%% Write  basic article template

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{color}
\usepackage{sagetex}
\usepackage{minted}
\usepackage{subcaption}
\usepackage{cancel}
\usepackage{mathtools}
\usepackage[]{breqn}
\usepackage[
backend=biber,
style=alphabetic,
sorting=ynt
]{biblatex}
\addbibresource{references.bib}

\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\chern}{\operatorname{ch}}
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\firsttilt}[1]{\mathcal{B}^{#1}}
\newcommand{\bddderived}{\mathcal{D}^{b}}
\newcommand{\centralcharge}{\mathcal{Z}}
\newcommand{\minorheading}[1]{{\noindent\normalfont\normalsize\bfseries #1}}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{corrolary}{Corrolary}[section]
\newtheorem{lemmadfn}{Lemma/Definition}[section]
\newtheorem{dfn}{Definition}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{fact}{Fact}[section]
\newtheorem{example}{Example}[section]
\newtheorem{problem}{Problem Statement}

\begin{document}

\begin{sagesilent}
# Requires extra package:
#! sage -pip install "pseudowalls==0.0.3" --extra-index-url https://gitlab.com/api/v4/projects/43962374/packages/pypi/simple

from pseudowalls import *

Δ = lambda v: v.Q_tilt()
mu = stability.Mumford().slope

def beta_minus(v):
  beta = stability.Tilt().beta
  solutions = solve(
    stability.Tilt(alpha=0).degree(v)==0,
    beta)
  return min(map(lambda s: s.rhs(), solutions))

class Object(object):
  pass
\end{sagesilent}

\title{Explicit Formulae for Bounds on the Ranks of Tilt Destabilizers and
Practical Methods for Finding Pseudowalls}

\author{Luke Naylor}

\maketitle

\tableofcontents

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

It is well known that for any rational $\beta_0$,
the vertical line $\{\sigma_{\alpha,\beta_0} \colon \alpha \in \RR_{>0}\}$ only
intersects finitely many walls
\cite[Thm 1.1]{LoJason2014Mfbs}
\cite[Prop 4.2]{alma9924569879402466}
\cite[Lemma 5.20]{MinaHiroYana_SomeModSp}.
A consequence of this is that if
$\beta_{-}$ is rational, then there can only be finitely many circular walls to the
left of the vertical wall $\beta = \mu$.
On the other hand, when $\beta_{-}$ is not rational, \cite{yanagida2014bridgeland}
showed that there are infinitely many walls.

This dichotomy does not only hold for real walls, realised by actual objects in
$\bddderived(X)$, but also for pseudowalls. Here pseudowalls are defined as
`potential' walls, induced by hypothetical Chern characters of destabilizers
which satisfy certain numerical conditions which would be satisfied by any real
destabilizer, regardless of whether they are realised by actual semistabilizers
in $\bddderived(X)$.

Since real walls are a subset of pseudowalls, the irrational $\beta_{-}$ case
follows immediately from the corresponding case for real walls.
However, the rational $\beta_{-}$ case involves showing that the following
conditions only admit finitely many solutions (despite the fact that the same
conditions admit infinitely many solutions when $\beta_{-}$ is irrational).


For a destabilizing sequence
$E \hookrightarrow F \twoheadrightarrow G$ in $\mathcal{B}^\beta$
we have the following conditions.
There are some Bogomolov-Gieseker type inequalities:
$0 \leq \Delta(E), \Delta(G)$ and $\Delta(E) + \Delta(G) \leq \Delta(F)$.
We also have a condition relating to the tilt category $\firsttilt\beta$:
$0 \leq \chern^\beta_1(E) \leq \chern^\beta_1(F)$.
Finally, there is a condition ensuring that the radius of the circular wall is
strictly positive: $\chern^{\beta_{-}}_2(E) > 0$.

For any fixed $\chern_0(E)$, the inequality
$0 \leq \chern^{\beta}_1(E) \leq \chern^{\beta}_1(F)$,
allows us to bound $\chern_1(E)$. Then, the other inequalities allow us to
bound $\chern_2(E)$. The final part to showing the finiteness of pseudowalls
would be bounding $\chern_0(E)$. This has been hinted at in
\cite{SchmidtBenjamin2020Bsot} and done explicitly by Benjamin Schmidt within a
SageMath \cite{sagemath} library which computes pseudowalls
\cite{SchmidtGithub2020}.
Here we discuss these bounds in more detail, along with the methods used,
followed by refinements on them which give explicit formulae for tighter bounds
on $\chern_0(E)$ of potential destabilizers $E$ of $F$.


\section{Characteristic Curves of Stability Conditions Associated to Chern
Characters}

\begin{dfn}[Pseudo-semistabilizers]
	Given a Chern Character $v$ on a Picard rank 1 surface, and a given stability
	condition $\sigma_{\alpha,\beta}$,
	a pseudo-semistabilizing $u$ is a `potential' Chern character:
	\[
		u = \left(r, c\ell, d \frac{1}{2} \ell^2\right)
	\]
	which has the same tilt slope as $v$: $\nu_{\alpha,\beta}(u) = \nu_{\alpha,\beta}(v)$.

	\noindent
	Furthermore the following Bogomolov-Gieseker inequalities are satisfied:
	\begin{itemize}
		\item $\Delta(u) \geq 0$
		\item $\Delta(v-u) \geq 0$
		\item $\Delta(u) + \Delta(v-u) \leq \Delta(v)$
	\end{itemize}
	\noindent
	And finally these two conditions are satisfied:
	\begin{itemize}
		\item $\chern_1^{\beta}(u) \geq 0$
		\item $\chern_1^{\beta}(v-u) \geq 0$
	\end{itemize}

	Note $u$ does not need to be a Chern character of an actual sub-object of some
	object in the stability condition's heart with Chern character $v$.
\end{dfn}

At this point, and in this document, we do not care about whether
pseudo-semistabilizers are even Chern characters of actual elements of
$\bddderived(X)$, some other sources may have this extra restriction too.

\begin{lemma}[ Sanity check for Pseudo-semistabilizers ]
	Given a Picard rank 1 surface, and a given stability
	condition $\sigma_{\alpha,\beta}$,
	if $E\hookrightarrow F\twoheadrightarrow G$ is a semistabilizing sequence in
	$\firsttilt\beta$ for $F$.
	Then $\chern(E)$ is a pseudo-semistabilizer of $\chern(F)$
\end{lemma}

Considering the stability conditions with two parameters $\alpha, \beta$ on
Picard rank 1 surfaces.
We can draw 2 characteristic curves for any given Chern character $v$ with
$\Delta(v) \geq 0$ and positive rank.
These are given by the equations $\chern_i^{\alpha,\beta}(v)=0$ for $i=1,2$, and
are illustrated in Fig \ref{fig:charact_curves_vis}
(dotted line for $i=1$, solid for $i=2$).

\begin{dfn}[Characteristic Curves $V_v$ and $\Theta_v$]
Given a Chern character $v$, with positive rank and $\Delta(v) \geq 0$, we
define two characteristic curves on the $(\alpha, \beta)$-plane:

\begin{align*}
	V_v &\colon \chern_1^{\alpha, \beta}(v) = 0 \\
	\Theta_v &\colon \chern_2^{\alpha, \beta}(v) = 0
\end{align*}
\end{dfn}

\begin{fact}[Geometry of Characteristic Curves]
The following facts can be deduced from the formulae for $\chern_i^{\alpha, \beta}(v)$
as well as the restrictions on $v$:
\begin{itemize}
	\item $V_v$ is a vertical line at $\beta=\mu(v)$
	\item $\Theta_v$ is a hyperbola with assymptotes angled at $\pm 45^\circ$
		crossing where $V_v$ meets the $\beta$-axis: $(\mu(v),0)$
	\item $\Theta_v$ is oriented with left-right branches (as opposed to up-down).
		The left branch shall be labelled $\Theta_v^-$ and the right $\Theta_v^+$.
	\item The gap along the $\beta$-axis between either branch of $\Theta_v$
		and $V_v$ is $\sqrt{\Delta(v)}/\chern_0(v)$.
	\item When $\Delta(v)=0$, $\Theta_v$ degenerates into a pair of lines, but the
		labels $\Theta_v^\pm$ will still be used for convenience.
\end{itemize}
\end{fact}


\minorheading{Relevance of the vertical line $V_v$}

By definition of the first tilt $\firsttilt\beta$, objects of Chern character
$v$ can only be in $\firsttilt\beta$ on the left of $V_v$, where
$\chern_1^{\alpha,\beta}(v)>0$, and objects of Chern character $-v$ can only be
in $\firsttilt\beta$ on the right, where $\chern_1^{\alpha,\beta}(-v)>0$. In
fact, if there is a Gieseker semistable coherent sheaf $E$ of Chern character
$v$, then $E \in \firsttilt\beta$ if and only if $\beta<\mu(E)$ (left of the
$V_v$), and $E[1] \in \firsttilt\beta$ if and only if $\beta\geq\mu(E)$.
Because of this, when using these characteristic curves, only positive ranks are
considered, as negative rank objects are implicitly considered on the right hand
side of $V_v$.

\begin{sagesilent}
def charact_curves(v):
    alpha = stability.Tilt().alpha
    beta = stability.Tilt().beta
    coords_range = (beta, -4, 5), (alpha, 0, 4)
    text_args = {"fontsize":"xx-large", "clip":True}
    black_text_args = {"rgbcolor": "black", **text_args}
    p = (
      implicit_plot(stability.Tilt().degree(v), *coords_range )
      + line([(mu(v),0),(mu(v),5)], linestyle = "dashed")
      + text(r"$\Theta_v^+$",[3.5, 2], rotation=45, **text_args)
      + text(r"$V_v$", [0.43, 1.5], rotation=90, **text_args)
      + text(r"$\Theta_v^-$", [-2.2, 2], rotation=-45, **text_args)
      + text(r"$\nu_{\alpha, \beta}(v)>0$", [-3, 1], **black_text_args)
      + text(r"$\nu_{\alpha, \beta}(v)<0$", [-1, 3], **black_text_args)
      + text(r"$\nu_{\alpha, \beta}(-v)>0$", [2, 3], **black_text_args)
      + text(r"$\nu_{\alpha, \beta}(-v)<0$", [4, 1], **black_text_args)
    )
    p.xmax(5)
    p.xmin(-4)
    p.ymax(4)
    p.axes_labels([r"$\beta$", r"$\alpha$"])
    return p

v1 = Chern_Char(3, 2, -2)
v2 = Chern_Char(3, 2, 2/3)
\end{sagesilent}

\begin{figure}
\centering
\begin{subfigure}{.49\textwidth}
	\centering
	\sageplot[width=\textwidth]{charact_curves(v1)}
	\caption{$\Delta(v)>0$}
	\label{fig:charact_curves_vis_bgmvlPos}
\end{subfigure}%
\hfill
\begin{subfigure}{.49\textwidth}
	\centering
	\sageplot[width=\textwidth]{charact_curves(v2)}
	\caption{
		$\Delta(v)=0$: hyperbola collapses
	}
	\label{fig:charact_curves_vis_bgmlv0}
\end{subfigure}
\caption{
	Characteristic curves ($\chern_i^{\alpha,\beta}(v)=0$) of stability conditions
	associated to Chern characters $v$ with $\Delta(v) \geq 0$ and positive rank.
}
\label{fig:charact_curves_vis}
\end{figure}


\minorheading{Relevance of the hyperbola $\Theta_v$}

Since $\chern_2^{\alpha, \beta}$ is the numerator of the tilt slope
$\nu_{\alpha, \beta}$. The curve $\Theta_v$, where this is 0, firstly divides the
$(\alpha$-$\beta)$-half-plane into regions where the signs of tilt slopes of
objects of Chern character $v$ (or $-v$) are fixed. Secondly, it gives more of a
fixed target for some $u=(r,c\ell,d\frac{1}{2}\ell^2)$ to be a
pseudo-semistabilizer of $v$, in the following sense: If $(\alpha,\beta)$, is on
$\Theta_v$, then for any $u$, $u$ is a pseudo-semistabilizer of $v$ iff
$\nu_{\alpha,\beta}(u)=0$, and hence $\chern_2^{\alpha, \beta}(u)=0$. In fact,
this allows us to use the characteristic curves of some $v$ and $u$ (with
$\Delta(v), \Delta(u)\geq 0$ and positive ranks) to determine the location of
the pseudo-wall where $u$ pseudo-semistabilizes $v$. This is done by finding the
intersection of $\Theta_v$ and $\Theta_u$, the point $(\beta,\alpha)$ where
$\nu_{\alpha,\beta}(u)=\nu_{\alpha,\beta}(v)=0$, and a pseudo-wall point on
$\Theta_v$, and hence the apex of the circular pseudo-wall with centre $(\beta,0)$
(as per subsection \ref{subsect:bertrams-nested-walls}).

\subsection{Bertram's nested wall theorem}
\label{subsect:bertrams-nested-walls}

Although Bertram's nested wall theorem can be proved more directly, it's also
important for the content of this document to understand the connection with
these characteristic curves.
Emanuele Macri noticed in (TODO ref) that any circular wall of $v$ reaches a critical
point on $\Theta_v$ (TODO ref). This is a consequence of
$\frac{\delta}{\delta\beta} \chern_2^{\alpha,\beta} = -\chern_1^{\alpha,\beta}$.
This fact, along with the hindsight knowledge that non-vertical walls are
circles with centers on the $\beta$-axis, gives an alternative view to see that
the circular walls must be nested and non-intersecting.

\subsection{Characteristic curves for pseudo-semistabilizers}

\begin{lemma}[Numerical tests for left-wall pseudo-semistabilizers]
\label{lem:pseudo_wall_numerical_tests}
Let $v$ and $u$ be Chern characters with $\Delta(v),
\Delta(u)\geq 0$, and $v$ has positive rank. Let $P$ be a point on $\Theta_v^-$.

\noindent
The following conditions:
\bgroup
\renewcommand{\labelenumi}{\alph{enumi}.}
\begin{enumerate}
\item $u$ is a pseudo-semistabilizer of $v$ at some point on $\Theta_v^-$ above
	$P$
\item $u$ destabilizes $v$ going `inwards', that is,
	$\nu_{\alpha,\beta}(u)<\nu_{\alpha,\beta}(v)$ outside the pseudo-wall, and
	$\nu_{\alpha,\beta}(u)>\nu_{\alpha,\beta}(v)$ inside.
\end{enumerate}
\egroup

\noindent
are equivalent to the following more numerical conditions:
\begin{enumerate}
	\item $u$ has positive rank
	\item $\beta(P)<\mu(u)<\mu(v)$, i.e. $V_u$ is strictly between $P$ and $V_v$.
	\item $\chern_1^{\beta(P)}(v-u)\geq0$, $\Delta(v-u) \geq 0$
	\item $\chern_2^{P}(u)>0$
\end{enumerate}
\end{lemma}

\begin{proof}
Let $u,v$ be Chern characters with
$\Delta(u),\Delta(v) \geq 0$, and $v$ has positive rank.


For the forwards implication, assume that the suppositions of the lemma are
satisfied. Let $Q$ be the point on $\Theta_v^-$ (above $P$) where $u$ is a
pseudo-semistabilizer of $v$.
Firstly, consequence 3 is part of the definition for $u$ being a
pseudo-semistabilizer at a point with same $\beta$ value of $P$ (since the
pseudo-wall surrounds $P$).
If $u$ were to have 0 rank, it's tilt slope would be decreasing as $\beta$
increases, contradicting supposition b. So $u$ must have strictly non-zero rank,
and we can consider it's characteristic curves (or that of $-u$ in case of
negative rank).
$\nu_Q(v)=0$, and hence $\nu_Q(u)=0$ too. This means that $\Theta_{\pm u}$ must
intersect $\Theta_v^-$ at $Q$. Considering the shapes of the hyperbolae alone,
there are 3 distinct ways that they can intersect, as illustrated in Fig
\ref{fig:hyperbol-intersection}. These cases are distinguished by whether it is
the left, or the right branch of $\Theta_u$ involved, as well as the positions
of the base. However, considering supposition b, only case 3 (green in
figure) is possible. This is because we need $\nu_{P}(u)>0$ (or $\nu_{P}(-u)>0$ in
case 1 involving $\Theta_u^+$), to satisfy supposition b.
Recalling how the sign of $\nu_{\alpha,\beta}(\pm u)$ changes (illustrated in
Fig \ref{fig:charact_curves_vis}), we can eliminate cases 1 and 2.

\begin{sagesilent}
def hyperbola_intersection_plot():
  var("alpha beta", domain="real")
  coords_range = (beta, -3, -1/2), (alpha, 0, 2.5)
  delta1 = -sqrt(2)+1/100
  delta2 = 1/2
  pbeta=-1.5
  text_args = {"fontsize":"large", "clip":True}
  black_text_args = {"rgbcolor":"black", **text_args}
  p = (
    implicit_plot( beta^2 - alpha^2 == 2,
        *coords_range , rgbcolor = "black", legend_label=r"a")
    + implicit_plot( (beta+4)^2 - (alpha)^2 == 2,
        *coords_range , rgbcolor = "red")
    + implicit_plot( (beta+delta1)^2 - alpha^2 == (delta1-2)^2-2,
        *coords_range , rgbcolor = "blue")
    + implicit_plot( (beta+delta2)^2 - alpha^2 == (delta2-2)^2-2,
        *coords_range , rgbcolor = "green")
    + point([-2, sqrt(2)], size=50, rgbcolor="black", zorder=50)
    + text("Q",[-2, sqrt(2)+0.1], **black_text_args)
    + point([pbeta, sqrt(pbeta^2-2)], size=50, rgbcolor="black", zorder=50)
    + text("P",[pbeta+0.1, sqrt(pbeta^2-2)], **black_text_args)
    + circle((-2,0),sqrt(2), linestyle="dashed", rgbcolor="purple")
    # dummy lines to add legends (circumvent bug in implicit_plot)
    + line([(2,0),(2,0)] , rgbcolor = "purple", linestyle="dotted",
        legend_label=r"pseudo-wall")
    + line([(2,0),(2,0)] , rgbcolor = "black",
        legend_label=r"$\Theta_v^-$")
    + line([(2,0),(2,0)] , rgbcolor = "red", legend_label=r"$\Theta_u$ case 1")
    + line([(2,0),(2,0)] , rgbcolor = "blue", legend_label=r"$\Theta_u$ case 2")
    + line([(2,0),(2,0)] , rgbcolor = "green", legend_label=r"$\Theta_u$ case 3")
  )
  p.set_legend_options(loc="upper right", font_size="x-large",
    font_family="serif")
  p.xmax(coords_range[0][2])
  p.xmin(coords_range[0][1])
  p.ymax(coords_range[1][2])
  p.ymin(coords_range[1][1])
  p.axes_labels([r"$\beta$", r"$\alpha$"])
  return p

def correct_hyperbola_intersection_plot():
  var("alpha beta", domain="real")
  coords_range = (beta, -2.5, 0.5), (alpha, 0, 3)
  delta2 = 1/2
  pbeta=-1.5
  text_args = {"fontsize":"large", "clip":True}
  black_text_args = {"rgbcolor":"black", **text_args}
  p = (
    implicit_plot( beta^2 - alpha^2 == 2,
        *coords_range , rgbcolor = "black", legend_label=r"a")
    + implicit_plot((beta+delta2)^2 - alpha^2 == (delta2-2)^2-2,
        *coords_range , rgbcolor = "green")
    + point([-2, sqrt(2)], size=50, rgbcolor="black", zorder=50)
    + text("Q",[-2, sqrt(2)+0.1], **black_text_args)
    + point([pbeta, sqrt(pbeta^2-2)], size=50, rgbcolor="black", zorder=50)
    + text("P",[pbeta+0.1, sqrt(pbeta^2-2)], **black_text_args)
    + circle((-2,0),sqrt(2), linestyle="dashed", rgbcolor="purple")
    # dummy lines to add legends (circumvent bug in implicit_plot)
    + line([(2,0),(2,0)] , rgbcolor = "purple", linestyle="dotted",
        legend_label=r"pseudo-wall")
    + line([(2,0),(2,0)] , rgbcolor = "black",
        legend_label=r"$\Theta_v^-$")
    + line([(2,0),(2,0)] , rgbcolor = "green",
        legend_label=r"$\Theta_u^-$")
    # vertical characteristic lines
    + line([(0,0),(0,coords_range[1][2])],
        rgbcolor="black", linestyle="dashed",
        legend_label=r"$V_v$")
    + line([(-delta2,0),(-delta2,coords_range[1][2])],
        rgbcolor="green", linestyle="dashed",
        legend_label=r"$V_u$")
    + line([(-delta2,0),(-delta2-coords_range[1][2],coords_range[1][2])],
        rgbcolor="green", linestyle="dotted",
        legend_label=r"$\Theta_u^-$ assymptote")
    + line([(0,0),(-coords_range[1][2],coords_range[1][2])],
        rgbcolor="black", linestyle="dotted",
        legend_label=r"$\Theta_v^-$ assymptote")
  )
  p.set_legend_options(loc="upper right", font_size="x-large",
    font_family="serif")
  p.xmax(coords_range[0][2])
  p.xmin(coords_range[0][1])
  p.ymax(coords_range[1][2])
  p.ymin(coords_range[1][1])
  p.axes_labels([r"$\beta$", r"$\alpha$"])
  return p
\end{sagesilent}

\begin{figure}
\begin{subfigure}[t]{0.48\textwidth}
	\centering
	\sageplot[width=\textwidth]{hyperbola_intersection_plot()}
	\caption{Three ways the characteristic hyperbola for $u$ can intersect the left
	branch of the characteristic hyperbola for $v$}
	\label{fig:hyperbol-intersection}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.48\textwidth}
	\centering
	\sageplot[width=\textwidth]{correct_hyperbola_intersection_plot()}
	\caption{Closer look at characteristic curves for valid case}
	\label{fig:correct-hyperbol-intersection}
\end{subfigure}
\end{figure}

Fixing attention on the only possible case (2), illustrated in Fig
\ref{fig:correct-hyperbol-intersection}.
$P$ is on the left of $V_{\pm u}$ (first part of consequence 2), so $u$ must
have positive rank (consequence 1)
to ensure that $\chern_1^{\beta{P}} \geq 0$ (since the pseudo-wall passed over
$P$).
Furthermore, $P$ being on the left of $V_u$ implies
$\chern_1^{\beta{P}}(u) \geq 0$,
and therefore $\chern_2^{P}(u) > 0$ (consequence 4) to satisfy supposition b.
Next considering the way the hyperbolae intersect, we must have $\Theta_u^-$ taking a
base-point to the right $\Theta_v$, but then, further up, crossing over to the
left side. The latter fact implies that the assymptote for $\Theta_u^-$ must be
to the left of the one for $\Theta_v^-$. Given that they are parallel and
intersect the $\beta$-axis at $\beta=\mu(u)$ and $\beta=\mu(v)$ respectively. We
must have $\mu(u)<\mu(v)$ (second part of consequence 2),
that is, $V_u$ is strictly to the left of $V_v$.


Conversely, suppose that the consequences 1-4 are satisfied. Consequence 2
implies that the assymptote for $\Theta_u^-$ is to the left of $\Theta_v^-$.
Consequence 4, along with $\beta(P)<\mu(u)$, implies that $P$ must be in the
region left of $\Theta_u^-$. These two facts imply that $\Theta_u^-$ is to the
right of $\Theta_v^-$ at $\alpha=\alpha(P)$, but crosses to the left side as
$\alpha \to +\infty$, intersection at some point $Q$ above $P$.
This implies that the characteristic curves for $u$ and $v$ are in the
configuration illustrated in Fig \ref{fig:correct-hyperbol-intersection}.
We then have $\nu(u)=\nu(v)$ along a circle to the left of $V_u$ reaching it's
apex at $Q$, and encircling $P$. This along with consequence 3 implies that $u$
is a pseudo-semistabilizer at the point on the circle with $\beta=\beta(P)$.
Therefore, it's also a pseudo-semistabilizer further along the circle at $Q$
(supposition a).
Finally, consequence 4 along with $P$ being to the left of $V_u$ implies
$\nu_P(u) > 0$ giving supposition b.
\end{proof}


\section{Loose Bounds on $\chern_0(E)$ for Semistabilizers Along Fixed
$\beta\in\QQ$}

\begin{dfn}[Twisted Chern Character]
\label{sec:twisted-chern}
For a given $\beta$, define the twisted Chern character as follows.
\[\chern^\beta(E) = \chern(E) \cdot \exp(-\beta \ell)\]
\noindent
Component-wise, this is:
\begin{align*}
	\chern^\beta_0(E) &= \chern_0(E)
\\
	\chern^\beta_1(E) &= \chern_1(E) - \beta \chern_0(E)
\\
	\chern^\beta_2(E) &= \chern_2(E) - \beta \chern_1(E) + \frac{\beta^2}{2} \chern_0(E)
\end{align*}
where $\chern_i$ is the coefficient of $\ell^i$ in $\chern$.

% TODO I think this^ needs adjusting for general Surface with $\ell$
\end{dfn}

$\chern^\beta_1(E)$ is the imaginary component of the central charge
$\centralcharge_{\alpha,\beta}(E)$ and any element of $\firsttilt\beta$
satisfies $\chern^\beta_1 \geq 0$. This, along with additivity gives us, for any
destabilizing sequence [ref]:
\begin{equation}
	\label{eqn-tilt-cat-cond}
	0 \leq \chern^\beta_1(E) \leq \chern^\beta_1(F)
\end{equation}

When finding Chern characters of potential destabilizers $E$ for some fixed
Chern character $\chern(F)$, this bounds $\chern_1(E)$.

The Bogomolov form applied to the twisted Chern character is the same as the
normal one. So $0 \leq \Delta(E)$ yields:

\begin{equation}
	\label{eqn-bgmlv-on-E}
	2\chern^\beta_0(E) \chern^\beta_2(E) \leq \chern^\beta_1(E)^2
\end{equation}

\begin{theorem}[Bound on $r$ - Benjamin Schmidt]
\label{thm:loose-bound-on-r}
Given a Chern character $v$ such that $\beta_-\coloneqq\beta_{-}(v)\in\QQ$, the rank $r$ of
any semistabilizer $E$ of some $F \in \firsttilt{\beta_-}$ with $\chern(F)=v$ is
bounded above by:

\begin{equation*}
	r \leq \frac{mn^2 \chern^{\beta_-}_1(v)^2}{\gcd(m,2n^2)}
\end{equation*}
\end{theorem}

\begin{proof}

The restrictions on $\chern^{\beta_-}_0(E)$ and $\chern^{\beta_-}_2(E)$
is best seen with the following graph:

% TODO: hyperbola restriction graph (shaded)
\begin{sagesilent}
var("m") # Initialize symbol for variety parameter
\end{sagesilent}

This is where the rationality of $\beta_{-}$ comes in. If
$\beta_{-} = \frac{a_v}{n}$ for some $a_v,n \in \ZZ$. Then
$\chern^{\beta_-}_2(E) \in \frac{1}{\lcm(m,2n^2)}\ZZ$ where $m$ is the integer
which guarantees $\chern_2(E) \in \frac{1}{m}\ZZ$ (determined by the variety).
In particular, since $\chern_2^{\beta_-}(E) > 0$ (by using 	$P=(\beta_-,0)$ in
lemma \ref{lem:pseudo_wall_numerical_tests}) we must also have
$\chern^{\beta_-}_2(E) \geq \frac{1}{\lcm(m,2n^2)}$, which then in turn gives a
bound for the rank of $E$:

\begin{align}
	\chern_0(E) &= \chern^{\beta_-}_0(E) \\
	&\leq \frac{\lcm(m,2n^2) \chern^{\beta_-}_1(E)^2}{2} \\
	&= \frac{mn^2 \chern^{\beta_-}_1(F)^2}{\gcd(m,2n^2)}
\end{align}

\end{proof}

\begin{example}[$v=(3, 2\ell, -2)$ on $\PP^2$]
\label{exmpl:recurring-first}
\begin{sagesilent}
recurring = Object()
recurring.chern = Chern_Char(3, 2, -2)
recurring.b = beta_minus(recurring.chern)
recurring.twisted = recurring.chern.twist(recurring.b)
\end{sagesilent}
Taking $\ell=c_1(\mathcal{O}(1))$ as the standard polarization on $\PP^2$, so
that $m=2$, $\beta_-=\sage{recurring.b}$,
giving $n=\sage{recurring.b.denominator()}$ and
$\chern_1^{\sage{recurring.b}}(F) = \sage{recurring.twisted.ch[1]}$.

\begin{sagesilent}
n = recurring.b.denominator()
m = 2
loose_bound = (
  m*n^2*recurring.twisted.ch[1]^2
) / gcd(m, 2*n^2)
\end{sagesilent}
Using the above theorem \ref{thm:loose-bound-on-r}, we get that the ranks of
tilt semistabilizers for $v$ are bounded above by $\sage{loose_bound}$.
However, when computing all tilt semistabilizers for $v$ on $\PP^2$, the maximum
rank that appears turns out to be 25. This will be a recurring example to
illustrate the performance of later theorems about rank bounds
\end{example}

\begin{example}[extravagant example: $v=(29, 13\ell, -3/2)$ on $\PP^2$]
\label{exmpl:extravagant-first}
\begin{sagesilent}
extravagant = Object()
extravagant.chern = Chern_Char(29, 13, -3/2)
extravagant.b = beta_minus(extravagant.chern)
extravagant.twisted = extravagant.chern.twist(extravagant.b)
extravagant.actual_rmax = 49313
\end{sagesilent}
Taking $\ell=c_1(\mathcal{O}(1))$ as the standard polarization on $\PP^2$, so
that $m=2$, $\beta_-=\sage{extravagant.b}$,
giving $n=\sage{extravagant.b.denominator()}$ and
$\chern_1^{\sage{extravagant.b}}(F) = \sage{extravagant.twisted.ch[1]}$.

\begin{sagesilent}
n = extravagant.b.denominator()
m = 2
loose_bound = (
  m*n^2*extravagant.twisted.ch[1]^2
) / gcd(m, 2*n^2)
\end{sagesilent}
Using the above theorem \ref{thm:loose-bound-on-r}, we get that the ranks of
tilt semistabilizers for $v$ are bounded above by $\sage{loose_bound}$.
However, when computing all tilt semistabilizers for $v$ on $\PP^2$, the maximum
rank that appears turns out to be $\sage{extravagant.actual_rmax}$.
\end{example}

\section{B.Schmidt's Wall Finding Method}

The proof for the previous theorem was hinted at in
\cite{SchmidtBenjamin2020Bsot}, but the value appears explicitly in
\cite{SchmidtGithub2020}. The latter reference is a SageMath \cite{sagemath}
library for computing certain quantities related to Bridgeland stabilities on
Picard rank 1 varieties. It also includes functions to compute pseudo-walls and
pseudo-semistabilizers for tilt stability.

Here is an outline of the algorithm involved to do this. Simplifications will be
made in the presenteation to concentrate on the case we are interested in:
finding all pseudo-walls when $\beta_{-}\in\QQ$. In section [ref], a different
algorithm will be presented making use of the later theorems in this article,
with the goal of cutting down the run time.

\begin{problem}[sufficiently large `left' pseudo-walls]
\label{problem:problem-statement-1}

Fix a Chern character $v$ with positive rank, $\Delta(v) \geq 0$,
and $\beta_{-}(v) \in \QQ$.
The goal is to find all pseudo-semistabilizers $u=(r,c\ell,d\ell^2)$
which give circular pseudo-walls containing some fixed point
$P\in\Theta_v^-$.
With the added restriction that $u$ `destabilizes' $v$ moving `inwards', that is,
$\nu(u)>\nu(v)$ inside the circular pseudo-wall
(`outward' destabilizers can be recovered as $v-u$).

This will give all pseudo-walls between the chamber corresponding to Gieseker
stability and the stability condition corresponding to $P$.
\end{problem}

\begin{problem}[all `left' pseudo-walls]
\label{problem:problem-statement-1}

Fix a Chern character $v$ with positive rank, $\Delta(v) \geq 0$,
and $\beta_{-}(v) \in \QQ$.
The goal is to find all solutions $u=(r,c\ell,d\ell^2)$
to problem \ref{problem:problem-statement-1} with the choice
$P=(\beta_{-},0)$.

This will give all circular pseudo-walls left of $V_v$.
\end{problem}

\subsection*{Algorithm}

\subsubsection*{Finding possible $r$ and $c$}
To do this, first calculate the upper bound $r_{max}$ on the ranks of tilt
semistabilizers, as given by theorem \ref{thm:loose-bound-on-r}.

Recalling consequence 2 of lemma \ref{lem:pseudo_wall_numerical_tests}, we can
iterate through the possible values of $\mu(u)=\frac{c}{r}$ taking a decreasing
sequence of all fractions between $\mu(v)$ and $\beta_{-}$, who's denominators
are no large than $r_{max}$ (giving a finite sequence). This can be done with
Farey sequences \cite[chapter 6]{alma994504533502466}, for which there exist formulae to generate.

These $\mu(u)$ values determine pairs $r,c$ up to multiples, we can then take
all multiples which satisy $0<r\leq r_{max}$.

We now have a finite sequence of pairs $r,c$ for which there might be a solution
$(r,c\ell,d\ell^2)$ to our problem. In particular, any $(r,c\ell,d\ell^2)$
satisfies consequence 2 of lemma \ref{lem:pseudo_wall_numerical_tests}, and the
positive rank condition. What remains is to find the $d$ values which satisfy
the Bogomolov inequalities and consequence 3 of lemma
\ref{lem:pseudo_wall_numerical_tests}
($\chern_2^{\beta_{-}}(u)>0$).

\subsubsection*{Finding $d$ for fixed $r$ and $c$}

$\Delta(u) \geq 0$ induces an upper bound $\frac{c^2}{2r}$ on $d$, and the
$\chern_2^{\beta_{-}}(u)>0$ condition induces a lower bound on $d$.
The values in the range can be tested individually, to check that
the rest of the conditions are satisfied.

\subsection*{Limitations}

The main downside of this algorithm is that many $r$,$c$ pairs which are tested
end up not yielding any solutions for the problem.
In fact, solutions $u$ to our problem with high rank must have $\mu(u)$ close to
$\beta_{-}$:
\begin{align*}
	0 &\leq \chern_1^{\beta_{-}}(u) \leq \chern_1^{\beta_{-}}(u) \\
	0 &\leq \mu(u) - \beta_{-} \leq \frac{\chern_1^{\beta_{-}}(v)}{r}
\end{align*}
In particular, it's the $\chern_1^{\beta_{-}}(v-u) \geq 0$ conditions which
fails for $r$,$c$ pairs with large $r$ and $\frac{c}{r}$ too far from $\beta_{-}$.
This condition is only checked within the internal loop.
This, along with a conservative estimate for a bound on the $r$ values (as
illustrated in example \ref{exmpl:recurring-first}) occasionally leads to slow
computations.

Here are some benchmarks to illustrate the performance benefits of the
alternative algorithm which will later be described in this article [ref].

\begin{center}
\begin{tabular}{ |r|l|l| }
 \hline
 Choice of $v$ on $\mathbb{P}^2$
 & $(3, 2\ell, -2)$
 & $(3, 2\ell, -\frac{15}{2})$ \\
 \hline
 \cite[\texttt{tilt.walls_left}]{SchmidtGithub2020} exec time & \sim 20s & >1hr \\
 \cite{NaylorRust2023} exec time & \sim 50ms & \sim 50ms \\
 \hline
\end{tabular}
\end{center}

\section{Tighter Bounds}
\label{sec:refinement}

To get tighter bounds on the rank of destabilizers $E$ of some $F$ with some
fixed Chern character, we will need to consider each of the values which
$\chern_1^{\beta}(E)$ can take.
Doing this will allow us to eliminate possible values of $\chern_0(E)$ for which
each $\chern_1^{\beta}(E)$ leads to the failure of at least one of the inequalities.
As opposed to only eliminating possible values of $\chern_0(E)$ for which all
corresponding $\chern_1^{\beta}(E)$ fail one of the inequalities (which is what
was implicitly happening before).

First, let us fix a Chern character for $F$, and some semistabilizer $E$:
\begin{align}
	v &\coloneqq \chern(F) = (R,C\ell,D\ell^2) \\
	u &\coloneqq \chern(E) = (r,c\ell,d\ell^2)
\end{align}
 
\begin{sagesilent}
# Requires extra package:
#! sage -pip install "pseudowalls==0.0.3" --extra-index-url https://gitlab.com/api/v4/projects/43962374/packages/pypi/simple

from pseudowalls import *

v = Chern_Char(*var("R C D", domain="real"))
u = Chern_Char(*var("r c d", domain="real"))

Δ = lambda v: v.Q_tilt()
\end{sagesilent}

Recall from eqn \ref{eqn-tilt-cat-cond} that $\chern_1^{\beta}(u)$ has fixed
bounds in terms of $\chern_1^{\beta}(v)$, and so we can write:

\begin{sagesilent}
ts = stability.Tilt
var("beta", domain="real")

c_lower_bound = -(
	ts(beta=beta).rank(u)
	/ts().alpha
).expand() + c

var("q", domain="real")
c_in_terms_of_q = c_lower_bound + q
\end{sagesilent}

\begin{equation}
	\label{eqn-cintermsofm}
	c=\chern_1(u) = \sage{c_in_terms_of_q}
	\qquad 0 \leq q \coloneqq \chern_1^{\beta}(u) \leq \chern_1^{\beta}(v)
\end{equation}

Furthermore, $\chern_1 \in \ZZ$ so we only need to consider
$q \in \frac{1}{n} \ZZ \cap [0, \chern_1^{\beta}(F)]$.
For the next subsections, we consider $q$ to be fixed with one of these values,
and we shall be varying $\chern_0(E) = r$ to see when certain inequalities fail.


\subsection{Numerical Inequalities}

\subsubsection{Size of pseudo-wall: $\chern_2^P(u)>0$ }
\label{subsect-d-bound-radiuscond}

This condition refers to consequence 4 from
lemma \ref{lem:pseudo_wall_numerical_tests}.

In the case where $P$ was chosen to be the base of $\Theta_v^-$: $P=(\beta_{-},0)$.
This condition amounts to:

\begin{align}
\label{eqn:radius-cond-betamin}
	\chern_2^{\beta_{-}}(u) &\geq 0 \\
	d &\geq \beta_{-}q + \frac{1}{2} \beta_{-}^2r
\end{align}

\subsubsection{
	\texorpdfstring{
		$\Delta(u,v-u) \geq 0$
	}{
		Δ(u,v-u) ≤ 0
	}
}
\label{subsect-d-bound-bgmlv1}

Writing the condition in terms of the twisted chern characters
for $u$ and $v$ at $\beta$
($(r,\chern_1^{\beta}(u),\chern_2^{\beta}(u))$
and $(R-r,\chern_1^{\beta}(v-u),\chern_2^{\beta}(v-u))$) yields:

\begin{equation}
\label{eqn:bgmlv1-pt1}
	(R-r)\chern_2^{\beta}(u)
	\leq
	\chern_1^{\beta}(u)\chern_1^{\beta}(v-u)
	- r\chern_2^{\beta}(v-u)
\end{equation}

Which rearranges to (using additivity of $\chern_2^{\beta}$):

\begin{equation}
\label{eqn:bgmlv1-pt2}
	(R-2r)\chern_2^{\beta}(u)
	\leq
	\chern_1^{\beta}(u)\chern_1^{\beta}(v-u)
	- r\chern_2^{\beta}(v)
\end{equation}

With $u$ satisfying the condition given by equation \ref{eqn-cintermsofm},
we note that $\chern_1^{\beta}(u),\chern_1^{\beta}(v-u) \geq 0$.

In the special case with $P=(\beta_{-},0)$,
we have $\chern_2^{\beta_{-}}(v)=0$, and we can assume
equation $\chern_2^{\beta_{-}}(u)>0$ (eqn \ref{eqn:radius-cond-betamin})
in the context of our problem.

Finally, $r>0$ as per the statement of the problem, so the right-hand-side
of equation \ref{eqn:bgmlv1-pt1} is always greater than, or equal, to zero.
And so, when $P\coloneqq(\beta_{-},0)$, this condition $\Delta(u,v-u) \geq 0$ is
always satisfied when $2r \geq R$, provided that the other conditions of the
problem statement (\ref{subsect:problem-statement}) hold.

However, when $2r<R$, this condition does add potentially independent condition
of the others:

\begin{equation}
\label{eqn:bgmlv1-pt3}
	\chern_2^{\beta}(u)
	\leq
	\frac{
		\chern_1^{\beta}(u)\chern_1^{\beta}(v-u)
		- r\chern_2^{\beta}(v)
	}
	{R-2r},
	\qquad
	2r<R
\end{equation}

Expressed in terms of $d$ and $q$:
\begin{equation}
\label{eqn:bgmlv1-pt4}
	d
	\leq
	\beta_{-}q
	+\frac{1}{2}{\beta_{-}}^2r
	+
	\frac{
		q(\chern_1^{\beta}(v)-q)
		- r\chern_2^{\beta}(v)
	}
	{R-2r},
	\qquad
	2r<R
\end{equation}

\subsubsection{
	\texorpdfstring{
		$\Delta(E) \geq 0$
	}{
		Δ(E) ≥ 0
	}
}

This condition expressed in terms of $R,C,D,r,c,d$ looks as follows:

\begin{sagesilent}
# First Bogomolov-Gieseker form expression that must be non-negative:
bgmlv2 = Δ(u)
\end{sagesilent}

\begin{equation}
	\sage{0 <= bgmlv2.expand() }
\end{equation}


\noindent
Expressing $c$ in terms of $q$ as defined in (eqn \ref{eqn-cintermsofm})
we get the following:

\begin{sagesilent}
bgmlv2_with_q = (
	bgmlv2
	.expand()
	.subs(c == c_in_terms_of_q)
)
\end{sagesilent}

\begin{equation}
	\sage{0 <= bgmlv2_with_q}
\end{equation}


\noindent
This can be rearranged to express a bound on $d$ as follows:

\begin{sagesilent}
bgmlv2_d_ineq = (
	(0 <= bgmlv2_with_q)/2/r # rescale assuming r > 0
	+ d # Rearrange for d
).expand()

# Keep hold of lower bound for d
bgmlv2_d_upperbound = bgmlv2_d_ineq.rhs()
\end{sagesilent}

\begin{equation}
	\label{eqn-bgmlv2_d_upperbound}
	\sage{bgmlv2_d_ineq}
\end{equation}

\begin{sagesilent}
# Seperate out the terms of the lower bound for d

bgmlv2_d_upperbound_without_hyp = (
	bgmlv2_d_upperbound
	.subs(1/r == 0)
)

bgmlv2_d_upperbound_const_term = (
	bgmlv2_d_upperbound_without_hyp
	.subs(r==0)
)

bgmlv2_d_upperbound_linear_term = (
	bgmlv2_d_upperbound_without_hyp
	- bgmlv2_d_upperbound_const_term
).expand()

bgmlv2_d_upperbound_exp_term = (
	bgmlv2_d_upperbound
	- bgmlv2_d_upperbound_without_hyp
).expand()
\end{sagesilent}

Viewing equation \ref{eqn-bgmlv2_d_upperbound} as a lower bound for $d$ in term
of $r$ again, there is a constant term
$\sage{bgmlv2_d_upperbound_const_term}$,
a linear term
$\sage{bgmlv2_d_upperbound_linear_term}$,
and a hyperbolic term
$\sage{bgmlv2_d_upperbound_exp_term}$.
Notice that for $\beta = \beta_{-}$ (or $\beta_{+}$), that is when
$\chern^{\beta}_2(F)=0$, the constant and linear terms match up with the ones
for the bound found for $d$ in subsection \ref{subsect-d-bound-bgmlv1}.

\subsubsection{
	\texorpdfstring{
		$\Delta(G) \geq 0$
	}{
		Δ(G) ≥ 0
	}
}
\label{subsect-d-bound-bgmlv3}

This condition expressed in terms of $R,C,D,r,c,d$ looks as follows:

\begin{sagesilent}
# Third Bogomolov-Gieseker form expression that must be non-negative:
bgmlv3 = Δ(v-u)
\end{sagesilent}

\begin{equation}
	\sage{0 <= bgmlv3.expand() }
\end{equation}


\noindent
Expressing $c$ in terms of $q$ as defined in (eqn \ref{eqn-cintermsofm})
we get the following:

\begin{sagesilent}
bgmlv3_with_q = (
	bgmlv3
	.expand()
	.subs(c == c_in_terms_of_q)
)
\end{sagesilent}

\begin{equation}
	\sage{0 <= bgmlv3_with_q}
\end{equation}


\noindent
This can be rearranged to express a bound on $d$ as follows:

\begin{sagesilent}
var("r_alt",domain="real") # r_alt = r - R temporary substitution

bgmlv3_with_q_reparam = (
	bgmlv3_with_q
	.subs(r == r_alt + R)
	/r_alt # This operation assumes r_alt > 0
).expand()

bgmlv3_d_ineq = (
	((0 <= bgmlv3_with_q_reparam)/2 + d) # Rearrange for d
	.subs(r_alt == r - R) # Resubstitute r back in
	.expand()
)

# Check that this equation represents a bound for d
assert bgmlv3_d_ineq.lhs() == d

bgmlv3_d_upperbound = bgmlv3_d_ineq.rhs() # Keep hold of lower bound for d
\end{sagesilent}

\begin{sagesilent}
# Seperate out the terms of the lower bound for d

bgmlv3_d_upperbound_without_hyp = (
	bgmlv3_d_upperbound
	.subs(1/(R-r) == 0)
)

bgmlv3_d_upperbound_const_term = (
	bgmlv3_d_upperbound_without_hyp
	.subs(r==0)
)

bgmlv3_d_upperbound_linear_term = (
	bgmlv3_d_upperbound_without_hyp
	- bgmlv3_d_upperbound_const_term
).expand()

bgmlv3_d_upperbound_exp_term = (
	bgmlv3_d_upperbound
	- bgmlv3_d_upperbound_without_hyp
).expand()

# Verify the simplified forms of the terms that will be mentioned in text

var("chb1v chb2v",domain="real") # symbol to represent ch_1^\beta(v)
var("psi phi", domain="real") # symbol to represent ch_1^\beta(v) and
# ch_2^\beta(v)

assert bgmlv3_d_upperbound_const_term == ( 
	(
		# keep hold of this alternative expression:
		bgmlv3_d_upperbound_const_term_alt := (
			phi
			+ beta*q
		)
	)
	.subs(phi == v.twist(beta).ch[2]) # subs real val of ch_1^\beta(v)
	.expand()
)

assert bgmlv3_d_upperbound_exp_term == (
	(
		# Keep hold of this alternative expression:
		bgmlv3_d_upperbound_exp_term_alt :=
		(
			R*phi
			+ (C - q)^2/2
			+ R*beta*q
			- D*R
		)/(r-R)
	)
	.subs(phi == v.twist(beta).ch[2]) # subs real val of ch_1^\beta(v)
	.expand()
)

assert bgmlv3_d_upperbound_exp_term == (
	(
		# Keep hold of this alternative expression:
		bgmlv3_d_upperbound_exp_term_alt2 :=
		(
			(psi - q)^2/2/(r-R)
		)
	)
	.subs(psi == v.twist(beta).ch[1]) # subs real val of ch_1^\beta(v)
	.expand()
)
\end{sagesilent}

\bgroup
\def\psi{\chern_1^{\beta}(F)}
\def\phi{\chern_2^{\beta}(F)}
\begin{dmath}
	\label{eqn-bgmlv3_d_upperbound}
	d \leq
	\sage{bgmlv3_d_upperbound_linear_term}
	+ \sage{bgmlv3_d_upperbound_const_term_alt}
	+ \sage{bgmlv3_d_upperbound_exp_term_alt2}
\end{dmath}
\egroup


\noindent
Viewing equation \ref{eqn-bgmlv3_d_upperbound} as an upper bound for $d$ give:
as a function of $r$, the terms can be rewritten as follows.
The constant term in $r$ is
$\chern^{\beta}_2(F) + \beta q$.
The linear term in $r$ is
$\sage{bgmlv3_d_upperbound_linear_term}$.
Finally, there is an hyperbolic term in $r$ which tends to 0 as $r \to \infty$,
and can be written:
\bgroup
\def\psi{\chern_1^{\beta}(F)}
$\sage{bgmlv3_d_upperbound_exp_term_alt2}$.
\egroup
In the case $\beta = \beta_{-}$ (or $\beta_{+}$) we have
$\chern^{\beta}_2(F) = 0$,
so some of these expressions simplify, and in particular, the constant and
linear terms match those of the other bounds in the previous subsections.

\subsubsection{All Bounds on $d$ together}
%% RECAP ON INEQUALITIES TOGETHER

%%%% RATIONAL BETA MINUS
\minorheading{Special Case: Rational $\beta_{-}$}

Suppose we take $\beta = \beta_{-}$ (so that $\chern^{\beta}_2(F)=0$)
in the previous subsections, to find all circular walls to the left of the
vertical wall (TODO as discussed in ref).

% redefine \beta (especially coming from rendered SageMath expressions)
% to be \beta_{-} for the rest of this subsubsection
\bgroup

\let\originalbeta\beta
\renewcommand\beta{{\originalbeta_{-}}}

\bgroup
% redefine \psi in sage expressions (placeholder for ch_1^\beta(F)
\def\psi{\chern_1^{\beta}(F)}
\begin{align}
	d &>&
	\frac{1}{2}\beta^2 r
	&+ \beta q,
	\phantom{+}& % to keep terms aligned
	 &\qquad\text{when\:} r > 0
	\label{eqn:radiuscond_d_bound_betamin}
\\
	d &\leq&
	\frac{1}{2}{\beta}^2r
	&+ \beta q
	+&
	\frac{
		q(\chern_1^{\beta}(v)-q)
	}
	{R-2r},
	 &\qquad\text{when\:} 0 < r < \frac{R}{2}
	\label{eqn:bgmlv1_d_bound_betamin}
\\
	d &\leq&
	\sage{bgmlv2_d_upperbound_linear_term}
	&+ \sage{bgmlv2_d_upperbound_const_term}
	+& \sage{bgmlv2_d_upperbound_exp_term},
	 &\qquad\text{when\:} r > 0
	 \label{eqn:bgmlv2_d_bound_betamin}
\\
	d &\leq&
	\sage{bgmlv3_d_upperbound_linear_term}
	&+ \sage{bgmlv3_d_upperbound_const_term_alt.subs(phi == 0)}
	% ^ ch_2^\beta(F)=0 for beta_{-}
	+& \sage{bgmlv3_d_upperbound_exp_term_alt2},
	 &\qquad\text{when\:} r > R
	 \label{eqn:bgmlv3_d_bound_betamin}
\end{align}
\egroup

Furthermore, we get an extra bound for $d$ resulting from the condition that the
radius of the circular wall must be positive. As discussed in (TODO ref), this
is equivalent to $\chern^{\beta}_2(E) > 0$, which yields:

\begin{sagesilent}
positive_radius_condition = (
	(
		(0 > - u.twist(beta).ch[2])
		+ d # rearrange for d
	)
	.subs(solve(q == u.twist(beta).ch[1], c)[0]) # express c in term of q
	.expand()
)
\end{sagesilent}

\begin{equation}
	\label{eqn:positive_rad_d_bound_betamin}
	\sage{positive_radius_condition}
\end{equation}
\begin{sagesilent}
def beta_min(chern):
  ts = stability.Tilt()
  return min(
    map(
      lambda soln: soln.rhs(),
      solve(
        (ts.degree(chern))
          .expand()
          .subs(ts.alpha == 0),
        beta
      )
    )
  )

v_example = Chern_Char(3,2,-2)
q_example = 7/3

def plot_d_bound(
  v_example,
  q_example,
  ymax=5,
  ymin=-2,
  xmax=20,
  aspect_ratio=None
):

  # Equations to plot imminently representing the bounds on d:
  eq1 = (
    (
      beta^2*r/2
      + beta*q
      + q*(chb1v - q)/(R-2*r)
    )
    .subs(chb1v == v_example.twist(beta_min(v_example)).ch[1])
    .subs(beta = beta_min(v_example))
    .subs(q == q_example)
    .subs(R == v_example.ch[0])
  )

  eq2 = (
    bgmlv2_d_upperbound
    .subs(R == v_example.ch[0])
    .subs(C == v_example.ch[1])
    .subs(D == v_example.ch[2])
    .subs(beta = beta_min(v_example))
    .subs(q == q_example)
  )

  eq3 = (
    bgmlv3_d_upperbound
    .subs(R == v_example.ch[0])
    .subs(C == v_example.ch[1])
    .subs(D == v_example.ch[2])
    .subs(beta = beta_min(v_example))
    .subs(q == q_example)
  )

  eq4 = (
    positive_radius_condition.rhs()
    .subs(q == q_example)
    .subs(beta = beta_min(v_example))
  )

  example_bounds_on_d_plot = (
    plot(
      eq3,
      (r,v_example.ch[0],xmax),
      color='green',
			linestyle = "dashed",
      legend_label=r"upper bound: $\Delta(v-u) \geq 0$",
    )
    + plot(
      eq2,
      (r,0,xmax),
      color='blue',
			linestyle = "dashed",
      legend_label=r"upper bound: $\Delta(u) \geq 0$"
    )
    + plot(
      eq4,
      (r,0,xmax),
      color='orange',
			linestyle = "dotted",
      legend_label=r"lower bound: $\mathrm{ch}_2^{\beta_{-}}(u)>0$"
    )
    + plot(
      eq1,
      (r,0,v_example.ch[0]/2),
      color='red',
			linestyle = "dashed",
      legend_label=r"upper bound: $\Delta(u,v) \geq 0$"
    )
  )
  example_bounds_on_d_plot.ymin(ymin)
  example_bounds_on_d_plot.ymax(ymax)
  example_bounds_on_d_plot.axes_labels(['$r$', '$d$'])
  if aspect_ratio:
    example_bounds_on_d_plot.set_aspect_ratio(aspect_ratio)
  return example_bounds_on_d_plot

\end{sagesilent}

\begin{figure}
\centering
\begin{subfigure}{.45\textwidth}
  \centering
	\sageplot[width=\linewidth]{plot_d_bound(v_example, 0, ymin=-0.5)}
	\caption{$q = 0$ (all bounds other than green coincide on line)}
  \label{fig:d_bounds_xmpl_min_q}
\end{subfigure}%
\hfill
\begin{subfigure}{.45\textwidth}
  \centering
	\sageplot[width=\linewidth]{plot_d_bound(v_example, 4, ymin=-3, ymax=3)}
	\caption{$q = \chern^{\beta}(F)$ (all bounds other than blue coincide on line)}
  \label{fig:d_bounds_xmpl_max_q}
\end{subfigure}
\caption{
	Bounds on $d\coloneqq\chern_2(E)$ in terms of $r\coloneqq\chern_0(E)$ for fixed, extreme,
	values of $q\coloneqq\chern_1^{\beta}(E)$.
	Where $\chern(F) = (3,2,-2)$.
}
\label{fig:d_bounds_xmpl_extrm_q}
\end{figure}

Recalling that $q \coloneqq \chern^{\beta}_1(E) \in [0, \chern^{\beta}_1(F)]$,
it is worth noting that the extreme values of $q$ in this range lead to the
tightest bounds on $d$, as illustrated in figure
(\ref{fig:d_bounds_xmpl_extrm_q}).
In fact, in each case, one of the weak upper bounds coincides with one of the
weak lower bounds, (implying no possible destabilizers $E$ with
$\chern_0(E)=\vcentcolon r>R\coloneqq\chern_0(F)$ for these $q$-values).
This indeed happens in general since the right hand sides of
(eqn \ref{eqn:bgmlv2_d_bound_betamin}) and
(eqn \ref{eqn:positive_rad_d_bound_betamin}) match when $q=0$.
In the other case, $q=\chern^{\beta}_1(F)$, it is the right hand sides of
(eqn \ref{eqn:bgmlv3_d_bound_betamin}) and
(eqn \ref{eqn:positive_rad_d_bound_betamin}) which match.


The more generic case, when $0 < q\coloneqq\chern_1^{\beta}(E) < \chern_1^{\beta}(F)$
for the bounds on $d$ in terms of $r$ is illustrated in figure
(\ref{fig:d_bounds_xmpl_gnrc_q}).
The question of whether there are pseudo-destabilizers of arbitrarily large
rank, in the context of the graph, comes down to whether there are points
$(r,d) \in \ZZ \oplus \frac{1}{2} \ZZ$ (with large $r$)
% TODO have a proper definition for pseudo-destabilizers/walls
that fit above the yellow line (ensuring positive radius of wall) but below the
blue and green (ensuring $\Delta(E), \Delta(G) > 0$).
These lines have the same assymptote at $r \to \infty$
(eqns \ref{eqn:bgmlv2_d_bound_betamin},
\ref{eqn:bgmlv3_d_bound_betamin},
\ref{eqn:positive_rad_d_bound_betamin}).
As mentioned in the introduction (sec \ref{sec:intro}), the finiteness of these
solutions is entirely determined by whether $\beta$ is rational or irrational.
Some of the details around the associated numerics are explored next.

\begin{figure}
\centering
\sageplot[
	width=\linewidth
]{plot_d_bound(v_example, 2, ymax=4, ymin=-2, aspect_ratio=1)}
\caption{
	Bounds on $d\coloneqq\chern_2(E)$ in terms of $r\coloneqq \chern_0(E)$ for a fixed
	value $\chern_1^{\beta}(F)/2$ of $q\coloneqq\chern_1^{\beta}(E)$.
	Where $\chern(F) = (3,2,-2)$.
}
\label{fig:d_bounds_xmpl_gnrc_q}
\end{figure}

\subsection{Bounds on Semistabilizer Rank \texorpdfstring{$r$}{r}}

Now, the inequalities from the above (TODO REF) will be used to find, for
each given $q=\chern^{\beta}_1(E)$, how large $r$ needs to be in order to leave
no possible solutions for $d$. At that point, there are no Chern characters
$(r,c,d)$ that satisfy all inequalities to give a pseudowall.


\subsubsection{All Semistabilizers Left of Vertical Wall for Rational Beta min}


The strategy here is similar to what was shown in (sect
\ref{sec:twisted-chern}).
One specialization here is to use that $\ell\coloneqq c_1(H)$ generates $NS(X)$, so that
in fact, any Chern character can be written as
$\left(r,c\ell,\frac{e}{2}\ell^2\right)$ for $r,c,e\in\ZZ$.
% ref to Schmidt?

\begin{sagesilent}
var("a_v b_q n") # Define symbols introduce for values of beta and q
beta_value_expr = (beta == a_v/n)
q_value_expr = (q == b_q/n)
\end{sagesilent}

\renewcommand{\aa}{{a_v}}
\newcommand{\bb}{{b_q}}
Suppose $\beta = \frac{\aa}{n}$ for some coprime $n \in \NN,\aa \in \ZZ$.
Then fix a value of $q$:
\begin{equation}
	q\coloneqq \chern_1^{\beta}(E)
	  =\frac{\bb}{n}
	\in
	\frac{1}{n} \ZZ
	\cap [0, \chern_1^{\beta}(F)]
\end{equation}
as noted at the beginning of this section (\ref{sec:refinement}).

Substituting the current values of $q$ and $\beta$ into the condition for the
radius of the pseudo-wall being positive
(eqn \ref{eqn:positive_rad_d_bound_betamin}) we get:

\begin{equation}
\label{eqn:positive_rad_condition_in_terms_of_q_beta}
	\frac{1}{2}\ZZ
	\ni
	\qquad
	\sage{positive_radius_condition.subs([q_value_expr,beta_value_expr]).factor()}
	\qquad
	\in
	\frac{1}{2n^2}\ZZ
\end{equation}

\begin{sagesilent}
# placeholder for the specific values of k (start with 1):
var("kappa", domain="real")

assymptote_gap_condition1 = (kappa/(2*n^2) < bgmlv2_d_upperbound_exp_term)
assymptote_gap_condition2 = (kappa/(2*n^2) < bgmlv3_d_upperbound_exp_term_alt2)

r_upper_bound1 = (
	assymptote_gap_condition1
	* r * 2*n^2 / kappa
)

assert r_upper_bound1.lhs() == r

r_upper_bound2 = (
	assymptote_gap_condition2
	* (r-R) * 2*n^2 / kappa + R
)

assert r_upper_bound2.lhs() == r
\end{sagesilent}

\begin{theorem}[Bound on $r$ \#1]
\label{thm:rmax_with_uniform_eps}
	Let $v = (R,C\ell,D\ell^2)$ be a fixed Chern character. Then the ranks of the
	pseudo-semistabilizers for $v$ with
	$\chern_1^\beta = q$
	are bounded above by the following expression.

	\bgroup
	\def\psi{\chern_1^{\beta}(F)}
	\begin{align*}
		\min
		\left(
			\sage{r_upper_bound1.subs(kappa==1).rhs()}, \:\:
			\sage{r_upper_bound2.subs(kappa==1).rhs()}
		\right)
	\end{align*}
	\egroup

	Taking the maximum of this expression over
	$q \in [0, \chern_1^{\beta}(F)]\cap \frac{1}{n}\ZZ$
	would give an upper bound for the ranks of pseudo-semistabilizers for $v$.
\end{theorem}

\begin{proof}

\noindent
Both $d$ and the lower bound in
(eqn \ref{eqn:positive_rad_condition_in_terms_of_q_beta})
are elements of $\frac{1}{2n^2}\ZZ$.
So, if any of the two upper bounds on $d$ come to within
$\frac{1}{2n^2}$ of this lower bound, then there are no solutions for
$d$.
Hence any corresponding $r$ cannot be a rank of a
pseudo-semistabilizer for $v$.

To avoid this, we must have,
considering equations
\ref{eqn:bgmlv2_d_bound_betamin},
\ref{eqn:bgmlv3_d_bound_betamin},
\ref{eqn:positive_rad_d_bound_betamin}.

\bgroup

\let\originalepsilon\epsilon
\renewcommand\epsilon{{\originalepsilon_{v}}}

\begin{sagesilent}
var("epsilon")
var("chbv") # symbol to represent \chern_1^{\beta}(v)

# Tightness conditions:

bounds_too_tight_condition1 = (
	bgmlv2_d_upperbound_exp_term
	< epsilon
)

bounds_too_tight_condition2 = (
	bgmlv3_d_upperbound_exp_term_alt.subs(chbv==0)
	< epsilon
)
\end{sagesilent}

\bgroup
\def\psi{\chern_1^{\beta}(F)}
\begin{equation}
	\min\left(
		\sage{bgmlv2_d_upperbound_exp_term},
		\sage{bgmlv3_d_upperbound_exp_term_alt2}
	\right)
	\geq \epsilon \coloneqq \frac{1}{2n^2}
\end{equation}
\egroup

\noindent
This is equivalent to:

\bgroup
\def\psi{\chern_1^{\beta}(F)}
\begin{equation}
	\label{eqn:thm-bound-for-r-impossible-cond-for-r}
	r \leq
	\min\left(
		\sage{
			r_upper_bound1.subs(kappa==1).rhs()
		} ,
		\sage{
			r_upper_bound2.subs(kappa==1).rhs()
		}
	\right)
\end{equation}
\egroup

\egroup % end scope where epsilon redefined

\end{proof}

\begin{sagesilent}
var("Delta nu", domain="real")
q_sol = solve(
  r_upper_bound1.subs(kappa==1).rhs()
  == r_upper_bound2.subs(kappa==1).rhs()
, q)[0].rhs()
r_upper_bound_all_q = (
	r_upper_bound1.rhs()
	.expand()
	.subs(q==q_sol)
	.subs(kappa==1)
	.subs(psi**2 == Delta/nu^2)
	.subs(1/psi**2 == nu^2/Delta)
)
\end{sagesilent}

\begin{corrolary}[Bound on $r$ \#2]
\label{cor:direct_rmax_with_uniform_eps}
	Let $v$ be a fixed Chern character and
	$R\coloneqq\chern_0(v) \leq n^2\Delta(v)$.
	Then the ranks of the pseudo-semistabilizers for $v$
	are bounded above by the following expression.

	\bgroup
	\let\originalDelta\Delta
	\let\nu\ell
	\renewcommand\Delta{{\originalDelta(v)}}
	\begin{equation*}
		\sage{r_upper_bound_all_q.expand()}
	\end{equation*}
	\egroup
\end{corrolary}

\begin{proof}
\bgroup
\def\psi{\chern_1^{\beta}(F)}
\let\originalDelta\Delta
The ranks of the pseudo-semistabilizers for $v$ are bounded above by the
maximum over $q\in [0, \chern_1^{\beta}(F)]$ of the expression in theorem
\ref{thm:rmax_with_uniform_eps}.
Noticing that the expression is a maximum of two quadratic functions in $q$:
\begin{equation*}
	f_1(q)\coloneqq\sage{r_upper_bound1.subs(kappa==1).rhs()} \qquad
	f_2(q)\coloneqq\sage{r_upper_bound2.subs(kappa==1).rhs()}
\end{equation*}
These have their minimums at $q=0$ and $q=\chern_1^{\beta}(F)$ respectively.
It suffices to find their intersection in
$q\in [0, \chern_1^{\beta}(F)]$, if it exists,
and evaluating on of the $f_i$ there.
The intersection exists, provided that
$f_1(\chern_1^{\beta}(F))>f_2(\chern_1^{\beta}(F))=R$,
or equivalently,
$R \leq n^2{\chern_1^{\beta}(F)}^2$.
Setting $f_1(q)=f_2(q)$ yields
$q=\sage{q_sol.expand()}$.
And evaluating $f_1$ at this $q$-value gives:
$\sage{r_upper_bound_all_q.expand().subs([nu==1,Delta==psi^2])}$.
Finally, noting that $\originalDelta(v)=\psi^2\ell^2$, we get the bound as
stated in the corollary.
\egroup
\end{proof}

\begin{example}[$v=(3, 2\ell, -2)$ on $\PP^2$]
\label{exmpl:recurring-second}
Just like in example \ref{exmpl:recurring-first}, take
$\ell=c_1(\mathcal{O}(1))$ as the standard polarization on $\PP^2$, so
that $m=2$, $\beta=\sage{recurring.b}$,
giving $n=\sage{recurring.b.denominator()}$.

\begin{sagesilent}
recurring.n = recurring.b.denominator()
recurring.bgmlv = recurring.chern.Q_tilt()
corrolary_bound = (
  r_upper_bound_all_q.expand()
  .subs(Delta==recurring.bgmlv)
  .subs(nu==1) ## \ell^2=1 on P^2
  .subs(R==recurring.chern.ch[0])
  .subs(n==recurring.n)
)
\end{sagesilent}
Using the above corrolary \ref{cor:direct_rmax_with_uniform_eps}, we get that
the ranks of tilt semistabilizers for $v$ are bounded above by
$\sage{corrolary_bound} \approx  \sage{float(corrolary_bound)}$,
which is much closer to real maximum 25 than the original bound 144.
\end{example}
\begin{example}[extravagant example: $v=(29, 13\ell, -3/2)$ on $\PP^2$]
\label{exmpl:extravagant-second}
Just like in example \ref{exmpl:extravagant-first}, take
$\ell=c_1(\mathcal{O}(1))$ as the standard polarization on $\PP^2$, so
that $m=2$, $\beta=\sage{extravagant.b}$,
giving $n=\sage{extravagant.b.denominator()}$.

\begin{sagesilent}
extravagant.n = extravagant.b.denominator()
extravagant.bgmlv = extravagant.chern.Q_tilt()
corrolary_bound = (
  r_upper_bound_all_q.expand()
  .subs(Delta==extravagant.bgmlv)
  .subs(nu==1) ## \ell^2=1 on P^2
  .subs(R==extravagant.chern.ch[0])
  .subs(n==extravagant.n)
)
\end{sagesilent}
Using the above corrolary \ref{cor:direct_rmax_with_uniform_eps}, we get that
the ranks of tilt semistabilizers for $v$ are bounded above by
$\sage{corrolary_bound} \approx  \sage{float(corrolary_bound)}$,
which is much closer to real maximum $\sage{extravagant.actual_rmax}$ than the
original bound 215296.
\end{example}
%% refinements using specific values of q and beta

These bound can be refined a bit more by considering restrictions from the
possible values that $r$ take.
Furthermore, the proof of theorem \ref{thm:rmax_with_uniform_eps} uses the fact
that, given an element of $\frac{1}{2n^2}\ZZ$, the closest non-equal element of
$\frac{1}{2}\ZZ$ is at least $\frac{1}{2n^2}$ away. However this a
conservative estimate, and a larger gap can sometimes be guaranteed if we know
this value of $\frac{1}{2n^2}\ZZ$ explicitly.

The expressions that will follow will be a bit more complicated and have more
parts which depend on the values of $q$ and $\beta$, even their numerators
$\aa,\bb$ specifically. The upcoming theorem (TODO ref) is less useful as a
`clean' formula for a bound on the ranks of the pseudo-semistabilizers, but has a
purpose in the context of writing a computer program to find
pseudo-semistabilizers. Such a program would iterate through possible values of
$q$, then iterate through values of $r$ within the bounds (dependent on $q$),
which would then determine $c$, and then find the corresponding possible values
for $d$.


Firstly, we only need to consider $r$-values for which $c\coloneqq\chern_1(E)$ is
integral:

\begin{equation}
	c =
	\sage{c_in_terms_of_q.subs([q_value_expr,beta_value_expr])}
	\in \ZZ
\end{equation}

\noindent
That is, $r \equiv -\aa^{-1}\bb$ mod $n$ ($\aa$ is coprime to
$n$, and so invertible mod $n$).

\begin{sagesilent}
	rhs_numerator = (
	positive_radius_condition
	.rhs()
	.subs([q_value_expr,beta_value_expr])
	.factor()
	.numerator()
	)
\end{sagesilent}

\noindent
Let $\aa^{'}$ be an integer representative of $\aa^{-1}$ in $\ZZ/n\ZZ$.

Next, we seek to find a larger $\epsilon$ to use in place of $\epsilon_F$ in the
proof of theorem \ref{thm:rmax_with_uniform_eps}:

\begin{lemmadfn}[
	Finding a better alternative to $\epsilon_v$:
	$\epsilon_{v,q}$
	]
	\label{lemdfn:epsilon_q}
	Suppose $d \in \frac{1}{2}\ZZ$ satisfies the condition in
	eqn \ref{eqn:positive_rad_condition_in_terms_of_q_beta}.
	That is:

	\begin{equation*}
		\sage{positive_radius_condition.subs([q_value_expr,beta_value_expr]).factor()}
	\end{equation*}

	\noindent
	Then we have:

	\begin{equation}
		\label{eqn:epsilon_q_lemma_prop}
		d - \frac{(\aa r + 2\bb)\aa}{2n^2}
		\geq \epsilon_{v,q} \geq \epsilon_v > 0
	\end{equation}

	\noindent
	Where $\epsilon_{v,q}$ is defined as follows:

	\begin{equation*}
		\epsilon_{v,q} \coloneqq
		\frac{k_{q}}{2n^2}
	\end{equation*}
	with $k_{v,q}$ being the least $k\in\ZZ_{>0}$ satisfying $k \equiv -\aa\bb \mod n$
	
\end{lemmadfn}

\begin{proof}

Consider the following:

\begin{align}
	\frac{ x }{ 2 }
	- \frac{
		(\aa r+2\bb)\aa
	}{
		2n^2
	}
	= \frac{ k }{ 2n^2 }
	\quad \text{for some } x \in \ZZ
	\span \span \span \span \span
	\label{eqn:finding_better_eps_problem}
\\ \Longleftrightarrow& &
	- (\aa r+2\bb)\aa
	&\equiv k &&
	\mod n^2
\\ \Longleftrightarrow& &
	- \aa^2 r - 2\aa\bb
	&\equiv k &&
	\mod n^2
\\  \Longrightarrow& &
  \aa^2 \aa^{-1}\bb - 2\aa\bb
	&\equiv k &&
	\mod n
	\label{eqn:better_eps_problem_k_mod_gcd2n2_a2mn}
\\ \Longleftrightarrow& &
  -\aa\bb
	&\equiv k &&
	\mod n
	\label{eqn:better_eps_problem_k_mod_n}
\end{align}

In our situation, we want to find the least $k$ satisfying 
eqn \ref{eqn:finding_better_eps_problem}.
Since such a $k$ must also satisfy eqn \ref{eqn:better_eps_problem_k_mod_n},
we can pick the smallest $k_{q,1} \in \ZZ_{>0}$ which satisfies this new condition
(a computation only depending on $q$ and $\beta$, but not $r$).
We are then guaranteed that $k_{v,q}$ is less than any $k$ satisfying eqn
\ref{eqn:finding_better_eps_problem}, giving the first inequality in eqn
\ref{eqn:epsilon_q_lemma_prop}.
Furthermore, $k_{v,q}\geq 1$ gives the second part of the inequality:
$\epsilon_{v,q}\geq\epsilon_v$, with equality when $k_{v,q}=1$.

\end{proof}


\begin{theorem}[Bound on $r$ \#3]
\label{thm:rmax_with_eps1}
	Let $v$ be a fixed Chern character, with $\frac{a_v}{n}=\beta\coloneqq\beta(v)$
	rational and expressed in lowest terms.
	Then the ranks $r$ of the pseudo-semistabilizers $u$ for $v$ with
	$\chern_1^\beta(u) = q = \frac{b_q}{n}$
	are bounded above by the following expression:

\begin{sagesilent}
var("delta", domain="real") # placeholder symbol to be replaced by k_{q,i}
\end{sagesilent}

	\bgroup
	\def\kappa{k_{v,q}}
	\def\psi{\chern_1^{\beta}(F)}
	\begin{align*}
		\min
		\left(
			\sage{r_upper_bound1.rhs()}, \:\:
			\sage{r_upper_bound2.rhs()}
		\right)
	\end{align*}
	\egroup
	Where $k_{v,q}$ is defined as in definition/lemma \ref{lemdfn:epsilon_q},
	and $R = \chern_0(v)$

	Furthermore, if $\aa \not= 0$ then
	$r \equiv \aa^{-1}b_q (\mod n)$.
\end{theorem}


\begin{example}[$v=(3, 2\ell, -2)$ on $\PP^2$]
\label{exmpl:recurring-third}
Just like in examples \ref{exmpl:recurring-first} and
\ref{exmpl:recurring-second},
take $\ell=c_1(\mathcal{O}(1))$ as the standard polarization on $\PP^2$, so that
$\beta=\sage{recurring.b}$, giving $n=\sage{recurring.b.denominator()}$
and $\chern_1^{\sage{recurring.b}}(F) = \sage{recurring.twisted.ch[1]}$.
%% TODO transcode notebook code
The (non-exclusive) upper bounds for $r\coloneqq\chern_0(u)$ of a tilt semistabilizer $u$ of $v$
in terms of the possible values for $q\coloneqq\chern_1^{\beta}(u)$ are as follows:

\begin{sagesilent}
import numpy as np

def bound_comparisons(example):
    n = example.b.denominator()
    a_v = example.b.numerator()

    def theorem_bound(v_twisted, q_val, k):
      return int(min(
        n^2*q_val^2/k
      ,
        v_twisted.ch[0]
        + n^2*(v_twisted.ch[1] - q_val)^2/k
      ))

    def k(n, a_v, b_q):
      n = int(n)
      a_v = int(a_v)
      b_q = int(b_q)
      k = -a_v*b_q % n
      return k if k > 0 else k + n

    b_qs = list(range(example.twisted.ch[1]*n+1))
    qs = list(map(lambda x: x/n,b_qs))
    ks = list(map(lambda b_q: k(n, a_v, b_q), b_qs))
    theorem2_bounds = [
        theorem_bound(example.twisted, q_val, 1)
        for q_val in qs
    ]
    theorem3_bounds = [
        theorem_bound(example.twisted, q_val, k)
        for q_val, k in zip(qs,ks)
    ]
    return qs, theorem2_bounds, theorem3_bounds

qs, theorem2_bounds, theorem3_bounds = bound_comparisons(recurring)
\end{sagesilent}

\vspace{1em}
\noindent
\directlua{ table_width = 3*4+1 }
\begin{tabular}{l\directlua{for i=0,table_width-1 do tex.sprint([[|c]]) end}}
	$q=\chern_1^\beta(u)$
\directlua{for i=0,table_width-1 do
	local cell = [[&$\noexpand\sage{qs[]] .. i .. "]}$"
  tex.sprint(cell)
end}
	\\ \hline
	Thm \ref{thm:rmax_with_uniform_eps}
\directlua{for i=0,table_width-1 do
	local cell = [[&$\noexpand\sage{theorem2_bounds[]] .. i .. "]}$"
  tex.sprint(cell)
end}
	\\
	Thm \ref{thm:rmax_with_eps1}
\directlua{for i=0,table_width-1 do
	local cell = [[&$\noexpand\sage{theorem3_bounds[]] .. i .. "]}$"
  tex.sprint(cell)
end}
\end{tabular}
\vspace{1em}

\noindent
It's worth noting that the bounds given by theorem \ref{thm:rmax_with_eps1}
reach, but do not exceed the actual maximum rank 25 of the
pseudo-semistabilizers of $v$ in this case.
As a reminder, the original loose bound from theorem \ref{thm:loose-bound-on-r}
was 144.

\end{example}

\begin{example}[extravagant example: $v=(29, 13\ell, -3/2)$ on $\PP^2$]
\label{exmpl:extravagant-third}
Just like in examples \ref{exmpl:extravagant-first} and
\ref{exmpl:extravagant-second},
take $\ell=c_1(\mathcal{O}(1))$ as the standard polarization on $\PP^2$, so that
$\beta=\sage{extravagant.b}$, giving $n=\sage{n:=extravagant.b.denominator()}$
and $\chern_1^{\sage{extravagant.b}}(F) = \sage{extravagant.twisted.ch[1]}$.
This example was chosen because the $n$ value is moderatly large, giving more
possible values for $k_{v,q}$, in dfn/lemma \ref{lemdfn:epsilon_q}. This allows
for a larger possible difference between the bounds given by theorems
\ref{thm:rmax_with_uniform_eps} and \ref{thm:rmax_with_eps1}, with the bound
from the second being up to $\sage{n}$ smaller, for any given $q$ value.
The (non-exclusive) upper bounds for $r\coloneqq\chern_0(u)$ of a tilt semistabilizer $u$ of $v$
in terms of the first few smallest possible values for $q\coloneqq\chern_1^{\beta}(u)$ are as follows:

\begin{sagesilent}
qs, theorem2_bounds, theorem3_bounds = bound_comparisons(extravagant)
\end{sagesilent}


\vspace{1em}
\noindent
\directlua{ table_width = 12 }
\begin{tabular}{l\directlua{for i=0,table_width do tex.sprint([[|c]]) end}}
	$q=\chern_1^\beta(u)$
\directlua{for i=0,table_width-1 do
	local cell = [[&$\noexpand\sage{qs[]] .. i .. "]}$"
  tex.sprint(cell)
end}
	&$\cdots$
	\\ \hline
	Thm \ref{thm:rmax_with_uniform_eps}
\directlua{for i=0,table_width-1 do
	local cell = [[&$\noexpand\sage{theorem2_bounds[]] .. i .. "]}$"
  tex.sprint(cell)
end}
	&$\cdots$
	\\
	Thm \ref{thm:rmax_with_eps1}
\directlua{for i=0,table_width-1 do
	local cell = [[&$\noexpand\sage{theorem3_bounds[]] .. i .. "]}$"
  tex.sprint(cell)
end}
	&$\cdots$
\end{tabular}
\vspace{1em}


\noindent
However the reduction in the overall bound on $r$ is not as drastic, since all
possible values for $k_{v,q}$ in $\{1,2,\ldots,\sage{n}\}$ are iterated through
cyclically as we consider successive possible values for $q$.
Calculating the maximums over all values of $q$ yields
$\sage{max(theorem2_bounds)}$ for theorem \ref{thm:rmax_with_uniform_eps}, and
$\sage{max(theorem3_bounds)}$ for theorem \ref{thm:rmax_with_eps1}.
\end{example}

\egroup % end scope where beta redefined to beta_{-}

\subsubsection{All Semistabilizers Giving Sufficiently Large Circular Walls Left
of Vertical Wall}


Goals:
\begin{itemize}
	\item refresher on strategy
	\item point out no need for rational beta
	\item calculate intersection of bounds?
\end{itemize}

\subsection{Irrational $\beta_{-}$}

Goals:
\begin{itemize}
	\item Point out if only looking for sufficiently large wall, look at above
		subsubsection
	\item Relate to Pell's equation through coordinate change?
	\item Relate to numerical condition described by Yanagida/Yoshioka
\end{itemize}

\newpage
\printbibliography

\newpage
\section{Appendix - SageMath code}

\usemintedstyle{tango}

\begin{footnotesize}
\inputminted[
	obeytabs=true,
	tabsize=2,
	breaklines=true,
	breakbefore=./
]{python}{filtered_sage.txt}
\end{footnotesize}

\end{document}