text:
\section{Introduction}
\label{intro}

There has been considerable interest over the past several decades in developing algorithms that can compute the spectrum of an operator acting on a separable Hilbert space (see \S \ref{sec:connection_work} for a complete discussion regarding previous work). The problem has only recently been solved \cite{ben2015can, hansen2011solvability} and gave rise to the Solvability Complexity Index (SCI), the smallest number of (successive) limits needed to solve a computational problem. A potentially surprising consequence of this work has been the proof that for general operators, the best one can do is design an algorithm $\Gamma_{n_3,n_2,n_1}$ dependent on three indices with
$$
\lim_{n_3\rightarrow\infty}\lim_{n_2\rightarrow\infty}\lim_{n_1\rightarrow\infty}\Gamma_{n_3,n_2,n_1}(A)=\mathrm{Sp}(A).
$$
In other words the general spectral problem has $\mathrm{SCI}=3$. This explains why many computational spectral problems remain unsolved and opens the door to an infinite classification theory. This phenomenon is not just restricted to spectral problems but is also shared by other areas of computational mathematics. For example, the problem of root-finding of polynomials with rational maps initiated by S. Smale \cite{smale_question} is also subject to the issue of requiring several limits as established by C. McMullen \cite{McMullen1, mcmullen1988braiding} and P. Doyle \& C. McMullen in \cite{Doyle_McMullen}. These results can also be classified in the SCI hierarchy, as can many problems in, for example, optimisation, numerical solutions of PDEs and neural networks.
In this paper, we provide the first set of algorithms computing geometric properties of the spectrum of operators, such as the fractal dimensions, Lebesgue measure, different types of spectral radii/numerical ranges and the capacity of the spectrum.

Sharp classifications of problems in the SCI hierarchy establish the boundaries of what computers can achieve, whilst lower bounds prevent the search for algorithms that do not exist. On the other hand, constructive classifications lead to new algorithms that realise these sharp boundaries, whilst also providing insight into the original problem. Such algorithms solve problems in the sciences that were previously not possible, with several examples of this provided in this paper. Another motivation lies in the field of computer-assisted proofs, where computers are used to solve numerical problems. These have become essential in modern mathematics and, surprisingly, non-computable problems can be used in computer-assisted proofs. Indeed, the recent proof of Kepler's conjecture (Hilbert's 18th problem) \cite{Hales_Annals, hales_Pi}, led by T. Hales, on optimal packings of $3$-spheres, relies on such undecidable problems \cite{SCI_optimization}. The decision problems used are of the form of deciding feasibility of linear programs given irrational inputs. Another example is the Dirac--Schwinger conjecture on the asymptotic behaviour of ground states of certain Schr\"{o}dinger operators, which was proven in a series of papers by C. Fefferman and L. Seco \cite{fefferman1990, fefferman1992, fefferman1993aperiodicity,  fefferman1994, fefferman1994_2, fefferman1995, fefferman1996interval, fefferman1996, fefferman1997} using computer assistance. This proof also relies on computing non-computable problems. Whilst this may seem like a paradox, it can be explained by the SCI hierarchy (see the $\Sigma^A_1$ class described below, which become available for computer-assisted proofs). In fact, Hales, Fefferman and Seco implicitly prove $\Sigma^A_1$ classifications in the SCI hierarchy in their papers. Some of the problems considered in this paper, such as computing spectra of Hilbert--Schmidt perturbations of self-adjoint operators, are also found to be in the class $\Sigma^A_1$, meaning that they can used for computer-assisted proofs.

\subsection{Contribution of the paper}

This paper forms part II of a two-part series. In this paper we consider the following five long-standing open problems as well contributing to the study of the SCI hierarchy itself through point six:
\begin{enumerate}
  \item Computing spectra and pseudospectra of Hilbert--Schmidt perturbations of self-adjoint operators,
  \item Computing spectral radii, essential spectral radii, polynomial operator norms and the capacity of spectra,
	\item Computing the essential numerical range and the problem of determining whether spectral pollution occurs on the closure of an open set (or interval),
	\item Computing the Lebesgue measure of the spectrum and determining if it is zero,
	\item Computing fractal dimensions (when they exist) of the spectrum.
	\item We develop new tools to study problems with arbitrarily large SCI index (previous studies had been restricted to index at most three)
\end{enumerate}
Table \ref{result_table} shows a summary of the classification results proven in this paper.

For the first problem, we show that one can compute the spectrum (and pseudospectrum) in one limit with $\Sigma_1$ error control given a bound on the Hilbert--Schmidt norm of the perturbation. Hence this problem is, remarkably, no more difficult than the case of diagonal self-adjoint operators (which also have a $\Sigma_1$ classification \cite{colb1}). While the computation of spectral radii may seem easy (indeed it is for normal operators), we show that computing the spectral radius of a general bounded linear operator requires three limits. Thus the problem has  the same classification in the SCI hierarchy, and is just as difficult, as that of computing the spectrum itself \cite{ben2015can}. The motivation for more general quantities such as the capacity of the spectrum arises when studying Krylov type methods where it determines the speed of convergence \cite{nevanlinna2012convergence,nevanlinna1995hessenberg}.

The third problem is motivated by a vast literature on methods to compute spectra and has direct implications in the field of computational chemistry \cite{shabaev2004dual}. The most obvious method, the finite section method, computes $\mathrm{Sp}(P_nA{|_{P_n\mathcal{H}}})$ (or the projection onto a generally increasing sequence of linear subspaces). Whilst this behaves well for a self-adjoint operator $A$ outside the convex hull of the essential spectrum \cite{bottcher2001approximation}, it can behave arbitrarily badly within gaps of the essential spectrum, a phenomenon known as spectral pollution (see \cite{Pokrzywa_79} and \S \ref{fs_fails}). Paradoxically, we show that for self-adjoint operators, determining if spectral pollution occurs is strictly harder, in some case by two levels of the SCI hierarchy, than computing the spectrum itself. Hence, computing a failure flag for the finite section method is strictly harder than solving the original problem for which it was designed. As a consequence, we also establish the SCI of detecting gaps in the essential spectrum of a self-adjoint operator.

Problems three and four are motivated by great progress recently made in the field of Schr{\"o}dinger operators with random or almost periodic potentials \cite{damanik2016schrodinger,puig2004cantor,avila2006,avila2009ten,avila2007simplicity}. Perhaps surprisingly, Cantor-like spectra occur in many families of one-dimensional operators. Whilst much is known for 1D examples such as the Almost Mathieu operator or the Fibonacci Hamiltonian \cite{sutHo1989singular}, very little is known in higher dimensions \cite{damanik2015absolutely}. This is reflected by the difficulty of performing rigorous numerical studies \cite{even2006electronic}, despite many examples studied in the physics literature \cite{odagaki1986electronic,sire1989electronic,fuchs2016hofstadter,bandres2016topological,beckus2013spectrum}. The Lebesgue measure question has been studied most prominently for the Almost Mathieu operator and Fibonacci Hamiltonian \cite{sutHo1989singular}. Zero Lebesgue measure implies the absence of absolutely continuous spectrum, which is related to transport properties if the operator represents a Hamiltonian of a quantum system. The question of fractal dimension leads to an upper bound on the spreading of an initially localised wavepacket, and there has been work from physicists relating the fractal dimension to time-dependent quantities associated with wave functions \cite{ng2007wavepacket,ketzmerick1992slow,ketzmerick1997determines,wilkinson1994spectral}. Despite known results for specific models and the physical importance of these questions, there are no algorithms for determining the Lebesgue measure and fractal dimension of spectra for general operators or even banded self-adjoint operators. It is natural to ask whether such algorithms might exist. We answer this in the affirmative and design towers of algorithms that are numerically implementable. These are demonstrated numerically on a two dimensional model of a quasicrystal. In particular, we show numerical evidence that a portion of the spectrum of the graphical Laplacian on a Penrose tile is fractal with fractal dimension approximately $0.7$. However, we find that determining the Lebesgue measure and fractal dimensions are hard in the sense of the SCI. This helps to explain their difficulty, both numerically and theoretically.

The final contribution is needed in our study of problems three, and four and provides a new tool to prove lower bounds (impossibility results) in the SCI hierarchy. This is not just restricted to spectral problems and our proof technique can be adapted to other scenarios. We will make use of some classical results from descriptive set theory. In particular, we will show that for a certain special class of problems, the SCI hierarchy is equivalent to the Baire hierarchy.\footnote{However, this does not hold in general.} However, it should be stressed that this is not a paper on descriptive set theory (nor mathematical logic). Our discussion is entirely self-contained and user-friendly, in order to be applicable to a wide audience from a primarily computational foundations background.

Some of the algorithms are built on the approximation of the functions (or similar versions) defined by\footnote{We use $P_n$ to denote the orthogonal projection onto the linear span of the first $n$ basis vectors.}
$$
\gamma_{n}(z;A)=\min\{\sigma_1((A-zI){|_{P_n\mathcal{H}}}),\sigma_1((A^*-\bar{z}I){|_{P_n\mathcal{H}}})\},
$$
where $\sigma_1$ denotes the smallest singular value (or injection modulus). These functions converge to the resolvent norm $\|R(z,A)\|^{-1}$ (where $R(z,A)=(A-zI)^{-1}$) uniformly on compact subsets of $\mathbb{C}$ from above as $n\rightarrow\infty$. This idea was crucial in the solution of the long-standing computational spectral problem \cite{hansen2011solvability} and was used in \cite{colb1} to compute spectra with error control for a large class of operators. A theme of the proofs of the results presented here, especially those concerning Lebesgue measure and fractal dimensions, is the extension of these ideas to compute geometrical properties of the spectrum.

\begin{table}
\begin{center}
\addtolength{\leftskip} {-1.6cm}
    \addtolength{\rightskip}{-2cm}

\hspace{-0.5cm}\begin{tabular}{|p{7.4cm}|p{6.7cm}|l|}
\hline
 \rule{0pt}{1.1em}\textbf{Description of Problem}&\textbf{SCI Hierarchy Classification}&\textbf{Theorems}\\
 \hline
 \hline

 \rule{0pt}{1.1em}Computing spectrum and pseudospectrum of Hilbert--Schmidt perturbations of self-adjoint operators.&Without bounded dispersion: $\in\Sigma_2^A$, $\not\in\Delta_2^G$
With bounded dispersion: $\in\Sigma_1^A$, $\not\in\Delta_1^G$&\ref{compact_pert_spec_theorem}\\

\hline

\rule{0pt}{1.1em}Computing spectral radius.&\makecell[l]{Varies. e.g. Normal operators: $\in\Sigma_1^A$, $\not\in\Delta_1^G$,\\Controlled resolvent: $\in\Pi_2^A$, $\not\in\Delta_2^G$,\\General bounded operators: $\in\Pi_3^A$, $\not\in\Delta_3^G$}&\ref{spec_rad_thm}\\

\hline

\rule{0pt}{1.1em}Computing essential spectral radius.&\makecell[l]{Varies. e.g. Most classes: $\in\Pi_2^A$, $\not\in\Delta_2^G$,\\General bounded operators: $\in\Pi_3^A$, $\not\in\Delta_3^G$}&\ref{spec_rad_thm2}\\

\hline

\rule{0pt}{1.1em}Computing essential numerical range.&\makecell[l]{$\in\Pi_2^A$, $\not\in\Delta_2^G$}&\ref{spec_rad_thm2}\\

\hline

\rule{0pt}{1.1em}Computing polynomial operator norms.&\makecell[l]{Without bounded dispersion: $\in\Sigma_2^A$, $\not\in\Delta_2^G$\\
With bounded dispersion: $\in\Sigma_1^A$, $\not\in\Delta_1^G$}&\ref{spec_rad_thm3}\\

\hline

\rule{0pt}{1.1em}Computing capacity of spectrum.&\makecell[l]{Without bounded dispersion: $\in\Pi_3^A$, $\not\in\Delta_3^G$\\
With bounded dispersion: $\in\Pi_2^A$, $\not\in\Delta_2^G$}&\ref{spec_rad_thm3}\\

\hline

\rule{0pt}{1.1em}Computing gaps in essential spectrum.&\makecell[l]{$\in\Sigma_3^A$, $\not\in\Delta_3^G$}&\ref{spec_poll_hard}\\

\hline

\rule{0pt}{1.1em}Determining if the finite section method fails.&\makecell[l]{$\in\Sigma_3^A$, $\not\in\Delta_3^G$}&\ref{spec_poll_hard}\\

\hline

\rule{0pt}{1.1em}Computing Lebesgue measure of spectrum.&\makecell[l]{Varies. e.g.\\Bounded dispersion and diagonal: $\in\Pi_2^A$, $\notin\Delta_2^G$,\\Self-adjoint and general bounded: $\in\Pi_3^A$, $\notin\Delta_3^G$}&\ref{Leb_1}\\

\hline

\rule{0pt}{1.1em}Computing Lebesgue measure of pseudospectrum.&\makecell[l]{Varies. e.g.\\Bounded dispersion and diagonal: $\in\Sigma_1^A$, $\notin\Delta_1^G$,\\Self-adjoint and general bounded: $\in\Sigma_2^A$, $\notin\Delta_2^G$}&  \ref{Leb_2}\\

\hline

\rule{0pt}{1.1em}Determining if the Lebesgue measure of spectrum is zero.&\makecell[l]{Varies. e.g.\\Bounded dispersion and diagonal: $\in\Pi_3^A$, $\notin\Delta_3^G$,\\Self-adjoint and general bounded: $\in\Pi_4^A$, $\notin\Delta_4^G$}&\ref{Leb_3}\\

\hline

\rule{0pt}{1.1em}Computing Box-counting dimension of spectrum (when it exists).&\makecell[l]{Varies. e.g. Bounded dispersion and diagonal:\\$\in\Pi_2^A$, $\notin\Delta_2^G$, Self-adjoint: $\in\Pi_3^A$, $\notin\Delta_3^G$}&\ref{Box_dim}\\

\hline

\rule{0pt}{1.1em}Computing Hausdorff dimension of spectrum.&\makecell[l]{Varies. e.g. Bounded dispersion and diagonal:\\$\in\Sigma_3^A$, $\notin\Delta_3^G$, Self-adjoint: $\in\Sigma_4^A$, $\notin\Delta_4^G$}&\ref{haus_dim}\\

\hline

\end{tabular}
\vspace{3mm}
\caption{Summary of results. These are for the evaluation set (readable information) $\Lambda_1$ consisting of matrix values.}
\vspace{-3mm}
\label{result_table}
\end{center}
\end{table}

\subsection{SCI hierarchy}
\label{intro_sec_SCI}

To interpret Table \ref{result_table} and provide the reader with a short summary, we briefly describe the SCI hierarchy. A more complete description can be found in \S \ref{bigHth}. Given a computational model\footnote{Throughout, $G$ will denote a general algorithm and $A$ an arithmetic algorithm - see \S \ref{bigHth}.} $\alpha$ we define
\begin{itemize}
\item[(i)] $\Delta^{\alpha}_0 = \Pi^{\alpha}_0 = \Sigma^{\alpha}_0$ is the set of problems that can be solved in finite time.
\item[(ii)] $\Delta^{\alpha}_1$ is the set of problems that can be computed by passing to one limit, moreover, one has error control and knows a bound on the error committed.
\item[(iii)] $\Sigma^{\alpha}_1$ is the set of problems that can be computed by passing to one limit. Error control may not be possible, however, what the algorithm produces is included in the true solution (up to a controlled error).
\item[(iv)] $\Pi^{\alpha}_1$  is the set of problems that can be computed by passing to one limit. Error control may not be possible, however, what the algorithm produces includes the true solution (up to a controlled error).
\item[(v)] $\Delta^{\alpha}_2$ is the set of problems that can be computed by passing to one limit, however, error control may not be possible.
\item[(vi)] $\Delta^{\alpha}_{m+1}$ is the set of problems that can be computed by passing to $m$ limits.
\item[(vii)] $\Sigma^{\alpha}_{m}$ is the set of problems that can be computed by passing to $m$ limits, and computing the $m$-th limit is a $\Sigma^{\alpha}_1$ problem.
\item[(viii)] $\Pi^{\alpha}_{m}$ is the set of problems that can be computed by passing to $m$ limits, and computing the $m$-th limit is a $\Pi^{\alpha}_1$ problem.
 \end{itemize}

\newpage
This gives rise to the following structure:

\begin{equation}\label{SCI_hierarchy}
\begin{tikzpicture}[baseline=(current  bounding  box.center)]
  \matrix (m) [matrix of math nodes,row sep=1.2em,column sep=1.5em] {
  \Pi_0^{\alpha}   &                    & \MA{\Pi_1^{\alpha}} &    &  \Pi_2^{\alpha}&  & {}\\
  \Delta_0^{\alpha}&  \Delta_1^{\alpha} & \Sigma_1^{\alpha}\cup\Pi_1^{\alpha} & \Delta_2^{\alpha}&      \Sigma_2^{\alpha}\cup\Pi_2^{\alpha} & \Delta_3^{\alpha}& \cdots\\
	\Sigma_0^{\alpha}&                    & \MA{\Sigma_1^{\alpha}} & &  \Sigma_2^{\alpha}&  &{} \\
  };
 \path[-stealth, auto] (m-1-1) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$=$} (m-2-1)
																		(m-3-1) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$=$} (m-2-1)

																		(m-2-2) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-3)
																		(m-2-3) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-4)
																		(m-2-4) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-5)
																		(m-2-5) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-6)
																		(m-2-6) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-7)

												(m-2-1) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-2)
											 (m-2-2) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-1-3)
											(m-2-2) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-3-3)
											 (m-1-3) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-4)
																		(m-3-3) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-4)
																		(m-2-4) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-1-5)
											(m-2-4) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-3-5)
																		(m-1-5) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-6)
																		(m-3-5) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-2-6)
											(m-2-6) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-1-7)
																		(m-2-6) edge[draw=none]
                                    node [sloped, auto=false,
                                     allow upside down] {$\subsetneq$} (m-3-7);

\end{tikzpicture}
\end{equation}
It is precisely the classes $\Sigma_1$ and $\Pi_1$ that allow computer-assisted proofs. A visual demonstration of these classes for the Hausdorff metric are shown in Figure \ref{sigma_meaning}.

\begin{figure}
\centering
\includegraphics[width=0.7\textwidth,trim={0mm 0mm 0mm 0mm},clip]{drawing.pdf}
\caption{Meaning of $\Sigma_1$ and $\Pi_1$ convergence for problem function $\Xi$ computed in the Hausdorff metric. The red areas represent $\Xi(A)$ whereas the green areas represent the output of the algorithm $\Gamma_n(A)$. $\Sigma_1$ convergence means convergence as $n\rightarrow\infty$ but each output point in $\Gamma_n(A)$ is at most distance $2^{-n}$ from $\Xi(A)$. Similarly, in the case of $\Pi_1$, we have convergence as $n\rightarrow\infty$ but any point in $\Xi(A)$ is at most distance $2^{-n}$ from $\Gamma_n(A)$.}
\label{sigma_meaning}
\end{figure}

\subsection{Outline of paper}
The paper is organised as follows. In \S \ref{main_results_section} we summarise our main results regarding classification of computational spectral problems (see also \S \ref{sec:connection_work} for connections with previous work). Mathematical preliminaries needed in the proofs, including definitions of the SCI hierarchy and the new tool to provide lower bounds in the SCI hierarchy, are presented in \S \ref{bigHth}. Proofs of our results are then given in \S \ref{first_set_proofs}--\ref{pf_frac} and are presented separately from the theorems to allow the reader quick access to the main results. Applications and numerical examples are discussed in \S \ref{num_test}. In order to make the paper self-contained, we have included short appendices on the results/algorithms of \cite{colb1}, definitions of Turing towers and also a natural example where the box-counting dimension of the spectrum of a Schr\"odinger operator does not exist.

\section{The Main Results}
\label{main_results_section}
We are concerned with the following basic problem:

\begin{itemize}
\item[] {\it Given a computational spectral problem, where is it in the SCI hierarchy?}
\end{itemize}
All our upper bounds are constructed with easy to use algorithms. These algorithms achieve the boundary of what computers can achieve in spectral computations. We have included routines for some of the main algorithms in \S \ref{num_test} along with numerical demonstrations.

Throughout this paper, $A$ will be a bounded operator on $l^2(\mathbb{N})$ realised as a matrix with respect to the canonical basis. There are in general two basic natural sets of information that we allow our ``algorithms'' to read when computing spectral properties of $A$. The first is the set of evaluation functions $\Lambda_1$ consisting of the family of all functions $f^1_{i,j}: A\mapsto \langle Ae_j,e_i\rangle$, $i,j\in\mathbb{N}$, which provide the entries of the matrix representation of $A$ with respect to the canonical basis $\{e_i\}_{i\in \mathbb{N}}$. The second, which we denote by $\Lambda_2$, is the family $\Lambda_1$ together with all functions $f^2_{i,j}: A\mapsto \langle Ae_j,Ae_i\rangle$ and $f^3_{i,j}: A\mapsto \langle A^*e_j,A^*e_i\rangle$, $i,j\in\mathbb{N}$, which provide the entries of the matrix representation of $A^*A$ and $AA^*$ with respect to the canonical basis $\{e_i\}_{i\in \mathbb{N}}$. In general, the position of a computational problem in the SCI hierarchy depends on the evaluation set $\Lambda$.

The proofs of lower bounds make clear that all results still hold if we replace the respective sub-class $\Omega\subset\mathcal{B}(l^2(\mathbb{N}))=:\Omega_{\mathrm{B}}$ by the restriction to operators in $\Omega$ having operator norm at most $M\in\mathbb{R}_{>0}$, adding such a value $M$ (constant function) to the evaluation set $\Lambda$. When considering classes with functions $f$ (and $\{c_n\}$) and $g$ as in Definition \ref{def101} and equation (\ref{control_resolvent}), we will add these to the relevant evaluation set (evaluating $g$ at rational points) and with an abuse of notation still use the notation $\Lambda_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 $\Lambda_i$ will be pointed out where appropriate. The results proved in this paper extend to general separable Hilbert spaces $\mathcal{H}$ once one is given an orthonormal basis $e_1,e_2,...$ and matrix values of the operators with respect to this basis. This allows computations with operators naturally defined on lattices such as $\mathbb{Z}^d$ or more generally on graphs. Such operators are abundant in mathematical physics.

\begin{remark}[Models of computation]
All the results in this paper are proven for arithmetic and general towers as defined in \S \ref{bigHth}. However, for real life computations, we may not have access to nor be able to store the exact matrix elements of our operator, and we may not be able to test two numbers for equality (or perform exact arithmetic over $\mathbb{R}$). For instance, it might be the case that the matrix value is irrational or occurs from estimating an inner product. All of the algorithms constructed in this paper can be adapted to work over $\mathbb{Q}$ with inexact input data. This is described in more detail in Appendix \ref{turing_tower} - essentially we can collapse the error of inexact input and models of computation that cannot compute arithmetic over $\mathbb{R}$ into the first limit. We can also convert our constructed arithmetic towers of algorithms into (recursive) Turing towers of algorithms as defined in Appendix \ref{turing_tower}. As a consequence, the classification of many spectral problems does not depend on the model of computation used.
\end{remark}

\subsection{Hilbert--Schmidt perturbations}

We define the problem functions $\Xi_1(A)=\mathrm{Sp}(A)$ and $\Xi_2(A)=\mathrm{Sp}_{\epsilon}(A)$ taking values in the space of non-empty compact subsets of $\mathbb{C}$ equipped with Hausdorff metric. The pseudospectrum is given by
$$
\mathrm{Sp}_{\epsilon}(A)=\mathrm{Sp}(A)\cup\{z\notin\mathrm{Sp}(A):\left\|R(z,A)\right\|\geq1/\epsilon\},
$$
To state the results from \cite{colb1} we need two further definitions.

\begin{definition}
\label{def101}
We define for $f:\mathbb{N}\rightarrow\mathbb{N}$, $f(n)\geq n+1$
\begin{equation}
\begin{split}
&D_{f,n}(A) :=\max\big\{{\left\|(I-P_{f(n)})AP_n\right\|},{\left\|P_nA(I-P_{f(n)})\right\|}\big\},
\end{split}
\label{bd_disp2}
\end{equation}
where $P_n$ is the projection onto the span of $\{e_1,\hdots, e_n\}$.
\end{definition}
We also assume that we have an estimate $D_{f,n}(A) \leq c_n(A)\in\mathbb{Q}_{\geq0}$, where $c_n \rightarrow 0$ as $n \rightarrow \infty$. We let $\Omega_f$ denote the class of bounded operators with known function $f$ and $\{c_n\}$. Though sometimes the sequence $\{c_n\}$ is not needed and we will explicitly mention when this is the case. 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 their positions) then we know an $f$ with $c_n=0$ and clearly $\Lambda_1$ and $\Lambda_2$ are equivalent. We can then compute matrix elements of products of $A$ and $A^*$ using finitely many arithmetic operations. In the more general non sparse case, $f$ and $\{c_n\}$ can be used to compute matrix elements of products $A$ and $A^*$ with error control. Conversely, given $\Lambda_2$ we can compute an $f$ and $\{c_n\}$ simply by considering norms of truncated rows and columns. Hence knowledge of $f$ (with or without $\{c_n\}$) and use of evaluation functions in $\Lambda_2$ are subtly different. We have included $\Lambda_2$ since it is natural for problems posed in variational form.

Consider operators of the form
\begin{equation}
\label{self-adjoint_pert}
A=A_1+A_2,
\end{equation}
where $A_1$ is self-adjoint and $A_2$ is a Hilbert--Schmidt operator, namely $A_2$ is compact and its singular values are square summable. Note that we no not assume $A$ is self-adjoint. Denote the Hilbert--Schmidt norm by
\begin{equation}
\left\|A_2\right\|_{\mathrm{HS}}:=\mathrm{Tr}(A_2^*A_2)=\sqrt{\sum_{k\in\mathbb{N}}\left\|A_2e_k\right\|^2}.
\end{equation}
Let $\Omega_{\mathrm{HS}}^{N}$ denote the class of operators in $\Omega_{\mathrm{B}}$ of the form (\ref{self-adjoint_pert}) for which $\left\|A_2\right\|_{\mathrm{HS}}\leq N$. Let $\Omega_{\mathrm{HS}}^{N,f}$ denote the class of operators in $\Omega_{\mathrm{HS}}^{N}$ of bounded dispersion with respect to $f$ (known $f$ and sequence $\{c_n\}$)

\begin{theorem}
\label{compact_pert_spec_theorem}
We have the following classifications:
\begin{align*}
&\Delta^G_2 \not\owns \{\Xi_1,\Omega_{\mathrm{HS}}^{N},\Lambda_1\} \in \Sigma^A_2,\quad &&\Delta^G_2 \not\owns \{\Xi_2,\Omega_{\mathrm{HS}}^{N},\Lambda_1\} \in \Sigma^A_2,\\
&\Delta^G_1 \not\owns \{\Xi_1,\Omega_{\mathrm{HS}}^{N,f},\Lambda_1\} \in \Sigma^A_1,\quad &&\Delta^G_1 \not\owns \{\Xi_2,\Omega_{\mathrm{HS}}^{N,f},\Lambda_1\} \in \Sigma^A_1.
\end{align*}
\end{theorem}

\begin{remark}
Note that we include the case that $N=0$. This shows that it is no more difficult from a foundations point of view to compute the spectrum of Hilbert--Schmidt perturbed self-adjoint operators, than that of self-adjoint operators, assuming that we know a bound on the Hilbert--Schmidt norm of the perturbation.
\end{remark}

\subsection{Spectral radii, operator norms and capacity of spectrum}
\label{initial_bounded_theorems}

The spectral radius $r(A)$ of a bounded operator $A$ is the supremum of the absolute values of member of the spectrum (which is attained). Let $\Omega_\mathrm{N}$ denote the class of normal operators in $\Omega_{\mathrm{B}}$ and $\Omega_\mathrm{D}$ denote the self-adjoint diagonal operators in $\Omega_{\mathrm{N}}$. Recall also the definition of $\Omega_f$ and let $\Xi_r(A):=r(A)$. Let $g:\mathbb{R}_{+}\rightarrow\mathbb{R}_{+}$ be a strictly increasing, continuous function that vanishes only at $0$ with $\lim_{x\rightarrow\infty}g(x)=\infty$. Let $\Omega_g$ be the class of bounded operators with
\begin{equation}
\label{control_resolvent}
\left\|R(z,A)\right\|^{-1}\geq{g(\mathrm{dist}(z,\mathrm{Sp}(A)))},
\end{equation}
for $z\in\mathbb{C}.$
Note that such a $g$ is always guaranteed to exist, however, the classification in the SCI hierarchy 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$ in the operator theory literature and include the well studied class of hyponormal operators (operators with $A^*A-AA^*\geq0$) \cite{putnam1979operators}. It is known that if $A$ is $G_1$ then; if $\mathrm{Sp}(A)$ is real then $A$ is self-adjoint \cite{nieminen1962condition}, if $\mathrm{Sp}(A)$ is contained in the unit circle then $A$ is unitary \cite{donoghue1963problem} and if $\mathrm{Sp}(A)$ is finite then $A$ is normal \cite{stampfli1965hyponormal}. More generally, one can view the function $g$ as a measure of stability of the spectrum of $A$ through the formula
\begin{equation}
\mathrm{Sp}_{\epsilon}(A)=\bigcup_{B\in\Omega_{\mathrm{B}},\left\|B\right\|\leq\epsilon}\mathrm{Sp}(A+B).
\end{equation}
Hence $g$ generalises the notion of condition number in the problem of computing $\mathrm{Sp}(A)$.

Our proofs will show that the computational problem of the operator norm or numerical radius of any $A\in\Omega_{\mathrm{B}}$ lies in $\Sigma_1^A$. Hence we can easily get an upper bound (that may not be sharp) for $\Xi_r(A)$ in one limit. If an operator lies in $\Omega_g$ with $g(x)=x$, then it is well known that the convex hull of the spectrum is equal to the closure of the numerical range (the operator is convexoid) \cite{orland1964class} and hence the computational problem lies in $\Sigma_1^A$. One might expect that the computation of $\Xi_r(A)$ is strictly easier than that of the spectrum, particularly in light of Gelfand's famous formula $\Xi_r(A)=\lim_{n\rightarrow\infty}\|A^n\|^{\frac{1}{n}}$ However, the following shows that this intuition is false in general and only occurs if an operator is convexoid. Controlling the resolvent via a function $g$ as in \ref{control_resolvent} makes the problem easier than the general $\Omega_{\mathrm{B}}$, but is not sufficient to reduce the SCI of the problem to $1$.

\begin{theorem}
\label{spec_rad_thm}
Let $g:\mathbb{R}_{+}\rightarrow\mathbb{R}_{+}$ be a strictly increasing, continuous function that vanishes only at $0$ with $\lim_{x\rightarrow\infty}g(x)=\infty$. Suppose also that for some $\delta\in(0,1)$ it holds that $g(x)\leq (1-\delta)x$. Then:
\begin{align*}
&\Delta^G_1 \not\owns  \{\Xi_r,\Omega_\mathrm{D},\Lambda_1\} \in \Sigma^A_1,\quad&&\Delta^G_1 \not\owns  \{\Xi_r,\Omega_\mathrm{N},\Lambda_1\} \in \Sigma^A_1,\quad&&\Delta^G_1 \not\owns  \{\Xi_r,\Omega_f\cap\Omega_g,\Lambda_1\} \in \Sigma^A_1,\\
&\Delta^G_2 \not\owns  \{\Xi_r,\Omega_g,\Lambda_1\} \in \Sigma^A_2,\quad&&\Delta^G_2 \not\owns  \{\Xi_r,\Omega_f,\Lambda_1\} \in \Pi^A_2,\quad &&\Delta^G_3 \not\owns \{\Xi_r,\Omega_{\mathrm{B}},\Lambda_1\} \in \Pi^A_3.
\end{align*}
When considering the evaluation set $\Lambda_2$, the only changes are the following classifications:
\begin{align*}
&\Delta^G_1 \not\owns  \{\Xi_r,\Omega_g,\Lambda_2\} \in \Sigma^A_1,\quad&&\Delta^G_2 \not\owns \{\Xi_r,\Omega_{\mathrm{B}},\Lambda_2\} \in \Pi^A_2.
\end{align*}
\end{theorem}

\begin{remark}
The $\Pi_2^A$ algorithm for $\{\Xi_r,\Omega_f\}$ does not need a null sequence $\{c_n\}$ bounding the dispersion, $D_{f,n}(A)\leq c_n$, to be a basic algorithm since this is absorbed in the first limit.
\end{remark}

Next we consider the essential spectral radius. Define the essential spectrum of $A\in\Omega_{\mathrm{B}}$ as
$$
\mathrm{Sp}_{\mathrm{ess}}(A)=\bigcap_{B\in\Omega_C}\mathrm{Sp}(A+B),
$$
where $\Omega_C$ denotes the class of compact operators. The essential spectral radius, $\Xi_{er}(A)$, is simply the supremum of the absolute values over $\mathrm{Sp}_{\mathrm{ess}}(A)$.

\begin{theorem}
\label{spec_rad_thm2}
We have the following classifications for $i=1,2$:
\begin{align*}
&\Delta^G_2 \not\owns  \{\Xi_{er},\Omega_\mathrm{D},\Lambda_i\} \in \Pi^A_2,\quad&&\Delta^G_2 \not\owns  \{\Xi_{er},\Omega_\mathrm{N},\Lambda_i\} \in \Pi^A_2,\quad&&\Delta^G_2 \not\owns  \{\Xi_{er},\Omega_f,\Lambda_i\} \in \Pi^A_2.
\end{align*}
For general operators,
\begin{align*}
\Delta^G_3 \not\owns \{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_1\} \in \Pi^A_3,\quad \Delta^G_2 \not\owns \{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_2\} \in \Pi^A_2.
\end{align*}
\end{theorem}

As two final problems in this section, given a polynomial $p$ (of degree at least two), we consider the problem of computing $\Xi_{r,p}=\|p(A)\|$ and the capacity of the spectrum defined by
$$
\Xi_{cap}(A)=\inf_{\text{monic polynomial }p}\|p(A)\|^{\frac{1}{\mathrm{deg}(p)}}.
$$
Operators with $\Xi_{cap}(A)=0$ are known as quasialgebraic, and a Theorem of Halmos shows that this definition of capacity agrees with the usual potential-theoretic definition of capacity of the set $\mathrm{Sp}(A)$ \cite{halmos1971capacity}. This quantity is of particular interest in Krylov methods where, for instance, it is related to the speed of convergence\footnote{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. \cite{muller1992local}) it follows that generically the  asymptotic speeds are the same.} \cite{nevanlinna2012convergence,nevanlinna1995hessenberg}. Vaguely speaking, the capacity is a measure of the size of $\mathrm{Sp}(A)$ (a measure of its ability to hold electrical charge as opposed to volume). We will also see some other measures of size in \S \ref{Leb_sec} and \S \ref{frac_dims_sec}.

\begin{theorem}
\label{spec_rad_thm3}
We have the following classifications for $i=1,2$ and $\hat\Omega=\Omega_\mathrm{D},\Omega_f$:
\begin{align*}
&\Delta^G_1 \not\owns  \{\Xi_{r,p},\hat\Omega,\Lambda_i\} \in \Sigma^A_1,\quad&&\Delta^G_2 \not\owns  \{\Xi_{cap},\hat\Omega,\Lambda_i\} \in \Pi^A_2.
\end{align*}
For $\tilde\Omega=\Omega_\mathrm{N},\Omega_g$ or $\Omega_{\mathrm{B}}$,
\begin{align*}
&\Delta^G_2 \not\owns  \{\Xi_{r,p},\tilde\Omega,\Lambda_1\} \in \Sigma^A_2,\quad&&\Delta^G_3 \not\owns  \{\Xi_{cap},\tilde\Omega,\Lambda_1\} \in \Pi^A_3\\
&\Delta^G_1 \not\owns  \{\Xi_{r,p},\tilde\Omega,\Lambda_2\} \in \Sigma^A_1,\quad&&\Delta^G_2 \not\owns  \{\Xi_{cap},\tilde\Omega,\Lambda_2\} \in \Pi^A_2.
\end{align*}
\end{theorem}

\begin{remark}
Note here that we do not use the assumption $g(x)\leq (1-\delta)x$. We also fix the polynomial $p$ for the strongest possible negative results. However, the existence of the towers of algorithms also hold when considering the polynomial $p$ itself as an input. Finally, the proof shows the same classifications for the class of bounded self-adjoint operators as $\Omega_\mathrm{N}$ for these problems.
\end{remark}

\begin{remark}
A natural way of computing the spectral radius is through Gelfand's formula and $\Xi_{r,p}$. The extra limit incurred compared to the computation of $\Xi_{r,p}$ for $\Omega_f$ and $\Omega_{\mathrm{B}}$ is due to the need to consider the family of polynomials $x^n$ with $n\rightarrow\infty$.
\end{remark}

\begin{remark}
Somewhat surprising is the result that the computation of $\|p(A)\|$ requires two limits for normal operators. The proof will make clear that one reason for this is spectral pollution associated with finite section methods. This also shows that computing the capacity from first approximating the spectrum via finite sections, computing the $n$th  diameters of those approximations and letting $n\rightarrow\infty$ will not converge in general.
\end{remark}

\subsection{Gaps in essential spectra and detecting algorithm failure for finite section}
\label{fs_fails}

There has been considerable attention towards methods that detect spectral gaps (gaps in the essential spectrum) and eigenvalues within these gaps for self-adjoint operators \cite{carmona2012spectral,lewin2014spurious,boffi2000problem,Davies_sec_order,reed1978iv,klaus1981point,zijlstra2000density}, as well as studying the precise nature of spectral pollution \cite{rappaz1997spectral,davies2004spectral,lewin2010spectral,Marletta_pollution}. To state our theorems in this section, we need the definition of the essential numerical range:
$$
W_e(A)=\bigcap_{B\in\Omega_C}\overline{W(A+B)},
$$
where $W(T)=\{\langle Ax,x\rangle:\|x\|=1\}$ is the usual numerical range. If $A$ is hyponormal then $W_e(A)$ is the convex hull of the essential spectrum \cite{salinas1972operators}. To motivate this section we recall two theorems:

\begin{theorem}[Pokrzywa \cite{Pokrzywa_79}]\label{polish}
Let $A \in \mathcal{B}(\mathcal{H})$ and $\{P_n\}$ be a sequence of
finite-dimensional projections converging strongly to the
identity. Suppose that $S \subset W_e(A).$ Then there exists a sequence
$\{Q_n\}$ of finite-dimensional projections such that $P_n < Q_n$ (so
$Q_n \rightarrow I$ strongly) and
\[
d_{\mathrm{H}}(\mathrm{Sp}(A_n) \cup S, \mathrm{Sp}(\tilde A_n)) \rightarrow 0,
 \quad n \rightarrow \infty,
\]
where
\[
A_n = P_nA |_{P_n\mathcal{H}}, \qquad \tilde A_n =
Q_nA |_{Q_n\mathcal{H}}
\]
and $d_{\mathrm{H}}$ denotes the Hausdorff distance.
\end{theorem}

\begin{theorem}[Pokrzywa \cite{Pokrzywa_79}]\label{t:conv}
Let $A \in \mathcal{B}(\mathcal{H})$ and $\{P_n\}$ be a sequence of
finite-dimensional projections converging strongly to the
identity. If $\lambda \notin W_e(A)$ then $\lambda \in
\mathrm{Sp}(A)$ if and only if
$$
\mathrm{dist}(\lambda,\mathrm{Sp}( P_nA|_{P_n\mathcal{H}})) \longrightarrow 0,
\qquad n \rightarrow \infty.
$$
\end{theorem}

These say that spectral pollution, or failure of the finite section method, is confined to the essential numerical range and can be arbitrarily bad in $W_e(A)\backslash \mathrm{Sp}(A)$. We will show that detecting whether spectral pollution can occur is strictly harder than computing the spectrum for self-adjoint operators. In other words, detecting the failure of the finite section method is strictly harder than the problem it was designed to solve!

Denote the problem function $W_e(A)$ by $\Xi_{we}$. For a given open set $U$ in $\mathbb{F}$ ($\mathbb{F}$ being $\mathbb{C}$ or $\mathbb{R}$), let $\Xi_{poll}^{\mathbb{F}}$ be the decision problem
$$
\Xi_{poll}^{\mathbb{F}}(A,U)=\begin{cases}
1\text{ if }\overline{U}\cap(W_e(A)\backslash \mathrm{Sp}(A))\neq\emptyset\\
0\text{ otherwise.}
\end{cases}
$$
$\Xi_{poll}^{\mathbb{F}}$ decides whether spectral pollution can occur on the \textit{closed} set $\overline{U}$, which is assumed to have non-empty interior. For the self-adjoint case (where $\mathbb{F}=\mathbb{R}$), this is equivalent to asking whether there exists a point in the \textit{open} set $U$ which also lies in a gap of the essential spectrum. To incorporate $U$ into $\Lambda_i$, we allow access to a countable number of open balls $\{U_m\}_{m\in\mathbb{N}}$ whose union is $U$. If $\mathbb{F}$ is $\mathbb{R}$ then each $U_m$ is of the form $(a_m,b_m)$ with $a_m,b_m\in\mathbb{Q}\cup{\pm\infty}$, whereas if $\mathbb{F}$ is $\mathbb{C}$ then each $U_m$ is equal to $D_{r_m}(z_m)$ (the open ball of radius $r_m$ centred at $z_m$) with $r_m\in\mathbb{Q_+}\cup{\infty}$ and $z_m\in\mathbb{Q}+i\mathbb{Q}$. We then add pointwise evaluations of the relevant sequences $\{(a_m,b_m)\}$ or $\{(r_m,z_m)\}$ to $\Lambda_i$. Let $\Omega_\mathrm{SA}$ denote the class of self-adjoint operators in $\Omega_{\mathrm{B}}$.

\begin{theorem}
\label{spec_poll_hard}
Let $\Omega=\Omega_\mathrm{N},\Omega_\mathrm{SA}$ or $\Omega_{\mathrm{B}}$ and let $i=1,2$. Then
$$
\Delta^G_2 \not\owns  \{\Xi_{we},\Omega,\Lambda_i\} \in \Pi^A_2.
$$
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=\mathbb{F}$:
\begin{align*}
\Delta^G_3 \not\owns \{\Xi_{poll}^{\mathbb{R}},\Omega_\mathrm{SA},\Lambda_i\} \in \Sigma^A_3, \quad &&\Delta^G_3 \not\owns \{\Xi_{poll}^{\mathbb{C}},\Omega_{\mathrm{B}},\Lambda_i\} \in \Sigma^A_3.
\end{align*}
\end{theorem}

\begin{remark}
One can show that $\{\mathrm{Sp}(\cdot),\Omega_\mathrm{SA},\Lambda_1\}\in\Sigma_2^A$ and $\{\mathrm{Sp}(\cdot),\Omega_\mathrm{SA},\Lambda_2\}\in\Sigma_1^A$. Hence determining $\Xi_{poll}^\mathbb{R}$ is strictly harder than the spectral computational problem and requires two extra limits if $\Lambda=\Lambda_2$. Even in the general case, $\{\mathrm{Sp}(\cdot),\Omega_{\mathrm{B}},\Lambda_2\}\in\Pi_2^A$ and hence the spectral problem is strictly easier. The proofs also make clear that we get the same classification of $\Xi_{poll}^{\mathbb{F}}$ for other classes such as $\Omega_\mathrm{N}$, $\Omega_g$ etc.
\end{remark}

\subsection{Lebesgue measure of spectra}

\label{Leb_sec}

A basic property of $\mathrm{Sp}(A)$, connected also to physical applications in quantum mechanics, is its Lebesgue measure. Well studied operators such as the Almost Mathieu operator at critical coupling \cite{avila2006} or the Fibonacci Hamiltonian \cite{sutHo1989singular} have spectra with Lebesgue measure zero. The Lebesgue measure on $\mathbb{C}$ will be denoted by $\mathrm{Leb}$ and when considering classes of self-adjoint operators, the Lebesgue measure on $\mathbb{R}$ will be denoted by $\mathrm{Leb}_{\mathbb{R}}$. We will also consider
$$
\widehat{\mathrm{Sp}}_{\epsilon}(A)=\{z\in\mathbb{C}:\|R(z,A)\|^{-1}<\epsilon\},
$$
whose closure is $\mathrm{Sp}_\epsilon(A)$. For a class $\Omega\subset\Omega_{\mathrm{B}}$, there are three questions we are interested in and answer in this section:
\begin{enumerate}
	\item Given $A\in\Omega$, can we compute $\mathrm{Leb}(\mathrm{Sp}(A))$?
	\item Given $A\in\Omega$ and $\epsilon>0$, can we compute $\mathrm{Leb}(\widehat{\mathrm{Sp}}_{\epsilon}(A))$?
	\item Given $A\in\Omega$, can we determine whether $\mathrm{Leb}(\mathrm{Sp}(A))=0$?
\end{enumerate}
A few comments are in order. First, we do not consider the final question for the pseudospectrum since $\mathrm{Leb}(\widehat{\mathrm{Sp}}_{\epsilon}(A))>0$. Second, it might appear that answering the third question is at least as easy as the first. However, this could be false (and in general is), since we consider a problem function with range in a different metric space. For the first two questions, we consider the metric space $([0,\infty),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. Finally, we consider the computation of $\mathrm{Leb}(\widehat{\mathrm{Sp}}_{\epsilon}(A))$ since it is not immediately clear that the level sets
\begin{equation}
\label{level_sets}
S_{\epsilon}(A):=\{z\in\mathbb{C}:\left\|R(z,A)\right\|^{-1}=\epsilon\}
\end{equation}
always have Lebesgue measure zero. Again, this is analogous to the case of approximating the pseudospectra for bounded operators, where one uses the crucial property that the pseudospectrum cannot jump - it cannot be constant on open subsets of $\mathbb{C}$ for bounded operators acting on a separable Hilbert space \cite{shargorodsky2008level}. Assuming that the sets in (\ref{level_sets}) are null is the measure theoretic equivalent. Note, however, that it is straightforward to show that $S_{\epsilon}(A)$ is null for $A\in\Omega_{\mathrm{N}}$ through the formula $\|R(z,A)\|^{-1}=\mathrm{dist}(z,\mathrm{Sp}(A))$.

The above problem functions are denoted by $\Xi_1^{L},\Xi_2^{L}$ and $\Xi_3^{L}$ respectively. In analogy to computing the spectra/pseudospectra themselves, $\Xi_2^L$ is, in fact, the easiest to compute and can be done in one limit for a large class of operators. We also have from the dominated convergence theorem that
\begin{equation}
\label{eps_down_leb}
\lim_{\epsilon\downarrow 0}\mathrm{Leb}(\widehat{\mathrm{Sp}}_{\epsilon}(A))=\mathrm{Leb}(\mathrm{Sp}(A)).
\end{equation}
Recall the classes $\Omega_f$ and $\Omega_\mathrm{D}$ from \S\ref{initial_bounded_theorems}. Unless otherwise told, we will assume given $A\in\Omega_f$ that we know a null sequence $c_n$ such that $D_{f,n}(A)\leq c_n$. When considering $\Omega_\mathrm{D}$ or $\Omega_\mathrm{SA}$, we use $\mathrm{Leb}_{\mathbb{R}}$.

\subsubsection{Lebesgue measure of spectrum and pseudospectrum}
\label{Leb_sect1}

\begin{theorem}
\label{Leb_1}
Given the above set-up, we have the following classifications
\begin{equation*}
\Delta^G_2 \not\owns \{\Xi_1^L,\Omega_f,\Lambda_i\} \in \Pi^A_2, \quad \Delta^G_2 \not\owns  \{\Xi_1^L,\Omega_\mathrm{D},\Lambda_i\} \in \Pi^A_2 \quad i=1,2,
\end{equation*}
and for $\Omega=\Omega_{\mathrm{B}},\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$,
$$
\Delta^G_3 \not\owns \{\Xi_1^L,\Omega,\Lambda_1 \} \in \Pi^A_3,\quad \Delta^G_2 \not\owns \{\Xi_1^L,\Omega,\Lambda_2 \} \in \Pi^A_2.
$$
\end{theorem}

This shows that for $\Omega_{\mathrm{B}}$ or $\Omega_f$, the problem of computing the Lebesgue measure of the spectrum has the same SCI as that of computing the spectrum, but is strictly harder for self-adjoint operators. The constructed algorithm is also local, and we can easily adapt it to find the Lebesgue measure of $\mathrm{Sp}(A)$ intersected with any compact interval or cube in one or two dimensions respectively. It also does not need the sequence $\{c_n\}$. In other words, the evaluations of $\{c_n\}$ can be dropped from $\Lambda_i$ and the theorem remains true. The algorithm can also be restricted to $\mathbb{R}$ where it converges to $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(A)\cap\mathbb{R})$.

\begin{remark}
Although we consider $\Omega_\mathrm{D}$ with $\mathrm{Leb}_{\mathbb{R}}$ throughout, all the proven lower bounds hold when considering bounded diagonal operators (dropping the restriction of self-adjointness) and using $\mathrm{Leb}$ instead of $\mathrm{Leb}_{\mathbb{R}}$. The proofs trivially generalise to the two-dimensional Lebesgue measure without altering the SCI classification.
\end{remark}

We now turn to the SCI classification of $\mathrm{Leb}(\widehat{\mathrm{Sp}}_{\epsilon}(A))$ which is useful since it provides a route to computing $\mathrm{Leb}(\mathrm{Sp}(A))$ for any $A\in\Omega_{\mathrm{B}}$ via (\ref{eps_down_leb}). This is a similar state of affairs to the computation of the spectrum itself - one can approximate the spectrum via pseudospectra.

\begin{theorem}
\label{Leb_2}
Given the above set-up, we have the following classifications
\begin{equation*}
\Delta^G_1 \not\owns \{\Xi_2^L,\Omega_f,\Lambda_i\} \in \Sigma^A_1, \quad \Delta^G_1 \not\owns  \{\Xi_2^L,\Omega_\mathrm{D},\Lambda_i\} \in \Sigma^A_1 \quad i=1,2,
\end{equation*}
and for $\Omega=\Omega_{\mathrm{B}},\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$,
$$
\Delta^G_2 \not\owns \{\Xi_2^L,\Omega,\Lambda_1 \} \in \Sigma^A_2,\quad \Delta^G_1 \not\owns \{\Xi_2^L,\Omega,\Lambda_2 \} \in \Sigma^A_1.
$$
\end{theorem}

Heuristically, the pseudospectrum is a fattened up version of the spectrum and hence is less refined making the measure easier to estimate than for the spectrum. Another viewpoint is the analysis of the continuity points of the maps $\Xi_1^L$ and $\Xi_2^L$. For simplicity we shall consider these maps restricted to $\Omega_\mathrm{D}$ and equip these diagonal operators with the operator norm topology.
\begin{proposition}
\label{leb_cty}
In the above set-up, the following hold:
\begin{enumerate}
	\item $\Xi_1^L$ is continuous at $A\in\Omega_\mathrm{D}$ if and only if $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(A))=0$.
	\item $\Xi_2^L$ is continuous at all $A\in\Omega_\mathrm{D}$ if $\epsilon>0$.
\end{enumerate}
\end{proposition}
It follows that $\Xi_2^L$ is more stable than $\Xi_1^L$, explaining why it is easier to approximate. Again, this is the same state of affairs to comparing $\mathrm{Sp}(A)$ and $\mathrm{Sp}_{\epsilon}(A)$ as sets.

\subsubsection{When is $\mathrm{Leb}(\mathrm{Sp}(A))=0$?}
\label{Leb_sect4}

In this section we let $(\mathcal{M},d)$ be the set $\{0,1\}$ endowed with discrete topology and consider the problem function
\begin{equation}
\label{eval_disc}
\Xi_3^L(A)=
\begin{cases}
0\text{ if }\mathrm{Leb}(\mathrm{Sp}(A))>0\\
1\text{ otherwise.}
\end{cases}
\end{equation}

It is straightforward to build a height three tower for this problem based on \texttt{LebSpec}, the algorithm constructed in Theorem \ref{Leb_1}. This relies on \textit{monotonicity} of \texttt{LebSpec}. The next theorem shows that this is basic - even for the set of diagonal self-adjoint bounded operators. This demonstrates just how hard it is to answer decision problem questions about the spectrum with finite amounts of information, particularly when the questions involve a tool such as Lebesgue measure, which ignores countable sets.

\begin{theorem}
\label{Leb_3}
Given the above set-up, we have the following classifications
$$
\Delta^G_3\not\owns\{\Xi_3^L,\Omega_f,\Lambda_i\}\in\Pi^A_3,\quad \Delta^G_3\not\owns\{\Xi_3^L,\Omega_\mathrm{D},\Lambda_i\}\in\Pi^A_3, \quad i=1,2,
$$
and for $\Omega=\Omega_{\mathrm{B}},\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$,
$$
\Delta^G_4\not\owns\{\Xi_3^L,\Omega,\Lambda_1\}\in\Pi^A_4, \quad \Delta^G_3\not\owns\{\Xi_3^L,\Omega,\Lambda_2\}\in\Pi^A_3.
$$
\end{theorem}

\begin{remark}
These are the first examples of computational spectral problems that require four limits to compute in the SCI hierarchy. To prove this, we need some tools from descriptive set theory/classical computational theory in \S \ref{bigHth}. Note that we prove the lower bounds for \textit{general} algorithms, so regardless of the model of computation.
\end{remark}

\subsection{Fractal dimensions of spectra}
\label{frac_dims_sec}

If one knows that the spectrum of an operator has zero Lebesgue measure, it is natural to ask about its fractal dimension. This question is not just borne out of mathematical curiosity, for instance the fractal dimension leads to an upper bound on the spreading of an initially localised wavepacket \cite{damanik2008fractal}. However, estimating the fractal dimension is extremely difficult (see \cite{puelz2015spectral} for a method using periodic approximations). One possible reason is that it is not possible to construct a height one tower of algorithms, even for the most basic definition of fractal dimension, the box-counting dimension. The Hausdorff dimension is even worse and has $\text{SCI}\geq 3$. In this section we will exclusively treat self-adjoint operators and hence seek fractal dimensions of subsets of $\mathbb{R}$.\footnote{The proofs for general self-adjoint operators can be adapted with an additional limit and the use of two-dimensional covering boxes to treat the class of general bounded operators. Some care must be needed involving boundaries of covering boxes for the Hausdorff dimension, but we omit the details.}

\subsubsection{Box-Counting Dimension}
\label{frac_dim1}

Let $F$ be a bounded set in some Euclidean space and $N_{\delta}(F)$ be the number of closed boxes of side length $\delta>0$ required to cover $F$. Define the upper and lower box-counting dimensions as
\begin{equation}
\begin{split}
\overline{\mathrm{dim}}_B(F)&=\limsup_{\delta\downarrow{}0}\frac{\log(N_{\delta}(F))}{\log(1/\delta)},\\
\underline{\mathrm{dim}}_B(F)&=\liminf_{\delta\downarrow{}0}\frac{\log(N_{\delta}(F))}{\log(1/\delta)}.
\end{split}
\end{equation}
When both are equal, we can replace the $\liminf$ and $\limsup$ by $\lim$ and we define the common value as the box-counting dimension $\mathrm{dim}_B(F)$, an example of a fractal dimension. The major drawback of this definition is lack of countable stability, for instance the box-counting dimension of $\{0,1,1/2,1/3,...\}$ is $1/2$. Examples also exist of closed cantor sets for which the upper and lower dimensions do not agree \cite{falconer2004fractal} and we present a natural example occurring as the spectrum of a discrete Schr{\"o}dinger operator in Appendix \ref{append_AM}. In the one-dimensional case, it is easy to prove that if $F$ is measurable with $\overline{\mathrm{dim}}_B(F)<1$ then $\mathrm{Leb}_{\mathbb{R}}(F)=0$. The converse is false by considering countable unions of cantor sets whose Hausdorff dimension tends to 1 and similar results hold in higher dimensions. We shall show that we can compute the box-counting dimension in two limits.

Let $\Omega_{f}^{BD}$ be the class of self-adjoint operators in $\Omega_f$ (see \ref{bd_disp2}) whose upper and lower box-counting dimensions of the spectrum agree. Let $\Omega_{\mathrm{SA}}^{BD}$ be the class of self-adjoint operators whose upper and lower box-counting dimensions of the spectrum agree and denote by $\Omega_{\mathrm{D}}^{BD}$ the class of diagonal operators in $\Omega_{\mathrm{SA}}^{BD}$.

\begin{theorem}
\label{Box_dim}
Let $\Xi_B$ be the evaluation of box-counting dimension of spectra, then for $i=1,2$ and $\Omega=\Omega_{f}^{BD}$ or $\Omega_{\mathrm{D}}^{BD}$
$$
\Delta^G_2\not\owns\{\Xi_B,\Omega,\Lambda_i\}\in\Pi^A_2,
$$
whereas
$$
\Delta^G_3\not\owns\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_1\}\in\Pi^A_3,\quad \Delta^G_2\not\owns\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_2\}\in\Pi^A_2.
$$
\end{theorem}

\begin{remark}The algorithms also converge without the assumption that the upper and lower box-counting dimensions agree, to a quantity $\Gamma(A)$ with
$$
\underline{\mathrm{dim}}_B(\mathrm{Sp}(A))\leq \Gamma(A)\leq\overline{\mathrm{dim}}_B(\mathrm{Sp}(A)).
$$
\end{remark}

\subsubsection{Hausdorff Dimension}
\label{frac_dim2}

A more complicated, yet robust notion of fractal dimension is related to the Hausdorff measure. For the connection and various other measures that give rise to the same dimension we refer the reader to \cite{falconer2004fractal,mattila1999geometry}. Let $F\subset\mathbb{R}^n$ be a Borel set in $n$-dimensional Euclidean space and let $\mathcal{C}_{\delta}(F)$ denote the class of (countable) $\delta$-covers\footnote{That is, the set of covers $\{U_i\}_{i\in I}$ with $I$ at most countable and with $\mathrm{diam}(U_i)\leq\delta$.} of $F$. One first defines the quantity (for $d\geq0$)
$$
\mathcal{H}^{d}_{\delta}(F)=\inf\big\{\sum_i\mathrm{diam}(U_i)^d:\{U_i\}\in\mathcal{C}_{\delta}(F)\big\},
$$
and the $d$-dimensional Hausdorff measure of $F$ by
$$
\mathcal{H}^{d}(F)=\lim_{\delta\downarrow0}\mathcal{H}^{d}_{\delta}(F).
$$
There is a unique $d'=\mathrm{dim}_{H}(F)\geq0$, the Hausdorff dimension of $F$, such that $\mathcal{H}^{d}(F)=0$ for $d>d'$ and $\mathcal{H}^{d}(F)=\infty$ for $d<d'$.

One can prove that
\begin{equation}
\mathrm{dim}_{H}(F)\leq\underline{\mathrm{dim}}_B(F)\leq\overline{\mathrm{dim}}_B(F).
\end{equation}
One of the properties that makes the Hausdorff dimension harder to compute than the box-counting dimension is its countable stability (if $F$ is countable then $\mathrm{dim}_H(F)=0$). The following lemma is used in the construction of a basic algorithm, \texttt{HausDim}, for computing the Hausdorff dimension but is interesting in its own right so is listed here.

\begin{lemma}
\label{halt_test}
Let $(a,b)\subset\mathbb{R}$ be a finite open interval and let $A\in\Omega_f\cap\Omega_\mathrm{SA}$. Then determining whether
$
\mathrm{Sp}(A)\cap(a,b)\neq\emptyset
$
using $\Lambda_i$ is a problem with $\mathrm{SCI}_A=1$. Furthermore, we can design an algorithm that halts if and only the answer is ``Yes'', that is, the problem lies in $\Sigma^A_1$. Similarly the problem lies in $\Sigma_2^A$ when considering $\Omega_\mathrm{SA}$ with $\Lambda_1$ (or $\Sigma_1^A$ when we allow access to $\Lambda_2$).
\end{lemma}

\begin{theorem}
\label{haus_dim}
Let $\Xi_H$ be the evaluation of the Hausdorff dimension of spectra, then for $i=1,2$ and $\Omega=\Omega_\mathrm{D}$ or $\Omega_f\cap\Omega_\mathrm{SA}$
$$
\Delta^G_3\not\owns\{\Xi_H,\Omega,\Lambda_i\}\in\Sigma^A_3,
$$
whereas
$$
\Delta^G_4\not\owns\{\Xi_H,\Omega_\mathrm{SA},\Lambda_1\}\in\Sigma^A_4,\quad \Delta^G_3\not\owns\{\Xi_H,\Omega_\mathrm{SA},\Lambda_2\}\in\Sigma^A_3.
$$
\end{theorem}

\begin{remark}
The results in this section and \S \ref{Leb_sec} can be interpreted in terms of real bounded sequences. Given such a sequence $\{a_i\}_{i\in\mathbb{N}}$ we can ask the same questions about $\overline{\{a_1,a_2,...\}}$ as we have asked about the spectrum. We can embed these problems as spectral problems for the class $\Omega_\mathrm{D}$ of bounded self-adjoint diagonal operators, by simply considering diagonal operators with entries $\{a_1,a_2,...\}$. Theorems \ref{Leb_1}, \ref{Leb_3}, \ref{Box_dim} and \ref{haus_dim} 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 numerical examples below. This was studied in \cite{stewart2001towards} numerically and has also been approached statistically \cite{hunt1990error}, assuming that the samples are taken from a probability distribution. Once we have the framework of the SCI we can immediately see why the problem is so difficult - the computational problem requires three limits for the Hausdorff dimension.
\end{remark}

\subsection{Connection to previous work}\label{sec:connection_work}
There is, of course, a vast literature on spectral computation and thus we can only cite a small subset that has motivated the developments in this paper. Using computational and algorithmic approaches to obtain spectral information dates at least as far back to work by E. Schr\"odinger \cite{schrodinger1940method}. Since then, many notable mathematicians and physicists have studies such problems \cite{anderson1958absence,Schwinger,weyl1950theory,Digernes}. With regards to the finite section method, the reader is referred to the pioneering work by A. B{\"o}ttcher \cite{Albrecht_Fields, Bottcher_pseu} and A. B{\"o}ttcher \& B. Silberman \cite{Bottcher_book, bottcher2006analysis}, see also A. B{\"o}ttcher, H. Brunner, A. Iserles \& S. N{\o}rsett \cite{Arieh2}, M. Marletta \cite{Marletta_pollution}, M. Marletta \& R. Scheichl \cite{Marletta_Spec_gaps} and Seidel \cite{seidel2014fredholm}. Some of these papers also discuss the failure of the finite section approach for certain classes of operators, see also \cite{Hansen_PRS, Hansen_JFA}. Another important result is that of  E. Shargorodsky \cite{Shargorodsky1} demonstrating how second order spectra methods \cite{Davies_sec_order} (a variant of the finite section method) will never recover the whole spectrum.

Relevant results linking spectral computations to the $C^*$-algebra literature can be found in the work of W. Arveson in \cite{Arveson_cnum_lin94, Arveson_noncommute93,Arveson_role_of94} and Brown in \cite{brown2007quasi, Brown_2006}, see also \cite{brown2002} where variants of finite section analysis is implicitly used. Arveson also considered spectral computation in terms of densities, which is related to G. Szego's work \cite{Szego} on finite section approximations. A. Laptev and Y. Safarov also obtained similar results \cite{Laptev}. Typically, when applied to appropriate subclasses of operators, finite section approaches yield $\Delta^A_2$ classification results.

Another approach based on the infinite QR algorithm (in connection with Toda flows with infinitely many variables) was pioneered by P. Deift, L. Li and C. Tomei \cite{deift} and studied from a numerical perspective in \cite{colb2}. This approach has been continued and refined by S. Olver, A. Townsend and M. Webb, where they have provided a practical framework for infinite-dimensional linear algebra and foundational results on computations with infinite data structures \cite{Webb_Olver2017,Olver_Townsend_Proceedings, Olver_SIAM_Rev, Olver_code1, Olver_code2}.

The pioneering work by C. Fefferman and L. Seco \cite{fefferman1990, fefferman1992, fefferman1993aperiodicity, fefferman1994, fefferman1994_2, fefferman1995, fefferman1996interval, fefferman1996, fefferman1997}  on proving the Dirac--Schwinger conjecture is a striking example of computations used in order to obtain complete information about the asymptotical behaviour of the ground state of a family of Schr\"odinger operators. The fascinating computer-assisted proof implicitly proves $\Sigma^A_1$ classifications in the SCI hierarchy. Moreover, the paper \cite{feffermanCPAM} by Fefferman is based on similar approaches. We also want to highlight the work by L. Demanet and W. Schlag \cite{Demanet} as well as P. Hertel, E. Lieb and W. Thirring \cite{Lieb}.
Although T. Hale's program on proving Kepler's conjecture (Hilbert's 18th problem) does not involve spectral computations, it may be of interest to the reader as it is based on computing problems that are in $\Sigma^A_1$ and not $\Delta_1^A$ (the class of problems that are defined as computable by Turing).

Finally, the work of M. Zworski \cite{Zworski1, zworski1999resonances} on computing resonances can also be viewed in terms of the SCI hierarchy. In particular, the computational approach \cite{Zworski1} is based on expressing the resonances as limits of non-self-adjoint spectral problems (see also \cite{sjostrand1999asymptotic}).

\section{Mathematical Preliminaries and a New Tool}
\label{bigHth}

We begin by properly defining the Solvability Complexity Index (SCI) hierarchy which is needed to show that our algorithms realise the boundary of what digital computers can do. An algorithm that is sharp with respect to the SCI will be called \textit{basic}. The SCI was first introduced in \cite{hansen2011solvability} where it was shown that the SCI $\leq 3$ for the computation of spectra of general operators. A result shown to be sharp in \cite{ben2015can}. However, for operators with more structure, for example, Schr\"{o}dinger operators, the spectral problem is fortunately much lower in the SCI hierarchy, with the first basic algorithms appearing in \cite{colb1}.

The basic objects of a computational problem are:
$\Omega$ is some set, called the \emph{primary} set,
$\Lambda$ is a set of complex-valued functions on $\Omega$ (we allow any such function to map to some finite-dimensional space $\mathbb{C}^N$), called the \emph{evaluation} set,
$\mathcal{M}$ is a metric space (typically in this paper a subset of $\mathbb{R}$, the discrete space $\{0,1\}$ representing decision problems or the Hausdorff metric on non-empty compact subsets of $\mathbb{C}$), and $\Xi:\Omega\to \mathcal{M}$ is called the \emph{problem} function. The set $\Omega$ is the set of objects that give rise to our computational problems. The problem function $\Xi : \Omega\to \mathcal{M}$ is what we are interested in computing. Finally, the set $\Lambda$ is the collection of functions that provide us with the information we are allowed to read. The collection $\{\Xi,\Omega,\mathcal{M},\Lambda\}$ is referred to as a computational problem.
\begin{definition}[General Algorithm]\label{Gen_alg}
Given a  computational problem $\{\Xi,\Omega,\mathcal{M},\Lambda\}$, a \emph{general algorithm} is a mapping $\Gamma:\Omega\to \mathcal{M}$ such that for each $A\in\Omega$
\begin{itemize}
\item[(i)] there exists a finite subset of evaluations $\Lambda_\Gamma(A) \subset\Lambda$,
\item[(ii)]  the action of $\,\Gamma$ on $A$ only depends on $\{A_f\}_{f \in \Lambda_\Gamma(A)}$ where $A_f := f(A),$
\item[(iii)]  for every $B\in\Omega$ such that $B_f=A_f$ for every $f\in\Lambda_\Gamma(A)$, it holds that $\Lambda_\Gamma(B)=\Lambda_\Gamma(A)$.
\end{itemize}
\end{definition}

Note that the definition of a general algorithm is more general than the definition of a Turing machine or a Blum--Shub--Smale (BSS) machine. One can establish that the SCI hierarchy does not collapse (in particular for the spectral problem) regardless of the model of computation. 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 \emph{adaptively} choose the finite amount of information it reads depending on the input. Condition (iii) assures that the algorithm reads the information in a consistent way. A \emph{tower of algorithms of height $k$
 for $\{\Xi,\Omega,\mathcal{M},\Lambda\}$} is then a family of sequences of functions
 $$\Gamma_{n_k}:\Omega
\rightarrow \mathcal{M},\ \Gamma_{n_k, n_{k-1}}:\Omega
\rightarrow \mathcal{M},\dots,\ \Gamma_{n_k, \hdots, n_1}:\Omega \rightarrow \mathcal{M},
$$
where $n_k,\hdots,n_1 \in \mathbb{N}$ and the functions $\Gamma_{n_k, \hdots, n_1}$ at the ``lowest level'' of the tower are general algorithms in the sense of Definition \ref{Gen_alg}. Moreover, for every $A \in \Omega$,
$$
\Xi(A)= \lim_{n_k \rightarrow \infty} \Gamma_{n_k}(A), \quad \Gamma_{n_k, \hdots, n_{j+1}}(A)= \lim_{n_j \rightarrow \infty} \Gamma_{n_k, \hdots, n_j}(A) \quad j=k-1,\dots,1.
$$
When considering arithmetic towers, each lowest level function
 $$
 \Gamma = \Gamma_{n_k, \hdots, n_1} :\Omega \rightarrow \mathcal{M}
 $$ must satisfy the following:
 For each $A\in\Omega$
the action of $\,\Gamma$ on $A$ consists of only finitely many arithmetic operations and comparisons on
$\{A_f\}_{f \in \Lambda_\Gamma(A)}$.

\begin{remark}
In Appendix \ref{turing_tower} we also briefly discuss the problem of inexact input, restricting computation to $\mathbb{Q}$ and recursivity through the definition of a Turing tower. All of the results of this paper extend to this type of tower also.
\end{remark}

A computational problem $\{\Xi,\Omega,\mathcal{M},\Lambda\}$ is said to have Solvability Complexity Index $\mathrm{SCI}(\Xi,\Omega,\mathcal{M},\Lambda)_{\alpha} = k$, with respect to a tower of algorithms of type $\alpha$, if $k$ is the smallest integer for which there exists a tower of algorithms of type $\alpha$ of height $k$. If no such tower exists then $\mathrm{SCI}(\Xi,\Omega,\mathcal{M},\Lambda)_{\alpha} = \infty.$ If there exists a tower $\{\Gamma_n\}_{n\in\mathbb{N}}$ of type $\alpha$ and height one such that $\Xi = \Gamma_{n_1}$ for some $n_1 < \infty$, then we define $\mathrm{SCI}(\Xi,\Omega,\mathcal{M},\Lambda)_{\alpha} = 0$. The type $\alpha$ may be General, or Arithmetic, denoted respectively $G$ and $A$. Consider a collection $\mathcal{C}$ of computational problems and let $\mathcal{T}$ be the collection of all towers of algorithms of type $\alpha$ for the computational problems in $\mathcal{C}$.
We then define
\begin{equation*}
\begin{split}
\Delta^{\alpha}_0 &:= \{\{\Xi,\Omega\} \in \mathcal{C} \ \vert \   \mathrm{SCI}(\Xi,\Omega)_{\alpha} = 0\},\\
\Delta^{\alpha}_{1} &:= \{\{\Xi,\Omega\}  \in \mathcal{C}   \  \vert \ \exists \ \{\Gamma_n\}_{n\in \mathbb{N}} \in \mathcal{T}\text{ s.t. } \forall A \ d(\Gamma_n(A),\Xi(A)) \leq 2^{-n}\},\\
\Delta^{\alpha}_{m+1} &:= \{\{\Xi,\Omega\}  \in \mathcal{C} \ \vert \   \mathrm{SCI}(\Xi,\Omega)_{\alpha} \leq m\}, \qquad \quad m \in \mathbb{N}.
\end{split}
\end{equation*}

When there is extra structure on the metric space, one can extend the SCI hierarchy in order to capture a precise sense of error control in the final limit. The two examples used in this paper are the following, with the Hausdorff metric case shown in Figure \ref{sigma_meaning}.

\begin{definition}[The SCI Hierarchy (Hausdorff metric)]
Given the above set-up, suppose in addition that $\mathcal{M}$ is a metric space with the Hausdorff metric induced by another metric space $\mathcal{M}^{\prime}$.
Define for $m \in \mathbb{N}$
\begin{equation*}
\begin{split}
\Sigma^{\alpha}_0 &= \Pi^{\alpha}_0 = \Delta^{\alpha}_0,\\
\Sigma^{\alpha}_{1} &= \{\{\Xi,\Omega\} \in \Delta_{2} \ \vert \  \exists \ \Gamma_{n} \in \mathcal{T}\text{ s.t. }  \ \Gamma_{n}(A)  \mathop{\subset}_{\mathcal{M}^{\prime}} B^{\mathcal{M}}_{2^{-n}}(\Xi(A)) \ \ \forall A \in \Omega\},
\\
\Pi^{\alpha}_{1} &= \{\{\Xi,\Omega\} \in \Delta_{2} \ \vert \  \exists \ \Gamma_{n}  \in \mathcal{T} \text{ s.t. } B^{\mathcal{M}}_{2^{-n}}(\Gamma_{n}(A))  \mathop{\supset}_{\mathcal{M}^{\prime}} \Xi(A) \ \ \forall A \in \Omega\}.
\end{split},
\end{equation*}
where $\mathop{\subset}_{\mathcal{M}^{\prime}}$ means inclusion in the metric space $\mathcal{M}^{\prime}$, and $B^{\mathcal{M}}_{\delta}(\cdot)$ denotes the closed $\delta$-ball in the metric space $\mathcal{M}$. There is a slight abuse of notation as we interpret $B^{\mathcal{M}}_{2^{-n}}(x)$ as a subset of $\mathcal{M}^{\prime}$ by identifying it with $\bigcup\{S \subset \mathcal{M}^{\prime} \, \vert \, S \in \mathcal{M}, d_{\mathcal{M}}(S,x) \leq 2^{-n}\}.$
Moreover,
\begin{equation*}
\begin{split}
\Sigma^{\alpha}_{m+1} &= \{\{\Xi,\Omega\} \in \Delta_{m+2} \ \vert \  \exists \ \Gamma_{n_{m+1}, \hdots, n_1} \in \mathcal{T} \text{ s.t. }\ \Gamma_{n_{m+1}}(A) \mathop{\subset}_{\mathcal{M}^{\prime}} B^{\mathcal{M}}_{2^{-n_{m+1}}}(\Xi(A))  \ \, \forall A \in \Omega\},\\
\Pi^{\alpha}_{m+1} &= \{\{\Xi,\Omega\} \in \Delta_{m+2} \ \vert \  \exists \ \Gamma_{n_{m+1}, \hdots, n_1} \in \mathcal{T} \text{ s.t. }  \ B^{\mathcal{M}}_{2^{-n_{m+1}}}(\Gamma_{n_{m+1}}(A))  \mathop{\subset}_{\mathcal{M}^{\prime}} \Xi(A) \ \, \forall A \in \Omega\}.
\end{split}
\end{equation*}
\end{definition}

\begin{definition}[The SCI Hierarchy (totally ordered set)]
Given the above set-up, suppose in addition that $\mathcal{M}$ is a totally ordered set.
Define
\begin{equation*}
\begin{split}
\Sigma^{\alpha}_0 &= \Pi^{\alpha}_0 = \Delta^{\alpha}_0,\\
\Sigma^{\alpha}_{1} &= \{\{\Xi,\Omega\} \in \Delta_{2} \ \vert \  \exists \ \Gamma_{n} \in \mathcal{T} \text{ s.t. } \Gamma_{n}(A) \nearrow \Xi(A) \ \, \forall A \in \Omega\},
\\
\Pi^{\alpha}_{1} &= \{\{\Xi,\Omega\} \in \Delta_{2} \ \vert \  \exists \ \Gamma_{n} \in \mathcal{T} \text{ s.t. } \Gamma_{n}(A) \searrow \Xi(A) \ \, \forall A \in \Omega\},
\end{split}
\end{equation*}
where $\nearrow$ and $\searrow$ denotes convergence from below and above respectively,
as well as, for $m \in \mathbb{N}$,
\begin{equation*}
\begin{split}
\Sigma^{\alpha}_{m+1} &= \{\{\Xi,\Omega\} \in \Delta_{m+2} \ \vert \  \exists \ \Gamma_{n_{m+1}, \hdots, n_1} \in \mathcal{T} \text{ s.t. }\Gamma_{n_{m+1}}(A) \nearrow \Xi(A) \ \, \forall A \in \Omega\}, \\
\Pi^{\alpha}_{m+1} &= \{\{\Xi,\Omega\} \in \Delta_{m+2} \ \vert \  \exists \ \Gamma_{n_{m+1}, \hdots, n_1} \in \mathcal{T} \text{ s.t. }\Gamma_{n_{m+1}}(A) \searrow \Xi(A) \ \, \forall A \in \Omega\}.
\end{split}
\end{equation*}
\end{definition}

A basic tower of algorithms is then simply a tower that realises the correct classification in the SCI Hierarchy of a given class of problems. Next, we shall 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 proven here hold for towers of \textit{general} algorithms without restrictions to arithmetic operations or notions of recursivity etc. This will be used extensively in the proofs of lower bounds for spectral problems that have $\mathrm{SCI}>2$, where we typically reduce the problems discussed here to the given spectral problem. The technique can often be quite fiddly and depends on the problem at hand.

It is beyond the scope of this paper to provide an extensive discussion of the topics in this section, but we refer the reader to \cite{kechris1987descriptive,moschovakis2009descriptive} for excellent introductions to descriptive set theory that cover the main ideas.\footnote{The reader wishing to assimilate the bare minimum quickly will find Chapter 2 of \cite{kechris1987descriptive} sufficient for this section.} It should be stressed that such a link to existing hierarchies only exists in special cases (when $\Omega$ and $\mathcal{M}$ are particularly well behaved) and even when it does, the induced topology on $\Omega$ is often too complicated/unnatural or too strong to be useful from a computational viewpoint. We also take the view that often for problems of scientific interest, the mappings $\Lambda$ and metric space $\mathcal{M}$ are given to us apriori from the corresponding applications and may not be compatible with topological viewpoints of computation.

\subsection{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. Let $X$ be a metric space and define
$$
\Sigma_1^0(X)=\{U\subset X:U\text{ is open}\},\quad \Pi_1^0(X)=\sim\hspace{-1mm}\Sigma_1^0(X)=\{F\subset X:F\text{ is closed}\},
$$
where for a class $\mathcal{U}$, $\sim\hspace{-1mm}\mathcal{U}$ denotes the class of complements (in $X$) of elements of $\mathcal{U}$. Inductively define
\begin{align*}
\Sigma^0_\xi(X)&=\{\cup_{n\in\mathbb{}N}A_n:A_n\in\Pi^0_{\xi_n},\xi_n<\xi\},\text{ if }\xi>1,\\
\Pi_\xi^0(X)&=\sim\hspace{-1mm}\Sigma_\xi^0(X),\quad\Delta_\xi^0(X)=\Sigma^0_\xi(X)\cap \Pi_\xi^0(X).
\end{align*}
The full Borel hierarchy extends to all $\xi<\omega_1$ ($\omega_1$ being the first uncountable ordinal) by transfinite induction but we do not need this here.

\begin{definition}
Given a class of subsets, $\mathcal{U}$, of a metric space $X$ and given another metric space $Y$, we say that the function $f:X\rightarrow Y$ is $\mathcal{U}$-measurable if $f^{-1}(U)\in\mathcal{U}$ for every open set $U\subset Y$.
\end{definition}

Given metric spaces $X$ and $Y$, the Baire hierarchy is defined as follows. A function $f:X\rightarrow Y$ is of Baire class 1, written $f\in\mathcal{B}_1$, if it is $\Sigma_2^0(X)$-measurable. For $1<\xi<\omega_1$, a function $f:X\rightarrow Y$ is of Baire class $\xi$, written $f\in\mathcal{B}_\xi$, if it is the pointwise limit of a sequence of functions $f_n$ in $\mathcal{B}_{\xi_n}$ with $\xi_n<\xi$. The following Theorem is well known (see for example \cite{kechris1987descriptive} section 24) and provides a useful link between the Borel and Baire hierarchies.

\begin{theorem}[Lebesgue, Hausdorff, Banach]
\label{Baire1}
Let $X,Y$ be metric spaces with $Y$ separable and $1\leq\xi<\omega_1$. Then $f\in\mathcal{B}_\xi$ if and only if it is $\Sigma_{\xi+1}^0(X)$ measurable. Furthermore, if $X$ is zero-dimensional (Hausdorff with a basis of clopen sets) and $f\in\mathcal{B}_1$, then $f$ is the pointwise limit of a sequence of continuous functions.
\end{theorem}

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=\mathbb{R}$. Examples of zero-dimensional 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 the cases when $Y$ is equal to $\{0,1\}$ (also zero-dimensional) or $[0,1]$ (not zero-dimensional), both with their natural topologies.

\subsection{Linking the SCI hierarchy to the Baire hierarchy in a special case}

\begin{definition}
\label{closed_under_search}
Given the triple $\{\Omega,\mathcal{M},\Lambda\}$, a class of algorithms $\mathcal{A}$ is closed under search with respect to $\{\Omega,\mathcal{M},\Lambda\}$ if whenever
\begin{enumerate}
	\item $\mathcal{I}$ is an index set,
	\item $\{n_i\}_{i\in\mathcal{I}}$ a family of natural numbers,
	\item $\{\Gamma_{i,l}:\Omega\rightarrow\mathcal{M}\}_{i\in\mathcal{I},l\leq n_i}\subset\mathcal{A}$,
	\item $\{U_{i,l}\}_{i\in\mathcal{I},l\leq n_i}$ family of basic open sets in $\mathcal{M}$ with	$\cup_{i\in\mathcal{I}}\cap_{l\leq n_i}\Gamma_{i,l}^{-1}(U_{i,l})=\Omega,$
	\item $\{c_i\}_{i\in\mathcal{I}}$ a family of points in some arbitrary dense subset of $\mathcal{M}$,
\end{enumerate}
then there is some $\Gamma\in\mathcal{A}$ such that for every $x\in\Omega$ there exists some $i\in\mathcal{I}$ with $\Gamma(x)=c_i$ and for all $l\leq n_i$ we have $\Gamma_{i,l}(x)\in U_{i,l}$.
\end{definition}

\begin{proposition}
\label{search_prop}
Suppose that $\mathcal{A}$ is closed under search with respect to $\{\Omega,\mathcal{M},\Lambda\}$, then there exists a topology $\mathcal{T}$ on $\Omega$ such that $\Delta_1^{\mathcal{A}}$ is precisely the set of continuous functions from $(\Omega,\mathcal{T})$ to $\mathcal{M}$.
\end{proposition}

\begin{proof}
Let $\mathcal{T}$ be the topology generated by $\{\Gamma^{-1}(B):\Gamma\in\mathcal{A},B\subset\mathcal{M}\text{ basic open}\}$. Now clearly any $\Gamma\in\mathcal{A}$ is continuous with respect to this topology. The fact that uniform limits of continuous functions into metric spaces are also continuous shows that any function in $\Delta_1^{\mathcal{A}}$ is continuous with respect to $\mathcal{T}$.

For the other direction, suppose that $f: (\Omega,\mathcal{T})\rightarrow \mathcal{M}$ is continuous. Choose $\{c_i\}_{i\in\mathcal{I}}\subset\mathcal{M}$ such that $\mathcal{M}\subset \cup_{i\in\mathcal{I}}D(c_i,2^{-n})$. Continuity of $f$ implies that $f^{-1}(D(c_i,2^{-n}))$ are open. This implies that there is an index set $\mathcal{J}$, natural numbers $\{n_{i,j}\}_{j\in\mathcal{J}}$, a family $\{\Gamma_{i,j,l}\}_{i\in\mathcal{I},j\in\mathcal{J},l\leq n_{i,j}}$ (in $\mathcal{A}$) and a family of basic open sets $\{U_{i,j,l}\}_{i\in\mathcal{I},j\in\mathcal{J},l\leq n_{i,j}}$ with the property that
$$
f^{-1}(D(c_i,2^{-n}))=\bigcup_{j\in\mathcal{J}}\bigcap_{l\leq n_{i,j}}\Gamma^{-1}_{i,j,l}(U_{i,j,l}).
$$
It follows that
$$
\bigcup_{i\in\mathcal{I},j\in\mathcal{J}}\bigcap_{l\leq n_{i,j}}\Gamma^{-1}_{i,j,l}(U_{i,j,l})=\Omega.
$$
Since $\mathcal{A}$ is closed under search, there exists $f_n\in\mathcal{A}$ such that for every $x\in\Omega$ there exists some $i\in\mathcal{I}$ and $j\in\mathcal{J}$ with $f_n(x)=c_i$ and for all $l\leq n_{i,j}$
$$
x\in\Gamma^{-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\in\Delta_1^{\mathcal{A}}$.
\end{proof}

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 $\Omega$ (and $\Lambda$) is a particularly simple discrete space.

\begin{theorem}
\label{B_equiv}
Suppose that $\Omega=\{0,1\}^{\mathbb{N}}=\{\{a_i\}_{i\in\mathbb{N}}:a_i\in\{0,1\}\}$ with the set of evaluation functions $\Lambda$ equal to the set of pointwise evaluations $\{\lambda_{j}(a):=a_j:j\in\mathbb{N}\}$ and let $\mathcal{M}$ be an arbitrary separable metric space with at least two separated points. Endow $\Omega$ with the product topology, $\tilde{\mathcal{T}}$, induced by the discrete topology on $\{0,1\}$ and consider the Baire hierarchy, $\{\mathcal{B}_{\xi}((\Omega,\tilde{\mathcal{T}}),\mathcal{M})=\mathcal{B}_{\xi}\}_{\xi<\omega_1}$, of functions $f:\Omega\rightarrow\mathcal{M}$. Then for any problem function $\Xi:\Omega\rightarrow\mathcal{M}$ and $m\in\mathbb{N}$,
\begin{equation}
\label{Baire_equiv}
\{\Xi,\Omega,\Lambda\}\in\Delta^G_{m+1}\Leftrightarrow \Xi\in\mathcal{B}_{m}.
\end{equation}
In other words, the SCI index corresponds to the Baire hierarchy index.
\end{theorem}

\begin{remark}
The proof will make clear that we can replace $\Omega$ by $\{0,1\}^{\mathbb{N}\times\mathbb{N}}$ or any other such product space (induced by discrete topology) of the form $A^B$ with $A,B$ countable, with $\Lambda$ the corresponding component-wise evaluations, as long as $\mathcal{M}$ has at least $\left|A\right|$ jointly separated points and is separable.
\end{remark}

\begin{proof}
First we show that general algorithms are closed under search and that the topology $\mathcal{T}$ is Proposition \ref{search_prop} is equal to the product topology $\tilde{\mathcal{T}}$. Without loss of generality we can assume that $\mathcal{I}$ is well-ordered by $\prec$. Given $x\in\Omega$, let $k\in\mathbb{N}$ be minimal such that there exists $i\in\mathcal{I}$ with $x\in\cap_{l\leq n_l}\Gamma^{-1}_{i,l}(U_{i,l})$ and $\Lambda_{\Gamma_{i,l}}(x)\subset\{\lambda_j:j\leq k\}$ for $l\leq n_l$. Let $i_0$ be the $\prec$-least witness for $k$ and then define $\Gamma(x)=c_{i_0}$. The well-ordering of $\mathcal{I}$ implies that $\Gamma$ is a general algorithm and clearly it satisfies the requirements in the definition of closed under search. Note that this part of the proof only uses countability of $\Lambda$.

To equate the topologies, suppose that $\Gamma\in\Delta_0^G$ is a general algorithm. For each $a\in\Omega,$ $\Lambda_{\Gamma}(a)$ is finite and we can assume without loss of generality that it is equal to $\{\lambda_j:j\leq I(a)\}$ for some finite $I(a)$. In particular, there exists an open set $U_a$ such that any $b\in U_a$ has $\lambda_j(b)=\lambda_j(a)$ for $j\leq I(a)$ and hence $\Gamma(b)=\Gamma(a)$.
Then for any open set $B\subset\mathcal{M}$
$$
\Gamma^{-1}(B)=\bigcup_{a\in \Gamma^{-1}(B)}U_a
$$
is open. Hence each $\Gamma$ is continuous with respect to the product topology on $\Omega$. It follows that $\mathcal{T}\subset\tilde{\mathcal{T}}$. To prove the converse, we must show that each projection map $\lambda_j$ is continuous with respect to $\mathcal{T}$. Let $x_1,x_2$ be separated points in $\mathcal{M}$ and consider $f:\{0,1\}\rightarrow\mathcal{M}$ with $f(0)=x_1$ and $f(1)=x_2$. Then the composition $f\circ\lambda_j$ is a general algorithm and hence continuous with respect to $\mathcal{T}$. But this implies that $\lambda_j$ is continuous. It follows from Proposition \ref{search_prop} that $\{\Xi,\Omega,\Lambda\}\in\Delta^G_{1}$ if and only if $\Xi$ is continuous.

Now the space $(\Omega,\mathcal{T})$ is zero-dimensional and $\mathcal{M}$ is separable, hence by Theorem \ref{Baire1} any element of $\mathcal{B}_1$ is a limit of continuous functions. The converse holds in greater generality. It follows that $\Xi\in\mathcal{B}_m$ if and only if there are $f_{n_m,...,n_1}\in\Delta^G_{1}$ with
\begin{equation}
\label{Baire_lim}
\Xi(a)=\lim_{n_m\rightarrow\infty}...\lim_{n_1\rightarrow\infty}f_{n_m,...,n_1}(a).
\end{equation}
If this holds then there exists general algorithms $\Gamma_{n_m,...,n_1}$ such that for all $a\in\Omega$,
$$
d(\Gamma_{n_m,...,n_1}(a),f_{n_m,...,n_1}(a))\leq 2^{-n_1}
$$
and hence
$$
\lim_{n_m\rightarrow\infty}...\lim_{n_1\rightarrow\infty}\Gamma_{n_m,...,n_1}(a)=\Xi(a)
$$
so that $\{\Xi,\Omega,\Lambda\}\in\Delta^G_{m+1}$. Conversely if $\{\Xi,\Omega,\Lambda\}\in\Delta^G_{m+1}$ with tower of algorithms $\Gamma_{n_{m},...,n_1}$, then since each general algorithm is continuous, (\ref{Baire_lim}) holds with $f_{n_m,...,n_1}(a)=\Gamma_{n_{m},...,n_1}$.
\end{proof}

\subsection{Combinatorial problems high up in the SCI hierarchy} We can now put the results of the previous two subsections together and obtain combinatorial array problems high up in the SCI hierarchy. Let $k\in\mathbb{N}_{\geq 2}$ and let $\Omega_k$ denote the collection of all infinite arrays $\{a_{m_1,...,m_k}\}_{m_1,...,m_k\in\mathbb{N}}$ with entries $a_{m_1,...,m_k}\in\{0,1\}$. As usual $\Lambda_k$ is the set of component-wise evaluations/projections. Consider the formulas
\begin{align*}
P(a,m_1,...,m_{k-2})&=\begin{cases}
1,\quad\text{if }\exists i \text{ }\forall j\text{ } \exists n>j \text{ s.t. }a_{m_1,...,m_{k-2},n,i}=1\\
0,\quad\text{otherwise}
\end{cases},\\
Q(a,m_1,...,m_{k-2})&=\begin{cases}
1,\quad\text{if } \forall^{\infty}i\forall j\text{ } \exists n>j \text{ s.t. }a_{m_1,...,m_{k-2},n,i}=1\\
0,\quad\text{otherwise}
\end{cases},
\end{align*}
where $\forall^{\infty}$ 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,Q$ consider the problem function for $a\in\Omega_k$
\begin{equation*}
\Xi_{k,R}(a)=\begin{cases}
\exists m_1\text{ } \forall m_2\text{ }...\text{ }\forall m_{k-2} R(a,m_1,...,m_{k-2}),\quad\text{if }k\text{ is even}\\
\forall m_1\text{ } \exists m_2\text{ }...\text{ }\forall m_{k-2} R(a,m_1,...,m_{k-2}),\quad\text{otherwise}
\end{cases},
\end{equation*}
that is, so that all quantifier types alternate.

\begin{theorem}
\label{DST_main}
Let $\mathcal{M}$ be either $\{0,1\}$ with the discrete metric or $[0,1]$ with the usual metric and consider the above problems $\{\Xi_k,\Omega_k,\mathcal{M},\Lambda_k\}$. For $k\in\mathbb{N}_{\geq 2}$ and $R=P,Q$,
$$
\Delta_{k+1}^G\not\ni\{\Xi_{k,R},\Omega_{k},\mathcal{M},\Lambda_k\}\in\Delta_{k+2}^A.
$$
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.
\end{theorem}

\begin{remark}
\label{cts_remark}
Note that we allow both discrete and continuous spaces $\mathcal{M}$, which will be important for our reduction arguments when proving lower bounds for classifications of spectral problems for non-discrete $\mathcal{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 combinatorial complexity of the problems that make the problems hard.
\end{remark}

\begin{proof}
We will deal with the case of $R=P$ since the case of $R=Q$ is completely analogous. It is easy to see that $\{\Xi_{k,P},\Omega_{k},\mathcal{M},\Lambda_k\}\in\Delta_{k+2}^A$. First consider the case $k=2$ and set
$$
\Gamma_{n_3,n_2,n_1}(a)=\max_{j\leq n_3}\chi_{(n_2,\infty)}\big(\sum_{i=1}^{n_1} a_{i,j}\big).
$$
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 $\Xi_{2,P}$ in $\mathcal{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
\begin{equation*}
\Gamma_{n_{k+1},...,n_1}(a)=\begin{cases}
\displaystyle\max_{m_{1}\leq n_{k+1}}\displaystyle\prod_{m_{2}=1}^{n_{k}}...\displaystyle\prod_{m_{k-2}=1}^{n_4}\Big\{\displaystyle\max_{j\leq n_3}\chi_{(n_2,\infty)}\big(\sum_{i=1}^{n_1} a_{m_1,...,m_{k-2},i,j}\big)\Big\},\quad\text{if }k\text{ is even}\\
\displaystyle\prod_{m_{1}=1}^{n_{k+1}}\displaystyle\max_{m_{2}\leq n_{k}}...\displaystyle\prod_{m_{k-2}=1}^{n_4}\Big\{\displaystyle\max_{j\leq n_3}\chi_{(n_2,\infty)}\big(\sum_{i=1}^{n_1} a_{m_1,...,m_{k-2},i,j}\big)\Big\},\quad\text{otherwise}.
\end{cases}
\end{equation*}
Again, this is an arithmetic tower and it is straightforward to show that this converges to $\Xi_{k,P}$ in $\mathcal{M}$. It also holds that $\{\Xi_{k,P},\Omega_{k},\mathcal{M},\Lambda_k\}\in\Sigma_{k+1}^A$ if $k$ is even and $\{\Xi_{k,P},\Omega_{k},\mathcal{M},\Lambda_k\}\in\Pi_{k+1}^A$ if $k$ is odd (not to be confused with the notation for the Borel hierarchy).

Recall the topology $\mathcal{T}$ on $\Omega_k$ form Theorem \ref{B_equiv}. For the lower bound we note that $P$ is $\Sigma_3^0$ complete (in the literature it is known as the problem ``$S_3$'', see for example \cite{kechris1987descriptive} section 23). This is terminology from the Wadge hierarchy, but in our case since $(\Omega_{k},\mathcal{T})$ is zero-dimensional, a theorem of Wadge implies this means that $P$ is the indicator function of a set, also denoted by $P$, which lies in $\Sigma_3^0(\Omega_k)$ but not $\Pi_3^0(\Omega_k)$. It also follows that $\Xi_{k,P}$ is $\Sigma_{k+1}^0(\Omega_k)$ complete if $k$ is even and $\Pi_{k+1}^0(\Omega_k)$ complete otherwise. Now suppose for a contradiction that $\{\Xi_{k,P},\Omega_{k},\mathcal{M},\Lambda_k\}\in\Delta_{k+1}^G$. But then Theorem \ref{B_equiv} implies that $\Xi_{k,P}\in\mathcal{B}_k(\Omega_k,\mathcal{M})$ and hence by Theorem \ref{Baire1}, $\Xi_{k,P}$ is $\Sigma_{k+1}^0(\Omega_k)$ measurable. $\Xi_{k,P}$ is the indicator function of set, also denoted by $\Xi_{k,P}$, which is either $\Sigma_{k+1}^0(\Omega_k)$ or $\Pi_{k+1}^0(\Omega_k)$ complete depending on the parity of $k$. But $0$ and $1$ are separated in $\mathcal{M}$ and hence since $\Xi_{k,P}$ is $\Sigma_{k+1}^0(\Omega_k)$ measurable, $\Xi_{k,P}$ and its complement both lie in $\Sigma_{k+1}^0(\Omega_k)$. It follows that $\Xi_{k,P}\in\Sigma_{k+1}^0(\Omega_k)\cap\Pi_{k+1}^0(\Omega_k)$, contradicting the stated completeness.
\end{proof}

For our applications to spectral problems, we will use $\tilde{\Omega}$ to denote $\Omega_k$ and consider
\begin{equation}
\begin{split}
\label{canonical_problems}
\tilde{\Xi}_1=\Xi_{2,P},\quad \tilde{\Xi}_2=\Xi_{2,Q},\\
\tilde{\Xi}_3=\Xi_{3,P},\quad \tilde{\Xi}_4=\Xi_{3,Q}.
\end{split}
\end{equation}
Clearly from the proof of Theorem \ref{DST_main}, we see that it 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 $\tilde\Xi_1$ and $\tilde\Xi_2$ where shown to have $\mathrm{SCI}_G=3$ in \cite{ben2015can}, but only with regards to the discrete space $\mathcal{M}=\{0,1\}$ and the proof used a somewhat complicated Baire category argument. Theorem \ref{DST_main} is much more general, can be extended to arbitrarily large SCI index and has a much slicker proof, making clear a beautiful connection with the Baire hierarchy for well behaved $\Omega$.

\begin{remark}
The results of this section point towards the extension of the SCI hierarchy to countable ordinals and begs the question whether this could be useful. This will be explored elsewhere in future work.
\end{remark}

\section{Proofs of Theorem \ref{compact_pert_spec_theorem} and Theorems in \S \ref{initial_bounded_theorems}}
\label{first_set_proofs}

Here we prove the Theorems found in \S \ref{initial_bounded_theorems} and Theorem \ref{compact_pert_spec_theorem}. To introduce some of the ideas of this paper, we briefly recall $\Sigma_1$ basic algorithms for spectral problems presented in \cite{colb1}. The basic algorithms constructed in \cite{colb1} are shown as pseudocode in \S \ref{basic_spec}, where we also refer the reader to a more detailed account. The following was proven in \cite{colb1} and was generalised in Part I to unbounded operators:

\begin{theorem}
\label{BASIC}
For each $\Omega_f$ and $\Omega_f\cap\Omega_g$, consider the family $\Lambda$ consisting of $\Lambda_1$, together with pointwise evaluation of $f,\{c_n\}$ (and evaluation of $g$ at rational points if considering $\Omega_f\cap\Omega_g$). The algorithms presented in \S \ref{basic_spec} are basic and achieve $\Sigma_1^A$ error control. In particular the following classification holds:
$$
\Delta_1^G\not\owns\{\Xi_1,\Omega_f\cap\Omega_g,\Lambda_1\}\in\Sigma_1^A,\quad
\Delta_1^G\not\owns\{\Xi_2,\Omega_f,\Lambda_1\}\in\Sigma_1^A.
$$
\end{theorem}

We will also need the following Lemma:

\begin{lemma}
Suppose that $A\in\Omega_{\mathrm{HS}}^{N}$, then we can take the function
\begin{equation}
\label{HS_gil}
g(x)=\frac{x}{\sqrt{2}}\exp\Big(-\frac{2N^2}{x^2}\Big)
\end{equation}
in (\ref{control_resolvent}) to control the resolvent norm. Furthermore, we can evaluate a strictly increasing continuous function $\tilde{g}:\mathbb{R}_{\geq 0}\rightarrow\mathbb{R}_{\geq 0}$, which diverges at infinity and satisfies
\begin{equation}
\label{HS_gil2}
\tilde{g}(x)\leq g(x),
\end{equation}
in finitely many arithmetic operations and comparisons using the input $x$, $N$ and the integers.
\end{lemma}

\begin{proof}
The operator $A_I:=(A-A^*)/(2i)$ is Hilbert--Schmidt with $\left\|A_I\right\|_{\mathrm{HS}}\leq N$. The fact that $g$ satisfies (\ref{control_resolvent}) now follows from Theorem 7.7.1 in \cite{gil2003operator}. For the existence of $\tilde{g}$, consider the following informal algorithm:
\begin{itemize}
	\item If $x=0$ then set $\tilde{g}(x)=0$, otherwise define $y=2N^2/x^2$ and continue.
	\item Compute, via finitely many comparisons, $n_1,n_2\in\mathbb{Z}_{\geq 0}$ such that $n_2=n_1+1$ and $y\in[n_1,n_2]$.
	\item Define
	$$
	\tilde{g}(x)=\frac{x}{2}\times \frac{1}{3^{n_1}+(3^{n_2}-3^{n_1})(y-n_1)}.
	$$
\end{itemize}
The fact that $e<3$ and that the function $3^x$ is convex show that
$$
\frac{1}{3^{n_1}+(3^{n_2}-3^{n_1})(y-n_1)}<\exp(-y).
$$
We have computed a piecewise linear approximation of $\frac{x}{2}\times 3^{-y}$ and the properties of $\tilde{g}$ follow.
\end{proof}

\begin{proof}[Proof of Theorem \ref{compact_pert_spec_theorem}]
Given the above construction of $\tilde{g}$, the fact that $\{\Xi_i,\Omega_{\mathrm{HS}}^{N},\Lambda_1\}\in\Sigma_2^A$ follows from the fact that $\{\Xi_i,\Omega_{\tilde{g}},\Lambda_1\}\in\Sigma_2^A$ as proven in \cite{ben2015can}. Note that there is a subtle point - the function $\tilde{g}$ is \textit{not} in our evaluation set $\Lambda_1$ as it is for the problems $\{\Xi_i,\Omega_{\tilde{g}},\Lambda_1\}$ in \cite{colb1}. However, Lemma \ref{HS_gil} shows that we can still evaluate $\tilde{g}$ using finitely many arithmetic operations and comparisons given the constant $N$ that bounds the Hilbert--Schmidt norm. The same argument also shows that $\{\Xi_i,\Omega_{\mathrm{HS}}^{N,f},\Lambda_1\}\in\Sigma_1^A$. The lower bounds follow from the $N=0$ case and the classification of spectral problems for self-adjoint operators in \cite{ben2015can}.
\end{proof}

We now turn to the proof of Theorem \ref{spec_rad_thm}, dealing with the evaluation set $\Lambda_1$ first. Suppose that $\tilde{\Gamma}_{n_k,...,n_1}$ is a $\Pi^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
$$
\Gamma_{n_k,...,n_1}(A)=\sup_{z\in\tilde{\Gamma}_{n_k,...,n_1}(A)}\left|z\right|+\frac{1}{2^{n_k}}
$$
provides a $\Pi^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 will always assume this is done without further comment. Similarly if $\tilde{\Gamma}_{n_k,...,n_1}$ provides a $\Sigma^A_k$ tower of algorithms for the spectrum (output a finite set for each $n_1,...,n_k$),
$$
\Gamma_{n_k,...,n_1}(A)=\sup_{z\in\tilde{\Gamma}_{n_k,...,n_1}(A)}\left|z\right|-\frac{1}{2^{n_k}}
$$
provides a $\Sigma^A_k$ tower of algorithms for the spectral radius. If we only have a height $k$ tower with no $\Sigma_k$ or $\Pi_k$ type error control for the spectrum then taking the supremum of absolute values shows we get a height $k$ tower for the spectral radius.

The fact that $\{\Xi_r,\Omega_\mathrm{D}\} \in \Sigma^A_1$, $\{\Xi_r,\Omega_f\cap\Omega_g\} \in \Sigma^A_1$, $\{\Xi_r,\Omega_g\} \in \Sigma^A_2$, $\{\Xi_r,\Omega_f\} \in \Pi^A_2$ and $\{\Xi_r,\Omega_{\mathrm{B}}\} \in \Pi^A_3$ hence follow from Theorems \ref{BASIC} and the results of \cite{ben2015can}. It is clear that $\{\Xi_r,\Omega_\mathrm{D}\}\notin\Delta^G_1$ (see the standard arguments in Part I) and this also shows that $\{\Xi_r,\Omega_\mathrm{N}\}\notin\Delta^G_1$ and $\{\Xi_r,\Omega_f\cap\Omega_g\}\notin\Delta^G_1$. Hence, we must show the positive result that $\{\Xi_r,\Omega_\mathrm{N}\} \in \Sigma^A_1$ and prove the lower bounds $\{\Xi_r,\Omega_g\}\notin\Delta^G_2$, $\{\Xi_r,\Omega_f\}\notin\Delta^G_2$ and $\{\Xi_r,\Omega_{\mathrm{B}}\}\notin\Delta^G_3$.

\begin{proof}[Proof of Theorem \ref{spec_rad_thm} for $\Lambda_1$]
Throughout this proof we use the evaluation set $\Lambda_1$ (dropped from notation for convenience).

\textbf{Step 1:} $\{\Xi_r,\Omega_\mathrm{N}\} \in \Sigma^A_1$. Recall that the spectral radius of a normal operator $A\in\Omega_{\mathrm{B}}$ is equal to its operator norm. Consider the finite section matrices $P_nAP_n\in\mathbb{C}^{n\times n}$. It is straightforward to show that
$$
\left\|P_nAP_n\right\|\uparrow \left\|A\right\|\quad\text{ as }n\rightarrow\infty.
$$
$\left\|P_nAP_n\right\|$ is the square root of the largest eigenvalue of the semi-positive definite matrix $(P_nAP_n)^*(P_nAP_n)$. This can be estimated from below to an accuracy of $1/n$ using Corollary \ref{eigs_fin_mat} in \S \ref{basic_spec} which then yields a $\Sigma_1^A$ algorithm for $\{\Xi_r,\Omega_\mathrm{N}\}$.

\textbf{Step 2:} $\{\Xi_r,\Omega_g\}\notin\Delta^G_2$. Recall that we assumed the existence of a $\delta\in(0,1)$ such that $g(x)\leq (1-\delta)x$. Let $\epsilon>0$, then it is easy to see that the matrices
$$
S_{\pm}(\epsilon)=\begin{pmatrix}
1 & 0 \\
\pm \epsilon & 1
\end{pmatrix}
$$
have norm bounded by $1+\epsilon+\epsilon^2$ and are clearly inverse of each other. Choose $\epsilon$ small such that $(1+\epsilon+\epsilon^2)^2\leq1/(1-\delta)$. If $B\in\mathbb{C}^{2\times 2}$ is normal, it follows that $\hat{B}:=S_{+}(\epsilon)BS_{-}(\epsilon)$ lies in $\Omega_g$ and has the same spectrum as $B$. We choose
$$
\hat{B}=S_{+}(\epsilon)\begin{pmatrix}
1 & -\epsilon \\
-\epsilon & 0
\end{pmatrix}S_{-}(\epsilon)=\begin{pmatrix}
1+\epsilon^2 & -\epsilon \\
\epsilon^3 & -\epsilon^2
\end{pmatrix}.
$$
The crucial property of $\hat{B}$ is that the first entry $1+\epsilon^2$ is strictly greater in magnitude than the two eigenvalues $(1\pm\sqrt{1+4\epsilon^2})/2$.

Now suppose for a contradiction that a height one tower, $\Gamma_n$, solves the problem. We will gain a contradiction by showing that $\Gamma_n(A)$ does not converge for an operator of the form,
$$
A=\bigoplus_{r=1}^\infty A_{l_r},\quad A_{m}:=\begin{pmatrix}
1+\epsilon^2& & & &-\epsilon\\
 &0& & & \\
 & &\ddots& & \\
 & & &0& \\
\epsilon^3& & & &-\epsilon^2\\
\end{pmatrix}
\in\mathbb{C}^{m\times m},
$$
Where we only consider $l_k\geq 3$. Each $A_m$ is unitarily equivalent to the matrix $\hat{B}\oplus 0\in\mathbb{C}^{m\times m}$ and has spectrum equal to $\{0,(1\pm\sqrt{1+4\epsilon^2})/2\}$. Any $A$ of the above form is unitarily equivalent to a direct sum of an infinite number of $\hat{B}$'s and the zero operator and hence lies in $\Omega_g$. Now suppose that $l_1,...,l_k$ have been chosen and consider the operator
$$
B_k=A_{l_1}\oplus...\oplus A_{l_k}\oplus C,\quad C=\mathrm{diag}\{1+\epsilon^2,0,...\}.
$$
The spectrum of $B_k$ is $\{0,(1\pm\sqrt{1+4\epsilon^2})/2,1+\epsilon^2\}$ and hence there exists $\eta>0$ and $n(k)\geq k$ such that $\Gamma_{n(k)}(B_k)>(1+\sqrt{1+4\epsilon^2})/2+\eta$. But $\Gamma_{n(k)}(B_k)$ can only depend on the evaluations of the matrix entries $\{B_k\}_{ij}=\langle B_ke_j,e_i \rangle$ with $i,j\leq 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 \ref{Gen_alg}, $\Gamma_{n(k)}(A)=\Gamma_{n(k)}(B_k)>(1+\sqrt{1+4\epsilon^2})/2+\eta$. But $\Gamma_n(A)$ must converge to $(1+\sqrt{1+4\epsilon^2})/2$, a contradiction.

\textbf{Step 3:} $\{\Xi_r,\Omega_f\}\notin\Delta^G_2$. Suppose for a contradiction that a height one tower, $\Gamma_n$, solves the problem. We will gain a contradiction by showing that $\Gamma_n(A)$ does not converge for an operator of the form,
$$
A=\bigoplus_{r=1}^\infty C_{l_r}\oplus A_{l_r},\quad A_{m}:=\begin{pmatrix}
0& 1& & &\\
 &0& 1& & \\
 & &\ddots& \ddots& \\
 & & && 1\\
& & & &0\\
\end{pmatrix}
\in\mathbb{C}^{m\times m},\quad C_m=\mathrm{diag}\{0,0,...,0\}\in\mathbb{C}^{m\times m}.
$$
Where we assume that $l_r\geq 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
$$
B_k=\big(C_{l_1}\oplus A_{l_1}\big)\oplus...\oplus \big(C_{l_k}\oplus A_{l_k}\big)\oplus C,\quad C=\mathrm{diag}\{0,0,...\}.
$$
The spectrum of $B_k$ is $\{0\}$ and hence there exists $n(k)\geq k$ such that $\Gamma_{n(k)}(B_k)<1/4$. But $\Gamma_{n(k)}(B_k)$ can only depend on the evaluations of the matrix entries $\{B_k\}_{ij}=\langle B_ke_j,e_i \rangle$ with $i,j\leq 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 \ref{Gen_alg}, $\Gamma_{n(k)}(A)=\Gamma_{n(k)}(B_k)<1/4$. But $\Gamma_n(A)$ must converge to $1$, a contradiction.

\textbf{Step 4:} $\{\Xi_r,\Omega_{\mathrm{B}}\}\notin\Delta^G_3$. Suppose for a contradiction that $\Gamma_{n_2,n_1}$ is a height two (general) tower and without loss of generality, assume it to be non-negative. In general, showing contradictions for height two towers directly is extremely tricky. A good strategy is to map the problem into another computational problem where it is known that $\mathrm{SCI}\geq 3$ and we adopt this method here using the results of \S\ref{bigHth}. Let $(\mathcal{M},d)$ be the space $[0,1]$ with the usual metric (note in particular this is not discrete so we use remark \ref{cts_remark}), let $\tilde\Omega$ denote the collection of all infinite matrices $\{a_{i,j}\}_{i,j\in\mathbb{N}}$ with entries $a_{i,j}\in\{0,1\}$ and recall the problem function
\begin{equation*}
\tilde\Xi_1(\{a_{i,j}\}):\text{ Does }\{a_{i,j}\}\text{ have a column containing infinitely many non-zero entries?}
\end{equation*}
It was shown in \S\ref{bigHth} Theorem \ref{DST_main} that $\mathrm{SCI}(\tilde\Xi_1,\tilde\Omega)_{G} = 3$. We will gain a contradiction by using the supposed height two tower to solve $\{\tilde\Xi_1,\tilde\Omega\}$.

Without loss of generality, identify $\Omega_{\mathrm{B}}$ with $\mathcal{B}(X)$ where $X=\bigoplus_{j=1}^{\infty}X_j$ in the $l^2$-sense with $X_j=l^2(\mathbb{N})$. Now let $\{a_{i,j}\}\in\tilde\Omega$ and define $B_j\in\mathcal{B}(X_j)$ with the matrix representation
$$
(B_{j})_{k,i}= \begin{cases}
        1, & \text{if } k=i\text{ and }a_{k,j}=0\\
        1, & \text{if } k<i\text{ and }a_{l,j}=0\text{ for }k<l<i\\
        0, & \text{otherwise } 0\leq n\leq 1.
        \end{cases}
$$
Let $\mathcal{I}_j$ be the index set of all $i$ where $a_{i,j}=1$. $B_j$ acts as a unilateral shift on $\overline{\mathrm{span}}\{e_k:k\in \mathcal{I}_j\}$ and the identity on its orthogonal complement. It follows that
$$
\mathrm{Sp}(B_j)= \begin{cases}
        1, & \text{if } \mathcal{I}_j=\emptyset\\
        \{0,1\}, & \text{if } \mathcal{I}_j\text{ is finite and non-empty}\\
        \mathbb{D}\quad(\text{the unit disc}),& \text{if } \mathcal{I}_j\text{ is infinite}.
        \end{cases}
$$
For the matrix $\{a_{i,j}\}$ define $A\in\Omega_{\mathrm{B}}$ by
$$
A=\bigoplus_{j=1}^{\infty}(B_j-\frac{1}{2}I_j),
$$
($I_j$ denotes the identity operator on $\mathbb{C}^{j\times j}$) then $\mathrm{Sp(A)}=\overline{\cup_{j=1}^\infty\mathrm{Sp}(B_j)}-\frac{1}{2}$.

Hence we see that
$$
\Xi_r(A)= \begin{cases}
        \frac{1}{2}, & \text{if }\tilde\Xi_1(\{a_{i,j}\})=0\\
        \frac{3}{2}, & \text{if }\tilde\Xi_1(\{a_{i,j}\})=1.
        \end{cases}
$$
We then set $\tilde{\Gamma}_{n_2,n_1}(\{a_{i,j}\})=\min\{\max\{\Gamma_{n_2,n_1}(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\leq N\}$ using only finitely many evaluations of $\{a_{i,j}\}$, where we can use a bijection between canonical bases of $l^2(\mathbb{N})$ and $\bigoplus_{j=1}^{\infty}X_j$ to view $A$ as acting on $l^2(\mathbb{N})$. But then $\tilde\Gamma_{n_2,n_1}$ provides a height two tower for $\{\tilde\Xi_1,\tilde\Omega\}$, a contradiction.
\end{proof}

\begin{remark}
The algorithm in step 1 of the above proof will work for all operators 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\{\left|\left\langle Ax,x\right\rangle\right|:\left\|x\right\|=1\},
$$
then a similar argument will hold by estimating $w(P_nAP_n)$. To do this, we need a way of computing $w(A)$ to a given accuracy using finitely many arithmetic operations and comparisons on its matrix values. This is given by Lemma \ref{num_ran_fs} below.
\end{remark}

\begin{proof}[Proof of Theorem \ref{spec_rad_thm} for $\Lambda_2$]
Here we prove the changes for $\Xi_r$ when we consider the evaluation set $\Lambda_2$. It is clear that the classifications in $\Sigma_1^A$ do not change. It is also easy to use the algorithm in Theorem \ref{BASIC} (now using $\Lambda_2$ to collapse the first limit and approximate $\gamma_n$ - see Appendix \ref{basic_spec}) to prove $\{\Xi_r,\Omega_g,\Lambda_2\}\in\Sigma_1^A$. Similarly we can use the algorithm for the spectrum of operators in  $\Omega_f$ for $\Omega_{\mathrm{B}}$ using $\Lambda_2$ to collapse the first limit and hence $\{\Xi_r,\Omega_{\mathrm{B}},\Lambda_2\}\in\Pi_2^A$. Since $\Omega_f\subset \Omega_{\mathrm{B}}$, it follows that we only need to prove $\{\Xi_r,\Omega_f,\Lambda_2\}\not\in\Delta_2^G$. This can be proven using exactly the same example and a similar argument to step 3 of the proof of Theorem \ref{spec_rad_thm} (hence omitted).
\end{proof}

\begin{proof}[Proof of Theorem \ref{spec_rad_thm2}]
We begin by proving the results for $\Lambda_1$. For the lower bounds, it is enough to show that $\{\Xi_{er},\Omega_\mathrm{D},\Lambda_1\}\not\in\Delta_2^G$ and $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_1\}\not\in\Delta_3^G$. For the upper bounds, we must show that $\{\Xi_{er},\Omega_f,\Lambda_1\}\in\Pi_2^A$, $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_1\}\in\Pi_3^A$ and $\{\Xi_{er},\Omega_\mathrm{N},\Lambda_1\}\in\Pi_2^A$. The lower bounds for $\Lambda_2$ follow from $\{\Xi_{er},\Omega_\mathrm{D},\Lambda_1\}\not\in\Delta_2^G$ and for the upper bounds it is enough to prove $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_2\}\in\Pi_2^A$.

\textbf{Step 1:} $\{\Xi_{er},\Omega_\mathrm{D},\Lambda_1\}\not\in\Delta_2^G$. This is the same argument as in step 3 of the proof of Theorem \ref{spec_rad_thm}, however now we replace $A_m$ by $A_m=\mathrm{diag}\{1,1,...,1\}\in\mathbb{C}^{m\times m}$ and use the fact that $\Xi_{er}(B_k)=0$. It follows that given the proposed height one tower $\Gamma_n$ and the constructed $A$, $\Xi_{er}(A)=1$ but $\Gamma_{n(k)}(A)<1/4$, the required contradiction.

\textbf{Step 2:} $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_1\}\not\in\Delta_3^G$. This is the same argument as step 4 of the proof of Theorem \ref{spec_rad_thm}.

\textbf{Step 3:} $\{\Xi_{er},\Omega_f,\Lambda_1\}\in\Pi_2^A$, $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_1\}\in\Pi_3^A$ and $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_2\}\in\Pi_2^A$. $\{\Xi_{er},\Omega_f,\Lambda_1\}\in\Pi_2^A$ follows immediately from the existence of a $\Pi_2^A$ tower of algorithms for the essential spectrum of operators in $\Omega_f$ proven in \cite{ben2015can}. 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 $\Pi_2^A$ tower for $\{\Xi_{er},\Omega_f,\Lambda_1\}$. Similarly, $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_1\}\in\Pi_3^A$ follows from the $\Pi_3^A$ tower of algorithms for $\{\mathrm{Sp}_{\mathrm{ess}},\Omega_{\mathrm{B}},\Lambda_1\}$ constructed in \cite{ben2015can}. Finally, we can use $\Lambda_2$ to collapse the first limit of the algorithm for the essential spectrum in \cite{ben2015can}, giving a $\Pi_2^A$ algorithm and this can be used to show $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_2\}\in\Pi_2^A$.

\textbf{Step 4:} $\{\Xi_{er},\Omega_\mathrm{N},\Lambda_1\}\in\Pi_2^A$.
A $\Pi_2^A$ tower is constructed in the proof of Theorem \ref{spec_poll_hard} for the essential numerical range, $W_e(A)$, of normal operators (using $\Lambda_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\in W_e(A)}\left|z\right|$ is equal to $\Xi_{er}(A)$. Hence a $\Pi_2^A$ tower for $\{\Xi_{er},\Omega_\mathrm{N},\Lambda_1\}$ follows by taking the maximum absolute value over the tower for $W_e(A)$.
\end{proof}

\begin{proof}[Proof of Theorem \ref{spec_rad_thm3}]
Some general remarks are in order to simplify the proof. First, note that given a height $k$ arithmetical tower $\widehat\Gamma_{n_k,...,n_1}(\cdot,p)$ for $\Xi_{r,p}$ and a class $\Omega'$, we can build a $\Pi_{k+1}^A$ tower for $\{\Xi_{cap},\Omega'\}$ as follows. Let $p_1,p_2,...$ be an enumeration of the monic polynomials with rational coefficients and $\tilde\Gamma_{n_k,...,n_1}(\cdot,p)$ be an approximation to $\left|\widehat\Gamma_{n_k,...,n_1}(\cdot,p)\right|^{1/\mathrm{deg}(p)}$ to accuracy $1/n_1$ using finitely many arithmetic operations and comparisons. Define
$$
\Gamma_{n_{k+1},...,n_1}(A)=\min_{1\leq m\leq n_{k+1}}\tilde\Gamma_{n_k,...,n_1}(A,p_m).
$$
The fact that this is a convergent $\Pi_{k+1}^A$ 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 $\{\Xi_{r,p},\Omega_f,\Lambda_1\}\in\Sigma_1^A$, $\{\Xi_{r,p},\Omega_{\mathrm{B}},\Lambda_1\}\in\Sigma_2^A$ and $\{\Xi_{r,p},\Omega_{\mathrm{B}},\Lambda_2\}\in\Sigma_1^A$. Likewise, for the negative results we only need to prove $\{\Xi_{cap},\Omega_{\mathrm{D}},\Lambda_2\}\not\in\Delta^G_2$ (the fact that $\{\Xi_{r,p},\Omega_{\mathrm{D}},\Lambda_2\}\not\in\Delta^G_1$ is obvious), $\{\Xi_{cap},\Omega_{\mathrm{N}},\Lambda_1\}\not\in\Delta^G_3$ and $\{\Xi_{r,p},\Omega_{\mathrm{N}},\Lambda_2\}\not\in\Delta^G_2$. We shall prove these results with $\Omega_{\mathrm{N}}$ replaced by the class of self-adjoint bounded operators denoted by $\Omega_{\mathrm{SA}}$.

\textbf{Step 1:} $\{\Xi_{r,p},\Omega_f,\Lambda_1\}\in\Sigma_1^A$. The function $f$ and sequence $\{c_n\}$ allows us to compute the matrix elements of $p(A)$ for any $A\in\Omega_f$ and polynomial $p$ to arbitrary accuracy. We can then use the same argument as step 1 of the proof of Theorem \ref{spec_rad_thm}, approximating $\|P_np(A)P_n\|$ instead of $\left\|P_nAP_n\right\|$.

\textbf{Step 2:} $\{\Xi_{r,p},\Omega_{\mathrm{B}},\Lambda_1\}\in\Sigma_2^A$ and $\{\Xi_{r,p},\Omega_{\mathrm{B}},\Lambda_2\}\in\Sigma_1^A$. For the first result, we note that
$$
\lim_{m\rightarrow\infty}\|P_np(P_{m}AP_m)P_n\|=\|P_np(A)P_n\|
$$
and let $\Gamma_{n,m}(A,p)$ be an approximation of $\|P_np(P_{m}AP_m)P_n\|$ to accuracy $1/m$, which can be computed in finitely many arithmetic operations and comparisons. To prove $\{\Xi_{r,p},\Omega_{\mathrm{B}},\Lambda_2\}\in\Sigma_1^A$, for any given $A\in\Omega_{\mathrm{B}}$ we can use $\Lambda_2$ to compute a function $f_A$ and sequence $\{c_n(A)\}$ bounding the dispersion such that $A\in\Omega^{f_A}$ and use step 1.

\textbf{Step 3}: $\{\Xi_{cap},\Omega_\mathrm{SA},\Lambda_1\}\notin\Delta^G_3$. Suppose for a contradiction that $\Gamma_{n_2,n_1}$ 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 Theorem \ref{spec_rad_thm} (recall also the results of \S\ref{bigHth}). Let $(\mathcal{M},d)$ be the space $[0,1]$ with the usual metric (note in particular this is not discrete so we use remark \ref{cts_remark}), let $\tilde{\Omega}$ denote the collection of all infinite matrices $\{a_{i,j}\}_{i,j\in\mathbb{N}}$ with entries $a_{i,j}\in\{0,1\}$ and consider the problem function
\begin{equation*}
\tilde{\Xi}_2(\{a_{i,j}\}):\text{ Does }\{a_{i,j}\}\text{ have (only) finitely many columns with (only) finitely many 1's?}
\end{equation*}
Recall that it was shown in \S \ref{bigHth} that $\mathrm{SCI}(\tilde{\Xi}_2,\tilde{\Omega})_{G} = 3$. We will gain a contradiction by using the supposed height two tower to solve $\{\tilde{\Xi}_2,\tilde{\Omega}\}$. Without loss of generality, identify $\Omega_\mathrm{SA}$ with self adjoint operators in $\mathcal{B}(X)$ where $X=\bigoplus_{j=1}^{\infty}X_j$ in the $l^2$-sense with $X_j=l^2(\mathbb{N})$. To proceed we need the following elementary lemma, which will be useful in constructing examples of spectral pollution.

\begin{lemma}
\label{useful_spec_poll}
Let $z_1,z_2,...,z_k\in[-1,1]$ and let $a_{j}=\sqrt{1-z_j^2}$ (say positive square root). Then the symmetric matrix
$$
B(z_1,...,z_k)=\left(\begin{array}{ccccc|ccccc}
z_1& 0& \cdots& &  &        a_1& 0& \cdots& &                                 \\
0 &z_2& 0 & \cdots& &          0 &a_2& 0 & \cdots& \\
\vdots& 0&\ddots& & &          \vdots& 0&\ddots& & \\
&\vdots& & &   &                   &\vdots& & &\\
& & & &z_k                &  & & & &a_k\\
\hline
a_1& 0& \cdots& &   &         -z_1& 0& \cdots& &                                 \\
0 &a_2& 0 & \cdots&  &        0 &-z_2& 0 & \cdots& \\
\vdots& 0&\ddots& &    &      \vdots& 0&\ddots& & \\
&\vdots& & &   &                   &\vdots& & &\\
& & & &a_k                   & & & & &-z_k
\end{array}\right)
\in\mathbb{C}^{2k\times 2k}
$$
has eigenvalues $\pm 1$ (repeated $k$ times).
\end{lemma}
\begin{proof}
By a change of basis, the above matrix is equivalent to a block diagonal matrix with blocks
$$
\begin{pmatrix}
z_j & a_j\\
a_j& -z_j
\end{pmatrix}.
$$
These blocks have eigenvalues $\{-1,1\}$.
\end{proof}

Now choose a sequence of rational numbers $\{z_j\}_{j\in\mathbb{N}}\in[-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}\}\in\tilde\Omega$, let the infinite matrix $C^{(j)}$ be defined as follows. If $k,l<j+1$ then $C^{(j)}_{kl}=z_{k}\delta_{k,l}$. Let $r(i)$ denote the row of the $i$th one of the column $\{a_{i,j}\}_{i\in\mathbb{N}}$ (with $r(i)=\infty$ if $\sum_{m}a_{m,j}<i$ and $r(0)=0$). If $r(i)<\infty$ then for $k\leq l$ define
$$
C^{(j)}_{kl}=\begin{cases}
        a_p\delta_{k,l-(r(i)-r(i-1)-1)}, & p=1,...,j,l=r(i)+j\cdot (2i-1)+p-1\\
        -z_p\delta_{k,l}, & p=1,...,j,l=r(i)+j\cdot (2i-1)+p-1\\
				z_p\delta_{k,l}, & p=1,...,j,l=r(i)+2j\cdot i+p-1\\
				0, & \text{otherwise},
        \end{cases}
$$
and extend $C^{(j)}_{kl}$ below the diagonal to a symmetric matrix. The key property of this matrix is that if the column $\{a_{i,j}\}_{i\in\mathbb{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 $\mathrm{Sp}(C^{(j)})=\{-1,1,0\}$ or $\{-1,1\}$. On the other hand, if $\{a_{i,j}\}_{i\in\mathbb{N}}$ has finitely many 1s, then $C^{(j)}$ is unitarily equivalent the direct sum of a finite number of $B_j$, the diagonal operator $\mathrm{diag}\{z_1,...,z_k\}$ and the zero operator acting on some subspace. In this case $\{z_1,...,z_j\}\subset\mathrm{Sp}(C^{(j)})$. Let $A=\bigoplus_{j=1}^{\infty}C^{(j)}$, then it is clear that if $\tilde\Xi_2(\{a_{i,j}\})=1$, then $\mathrm{Sp}(A)$ is a finite set, otherwise it is the entire interval $[-1,1]$.

Now we use the following facts for bounded self-adjoint operators $A$. If $\mathrm{Sp}(A)$ is a finite set then $\Xi_{cap}(A)=0$ whereas if $\mathrm{Sp}(A)=[-1,1]$ then $\Xi_{cap}(A)=1/2$ (this can be proven easily using the minimal $l^\infty$ norm property of monic Chebyshev polynomials). We then define $\tilde{\Gamma}_{n_2,n_1}(\{a_{i,j}\})=\min\{\max\{1-2\Gamma_{n_2,n_1}(A),0\},1\}$. It is clear that this defines a generalised algorithm. In particular, given $N$ we can evaluate $\{A_{k,l}:k,l\leq N\}$ using only finitely many evaluations of $\{a_{i,j}\}$, where we can use a bijection between canonical bases of $l^2(\mathbb{N})$ and $\bigoplus_{j=1}^{\infty}X_j$ to view $A$ as acting on $l^2(\mathbb{N})$. We also have the convergence $\lim_{n_2\rightarrow\infty}\lim_{n_1\rightarrow\infty}\tilde{\Gamma}_{n_2,n_1}(\{a_{i,j}\})=\tilde\Xi_2(\{a_{i,j}\})$, a contradiction.

\textbf{Step 4:} $\{\Xi_{cap},\Omega_{\mathrm{D}},\Lambda_2\}\not\in\Delta^G_2$. This is the same argument as in step 3 of the proof of Theorem \ref{spec_rad_thm}, however now we replace $A_m$ by $A_m=\mathrm{diag}\{d_1,d_2,...,d_m\}\in\mathbb{C}^{m\times m}$, where $\{d_m\}$ is a dense subsequence of $[-1,1]$, and use the fact that $\Xi_{cap}(B_k)=0$. It follows that given the proposed height one tower $\Gamma_n$ and the constructed $A$, $\Xi_{cap}(A)=1/2$ but $\Gamma_{n(k)}(A)<1/4$, the required contradiction.

\textbf{Step 5:} $\{\Xi_{r,p},\Omega_{\mathrm{SA}},\Lambda_2\}\not\in\Delta^G_2$. Recall that we are given some polynomial $p$ of degree at least two. We will assume without loss of generality that the zeros of $p$ are $\pm1$ and $\left|p(0)\right|>1$ (the more general case is similar). The argument is similar to step 3 of the proof of Theorem \ref{spec_rad_thm}, but we spell it out since it uses Lemma \ref{useful_spec_poll}. Suppose for a contradiction that a height one tower, $\Gamma_n$, solves the problem. We will gain a contradiction by showing that $\Gamma_n(A)$ does not converge for an operator of the form,
$$
A=\bigoplus_{r=1}^\infty B(z_1,...,z_{l_r}),
$$
and define
$$
C=\mathrm{diag}\{z_1,z_2,...\}\in\Omega_{\mathrm{B}}.
$$
Where we assume that $l_r\geq r$ to ensure that the spectrum of $A$ is equal to $\{-1,1\}$ and hence $\Xi_{r,p}(A)=0$. Now suppose that $l_1,...,l_k$ have been chosen and consider the operator
$$
B_k=B(z_1)\oplus...\oplus B(z_1,...,z_{l_k})\oplus C.
$$
The spectrum of $B_k$ is $[-1,1]$ so that $\Xi_{r,p}(B_k)>1$ and hence there exists $n(k)\geq k$ such that $\Gamma_{n(k)}(B_k)>1/4$. But $\Gamma_{n(k)}(B_k)$ can only depend on the evaluations of the matrix entries $\{B_k\}_{ij}=\langle B_ke_j,e_i \rangle$ with $i,j\leq 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 \ref{Gen_alg}, $\Gamma_{n(k)}(A)=\Gamma_{n(k)}(B_k)>1/4$. But $\Gamma_n(A)$ must converge to $0$, a contradiction.
\end{proof}

\section{Proof of Theorem \ref{spec_poll_hard}}

\begin{proof}[Proof of Theorem \ref{spec_poll_hard} for $\Xi_{we}$] For the lower bounds, it is enough to note that $\{\Xi_{we},\Omega_\mathrm{D},\Lambda_2\}\not\in\Delta_2^G$ by the same argument as step 1 of the proof of Theorem \ref{spec_rad_thm2}. The construction is exactly the same but yields $d_{\mathrm{H}}(\Gamma_{n(k)}(A),\{0\})\leq1/2$, whereas $\Xi_{we}(A)=[0,1]$. Hence the proposed height one tower cannot converge. To construct a $\Pi_2^A$ tower for general operators, we need the following Lemma:

\begin{lemma}
\label{num_ran_fs}
Let $B\in\mathbb{C}^{n\times n}$ and $\epsilon>0$. Then using finitely many arithmetic operations and comparisons, we can compute points $z_1,...,z_k\in\mathbb{Q}+i\mathbb{Q}$ such that
$$
d_{\mathrm{H}}(\{z_1,...,z_k\},W(B))\leq \epsilon.
$$
\end{lemma}
\begin{proof}
Recall from step 1 of the proof of Theorem \ref{spec_rad_thm} that we can compute an upper bound $M\in\mathbb{Q}_+$ for $\|B\|$ in finitely many arithmetic operations and comparisons. Now choose points $x_1,...,x_k\in\mathbb{Q}^n$, each of norm at most $1$, such that $d_{\mathrm{H}}(\{x_1,...,x_k\},\{x\in\mathbb{C}^n:\|x\|=1\})<\epsilon/(3M)$. These can be computed in finitely many arithmetic operations and comparisons using generalised polar coordinates and approximations of trigonometric identities. It follows that
$$
d_{\mathrm{H}}(\{\langle Bx_1,x_1\rangle,...,\langle Bx_k,x_k\rangle\},W(B))\leq2\epsilon/3.
$$
We then let each $z_j\in \mathbb{Q}+i\mathbb{Q}$ be a $\epsilon/4$ approximation of $\langle Bx_j,x_j\rangle$, which can be computed in finitely many arithmetic operations and comparisons.
\end{proof}

It is well known that for $A\in\Omega_{\mathrm{B}}$,
\begin{align*}
\overline{W(P_nA|_{P_n\mathcal{H}})}&\uparrow \overline{W(A)},\\
\overline{W((I-P_n)A|_{(I-P_n)\mathcal{H}})}&\downarrow W_{e}(A).
\end{align*}
Given $A$, let $\Gamma_{n_2,n_1}(A)$ be a finite collection of points produced by the algorithm in Lemma \ref{num_ran_fs} applied to $B=(I-P_{n_2})P_{n_1+n_2+1}A|_{P_{n_1+n_2+1}(I-P_{n_2})\mathcal{H}}$ and $\epsilon=1/n_1$. The above limits show that $\Gamma_{n_2,n_1}$ provides a $\Pi_2^A$ tower for $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_1\}$.
\end{proof}

\begin{proof}[Proof of Theorem \ref{spec_poll_hard} for $\Xi_{poll}^{\mathbb{F}}$] We will prove that $\{\Xi_{poll}^{\mathbb{R}},\Omega_\mathrm{D},\Lambda_i\}\not\in\Delta^G_3$ and $\{\Xi_{poll}^{\mathbb{C}},\Omega_{\mathrm{B}},\Lambda_1\}\in\Sigma^A_3$. The construction of towers for $\Xi_{poll}^{\mathbb{R}}$ are similar, as are the arguments for lower bounds.

\textbf{Step 1:} $\{\Xi_{poll}^{\mathbb{C}},\Omega_{\mathrm{B}},\Lambda_1\}\in\Sigma^A_3$. Let $\tilde \Gamma_{n_2,n_1}$ be the $\Pi_2^A$ tower for $\{\Xi_{er},\Omega_{\mathrm{B}},\Lambda_1\}$ constructed above. Recall the definition
$$
\gamma_{n_2,n_1}(z;A)=\min\{\sigma_1(P_{n_1}(A-zI){|_{P_{n_2}\mathcal{H}}}),\sigma_1(P_{n_1}(A^*-\bar{z}I){|_{P_{n_2}\mathcal{H}}})\}
$$
and that this can be approximated to any given accuracy in finitely many arithmetic operations and comparisons (see also Appendix \ref{basic_spec} and Part I). We assume that we approximate from below to an accuracy of $1/n_1$ and call this approximation $\tilde \gamma_{n_2,n_1}$. The function $\gamma_{n_2,n_1}(z;A)$ is Lipschitz continuous with Lipschitz constant bounded by $\|P_{n_1}(A-zI){|_{P_{n_2}\mathcal{H}}}\|$. An upper bound $M_{n_2,n_1}$, say to within $1$, for this can be computed in finitely many arithmetic operations and comparisons via the same arguments from step 1 of the proof of Theorem \ref{spec_rad_thm}. We also have that $M_{n_2,n_1}$ are uniformly bounded above over all $n_2,n_1$ (but we cannot necessarily compute an upper bound). Define the set
$$
V_{n_1}=\bigcup_{m=1}^{n_1}U_{m},
$$
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\in\mathbb{Q}+i\mathbb{Q}$ has $\mathrm{dist}(z,V_{n_1})<\eta$ for any given $\eta\in\mathbb{Q}_+$. Let $\Upsilon_{n_2,n_1}(A,U)$ be the finite collection of all $z\in\tilde \Gamma_{n_2,n_1}(A)$ with $\mathrm{dist}(z,V_{n_1})<1/n_2-1/n_1$. If $\Upsilon_{n_2,n_1}(A,U)$ is empty then set $Q_{n_2,n_1}(A,U)=0$, otherwise set
$$
Q_{n_2,n_1}(A,U):=\sup_{z\in\Upsilon_{n_2,n_1}(A,U)} \tilde\gamma_{n_2,n_1}(z;A)-\frac{M_{n_2,n_1}}{n_1}.
$$
The above remarks show that this can be computed using finitely many arithmetic operations and comparisons.

Let $W_{n_2}=\overline{W((I-P_{n_2})A|_{(I-P_{n_2})\mathcal{H}})}$ and $W_{n_2,n_1}=W((I-P_{n_2})P_{n_1+n_2+1}A|_{P_{n_1+n_2+1}(I-P_{n_2})\mathcal{H}})$. We claim that the set $\Upsilon_{n_2,n_1}(A,U)$ converges to
$$
\Upsilon_{n_2}(A,U):=\overline{\big\{z\in W_{n_2}:\mathrm{dist}(z,\overline{U})<\frac{1}{n_2}\big\}},
$$
as $n_1\rightarrow\infty$, meaning also if $\Upsilon_{n_2}(A,U)$ is empty then $\Upsilon_{n_2,n_1}(A,U)$ is empty for large $n_1$. If $z\in \Upsilon_{n_2,n_1}(A,U)$, then there exists $\hat{z}\in W_{n_2,n_1}\subset W_{n_2}$ with $\left|z-\hat{z}\right|\leq1/{n_1}$. Since
$$
\mathrm{dist}(z,\overline{U})\leq\mathrm{dist}(z,V_{n_1})<1/n_2-1/n_1,
$$
it follows that $\mathrm{dist}(\hat{z},\overline{U})<{1}/{n_2}$ and hence $\Upsilon_{n_2}(A,U)$ is non-empty. So to prove convergence we only need to deal with the case $\Upsilon_{n_2}(A,U)\neq\emptyset$. The above argument also shows that any limit point of a subsequence $z_{m(j)}\in\Upsilon_{n_2,m(j)}(A,U)$ must lie in $\Upsilon_{n_2}(A,U)$. Hence to prove the claim, we need to only prove that for any $z\in\Upsilon_{n_2}(A,U)$, there exists $z_{n_1}$ that are contained in $\Upsilon_{n_2,n_1}(A,U)$ for large $n_1$ and converge to $z$.

Let $z\in W_{n_2} $ with $\mathrm{dist}(z,\overline{U})<{1}/{n_2}$, then there exists $\epsilon>0$ and $j>0$ such that $\mathrm{dist}(z,U_j)<{1}/{n_2}-\epsilon$. There also exists $z_{n_1}\in\tilde\Gamma_{n_2,n_1}(A)$ with $z_{n_1}\rightarrow z$.
It must hold for $n_1>j$ that
\begin{align*}
\mathrm{dist}({z}_{n_1},V_{n_1})\leq \mathrm{dist}({z}_{n_1},V_j)&\leq \left|z_{n_1}-z\right|+\mathrm{dist}(z,U_j)\\
&<\left|z_{n_1}-z\right|+\frac{1}{n_2}-\epsilon.
\end{align*}
This last quantity is smaller than $1/n_2-1/n_1$ for large $n_1$ and hence $z_{n_1}\in\Upsilon_{n_2,n_1}(A,U)$ for large $n_1$. It follows for any $z\in\Upsilon_{n_2}(A,U)$, there exists $z_{n_1}$ that are contained in $\Upsilon_{n_2,n_1}(A,U)$ for large $n_1$ and converge to $z$.

Define
$$
Q_{n_2}(A,U):=\sup_{z\in\Upsilon_{n_2}(A,U)} \gamma_{n_2}(z;A),
$$
where we recall that $\gamma_{n_2}(z;A)=\min\{\sigma_1((A-zI){|_{P_{n_2}\mathcal{H}}}),\sigma_1((A^*-\bar{z}I){|_{P_{n_2}\mathcal{H}}})\}.$ If $z\in\Upsilon_{n_2,n_1}(A,U)$, then the above shows that there exists $\hat{z}\in\Upsilon_{n_2}(A,U)$ with $\left|z-\hat{z}\right|\leq1/{n_1}$. It follows that
\begin{align*}
\tilde\gamma_{n_2,n_1}(z;A)-\frac{M_{n_2,n_1}}{n_1}&\leq \gamma_{n_2,n_1}(z;A)-\frac{M_{n_2,n_1}}{n_1}\\
&\leq \gamma_{n_2,n_1}(\hat{z};A)\leq \gamma_{n_2}(z;A),
\end{align*}
where we have used the bound on the Lipschitz constant and the fact that $\gamma_{n_2,n_1}$ converge up to $\gamma_{n_2}$ (and uniformly on compact subsets of $\mathbb{C}$). It follows that $Q_{n_2,n_1}(A,U)\leq Q_{n_2}(A,U)$ and this also covers the case that $\Upsilon_{n_2}(A,U)=\emptyset$ if we define the supremum over the empty set to be $0$. The set convergence proven above and uniform convergence of $\tilde\gamma_{n_2,n_1}$ implies that $Q_{n_2,n_1}(A,U)$ converges to $Q_{n_2}(A,U)$. It is also clear that the $\Upsilon_{n_2}(A,U)$ are nested and converge down to $W_e(A)\cap\overline{U}$ since $W_{n_2}$ converges down to $W_{e}(A)$. The function $\gamma_{n_2}$ also converges down to
$$
\gamma(z;A)=\left\|R(z,A)\right\|^{-1}
$$
uniformly on compact subsets of $\mathbb{C}$ and hence $Q_{n_2}(A,U)$ converges down to
$$
Q(A,U)=\sup_{z\in W_e(A)\cap\overline{U}} \left\|R(z,A)\right\|^{-1}.
$$

Define
$$
\Gamma_{n_3,n_2,n_1}(A,U)=1-\chi_{[0,1/{n_3}]}(Q_{n_2,n_1}(A,U))\in\{0,1\}.
$$
The above show that
$$
\lim_{n_1\rightarrow\infty} \Gamma_{n_3,n_2,n_1}(A,U)=1-\chi_{[0,1/{n_3}]}(Q_{n_2}(A,U))=:\Gamma_{n_3,n_2}(A,U).
$$
Since $\chi_{[0,1/n_3]}$ has right limits and $Q_{n_2}(A,U)$ are non-increasing,
$$
\lim_{n_2\rightarrow\infty} \Gamma_{n_3,n_2}(A,U)=1-\chi_{[0,1/{n_3}]}(Q(A,U)\pm):=\Gamma_{n_3}(A,U),
$$
where $\pm$ denotes one of the right or left limits (it is possible to have either). Now if $\Xi_{poll}^{\mathbb{C}}(A,U)=0$, then $\Gamma_{n_3}(A,U)=0$ for all $n_3$. But if $\Xi_{poll}^{\mathbb{C}}(A,U)=1$, then for large $n_3$, $\Gamma_{n_3}(A,U)=1$. Moreover, in this latter case, $\Gamma_{n_3}(A,U)=1$ signifies the existence of $z\in W_e(A)\cap\overline{U}$ with $\gamma(z;A)>0$ and hence $z\not\in\mathrm{Sp}(A)$. Hence $\Gamma_{n_3,n_2,n_1}$ provides a $\Sigma_3^A$ tower.

\textbf{Step 2:} $\{\Xi_{poll}^{\mathbb{R}},\Omega_{\mathrm{D}},\Lambda_2\}\not\in\Delta^G_3$. We will argue for the case that $U=U_1=\mathbb{R}$ and the restricted case is similar. Assume for a contradiction that this is false and $\widehat{\Gamma}_{n_2,n_1}$ is a general height two tower for $\{\Xi_{poll}^{\mathbb{R}},\Omega_{\mathrm{D}},\Lambda_2\}$. We follow the same strategy as the proof of Theorem \ref{spec_rad_thm} step 4 (recall also the results of \S\ref{bigHth}). Let $(\mathcal{M},d)$ be discrete space $\{0,1\}$ and $\tilde\Omega$ denote the collection of all infinite matrices $\{a_{i,j}\}_{i,j\in\mathbb{N}}$ with entries $a_{i,j}\in\{0,1\}$ and consider the problem function
\begin{equation*}
\tilde\Xi_1(\{a_{i,j}\}):\text{ Does }\{a_{i,j}\}\text{ have a column containing infinitely many non-zero entries?}
\end{equation*}

For $j\in\mathbb{N}$, let $\{b_{i,j}\}_{i\in\mathbb{N}}$ be a dense subset of $I_j:=[1-1/2^{2j-1},1-1/{2^{2j}}]$. Given a matrix $\{a_{i,j}\}_{i,j\in\mathbb{N}}\in\tilde\Omega$, construct a matrix $\{c_{i,j}\}_{i,j\in\mathbb{N}}$ by letting $c_{i,j}=a_{i,j}b_{r(i,j),j}$ where
$$
r(i,j)=\max\big\{1,\sum_{k=1}^{i}a_{k,j}\big\}.
$$
Now consider any bijection $\phi:\mathbb{N}\rightarrow\mathbb{N}^2$ and define the diagonal operator
\begin{equation*}
A=\mathrm{diag}(c_{\phi(1)},c_{\phi(2)},c_{\phi(3)},...).
\end{equation*}
The algorithm $\widehat{\Gamma}_{n_2,n_1}$ thus translates to an algorithm $\Gamma'_{n_2,n_1}$ for $\{\tilde\Xi_1,\tilde\Omega\}$. Namely, we set $\Gamma'_{n_2,n_1}(\{a_{i,j}\}_{i\in\mathbb{N}})=\widehat{\Gamma}_{n_2,n_1}(A)$. The fact that $\phi$ is a bijection shows that the lowest level $\Gamma'_{n_2,n_1}$ are generalised algorithms (and are consistent). In particular, given $N$, we can find $\{A_{i,j}:i,j\leq 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
\begin{equation*}
\mathrm{Sp}(A)=\{1\}\cup(\bigcup_{j:\{a_{i,j}\}_{i\in\mathbb{N}}\text{ has infinitely many 1s}}I_j)\cup Q,
\end{equation*}
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\in\mathbb{N}}$ with infinitely many 1s. Otherwise the essential spectrum is $\{1\}$. It follows that $\tilde \Xi(\{a_{i,j}\})=\Xi_{poll}^{\mathbb{R}}(A,\mathbb{R})$ and hence we get a contradiction.
\end{proof}

\section{Proofs of Theorems on Lebesgue Measure}
\label{pf_leb}

We will use the function $\texttt{DistSpec}$ in Appendix \ref{basic_spec}. For ease of notation, we suppress the dispersion function $f$ in calling $\texttt{DistSpec}$ but assume that we know $D_{f,n}(A)\leq c_n$ with $c_n\rightarrow 0$ as $n\rightarrow\infty$. 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:

\vspace{2mm}
\textbf{\textit{Observation:}} If $A\in\Omega_f$, then the function $F_n(z):=\texttt{DistSpec}(A,n,f(n),z)+c_n$ converges uniformly to $\left\|R(z,A)\right\|^{-1}$ from above on compact subsets of $\mathbb{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
\begin{proposition}
\label{comp_prop}
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 the position of the rectangle.
\end{proposition}

\begin{proof}
Without loss of generality we assume that the rectangle is $\{x+iy:x,y\in[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. What is more, we can bound the number of subrectangles that intersect the boundary of any of the circles, and this can be used to obtain known precision.
\end{proof}

\begin{proof}[Proof of Theorem \ref{Leb_1}]

\textbf{Step 1:} $\{\Xi_1^L,\Omega_f,\Lambda_i\},\{\Xi_1^L,\Omega_\mathrm{D},\Lambda_i\}\in\Pi^A_2$. It is enough to consider $\Lambda_1$. We will estimate $\mathrm{Leb}(\mathrm{Sp}(A))$ by estimating the Lebesgue measure of the resolvent set on the closed square $[-C,C]^2$, where $\left\|A\right\|\leq C$. We do not assume $C$ is known. For $n_1,n_2\in\mathbb{N}$, let
\begin{equation*}
\texttt{Grid}(n_1,n_2)=\left(\frac{1}{2^{n_2}}\mathbb{Z}+\frac{1}{2^{n_2}}i\mathbb{Z}\right)\cap[-n_1,n_1]^2.
\end{equation*}
Letting $B(x,r),D(x,r)$ denote the closed and open balls of radius $r$ around $x$ respectively\footnote{We set $D(x,0)=\emptyset$.} in $\mathbb{C}$ (or $\mathbb{R}$ where appropriate), we define
\begin{equation*}
U(n_1,n_2,A)=[-n_1,n_1]\times[-n_1,n_1]\cap(\cup_{z\in\texttt{Grid}(n_1,n_2)}B(z,F_{n_1}(z))).
\end{equation*}
Note that $\mathrm{Leb}(U(n_1,n_2,A))$ can be computed up to arbitrary predetermined precision using only arithmetic operations and comparisons by Proposition \ref{comp_prop}. Using this we can define
\begin{equation}
\Gamma_{n_2,n_1}(A)=4n_1^2-\mathrm{Leb}(U(n_1,n_2,A))
\end{equation}
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). It is obvious that $\Gamma_{n_2,n_1}$ are general arithmetical algorithms using the fact that $\texttt{DistSpec}$ is and the above proposition. The only non-trivial part is convergence. The algorithm is summarised in the routine \texttt{LebSpec} in \S \ref{leb_num}.

We will now show that the algorithm \texttt{LebSpec} converges and realises the $\Pi_2^A$ classification. There exists a compact set $K$ such that $\left\|R(z,A)\right\|^{-1}> 1$ on $K^c$ and without loss of generality we can make $C$ larger, $C\in\mathbb{N}$ and take $K=[-C,C]^2$. For $n_1\geq C$
$$
U(n_1,n_2,A)=([-C,C]^2\cap(\cup_{z\in\texttt{Grid}(n_1,n_2)}B(z,F_{n_1}(z))))\cup([-n_1,n_1]^2\backslash[-C,C]^2)
$$
since $F_{n}(z)\geq \left\|R(z,A)\right\|^{-1}$. It follows that for large $n_1$
$$
\Gamma_{n_2,n_1}(A)=4C^2-\mathrm{Leb}([-C,C]^2\cap(\cup_{z\in\texttt{Grid}(n_1,n_2)}B(z,F_{n_1}(z)))).
$$
As $n_1\rightarrow\infty$, $[-C,C]^2\cap(\cup_{z\in\texttt{Grid}(n_1,n_2)}B(z,F_{n_1}(z)))$ converges to the closed set
\begin{equation*}
K(n_2,A)=[-C,C]^2\cap(\cup_{z\in\texttt{Grid}(C,n_2)}B(z,\left\|R(z,A)\right\|^{-1}))
\end{equation*}
from above and hence
\begin{equation*}
\lim_{n_1\rightarrow\infty}\Gamma_{n_2,n_1}(A)=4C^2-\mathrm{Leb}(K(n_2,A)),
\end{equation*}
from below. Consider the relatively open set
\begin{equation*}
V(n_2,A)=[-C,C]^2\cap(\cup_{z\in\texttt{Grid}(C,n_2)}D(z,\left\|R(z,A)\right\|^{-1})).
\end{equation*}
Clearly $\mathrm{Leb}(K(n_2,A))=\mathrm{Leb}(V(n_2,A))$ since the sets differ by a finite collection of circular arcs or points (recall we defined the open ball of radius zero to be the empty set). Hence we must show that
\begin{equation*}
\lim_{n_2\rightarrow\infty}\mathrm{Leb}(V(n_2,A))=\mathrm{Leb}(\rho_{C}(A)),
\end{equation*}
where $\rho_{C}(A)=[-C,C]^2\backslash\mathrm{Sp}(A)$. For $z\in\rho_C(A)$,
$$
\mathrm{dist}(z,\mathrm{Sp}(A))\geq\left\|R(z,A)\right\|^{-1}
$$
and hence we get $V(n_2,A)\subset\rho_{C}(A)$. Since $\rho_C(A)$ is relatively open, a simple density argument using the continuity of $\left\|R(z,A)\right\|^{-1}$ yields $V(n_2,A)\uparrow\rho_{C}(A)$ as $n_2\rightarrow\infty$ since the grid refines itself. So we get
$$
\mathrm{Leb}(V(n_2,A))\uparrow\mathrm{Leb}(\rho_{C}(A)).
$$
This proves the convergence and also shows that $\Gamma_{n_2}(A)\downarrow \Xi_1^L(A)$, thus yielding the $\Pi_2^A$ classification. The same argument works in the one-dimensional case when considering self-adjoint operators $\Omega_{\mathrm{D}}$ and $\mathrm{Leb}_{\mathbb{R}}$. Simply restrict everything to the real line and consider the interval $[-C,C]$ rather than a square.

\textbf{Step 2:} $\{\Xi_1^L,\Omega_f,\Lambda_i\},\{\Xi_1^L,\Omega_\mathrm{D},\Lambda_i\}\notin\Delta^G_2$. It is enough to consider $\Lambda_2$. We will only show that $\mathrm{SCI}(\Xi_1^L,\Omega_\mathrm{D},\Lambda_2)_{G} \geq 2$ for which we use $\mathrm{Leb}_{\mathbb{R}}$ and the two-dimensional case is similar. Suppose for a contradiction that there exists a height one tower $\Gamma_n$, then $\Lambda_{\Gamma_n}(A)$ is finite for each $A\in\Omega_\mathrm{D}$. Hence, for every $A$ and $n$ there exists a finite number $N(A,n)\in\mathbb{N}$ such that the evaluations from $\Lambda_{\Gamma_n}(A)$ only take the matrix entries $A_{ij} = \left\langle Ae_j , e_i\right\rangle$ with $i,j\leq N(A,n)$ into account.

Pick any sequence $a_1,a_2,...$ dense in the unit interval $[0,1]$. Consider the matrix operators $A_m=\mathrm{diag}\{a_1,a_2,...,a_m\}\in\mathbb{C}^{m\times m}$, $B_m=\mathrm{diag}\{0,0,...,0\}\in\mathbb{C}^{m\times m}$ and $C=\mathrm{diag}\{0,0,...\}$. Set $A=\bigoplus_{m=1}^{\infty}(B_{k_m}\oplus A_{k_m})$ 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. $\mathrm{Sp}(B_{k_1}\oplus A_{k_1}\oplus...\oplus B_{k_m}\oplus A_{k_m}\oplus C)=\{0,a_1,a_2,...,a_{k_m}\}$ and hence $\mathrm{Leb}(\mathrm{Sp}(B_{k_1}\oplus A_{k_1}\oplus...\oplus B_{k_m}\oplus A_{k_m}\oplus C))=0$ so there exists some $n_m\geq m$ such that if $n\geq n_m$ then
\begin{equation*}
\Gamma_n(B_{k_1}\oplus A_{k_1}\oplus...\oplus B_{k_m}\oplus A_{k_m}\oplus C)\leq \frac{1}{2}.
\end{equation*}
Now let $k_{m+1}\geq \max\{N(B_{k_1}\oplus A_{k_1}\oplus...\oplus B_{k_m}\oplus A_{k_m}\oplus C,n_m),k_m+1\}$. Any evaluation function $f_{i,j}\in\Lambda$ is simply the $(i,j)^{\rm th}$ matrix entry and hence by construction
\begin{equation*}
f_{i,j}(B_{k_1}\oplus A_{k_1}\oplus...\oplus B_{k_m}\oplus A_{k_m}\oplus C)=f_{i,j}(A),
\end{equation*}
for all $f_{i,j}\in\Lambda_{\Gamma_{n_m}}(B_{k_1}\oplus A_{k_1}\oplus...\oplus B_{k_m}\oplus A_{k_m}\oplus C)$. By assumption (iii) in Definition \ref{Gen_alg} it follows that $\Lambda_{\Gamma_{n_m}}(B_{k_1}\oplus A_{k_1}\oplus...\oplus B_{k_m}\oplus A_{k_m}\oplus C)=\Lambda_{\Gamma_{n_m}}(A)$ and hence by assumption (ii) in the same definition that $\Gamma_{n_m}(A)=\Gamma_{n_m}(B_{k_1}\oplus A_{k_1}\oplus...\oplus B_{k_m}\oplus A_{k_m}\oplus C)\leq 1/2$. But $\lim_{n\rightarrow\infty}(\Gamma_n(A))=\mathrm{Leb}(\overline{\{0,a_1,a_2,...\}})=1$ a contradiction.

\textbf{Step 3}: $\{\Xi_1^L,\Omega,\Lambda_1\}\in\Pi^A_3$ for $\Omega=\Omega_{\mathrm{B}},\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$. We will deal with the case of $\Omega_{\mathrm{B}}$. The cases of $\Omega_\mathrm{N}$ and $\Omega_g$ then follow via $\Omega_{\mathrm{N}}\subset\Omega_{g}\subset \Omega_{\mathrm{B}}$ and the one-dimensional Lebesgue measure case for $\Omega_\mathrm{SA}$ is similar.

A careful analysis of the proof in step 1 yields that
\begin{itemize}
	\item $\Gamma_{n_2,n_1}(A)$ converges to $\Gamma_{n_2}(A)$ from below as $n_1\rightarrow\infty$.
	\item $\Gamma_{n_2}(A)$ converges to $\mathrm{Leb}(\mathrm{Sp}(A))$ monotonically from above as $n_2\rightarrow\infty$.
\end{itemize}
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 \ref{comp_prop}. 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 we need it for the first of the above facts. A slight alteration of the proof/algorithm by inserting an extra limit deals with the general case.

Define the function
$$
\gamma_{n,m}(z;A)=\min\{\sigma_1(P_m(A-zI){|_{P_n\mathcal{H}}}),\sigma_1(P_m(A^*-\bar{z}I){|_{P_n\mathcal{H}}})\},
$$
where $\sigma_1$ denotes the injection modulus/smallest singular value (see also Appendix \ref{basic_spec} and Part I). One can show that $\gamma_{n,m}$ converges uniformly on compact subsets to
$$
\gamma_{n}(z;A)=\min\{\sigma_1((A-zI){|_{P_n\mathcal{H}}}),\sigma_1((A^*-\bar{z}I){|_{P_n\mathcal{H}}})\},
$$
as $m\rightarrow\infty$ and that this converges uniformly down to $\left\|R(z,A)\right\|^{-1}$ on compact subsets as $n\rightarrow\infty$ \cite{hansen2011solvability}. With a slight abuse of notation, we can approximate $\gamma_{n,m}(z;A)$ to within $1/m$ by $\texttt{DistSpec}(A,n,m,z)$ (where the spacing of the search routine is $1/m$, see also Appendix \ref{basic_spec}) so that this converges uniformly on compact subsets to $\gamma_{n}(z;A)$. In exactly the same manner as before, define
\begin{align*}
U(n_1,n_2,n_3,A)&=[-n_2,n_2]^2\cap(\cup_{z\in\texttt{Grid}(n_2,n_3)}B(z,\gamma_{n_2,n_1}(z;A))),\\
\Gamma_{n_3,n_2,n_1}(A)&=(2n_2)^2-\mathrm{Leb}(U(n_1,n_2,n_3,A))
\end{align*}
The stated uniform convergence means that the argument in step 1 carries through and we have a height three tower, realising the $\Pi^A_3$ classification.

\textbf{Step 4}: $\{\Xi_1^L,\Omega_\mathrm{SA},\Lambda_1\}\notin\Delta^G_3$. The proof is exactly the same argument as the proof of step 3 of Theorem \ref{spec_rad_thm3}. However, in this case to gain the contradiction, we then define $\tilde{\Gamma}_{n_2,n_1}(\{a_{i,j}\})=\min\{\max\{1-\Gamma_{n_2,n_1}(A)/2,0\},1\}$ where $\Gamma_{n_2,n_1}(A)$ is the supposed height two tower for $\{\Xi_1^L,\Omega_\mathrm{SA},\Lambda_1\}$.

\textbf{Step 5}: $\{\Xi_1^L,\Omega,\Lambda_1\}\notin\Delta^G_3$ for $\Omega=\Omega_{\mathrm{B}},\Omega_{\mathrm{N}}$, or $\Omega_g$. Since $\Omega_\mathrm{N}\subset\Omega_g\subset\Omega_{\mathrm{B}}$, we only need to deal with $\Omega_\mathrm{N}$. We can use a similar argument as in step 4, but now replacing each $C^{(j)}$ by
$$
D^{(j)}=\bigoplus_{k=1}^j ih_k C^{(j)},
$$
where $h_1,h_2,...$ is a dense sequence in $[0,1]$ and this operators acts on $X_j=\bigoplus_{k=1}^j l^2(\mathbb{N})$. This ensures that the spectrum of the operator yields a positive two-dimensional Lebesgue measure if and only if $\tilde\Xi_2(\{a_{i,j}\})=0$. The rest of the argument is entirely analogous.

\textbf{Step 6}: $\Delta^G_2 \not\owns\{\Xi_1^L,\Omega,\Lambda_2\}\in\Pi^A_2$ for $\Omega=\Omega_{\mathrm{B}},\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$. The impossibility result follows by considering diagonal operators. For the existence of $\Pi^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 $\gamma_n$ directly.
\end{proof}

\begin{proof}[Proof of Theorem \ref{Leb_2}]
Using the convergence
$$
\lim_{\epsilon\downarrow 0}\mathrm{Leb}(\widehat{\mathrm{Sp}}_{\epsilon}(A))=\mathrm{Leb}(\mathrm{Sp}(A)),
$$
the lower bounds in Theorem \ref{Leb_1} immediately imply the lower bounds in Theorem \ref{Leb_2}. Hence we only need to construct the appropriate algorithms.

\textbf{Step 1}: $\{\Xi_2^L,\Omega_f,\Lambda_1\},\{\Xi_2^L,\Omega_{\mathrm{D}},\Lambda_1\}\in\Sigma_1^A$. Let $A\in\Omega_f$ and
$$
E_n=\frac{1}{n}\left(\mathbb{Z}+i\mathbb{Z}\right)\cap\{z\in\mathbb{C}:F_n(z)\leq\epsilon\}\cap[-n,n]^2.
$$
Clearly we can compute $E_n$ with finitely many arithmetic operations and comparisons and we set
$$
\Gamma_n(A)=\mathrm{Leb}\big(\cup_{z\in E_n}D(z,\max\{0,\epsilon-F_n(z)\})\big).
$$
Proposition \ref{comp_prop} shows that without loss of generality we can assume $\Gamma_n(A)$ can be computed exactly with finitely many arithmetic operations and comparisons. The algorithm is presented in the \texttt{LebPseudoSpec} routine in \S \ref{leb_num} and the following shows that this algorithm is basic.

Suppose that $F_n(z)<\epsilon$ and that $\left|w\right|<\epsilon-F_n(z)$. If $z\in\mathrm{Sp}(A)$ then clearly
$$
\left\|R(z+w,A)\right\|^{-1}\leq\left|w\right|<\epsilon-F_n(z)\leq \epsilon,
$$
and this holds trivially if $z+w\in\mathrm{Sp}(A)$ so assume that neither of $z,z+w$ are in the spectrum. The resolvent identity yields
$$
\left\|R(z+w,A)\right\|\geq\left\|R(z,A)\right\|-\left|w\right|\left\|R(z+w,A)\right\|\left\|R(z,A)\right\|,
$$
which rearranges to
$$
\left\|R(z+w,A)\right\|^{-1}\leq\left\|R(z,A)\right\|^{-1}+\left|w\right|<\epsilon.
$$
It follows that $\cup_{z\in E_n}D(z,\max\{0,\epsilon-F_n(z)\})$ is in $\widehat{\mathrm{Sp}}_{\epsilon}(A)$ and hence that $\Gamma_{n}(A)\leq \Xi_2^L(A)$. Without loss of generality by taking successive maxima we can assume that $\Gamma_{n}(A)$ is increasing. Together these will yield $\Sigma^A_1$ once convergence is shown. Using the uniform convergence of $F_n$ and density of $1/n(\mathbb{Z}+i\mathbb{Z})\cap[-n,n]^2$ we see that pointwise convergence holds:
$$
\chi_{\cup_{z\in E_n}D(z,\max\{0,\epsilon-F_n(z)\}}\rightarrow\chi_{\widehat{\mathrm{Sp}}_{\epsilon}(A)},
$$
where $\chi_E$ denotes the indicator function of a set $E$. It follows by the dominated convergence theorem that $\Gamma_n(A)\rightarrow\mathrm{Leb}(\widehat{\mathrm{Sp}}_{\epsilon}(A))$. The proof for $\Omega_{\mathrm{D}}$ is similar by restricting everything to the real line.

\textbf{Step 2}: $\{\Xi_2^L,\Omega,\Lambda_1\}\in\Sigma_2^A$ for $\Omega=\Omega_{\mathrm{B}},\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$. To prove this, we simply replace $F_{n_1}$ by the functions $\gamma_{n_2,n_1}$ and set
$$
\Gamma_{n_2,n_1}(A)=\mathrm{Leb}\big(\cup_{z\in E_{n_2}}D(z,\max\{0,\epsilon-\gamma_{n_2,n_1}(z;A)\})\big).
$$

\textbf{Step 3}: $\{\Xi_2^L,\Omega,\Lambda_2\}\in\Sigma_1^A$ for $\Omega=\Omega_{\mathrm{B}},\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$. The knowledge of matrix values of $A^*A$ allows us to skip the first limit in the construction of step 2 and approximate $\gamma_n$ directly.
\end{proof}

\begin{proof}[Proof of Proposition \ref{leb_cty}]
We begin with the proof of 1. Suppose $A\in\Omega_\mathrm{D}$ has $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(A))=0$ and let $A_n\in\Omega_\mathrm{D}$ be such that $\left\|A-A_n\right\|\rightarrow 0$ as $n\rightarrow\infty$. This implies that $\mathrm{Sp}(A_n)\rightarrow\mathrm{Sp}(A)$ since all our operators are normal. To prove that $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(A_n))\rightarrow0$, it is enough to prove that
\begin{equation}
\label{fn}
\mathrm{Leb}(F_n)\downarrow0,
\end{equation}
where $F_n=\mathrm{Sp}(A)\cup(\cup_{m\geq n}\mathrm{Sp}(A_m))$. But $F_n$ decreases to $\mathrm{Sp}(A)$ and is bounded in measure so (\ref{fn}) holds. For the converse, let $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(A))>0$. Without loss of generality, assume that all of $A$'s entries lie in $[0,1]$. Let $\mathbb{D}_n$ denote the set $\{j/2^n\}_{j=1}^n$ and let us consider the map
$
\phi_n:x\hookrightarrow2^{-n}\left\lceil x2^n\right\rceil
$
on $[0,1]$. Let $A_n$ be the diagonal operator obtained by applying $\phi_n$ to each of $A$'s entries. We clearly have that $\left\|A-A_n\right\|\rightarrow 0$ as $n\rightarrow\infty$ but note that $\mathrm{Sp}(A_n)$ is finite so has Lebesgue measure $0$. Hence $\Xi_1^L$ is discontinuous at $A$.

To prove 2, note that for $A\in\Omega_\mathrm{D}$, $\mathrm{Leb}_{\mathbb{R}}(S_{\epsilon}(A))=0$. Let $A_n\in\Omega_\mathrm{D}$ have $\left\|A-A_n\right\|\rightarrow 0$. Then given some $0<\delta<\epsilon$ it holds for large $n$ that
$
\mathrm{Sp}_{\epsilon-\delta}(A)\subset\mathrm{Sp}_{\epsilon}(A_n)\subset\mathrm{Sp}_{\epsilon+\delta}(A)
$
and hence that
\begin{align*}
\limsup_{n\rightarrow\infty}\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}_{\epsilon}(A_n))&\leq\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}_{\epsilon+\delta}(A))\\
\liminf_{n\rightarrow\infty}\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}_{\epsilon}(A_n))&\geq\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}_{\epsilon-\delta}(A)).
\end{align*}
Now let $\delta\downarrow0$ and use the fact that $\Xi_2^L$ is continuous in $\epsilon$.
\end{proof}

Finally, we deal with the question of determining if the Lebesgue measure is zero. Recall that for this problem, $(\mathcal{M},d)$ denotes the set $\{0,1\}$ endowed with discrete topology and we consider the problem function
$$
\Xi_3^L(A)=
\begin{cases}
0\text{ if }\mathrm{Leb}(\mathrm{Sp}(A))>0\\
1\text{ otherwise.}
\end{cases}
$$

\begin{proof}[Proof of Theorem \ref{Leb_3}] We will show that $\{\Xi_3^L,\Omega_f,\Lambda_1\}\in \Pi_3^A$ and $\{\Xi_3^L,\Omega_\mathrm{D},\Lambda_2\}\notin\Delta_3^G$. The analogous statements $\{\Xi_3^L,\Omega_\mathrm{D},\Lambda_1\}\in \Pi_3^A$ and $\{\Xi_3^L,\Omega_f,\Lambda_2\}\notin\Delta_3^G $ follow from similar arguments.

The lower bound argument can also be used when considering $\Lambda_2$ and $\Omega=\Omega_{\mathrm{B}},\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$. We will also prove the lower bound $\{\Xi_3^L,\Omega_\mathrm{SA},\Lambda_1\}\notin \Delta_4^G$. The remaining lower bounds for $\Lambda_1$ follow from a similar argument and construction as in step 5 of the proof of Theorem \ref{Leb_1} to ensure we are dealing with two-dimensional Lebesgue measure. Finally, we prove that $\{\Xi_3^L,\Omega_{\mathrm{B}},\Lambda_1\}\in\Pi_4^A$. The upper bounds for $\Omega=\Omega_\mathrm{SA}$, $\Omega_\mathrm{N}$ or $\Omega_g$ and $\Lambda_1$ follow an almost identical argument. When considering $\Lambda_2$, we can collapse the first limit in exactly the same manner as we did for solving $\Xi_1^L$.

\textbf{Step 1}: $\{\Xi_3^L,\Omega_f,\Lambda_1\}\in \Pi_3^A$. First we use the algorithm used to compute $\Xi_1^L$ in Theorem \ref{Leb_1}, which we shall denote by $\widetilde{\Gamma}$, to build a height 3 tower for $\{\Xi_3^L,\Omega_f\}$. As above, $\Omega_f$ denotes the set of bounded operators with the usual assumption of bounded dispersion (now with known bounds $c_n$). Recall that we observed
\begin{itemize}
	\item $\widetilde{\Gamma}_{n_2,n_1}(A)$ converges to $\widetilde{\Gamma}_{n_2}(A)$ from below as $n_1\rightarrow\infty$.
	\item $\widetilde{\Gamma}_{n_2}(A)$ converges to $\mathrm{Leb}(\mathrm{Sp}(A))$ monotonically from above as $n_2\rightarrow\infty$.
\end{itemize}
We can alter our algorithms, by taking maxima, so that we can assume without loss of generality that $\widetilde{\Gamma}_{n_2,n_1}(A)$ converges to $\widetilde{\Gamma}_{n_2}(A)$ \textit{monotonically} from below as $n_1\rightarrow\infty$. Now let
\begin{equation}
\Gamma_{n_3,n_2,n_1}(A)=\chi_{[0,1/n_3]}(\widetilde{\Gamma}_{n_2,n_1}(A)).
\end{equation}
Note that $\chi_{[0,1/n_3]}$ is left continuous on $[0,\infty)$ with right limits. Hence by the assumed monotonicity
\begin{equation*}
\lim_{n_1\rightarrow\infty}\Gamma_{n_3,n_2,n_1}(A)=\chi_{[0,1/n_3]}(\widetilde{\Gamma}_{n_2}(A)).
\end{equation*}
It follows that
\begin{equation*}
\lim_{n_2\rightarrow\infty}\lim_{n_1\rightarrow\infty}\Gamma_{n_3,n_2,n_1}(A)=\chi_{[0,1/n_3]}(\mathrm{Leb}(\mathrm{Sp}(A))\pm),
\end{equation*}
where $\pm$ denotes one of the right or left limits (it is possible to have either). It is then easy to see that
\begin{equation*}
\lim_{n_3\rightarrow\infty}\lim_{n_2\rightarrow\infty}\lim_{n_1\rightarrow\infty}\Gamma_{n_3,n_2,n_1}(A)=\Xi_3^L(A).
\end{equation*}
It is also clear that the answer to the question is ``No'' if $\Gamma_{n_3}(A)=0$, which yields the $\Pi_3^A$ classification.

\textbf{Step 2}: $\{\Xi_3^L,\Omega_\mathrm{D},\Lambda_1\}\notin\Delta_3^G$.
Assume for a contradiction that this is false and $\widehat{\Gamma}_{n_2,n_1}$ is a general height two tower for $\{\Xi_3^L,\Omega_\mathrm{D}\}$. Let $(\mathcal{M},d)$ be discrete space $\{0,1\}$ and $\tilde\Omega$ denote the collection of all infinite matrices $\{a_{i,j}\}_{i,j\in\mathbb{N}}$ with entries $a_{i,j}\in\{0,1\}$ and consider the problem function
\begin{equation*}
\tilde\Xi_1(\{a_{i,j}\}):\text{ Does }\{a_{i,j}\}\text{ have a column containing infinitely many non-zero entries?}
\end{equation*}

For $j\in\mathbb{N}$, let $\{b_{i,j}\}_{i\in\mathbb{N}}$ be a dense subset of $I_j:=[1-1/2^{j-1},1-1/{2^j}]$. Given a matrix $\{a_{i,j}\}_{i,j\in\mathbb{N}}\in\tilde\Omega$, construct a matrix $\{c_{i,j}\}_{i,j\in\mathbb{N}}$ by letting $c_{i,j}=a_{i,j}b_{r(i,j),j}$ where
$$
r(i,j)=\max\big\{1,\sum_{k=1}^{i}a_{k,j}\big\}.
$$
Now consider any bijection $\phi:\mathbb{N}\rightarrow\mathbb{N}^2$ and define the diagonal operator
\begin{equation*}
A=\mathrm{diag}(c_{\phi(1)},c_{\phi(2)},c_{\phi(3)},...).
\end{equation*}
The algorithm $\widehat{\Gamma}_{n_2,n_1}$ thus translates to an algorithm $\Gamma'_{n_2,n_1}$ for $\{\tilde\Xi_1,\tilde\Omega\}$. Namely, we set $\Gamma'_{n_2,n_1}(\{a_{i,j}\}_{i\in\mathbb{N}})=\widehat{\Gamma}_{n_2,n_1}(A)$. The fact that $\phi$ is a bijection shows that the lowest level $\Gamma'_{n_2,n_1}$ are generalised algorithms (and are consistent). In particular, given $N$, we can find $\{A_{i,j}:i,j\leq 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
\begin{equation*}
\mathrm{Sp}(A)=\left(\bigcup_{j:\sum_ia_{i,j}=\infty}I_j\right)\cup Q,
\end{equation*}
where $Q$ is at most countable. Hence
\begin{equation*}
\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(A))=\sum_{j:\sum_ia_{i,j}=\infty}\frac{1}{2^j}.
\end{equation*}
It follows that $\tilde \Xi_1(\{a_{i,j}\})=\Xi_3^L(A)$ and hence we get a contradiction.

\textbf{Step 3}: $\{\Xi_3^L,\Omega_\mathrm{SA},\Lambda_1\}\notin\Delta_4^G$. Suppose for a contradiction that $\Gamma_{n_3,n_2,n_1}$ is a height three tower of general algorithms for the problem $\{\Xi_3^L,\Omega_\mathrm{SA},\Lambda_1\}$. Let $(\mathcal{M},d)$ be the space $\{0,1\}$ with the discrete metric, let $\tilde{\Omega}$ denote the collection of all infinite arrays $\{a_{m,i,j}\}_{m,i,j\in\mathbb{N}}$ with entries $a_{m,i,j}\in\{0,1\}$ and consider the problem function
\begin{equation*}
\tilde{\Xi}_4(\{a_{m,i,j}\}):\text{ For every $m$, does }\{a_{m,i,j}\}_{i,j}\text{ have (only) finitely many columns with (only) finitely many 1's?}
\end{equation*}
Recall that it was shown in \S \ref{bigHth} that $\mathrm{SCI}(\tilde{\Xi}_4,\tilde{\Omega})_{G} = 4$. We will gain a contradiction by using the supposed height three tower to solve $\{\tilde{\Xi}_4,\tilde{\Omega}\}$.

The construction will follow step 3 of the proof of Theorem \ref{spec_rad_thm3} 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 $\mathrm{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, $\alpha_m$, that act as a bijection from $[-1,1]$ to $I_m$. Without loss of generality, identify $\Omega_\mathrm{SA}$ with self adjoint operators in $\mathcal{B}(X)$ where $X=\bigoplus_{i=1}^{\infty}\bigoplus_{j=1}^{\infty}X_{i,j}$ in the $l^2$-sense with $X_{i,j}=l^2(\mathbb{N})$. We then consider the operator
$$
T(\{a_{m,i,j}\}_{m,i,j})=\bigoplus_{m=1}^\infty \alpha_{m}(A_m).
$$
The same arguments in the proof of Theorem \ref{spec_rad_thm3} show that the map
$$
\tilde\Gamma_{n_3,n_2,n_1}(\{a_{m,i,j}\}_{m,i,j})=\Gamma_{n_3,n_2,n_1}(T(\{a_{m,i,j}\}_{m,i,j}))
$$
is a general tower using the relevant pointwise evaluation functions of the array $\{a_{m,i,j}\}_{m,i,j}$. If $\tilde{\Xi}_4(\{a_{m,i,j}\})=1$, then $\mathrm{Sp}(T(\{a_{m,i,j}\}_{m,i,j}))$ is countable and hence $\Xi_3^L(T(\{a_{m,i,j}\}_{m,i,j}))=1$. On the other hand, if $\tilde{\Xi}_4(\{a_{m,i,j}\})=0$, then there exists $m$ with $\mathrm{Sp}(A_m)=[-1,1]$ and hence $I_m\subset \mathrm{Sp}(T(\{a_{m,i,j}\}_{m,i,j}))$ so that $\Xi_3^L(T(\{a_{m,i,j}\}_{m,i,j}))=0$. It follows that $\tilde\Gamma_{n_3,n_2,n_1}$ provides a height three tower for $\{\tilde{\Xi}_4,\tilde{\Omega}\}$, a contradiction.

\textbf{Step 4}: $\{\Xi_3^L,\Omega_{\mathrm{B}},\Lambda_1\}\in\Pi_4^A$. Recall the tower of algorithms to solve $\{\Xi_1^L,\Omega_{\mathrm{B}},\Lambda_1\}$, and denote it by $\widetilde{\Gamma}$. Our strategy will be the same as in step 1 but with an extra limit. It is easy to show that
\begin{itemize}
	\item $\widetilde{\Gamma}_{n_3,n_2,n_1}(A)$ converges to $\widetilde{\Gamma}_{n_3,n_2}(A)$ from above as $n_1\rightarrow\infty$.
	\item $\widetilde{\Gamma}_{n_3,n_2}(A)$ converges to $\widetilde{\Gamma}_{n_3}(A)$ from below as $n_2\rightarrow\infty$.
	\item $\widetilde{\Gamma}_{n_3}(A)$ converges to $\mathrm{Leb}(\mathrm{Sp}(A))$ from above as $n_3\rightarrow\infty$.
\end{itemize}
Again, by taking successive maxima or minima where appropriate, we can assume that all of these are monotonic. Now let
\begin{equation}
\Gamma_{n_4,n_3,n_2,n_1}(A)=\chi_{[0,1/n_4]}(\widetilde{\Gamma}_{n_3,n_2,n_1}(A)).
\end{equation}
Note that $\chi_{[0,1/n_4]}$ is left continuous on $[0,\infty)$ with right limits. Hence by the assumed monotonicity and arguments as in step 1, it is then easy to see that
\begin{equation*}
\lim_{n_4\rightarrow\infty}\lim_{n_3\rightarrow\infty}\lim_{n_2\rightarrow\infty}\lim_{n_1\rightarrow\infty}\Gamma_{n_4,n_3,n_2,n_1}(A)=\Xi_3^L(A).
\end{equation*}
It is also clear that the answer to the question is ``No'' if $\Gamma_{n_4}(A)=0$, which yields the $\Pi_4^A$ classification.
\end{proof}

\section{Proofs of Theorems on Fractal Dimensions}
\label{pf_frac}

We begin with the box-counting dimension. For the construction of towers of algorithms, it is useful to use a slightly different (but equivalent - see \cite{falconer2004fractal}) definition of the upper and lower box-counting dimensions. Let $F\subset\mathbb{R}$ be bounded and $N'_\delta(F)$ denote the number of $\delta$-mesh intervals that intersect $F$. A $\delta$-mesh interval is an interval of the form $[m\delta,(m+1)\delta]$ for $m\in\mathbb{Z}$. Then
\begin{equation}
\begin{split}
\overline{\mathrm{dim}}_B(F)&=\limsup_{\delta\downarrow{}0}\frac{\log(N'_{\delta}(F))}{\log(1/\delta)},\\
\underline{\mathrm{dim}}_B(F)&=\liminf_{\delta\downarrow{}0}\frac{\log(N'_{\delta}(F))}{\log(1/\delta)}.
\end{split}
\end{equation}

\begin{proof}[Proof of Theorem \ref{Box_dim}] Since $\Omega_{BD}^\mathrm{D}\subset\Omega^{BD}_f\subset\Omega^{BD}_{\mathrm{SA}}$, it is enough to prove that $\{\Xi_B,\Omega^{BD}_f,\Lambda_1\}\in\Pi_2^A$, $\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_2\}\in\Pi_2^A$, $\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_1\}\in\Pi_3^A$, $\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_1\}\not\in\Delta_3^A$ and $\{\Xi_B,\Omega^{BD}_\mathrm{D},\Lambda_2\}\not\in\Delta_2^A$.

\textbf{Step 1}: $\{\Xi_B,\Omega^{BD}_f,\Lambda_1\}\in\Pi_2^A$. Recall the existence of a height one tower, $\tilde\Gamma_n$, using $\Lambda_1$ for $\mathrm{Sp}(A)$, $A\in\Omega^{BD}_f$. Furthermore, $\tilde\Gamma_n(A)$ outputs a finite collection $\{z_{1,n},...,z_{k_n,n}\}\subset \mathbb{Q}$ such that $\mathrm{dist}(z_{j,n},\mathrm{Sp}(A))\leq2^{-n}$. Define the intervals
$$
I_{j,n}=[z_{j,n}-2^{-n},z_{j,n}+2^{-n}]
$$
and let $\mathcal{I}_{m}$ denote the collection of all $2^{-m}$-mesh intervals. Let $\Upsilon_{m,n}(A)$ be any union of finitely many such mesh intervals with minimal length $\left|\Upsilon_{m,n}(A)\right|$ (``length'' being the number of intervals $\in\mathcal{I}_{m}$ that make up $\Upsilon_{m,n}(A)$) such that
$$
\Upsilon_{m,n}(A)\cap I_{j,l}\neq\emptyset,\quad\text{for }1\leq l\leq n,1\leq j\leq k_l.
$$
There may be more than one such collection so we can gain a deterministic algorithm by enumerating each $\mathcal{I}_{m}$ and choosing the first such collection in this enumeration. It is then clear that $\left|\Upsilon_{m,n}(A)\right|$ is increasing in $n$. Furthermore, to determine $\Upsilon_{m,n}(A)$, there are only finitely many intervals in $\mathcal{I}_{m}$ to consider, namely those that have non-empty intersection with at least one $I_{j,l}$ with $1\leq l\leq n,1\leq j\leq k_l$. It follows that $\Upsilon_{m,n}(A)$ and hence $\left|\Upsilon_{m,n}(A)\right|$ can be computed in finitely may arithmetic operations and comparisons using $\Lambda_1$.

Suppose that $I=[a,b]\in\mathcal{I}_{m}$ has $(a,b)\cap\mathrm{Sp}(A)\neq\emptyset$. Then for large $n$ there exists $z_{j,n}\in I$ such that $I_{j,n}\subset I$ and hence $I\subset\Upsilon_{m,n}(A)$ for large $n$. If $z\in\mathrm{Sp}(A)\cap 2^{-m}\mathbb{Z}$ then a similar argument shows that $z\subset\Upsilon_{m,n}(A)$ for large $n$. Since $\mathrm{Sp}(A)$ is bounded and $\mathrm{Sp}(A)\cap 2^{-m}\mathbb{Z}$ finite, it follows that $\mathrm{Sp}(A)\subset\Upsilon_{m,n}(A)$ for large $n$ and hence
$$
N_{2^{-m}}(\mathrm{Sp}(A))\leq \liminf_{n\rightarrow\infty}\left|\Upsilon_{m,n}(A)\right|.
$$
Let $W_m(A)$ be the union of all intervals in $\mathcal{I}_m$ that intersect $\mathrm{Sp}(A)$. It is clear that $W_m(A)\cap I_{j,l}\neq\emptyset$ for $1\leq l\leq n,1\leq j\leq k_l$ and hence $\left|\Upsilon_{m,n}(A)\right|\leq N'_{2^{-m}}(\mathrm{Sp}(A))$. It follows that $\lim_{n\rightarrow\infty}\left|\Upsilon_{m,n}(A)\right|=\delta_{m}(A)$ exists with
\begin{equation}
\label{delta_bd}
N_{2^{-m}}(\mathrm{Sp}(A))\leq\delta_{m}(A)\leq N'_{2^{-m}}(\mathrm{Sp}(A)).
\end{equation}

For $n_2>n_1$ set $\Gamma_{n_2,n_1}(A)=0$, otherwise set
$$
\Gamma_{n_2,n_1}(A)=\max_{n_2\leq k \leq n_1} \max_{1\leq j\leq n_1}\frac{\log(\left|\Upsilon_{k,j}(A)\right|)}{k\log(2)}.
$$
The above monotone convergence and (\ref{delta_bd}) shows that
\begin{align*}
\lim_{n_1\rightarrow\infty}\Gamma_{n_2,n_1}(A)&=\Gamma_{n_2}(A)=\sup_{k\geq n_2}\frac{\log(\delta_k(A))}{k\log(2)}\geq \limsup_{k\rightarrow\infty}\frac{\log(\delta_k(A))}{k\log(2)},\\
\lim_{n_2\rightarrow\infty}\Gamma_{n_2}(A)&=\limsup_{k\rightarrow\infty}\frac{\log(\delta_k(A))}{k\log(2)}.
\end{align*}
Hence, by the assumption that the box-counting dimension exists, we have constructed a $\Pi_2^A$ tower.

\textbf{Step 2}: $\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_2\}\in\Pi_2^A$ and $\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_1\}\in\Pi_3^A$. The first of these is exactly as in step 1, using $\Lambda_2$ to construct the relevant $\Sigma_1^A$ tower for the spectrum. The proof that $\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_1\}\in\Pi_3^A$ uses a height two tower, $\tilde\Gamma_{n_2,n_1}$, using $\Lambda_1$ for $\mathrm{Sp}(A)$, $A\in\Omega_{\mathrm{SA}}^{BD}$ (or any self-adjoint $A$) constructed in \cite{ben2015can}. This tower has the property that each $\tilde\Gamma_{n_2,n_1}(A)$ is a finite subset of $\mathbb{Q}$ and, for fixed $n_2$, is constant for large $n_1$. Moreover if $z\in\lim_{n_1\rightarrow\infty}\tilde\Gamma_{n_2,n_1}(A)$ then $\mathrm{dist}(z,\mathrm{Sp}(A))\leq2^{-n_2}$. 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_{n_1\rightarrow\infty}\tilde\Gamma_{n_2,n_1}(A)$.

\textbf{Step 3}: $\{\Xi_B,\Omega^{BD}_\mathrm{D},\Lambda_2\}\not\in\Delta_2^A$. This is exactly the same argument as step 2 of the proof of Theorem \ref{Leb_1} with Lebesgue measure replaced by box-counting dimension.

\textbf{Step 4}: $\{\Xi_B,\Omega_{\mathrm{SA}}^{BD},\Lambda_1\}\not\in\Delta_3^A$. This is exactly the same argument as step 4 of the proof of Theorem \ref{Leb_1} with Lebesgue measure replaced by box-counting dimension.
\end{proof}

We now turn to the Hausdorff dimension. Recall Lemma \ref{halt_test} on the problem of determining whether $\mathrm{Sp}(A)\cap(a,b)\neq\emptyset$.

\begin{proof}[Proof of Lemma \ref{halt_test}]
We start with the class $\Omega_f\cap\Omega_\mathrm{SA}$. We can interpret this problem as a decision problem and the following algorithm as one that halts on output \textit{Yes}. Let $c=(a+b)/2$ and $\delta=(b-a)/2$ then the idea is to simply test whether $\texttt{DistSpec}(A,n,f(n),c)+c_n<\delta$. If the answer is yes then we output \textit{Yes}, otherwise we output \textit{No} and increase $n$ by one. Note that $\mathrm{Sp}(A)\cap(a,b)\neq\emptyset$ if and only if $\left\|R(c,A)\right\|^{-1}<\delta$ and hence as $\texttt{DistSpec}(A,n,f(n),c)+c_n$ converges down to $\left\|R(c,A)\right\|^{-1}$ we see that this provides a convergent algorithm. For $\Omega_\mathrm{SA}$ we require an additional limit by replacing $\texttt{DistSpec}(A,n,f(n),c)+c_n$ with the function $\gamma_{n_2,n_1}(z;A)$. If we have access to $\Lambda_2$ then this can be avoided in the usual way.
\end{proof}

To build our algorithm for the Hausdorff dimension, we will use an alternative, equivalent definition for compact sets that can be found in \cite{fernandez2015calculate,fernandez2014fractal}. We consider the case of subsets of $\mathbb{R}$. Let $\rho_k$ denote the set of all closed binary cubes of the form
$
[2^{-k}m,2^{-k}(m+1)], m\in\mathbb{Z}.
$
Set
$$
\mathcal{A}_k(F)=\big\{\{U_i\}_{i\in I}:I\text{ is finite },F\subset\cup_{i\in I}U_i,U_i\in\cup_{l\geq k}\rho_l\big\}
$$
and define
$$
\tilde{\mathcal{H}}^{d}_{k}(F)=\inf\{\sum_i\mathrm{diam}(U_i)^d:\{U_i\}_{i\in I}\in\mathcal{A}_{k}(F)\},\quad\tilde{\mathcal{H}}^{d}(F)=\lim_{k\rightarrow\infty}\tilde{\mathcal{H}}^{d}_{k}(F).
$$
The following can be found in \cite{fernandez2014fractal} (Theorem 3.13):

\begin{theorem}
\label{new_haus}
Let $F$ be a bounded subset of $\mathbb{R}$. Then there exists a unique $d'=\mathrm{dim}_{H'}(F)$ such that $\tilde{\mathcal{H}}^{d}(F)=0$ for $d>d'$ and $\tilde{\mathcal{H}}^{d}(F)=\infty$ for $d<d'$. What's more, $d'=\mathrm{dim}_H(\overline{F})$.
\end{theorem}

Denoting the dyadic rationals by $\mathbb{D}$, we shall compute $\mathrm{dim}_H(\mathrm{Sp}(A))$ via approximating the above applied to $F=\mathrm{Sp}(A)\cap\mathbb{D}^c$ and using the lemma \ref{halt_test}.

\begin{proof}[Proof of Theorem \ref{haus_dim}]
It is enough to prove the lower bounds $\{\Xi_H,\Omega_\mathrm{D},\Lambda_2\}\notin\Delta^G_3$, $\{\Xi_H,\Omega_\mathrm{SA},\Lambda_1\}\notin\Delta^G_4$ and construct the towers of algorithms for the inclusions $\{\Xi_H,\Omega_f\cap\Omega_\mathrm{SA},\Lambda_1\}\in\Sigma^A_3$, $\{\Xi_H,\Omega_\mathrm{SA},\Lambda_1\}\in\Sigma_4^A$ and $\{\Xi_H,\Omega_\mathrm{SA},\Lambda_2\}\in\Sigma_3^A$.

\textbf{Step 1}: $\{\Xi_H,\Omega_\mathrm{D},\Lambda_2\}\notin\Delta^G_3$. Suppose for a contradiction that a height two tower, $\Gamma_{n_2,n_1}$, exists for $\{\Xi_H,\Omega_\mathrm{D}\}$ (taking values in $[0,1]$ without loss of generality). We repeat the argument in the proof of Theorem \ref{Leb_3}. Consider the same problem
\begin{equation*}
\tilde\Xi_1(\{a_{i,j}\}):\text{ Does }\{a_{i,j}\}\text{ have a column containing infinitely many non-zero entries?}
\end{equation*}
but now mapping to $[0,1]$ with the usual metric, and the same operator
$
A=\mathrm{diag}(c_{\phi(1)},c_{\phi(2)},c_{\phi(3)},...)
$
with
\begin{equation*}
\mathrm{Sp}(A)=\left(\bigcup_{j:\sum_{i}a_{i,j}=\infty}I_j\right)\cup Q,
\end{equation*}
where $Q$ is at most countable. We use the fact that the Hausdorff dimension satisfies
$$
\mathrm{dim}_H(\cup_{j=1}^\infty X_j)=\sup_{j\in\mathbb{N}}\mathrm{dim}_H(X_j)
$$
and that $\mathrm{dim}_H(Q)=0$ for any countable $Q$ to note that $\Xi_H(A)=\tilde\Xi_1(\{a_{i,j}\})$. We then set $\tilde{\Gamma}_{n_2,n_1}(\{a_{i,j}\}_{i,j})=\Gamma_{n_2,n_1}(A)$ to provide a height two tower for $\tilde\Xi_1$. But this contradicts Theorem \ref{DST_main}.

\textbf{Step 2}: $\{\Xi_H,\Omega_\mathrm{SA},\Lambda_1\}\notin\Delta^G_4$. Suppose for a contradiction that $\Gamma_{n_3,n_2,n_1}$ is a height three tower of general algorithms for the problem $\{\Xi_H,\Omega_\mathrm{SA},\Lambda_1\}$ (taking values in $[0,1]$ without loss of generality). Let $(\mathcal{M},d)$ be the space $[0,1]$ with the usual metric, let $\tilde{\Omega}$ denote the collection of all infinite arrays $\{a_{m,i,j}\}_{m,i,j\in\mathbb{N}}$ with entries $a_{m,i,j}\in\{0,1\}$ and consider the problem function
\begin{equation*}
\tilde{\Xi}_4(\{a_{m,i,j}\}):\text{ For every $m$, does }\{a_{m,i,j}\}_{i,j}\text{ have (only) finitely many columns with (only) finitely many 1's?}
\end{equation*}
Recall that it was shown in \S \ref{bigHth} that $\mathrm{SCI}(\tilde{\Xi}_4,\tilde{\Omega})_{G} = 4$. We will gain a contradiction by using the supposed height three tower to solve $\{\tilde{\Xi}_4,\tilde{\Omega}\}$. We use the same construction as in step 3 of the proof of Theorem \ref{Leb_3}. If $\tilde{\Xi}_4(\{a_{m,i,j}\})=1$, then $\mathrm{Sp}(T(\{a_{m,i,j}\}_{m,i,j}))$ is countable and hence $\Xi_H(T(\{a_{m,i,j}\}_{m,i,j}))=0$. On the other hand, if $\tilde{\Xi}_4(\{a_{m,i,j}\})=0$, then there exists $m$ with $\mathrm{Sp}(A_m)=[-1,1]$ and hence $I_m\subset \mathrm{Sp}(T(\{a_{m,i,j}\}_{m,i,j}))$ so that $\Xi_H(T(\{a_{m,i,j}\}_{m,i,j}))=1$. It follows that $\tilde\Gamma_{n_3,n_2,n_1}(\{a_{m,i,j}\}_{m,i,j})=1-\Gamma_{n_3,n_2,n_1}(T(\{a_{m,i,j}\}_{m,i,j}))$ provides a height three tower for $\{\tilde{\Xi}_4,\tilde{\Omega}\}$, a contradiction.

\textbf{Step 3}: $\{\Xi_H,\Omega_f\cap\Omega_\mathrm{SA},\Lambda_1\}\in\Sigma_3^A$. To construct a height three tower for $A\in\Omega_f\cap\Omega_\mathrm{SA}$, if $n_2<n_3$ set $\Gamma_{n_3,n_2,n_1}(A)=0$. Otherwise, consider the set
$$
\mathcal{A}_{n_3,n_2,n_1}(A)=\big\{\{U_i\}_{i\in I}:I\text{ is finite },S_{n_1,n_2}(A)\subset\cup_{i\in I}U_i,U_i\in\cup_{n_3\leq l\leq n_2}\rho_l\big\}
$$
where $S_{n_1,n_2}(A)$ is the union of all $S\in\rho_{n_2}$ with $S\subset[-n_1,n_1]$ and such that the algorithm discussed in Lemma \ref{halt_test} outputs \textit{Yes} for the interior of $S$ and input parameter $n_1$. We then define
$$
h_{n_3,n_2,n_1}(A,d)=\inf\big\{\sum_i\mathrm{diam}(U_i)^d:\{U_i\}\in\mathcal{A}_{n_3,n_2,n_1}(A)\big\}.
$$
If $S_{n_1,n_2}(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 \S \ref{sect:PenFract} for a discussion of efficient implementation). It follows that $h_{n_3,n_2,n_1}(A,d)$ defines a general algorithm computable in finitely many arithmetic operations and comparisons. Furthermore, it is easy to see that
$$
\lim_{n_1\rightarrow\infty}h_{n_3,n_2,n_1}(A,d)=\inf\{\sum_i\mathrm{diam}(U_i)^d:\{U_i\}\in\mathcal{C}_{n_3,n_2}(A)\}=:h_{n_3,n_2}(A,d)
$$
from below (since we are covering larger sets as $n_1$ increases). Where
$$
\mathcal{C}_{n_3,n_2}(A)=\big\{\{U_i\}_{i\in I}:I\text{ is finite },\mathrm{Sp}(A)\cap\mathbb{D}_{n_2}^c\subset\cup_{i\in I}U_i,U_i\in\cup_{n_3\leq l\leq n_2}\rho_l\big\}
$$
and $\mathbb{D}_k:=1/{2^k}\cdot\mathbb{Z}$ denotes the dyadic rationals of resolution $k$.
We now use the property that $\mathcal{A}_k(F)$ consists of collections of \textit{finite } coverings. As $n_2\rightarrow\infty$, $h_{n_3,n_2}(A,d)$ is non increasing (since we take infinum over a larger class of coverings and the sets $\mathrm{Sp}(A)\cap\mathbb{D}_{n_2}^c$ decrease) and hence converges to some number. Clearly
\begin{equation*}
\label{sandwich1}
\lim_{n_2\rightarrow\infty}h_{n_3,n_2}(A,d)=:h_{n_3}(A,d)\geq \tilde{\mathcal{H}}^d_{n_3}(\mathrm{Sp}(A)\cap\mathbb{D}^c).
\end{equation*}
For $\epsilon>0$ let $l\in\mathbb{N}$ and $\{U_i\}\in\mathcal{A}_{n_3}(\mathrm{Sp}(A)\cap\mathbb{D}_l^c)\}$ with
$$
\sum_{i}\mathrm{diam}(U_i)^d\leq\epsilon+\tilde{\mathcal{H}}^d_{n_3}(\mathrm{Sp}(A)\cap\mathbb{D}_l^c).
$$
For large enough $n_2$, $\{U_i\}\in\mathcal{C}_{n_3,n_2}(A)$ and hence since $\epsilon>0$ was arbitrary,
\begin{equation*}
\label{sandwich2}
h_{n_3}(A,d)\leq \tilde{\mathcal{H}}^d_{n_3}(\mathrm{Sp}(A)\cap\mathbb{D}_l^c)
\end{equation*}
for all $l$. For a fixed $A$ and $d$, $h_{n_3}(A,d)$ is non-decreasing in $n_3$ and hence converges to a function of $d$, $h(A,d)$ (possibly taking infinite values). Furthermore,
$$
\tilde{\mathcal{H}}^{d}(\mathrm{Sp}(A)\cap\mathbb{D}^c)\leq h(A,d) \leq \tilde{\mathcal{H}}^{d}(\mathrm{Sp}(A)\cap\mathbb{D}_l^c).
$$
Since the set $\mathrm{Sp}(A)\cap\mathbb{D}$ is countable, its Hausdorff dimension is zero. Using sub-additivity of Hausdorff dimension and Theorem \ref{new_haus},
\begin{align*}
\mathrm{dim}_H(\mathrm{Sp}(A))&\leq \mathrm{dim}_H(\mathrm{Sp}(A)\cap\mathbb{D}^c)\\
&\leq \mathrm{dim}_H(\overline{\mathrm{Sp}(A)\cap\mathbb{D}^c})=\mathrm{dim}_{H'}(\mathrm{Sp}(A)\cap\mathbb{D}^c)\\
&\leq \mathrm{dim}_H(\overline{\mathrm{Sp}(A)\cap\mathbb{D}^c_l})=\mathrm{dim}_{H'}(\mathrm{Sp}(A)\cap\mathbb{D}^c_l)\\
&\leq \mathrm{dim}_H(\mathrm{Sp}(A)).
\end{align*}
It follows that $h(A,d)=0$ if $d>\mathrm{dim}_H(\mathrm{Sp}(A))$ and that $h(A,d)=\infty$ if $d<\mathrm{dim}_H(\mathrm{Sp}(A))$. Define
$$
\Gamma_{n_3,n_2,n_1}(A)=\sup_{j=1,...,2^{n_3}}\big\{\frac{j}{2^{n_3}}:h_{n_3,n_2,n_1}(A,k/{2^{n_3}})+\frac{1}{n_2}>\frac{1}{2}\text{ for }k=1,...,j\big\},
$$
where in this case we define the maximum over the empty set to be $0$.

Consider $n_2\geq n_3$. Since $h_{n_3,n_2,n_1}(A,d)\uparrow h_{n_3,n_2}(A,d)$, it is clear that
$$
\lim_{n_1\rightarrow\infty}\Gamma_{n_3,n_2,n_1}(A)=\sup_{j=1,...,2^{n_3}}\big\{\frac{j}{2^{n_3}}:h_{n_3,n_2}(A,k/2^{n_3})+\frac{1}{n_2}>\frac{1}{2}\text{ for }k=1,...,j\big\}=:\Gamma_{n_3,n_2}(A).
$$
If $h_{n_3}(A,d)\geq1/2$ then $h_{n_3,n_2}(A,d)+1/{n_2}>1/2$ for all $n_2$ otherwise $h_{n_3,n_2}(A,d)+1/{n_2}<1/2$ eventually. Hence
$$
\lim_{n_2\rightarrow\infty}\Gamma_{n_3,n_2}(A)=\sup_{j=1,...,2^{n_3}}\big\{\frac{j}{2^{n_3}}:h_{n_3}(A,k/{2^{n_3}})\geq\frac{1}{2}\text{ for }k=1,...,j\big\}=:\Gamma_{n_3}(A).
$$
Using the monotonicity of $h_{n_3}(A,d)$ in $d$ and the proven properties of the limit function $h$, it follows that
$$
\lim_{n_3\rightarrow\infty}\Gamma_{n_3}(A)=\mathrm{dim}_H(\mathrm{Sp}(A)).
$$
The fact that $h_{n_3}$ is non-decreasing in $n_3$, the set $\{1/2^{n_3},2/2^{n_3},...,1\}$ refines itself and the stated monotonicity show that convergence is monotonic from below and hence we get the $\Sigma_3^A$ classification.

\textbf{Step 4}: $\{\Xi_H,\Omega_\mathrm{SA},\Lambda_1\}\in\Sigma_4^A$ and $\{\Xi_H,\Omega_\mathrm{SA},\Lambda_2\}\in\Sigma_3^A$. 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_{n_2,n_1}(A)$ by the set $S_{n_3,n_2,n_1}(A)$ given by the union of all $S\in\rho_{n_3}$ with $S\subset[-n_2,n_2]$ and such that the $\Sigma_2^A$ tower of algorithms discussed in Lemma \ref{halt_test} outputs \textit{Yes} for the interior of $S$ and input parameters $(n_2,n_1)$. To prove $\{\Xi_H,\Omega_\mathrm{SA},\Lambda_2\}\in\Sigma_3^A$ we use exactly the same construction as in step 3 now using the $\Sigma_1^A$ algorithm (which uses $\Lambda_2$) given by Lemma \ref{halt_test}.
\end{proof}

\section{Applications and Numerical Examples}
\label{num_test}

In this section we demonstrate that while the majority of problems considered in this paper require more than one limit to solve, the basic towers of algorithms constructed in this paper are usable and can be efficiently implemented for large scale computations. They have desirable convergence properties, converging monotonically or being eventually constant, as captured by the $\Sigma/\Pi$ classification. We can take advantage of this when analysing them numerically and this can be useful for creating ansatz for stopping criteria. Our proofs show that many of the towers undergo \textit{oscillation phenomena} where each subsequent limit is monotone but in the opposite sense/direction than the limit beforehand. The algorithms also highlight suitable information that lowers the SCI classification to $\Sigma_1/\Pi_1$, which are needed for rigorous numerics.

\subsection{Numerical examples for Lebesgue measure}
\label{leb_num}
Our first set of examples tests the towers of algorithms constructed for Lebesgue measure. We consider one example where the solution is analytically known and then one where nothing is currently known. The routines for these examples are shown in pseudocode below. Recall that $F_n(z):=\texttt{DistSpec}(A,n,f(n),z)+c_n$ converges uniformly to $\left\|R(z,A)\right\|^{-1}$ from above on compact subsets of $\mathbb{C}$.

\vspace{0.3cm}
\begin{algorithm}[H]
 \SetKwInOut{Input}{Input}\SetKwInOut{Output}{Output}
 \BlankLine
\SetKwProg{Fn}{Function}{}{end}
 \SetKwFunction{LebSpec}{LebSpec}
 \SetKwData{Left}{left}\SetKwData{This}{this}\SetKwData{Up}{up}
\SetKwFunction{Union}{Union}\SetKwFunction{FindCompress}{FindCompress}
 \Fn{\LebSpec{$n_1,n_2,f(n_1),c_{n_1},A$}}{
  \Input{$n_1,n_2,f(n_1)\in\mathbb{N}$, $c_{n_1}\in\mathbb{R}_{+}$, $A\in\Omega_f$}
  \Output{$\Gamma_{n_2,n_1}(A)$, an approximation to $\mathrm{Leb}\mathrm{Sp}(A)$}
  \BlankLine
$G=\texttt{Grid}(n_1,n_2)=\frac{1}{2^{n_2}}\Big(\mathbb{Z}+i\mathbb{Z}\Big)\cap[-n_1,n_1]^2=\{z_1,...,z_{m}\}$\\
\For{$z\in G$}{$f_{n_1}(z):=\texttt{DistSpec}(A,n_1,f(n_1),z)+c_{n_1}$\\

}
 $U=[-n_1,n_1]^2\cap(\cup_{j=1}^{m}B(z_j,f_{n_1}(z_j)))$\\
$\Gamma_{n_2,n_1}(A)=4n_1^2-\mathrm{Leb}(U(n_2,n_1,A))$\\}
 \end{algorithm}
\vspace{0.3cm}

\vspace{0.3cm}
\begin{algorithm}[H]
 \SetKwInOut{Input}{Input}\SetKwInOut{Output}{Output}
 \BlankLine
\SetKwProg{Fn}{Function}{}{end}
 \SetKwFunction{LebPseudoSpec}{LebPseudoSpec}
 \SetKwData{Left}{left}\SetKwData{This}{this}\SetKwData{Up}{up}
\SetKwFunction{Union}{Union}\SetKwFunction{FindCompress}{FindCompress}
 \Fn{\LebPseudoSpec{$n,A,\epsilon$}}{
  \Input{$n\in\mathbb{N}$, $A\in\Omega_\epsilon^L$, $\epsilon>0$}
  \Output{$\Gamma_{n}(A)$, an approximation to $\mathrm{Leb}\mathrm{Sp}_{\epsilon}(A)$}
  \BlankLine
$E_n=\frac{1}{n}(\mathbb{Z}+i\mathbb{Z})\cap\{z\in\mathbb{C}:F_n(z)\leq\epsilon\}\cap[-n,n]^2$\\
$\Gamma_n(A)=\mathrm{Leb}(\cup_{z\in E_n}D(z,\max\{0,\epsilon-F_n(z)\})$\\}
 \end{algorithm}
\vspace{0.3cm}

\subsubsection{Almost Mathieu Operator}
We begin testing the algorithms on the Almost Mathieu operator, which is related to a wealth of mathematical and physical problems such as the Ten Martini Problem (see \cite{jitomirskaya1999metal,damanik2009spectrum,avila2009ten}). The operator acts on $l^2(\mathbb{Z})$ via
\begin{equation}
(H_{\alpha}x)_n=x_{n-1}+x_{n+1}+2\lambda\cos(2\pi n\alpha+\nu)x_n.
\label{Harper}
\end{equation}
The choice of $\lambda=1$ was studied in Hofstadter's classic paper \cite{hofstadter1976energy} on what has become known as the Hofstadter butterfly (union of the spectra over $\nu$ as $\alpha$ varies). 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 $\alpha$, the spectrum of $H_{\alpha}$ does not depend on $\nu$ and \cite{avila2006}
\begin{equation}
\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(H_{\alpha}))=4\left|1-\left|\lambda\right|\right|.
\end{equation}
We consider the case $\alpha=(\sqrt{5}-1)/2$ and without loss of generality set $\nu=0$. Fig. \ref{AM_leb} shows the output of the algorithm, computing $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(H_{\alpha}))$ and $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}_{\epsilon}(H_{\alpha}))$ for a range of values of $\epsilon$. We chose values of $n=5000$ (corresponding to $10003\times10001$ matrices for resolvent estimates), a grid spacing of $1/128$ and a resolution in $\texttt{DistSpec}$ of order $1/1000$. We have also shown the computed spectrum with grid spacing $1/1000$ and the same parameter values. One can clearly see that the estimates for $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}_{\epsilon}(H_{\alpha}))$ are decreasing to the true value of $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(H_{\alpha}))$, which is well estimated by \texttt{LebSpec} (Method 1).

\begin{figure}
\centering
\includegraphics[width=0.48\textwidth,trim={33mm 90mm 40mm 97mm},clip]{am_analytic3}
\includegraphics[width=0.48\textwidth,trim={33mm 90mm 40mm 97mm},clip]{am_leb2}
\caption{Left: Estimates to the spectrum using the algorithms in \cite{colb1}. Right: Output of algorithm to compute $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}_{\epsilon}(H_{\alpha}))$ as well as the direct algorithm for $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(H_{\alpha}))$  from \S \ref{Leb_sect1} (Method 1). Note that we gain convergence to the true value as $\epsilon\downarrow 0$.}
\label{AM_leb}
\end{figure}

We also compare Method 1 with the na\"{i}ve estimate provided by finite section estimates $\mathrm{Sp}(P_nH_{\alpha}{|_{P_n\mathcal{H}}})$, where $P_n$ is the orthogonal projection onto $\mathrm{span}\{e_k:\left|k\right|\leq n\}$. In general, suppose there is some algorithm $\tilde{\Gamma}_n(H_{\alpha})$ convergent to $\mathrm{Sp}(H_{\alpha})$ in the Hausdorff metric (this is not true in general for $\mathrm{Sp}(P_nH_{\alpha}{|_{P_n\mathcal{H}}})$). Let $\mathcal{I}_m$ be the collection of open intervals $\{(j/2^m,(j+1)/2^m):j\in\mathbb{Z}\}$ and set
$$
\hat{\Gamma}_{n_2,n_1}(H_{\alpha})=\frac{1}{2^{n_2}}\#\{I\in\mathcal{I}_{n_2}:I\cap\tilde{\Gamma}_{n_1}(H_{\alpha})\neq\emptyset\}.
$$
Since the intervals are open,
$$
\liminf_{n_1\rightarrow\infty}\hat{\Gamma}_{n_2,n_1}(H_{\alpha})\geq\frac{1}{2^{n_2}}\#\{I\in\mathcal{I}_{n_2}:I\cap\mathrm{Sp}(H_{\alpha})\neq\emptyset\}:=\hat{\Gamma}_{n_2}(H_{\alpha})
$$
and
$$
\hat{\Gamma}_{n_2}(H_{\alpha})\downarrow\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(H_{\alpha}))\text{ as }n_2\rightarrow\infty.
$$
What's more, for any $\epsilon>0$,
$$
\limsup_{n_1\rightarrow\infty}\hat{\Gamma}_{n_2,n_1}(H_{\alpha})\leq\frac{1}{2^{n_2}}\#\{I\in\mathcal{I}_{n_2}:I\cap\mathrm{Sp_{\epsilon}}(H_{\alpha})\neq\emptyset\}:=\hat{\Upsilon}_{n_2}(H_{\alpha},\epsilon)
$$
and
$$
\hat{\Upsilon}_{n_2}(H_{\alpha},\epsilon)\downarrow\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp_{\epsilon}}(H_{\alpha}))\text{ as }n_2\rightarrow\infty.
$$
Since $\epsilon>0$ was arbitrary, if $\lim_{n_1\rightarrow\infty}\hat{\Gamma}_{n_2,n_1}(H_{\alpha})$ exists, then
$$
\lim_{n_2\rightarrow\infty}\lim_{n_1\rightarrow\infty}\hat{\Gamma}_{n_2,n_1}(H_{\alpha})=\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(H_{\alpha})).
$$
For comparison, $\hat{\Gamma}_{7,5000}(H_{\alpha})$ is shown for $\tilde{\Gamma}_n(H_{\alpha})=\mathrm{Sp}(P_nH_{\alpha}{|_{P_n\mathcal{H}}})$. As expected, this gives too coarse an estimate of the Lebesgue measure, overestimating, particularly when the Lebesgue measure is close to zero. \texttt{LebSpec} and \texttt{LebPseudoSpec} estimate the distance to the spectrum directly, allowing us to produce covering estimates tailor-made to the spectrum. Other advantages include locality, numerical stability and speed/parallelisation. Furthermore, the finite section method does not always converge.

\subsubsection{Graphical Laplacian on Penrose Tile}
\label{graphlap}
We now consider a transport Hamiltonian on a Penrose tile for which few analytical results are known. Quasicrystals were discovered in 1982 by Shechtman \cite{PhysRevLett.53.1951} 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 physical properties (see \cite{stadnik2012physical} for reviews). The Penrose tile is the standard 2D model \cite{della2005band,takemura2015valence,vardeny2013optics}. However, unlike 1D models, very little is known about the spectral properties of 2D quasicrystals

Our Penrose tile is constructed by the inflation method \cite{grunbaum1987tilings,austin2005penrose} shown in Fig. \ref{pen_leb}. We begin with the initial ring of triangles. Each triangle is then subdivided as shown (note the order of the indices gives an orientation) and then the whole tiling is inflated by a length factor $(1+\sqrt{5})/2$. The effect of inflating twice is to obtain a ring around our original piece with the whole tiling flipped vertically. 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 $x \sim y$. The (negative) Laplacian or free Hamiltonian, $H$, acts on $\psi \in l^2(V(G)) \cong l^{2}(\mathbb{N})$ by
\begin{equation}\label{H_0}
(H\psi)(x) = \sum_{y\sim x} \left(\psi(y)-\psi(x)\right).
\end{equation}
A choice of basis with $f(n)-n\sim\mathcal{O}(\sqrt{n})$ is also shown in Fig. \ref{pen_leb}.

An obvious problem of a height two tower $\Gamma_{n_2,n_1}$ is that apriori we do not know, for a given input $A$, a choice of subsequence $n_2(n_1)$ such that $\Gamma_{n_2(n_1),n_1}(A)$ converges. There are numerous ``stopping criteria'' for such scenarios. In our case, note that, for the height two tower in \S \ref{Leb_sect1}, we may assume without loss of generality that $\Gamma_{n_2,n_1}(A)$ is decreasing in $n_2$ but increasing in $n_1$. This suggests setting $n_1$ as computationally large as feasibly possible, then choosing a suitable cut-off, or maxima $N$, for $n_2$ and seeing if we appear to gain convergence for $n_2\leq N$. We set $n_1=100,000$ and look at the average estimated error of the output via \texttt{DistSpec}. This was $0.0016$ for a grid spacing of $10^{-5}$ so we shall consider grid refinements of spacing $1/32,1/64,...,1/1024$ corresponding to $n_2=5,6,...,10$. Fig. \ref{pen_leb} shows the output as a cumulative Lebesgue measure, that is, an estimate of $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(A)\cap(-\infty,x])$ for a given $x$, along with the computed spectrum (for a grid spacing of $10^{-5}$). The figure suggests that we have not reached required convergence in $n_1$ to take $n_2$ any larger. However, there is 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 \S \ref{sect:PenFract}.

\begin{figure}
\begin{minipage}{.49\textwidth}
\centering
\includegraphics[width=0.88\textwidth,clip,trim= 12mm 50mm 12mm 90mm]{tile_gen}
\end{minipage}
\begin{minipage}{.49\textwidth}
\centering
\includegraphics[width=0.98\textwidth,trim={33mm 125mm 40mm 97mm},clip]{penLeb4}
\includegraphics[width=0.98\textwidth,trim={33mm 92mm 40mm 165mm},clip]{penLeb3}
\end{minipage}
\caption{ Left: Inflation method for constructing the Penrose tile. At each stage substitute each triangle for the new pieces shown and then inflate (not shown) by $\tau=(1+\sqrt{5})/2$. The construction of the rhombi to form the Penrose tile is shown on the right. Inflating twice adds a ring around our tile piece and flips the tile vertically as shown. A natural choice of basis is also shown. Right: Estimates for $\mathrm{Leb}_{\mathbb{R}}(\mathrm{Sp}(H)\cap(-\infty,x])$ obtained by letting $n_1=10^5$ and selecting different $n_2$. The estimate above $-3$ appears to be well resolved.}
\label{pen_leb}
\end{figure}

\subsection{Numerical example for fractal dimensions}
\label{sect:PenFract}
Now we turn to demonstrating the algorithms for fractal dimensions. The routine \texttt{BoxDim} computes the box-counting dimension of $\mathrm{Sp}(A)$ for $A\in\Omega^{BD}_f$ using as input, a height one tower for the spectrum, $\tilde{\Gamma}_n(A)$ (see text for definition of $\Upsilon_{k,j}(A)$ in terms of coverings). The routine \texttt{HausDim} computes $\mathrm{dim}_H(\mathrm{Sp}(A))$ (see text for definition of $h_{n_3,n_2,n_1}$ in terms of coverings) for $A\in\Omega_f\cap\Omega_\mathrm{SA}$.

\vspace{0.3cm}
\begin{algorithm}[H]
 \SetKwInOut{Input}{Input}\SetKwInOut{Output}{Output}
 \BlankLine
\SetKwProg{Fn}{Function}{}{end}
 \SetKwFunction{BoxDim}{BoxDim}
 \SetKwData{Left}{left}\SetKwData{This}{this}\SetKwData{Up}{up}
\SetKwFunction{Union}{Union}\SetKwFunction{FindCompress}{FindCompress}
 \Fn{\BoxDim{$n_1,n_2,A$}}{
  \Input{$n_1,n_2\in\mathbb{N}$, $A\in\Omega^{BD}_f$}
  \Output{$\Gamma_{n_2,n_1}(A)$, an approximation to $\mathrm{dim}_B(\mathrm{Sp}(A))$}
  \BlankLine

\For{$k\in\{n_2,n_2+1,...,{n_1}\}$, $j\in\{1,2,...,{n_1}\}$}{$a_{k,j}=\log(\left|\Upsilon_{k,j}(A)\right|)/k$\\

}
$\Gamma_{n_2,n_1}(A)=\max\{a_{k,j}/\log(2)\}$ (max over empty set is zero).\\
 }
 \end{algorithm}
\vspace{0.3cm}
\begin{algorithm}[H]
 \SetKwInOut{Input}{Input}\SetKwInOut{Output}{Output}
 \BlankLine
\SetKwProg{Fn}{Function}{}{end}
 \SetKwFunction{HausDim}{HausDim}
 \SetKwData{Left}{left}\SetKwData{This}{this}\SetKwData{Up}{up}
\SetKwFunction{Union}{Union}\SetKwFunction{FindCompress}{FindCompress}
 \Fn{\HausDim{$n_1,n_2,n_3,A$}}{
  \Input{$n_1,n_2,n_3\in\mathbb{N}$, $A\in\Omega_f\cap\Omega_\mathrm{SA}$}
  \Output{$\Gamma_{n_3,n_2,n_1}(A)$, an approximation to $\mathrm{dim}_H(\mathrm{Sp}(A))$}
  \BlankLine

\For{$m\in\{1,...,2^{n_3}\}$}{$b_{m}=h_{n_3,n_2,n_1}(A,m/2^{n_3})+1/n_2$\\

}
$\Gamma_{n_3,n_2,n_1}(A)=\max\{m/{2^{n_3}}:b_j>1/2\text{ for }j=1,...,m\}$ (max over empty set is zero).\\
 }
 \end{algorithm}
\vspace{0.3cm}

We begin with the box-counting dimension. The caveat in the tower of algorithms used to compute the box-counting dimension is that convergence at best can only be expected to be logarithmic in the following sense. We expect that the error in approximating $\log(N_{1/2^{n_2}}(\mathrm{Sp}(A)))/\log(2^{n_2})$ via the first limit is roughly order $\mathcal{O}(1/{n_2})$. This can only be reached in the worst case for $d_{\mathrm{H}}(\tilde{\Gamma}_{n_1}(A),\mathrm{Sp}(A))=\mathcal{O}(1/2^{n_2})$ meaning that we have to resolve the spectrum to order $\exp(-1/\epsilon)$ to approximate the box-counting dimension to order $\epsilon$. This is a problem shared by all methods that use the definition of box-counting dimension directly with an estimate of the spectrum. In reality, it is much better to assume that one has the stronger asymptotic condition
\begin{equation}
\label{frac_dim_asym}
N_{\delta}\sim 1/\delta^{d},\quad \delta\rightarrow 0.
\end{equation}
It is then a question of choosing $n_1$ sufficiently large and plotting a graph of $N_{1/n_2}(\tilde{\Gamma}_{n_1}(A))$ against $n_2$. We do this for the operator $H$ from \S \ref{graphlap} and $n_1=10^5$. The results are shown in Fig. \ref{PenFract} for the part of the spectrum above $-3,-2$ and $-1$. There appears to be a region for $n_2$ small such that $1/n_2$ is not greater than the error of the output for which a scaling of the form (\ref{frac_dim_asym}) holds. We found gradients of $0.80,0.76$ and $0.80$ respectively, providing more numerical evidence that the Lebesgue measure of the spectrum above $-3$ is zero and that it perhaps has box-counting dimension between $0.75$ and $0.80$.

Next we investigate the Hausdorff dimension. An efficient way to compute the minimal covering is to use binary trees (see \cite{stewart2001towards} for a discussion of this). In general, there is no way of dealing with a height three tower without extra information giving an ansatz describing which subsequences $n_2(n_3)$ and $n_1(n_3)$ to pick. We take $n_1=10^5$ and use the error bounds to estimate the resolution obtained which corresponds to $n_2$. The height three tower can be written as
$$
\Gamma_{n_3,n_2,n_1}(A)=\sup_{j=1,...,2^{n_3}}\big\{\frac{j}{2^{n_3}}:h_{n_3,n_2,n_1}(A,k/{2^{n_3}})+\frac{1}{n_2}>\frac{1}{2}\text{ for }k=1,...,j\big\},
$$
where $h_{n_3,n_2,n_1}$ is an analogue of $\mathcal{H}_{\delta}^{d}$ (see \S \ref{pf_frac}). Fig. \ref{PenFract} shows $h_{n_3,9,10^5}(H,d)$ for various $d$ and restricted to estimating $\mathrm{Sp}(H)\cap[-3,\infty)$. The figure is consistent with the estimates increasing in $n_3$. There appears to be a region between $0.5$ and $0.7$ where the estimates begin to rapidly increase. We found this region to be largely consistent as we varied $n_2$ and similar results where found for other regions of the spectrum above $-3$. There is a cut-off point bounding the estimates below given by $J/{2^{n_2}}$ with $J$ being the number of intervals of length $2^{-n_2}$ that need to be covered from the estimate of $\mathrm{Sp}(H)\cap[-3,\infty)$. This is also shown in the figure and demonstrates that the value $1/2$ used in the construction of the algorithm may need to be tweaked for different applications. Both algorithms support the possibility that the spectrum above $-3$ is fractal and hence has Lebesgue measure zero.

\begin{figure}
\centering
\includegraphics[width=0.48\textwidth,trim={33mm 90mm 40mm 97mm},clip]{penDim}
\includegraphics[width=0.48\textwidth,trim={33mm 90mm 40mm 97mm},clip]{Haus2}
\caption{Left: A plot of $N_{1/n_2}(\tilde{\Gamma}_{100,000}(H)\cap[x,\infty))$ against $n_2$. We found a scaling region with estimated $d\approx 0.75-0.80$. Note that for large $n_2$ we are looking at scalings not resolved by $\tilde{\Gamma}_{100,000}$ so get nonsense.  Right: $h_{n_3,9,10^5}(H,d)\wedge10$ to show a range of $d$ where the estimates to the Hausdorff measures of $\mathrm{Sp}(H)\cap[-3,\infty)$ rapidly increase. These curves increase with $n_3$ consistent with the theory. This supports that the Hausdorff dimension is between $0.5$ and $0.8$. The ``cut-off'' is a lower bound for the estimates given by $J/{2^{n_2}}$ with $J$ being the number of intervals of length $2^{-n_2}$ that need to be covered from the estimate of $\mathrm{Sp}(H)\cap[-3,\infty)$.}
\label{PenFract}
\end{figure}