%% Write basic article template

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{color}
\usepackage{sagetex}
\usepackage[]{breqn}

\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\chern}{\operatorname{ch}}
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\firsttilt}[1]{\mathcal{B}^{#1}}
\newcommand{\bddderived}{\mathcal{D}^{b}}
\newcommand{\centralcharge}{\mathcal{Z}}

\begin{document}

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

\author{Luke Naylor}

\maketitle

\section{Introduction}

[ref] shows that for any rational $\beta_0$,
the vertical line $\{\sigma_{\alpha,\beta_0} \colon \alpha \in \RR_{>0}\}$ only
intersects finitely many walls. 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, [ref] 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 elements of
$\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's 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 [ref] and done
explicitly by Benjamin Schmidt within a computer program which computes
pseudowalls. 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}

\section{Twisted Chern Characters of Pseudo Destabilizers}

For a given $\beta$, we can define a twisted Chern character
$\chern^\beta(E) = \chern(E) \cdot \exp(-\beta \ell)$:

\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*}

% TODO I think this^ needs adjusting for general Surface with $\ell$

$\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}

The restrictions on $\chern^\beta_0(E)$ and $\chern^\beta_2(E)$
is best seen with the following graph:

% TODO: hyperbola restriction graph (shaded)

This is where the $\beta_{-}$ criterion comes in. If $\beta_{-} = \frac{*}{n}$
for some $*,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(E) > 0$ 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} \\
	&\leq \frac{mn^2 \chern^\beta_1(F)^2}{\gcd(m,2n^2)}
\end{align}

\section{B.Schmidt's Method}

\section{Limitations}

\section{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$,
$\chern(F) = (R,C,D)$, and consider the possible Chern characters
$\chern(E) = (r,c,d)$ of some semistabilizer $E$.
 
\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 [ref] that $\chern_1^{\beta_{-}}$ has fixed bounds in terms of
$\chern(F)$, and so we can write:

\begin{sagesilent}
	ts = stability.Tilt
	beta_min = var("beta", domain="real")
	c_lower_bound = -(ts(beta=beta_min).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(E) = \sage{c_in_terms_of_q}
	\qquad 0 \leq q \leq \chern_1^{\beta_{-}}(F)
\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{$\Delta(E) + \Delta(G) \leq \Delta(F)$}
\label{subsect-d-bound-bgmlv1}

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:
	bgmlv1 = Δ(v) - Δ(u) - Δ(v-u)
\end{sagesilent}

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


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

\begin{sagesilent}
	bgmlv1_with_q = bgmlv1.expand().subs(c == c_in_terms_of_q)
\end{sagesilent}

\begin{equation}
	\sage{0 <= bgmlv1_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/2 temporary substitution

	bgmlv1_with_q_reparam = (bgmlv1_with_q.subs(r == r_alt + R/2)/r_alt).expand()
	bgmlv1_d_ineq = (
		((0 >= -bgmlv1_with_q_reparam)/4 + d) # Rearrange for d
		.subs(r_alt == r - R/2) # Resubstitute r back in
		.expand()
	)

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

\begin{dmath}
	\label{eqn-bgmlv1_d_lowerbound}
	\sage{bgmlv1_d_ineq}
\end{dmath}

\begin{sagesilent}
	# Seperate out the terms of the lower bound for d
	bgmlv1_d_lowerbound_exp_term = (bgmlv1_d_lowerbound*(R-2*r)).expand().subs(r==2*R)/(R-2*r)
	bgmlv1_d_lowerbound_const_term = bgmlv1_d_lowerbound.subs(1/(R-2*r) == 0).subs(r==0)
	bgmlv1_d_lowerbound_linear_term = bgmlv1_d_lowerbound.subs(1/(R-2*r) == 0).subs(r==1)*r

	# Verify the simplified forms of the terms that will be mentioned in text
	assert bgmlv1_d_lowerbound_const_term == v.twist(beta_min).ch[2]/2 + beta_min*q, "fail"
	assert bgmlv1_d_lowerbound_linear_term == (v.twist(beta_min).ch[2]/2 + beta_min^2/2 + beta_min*q)*r, "fail"

	assert bgmlv1_d_lowerbound_exp_term == (
		- 2*R*v.twist(beta_min).ch[2]
		- 3*R^2*beta_min^2
		- 4*R*beta_min*q
		+ C*q
		- q^2
	).expand()/(R-2*r), "fail"

	assert bgmlv1_d_lowerbound_exp_term == (
		- 2*D*R + (C^2)/4
		- ((C - 4*R*beta_min)/2 - q)^2
	).expand()/(R-2*r), "fail"

	assert bgmlv1_d_lowerbound_exp_term == (
		(2*R*beta_min + q)
		*(2*R*beta_min + q - C)
		+ 2*D*R
	).expand()/(2*r - R), "fail"
\end{sagesilent}

\noindent
Viewing equation \ref{eqn-bgmlv1_d_lowerbound} as a lower bound for $d$ given
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
$(\chern^{\beta}_2(F)/2 + \beta^2/2 + \beta q)r$.
Finally, there's an hyperbolic term in $r$ which tends to 0 as $r \to \infty$,
and can be written:
$\frac{-2R\chern^{\beta}_2(F) - 3R^2\beta^2 - 4Rq\beta + Cq - q^2}{R-2r}$ or
$\frac{(2R\beta + q)(2R\beta + q - C) + 2DR}{2r-R}$.
In the case $\beta = \beta_{-}$ (or $\beta_{+}$) we have
$\chern^{\beta}_2(F) = 0$,
so some of these expressions simplify.

\subsection{$\Delta(E) \geq 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 + d) # Rearrange for d
		.expand()
	)

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

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

\begin{sagesilent}
	# Seperate out the terms of the lower bound for d
	bgmlv2_d_lowerbound_exp_term = (bgmlv2_d_lowerbound*r).expand().subs(r==0)/r
	bgmlv2_d_lowerbound_const_term = bgmlv2_d_lowerbound.subs(1/r == 0).subs(r==0)
	bgmlv2_d_lowerbound_linear_term = bgmlv2_d_lowerbound.subs(1/r == 0).subs(r==1)*r
\end{sagesilent}

Viewing equation \ref{eqn-bgmlv2_d_lowerbound} as a lower bound for $d$ in term
of $r$ again, there's a constant term
$\sage{bgmlv2_d_lowerbound_const_term}$,
a linear term
$\sage{bgmlv2_d_lowerbound_linear_term}$,
and a hyperbolic term
$\sage{bgmlv2_d_lowerbound_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}.

\section{Conclusion}

\newpage
\section{Appendix - SageMath code}

\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
%\definecolor{backcolour}{rgb}{0.95,0.95,0.92}

\lstdefinestyle{mystyle}{
  %backgroundcolor=\color{backcolour},
  commentstyle=\color{codegreen},
  keywordstyle=\color{magenta},
  numberstyle=\tiny\color{codegray},
  stringstyle=\color{codepurple},
  basicstyle=\ttfamily\footnotesize,
  breakatwhitespace=false,
  breaklines=true,
  captionpos=b,
  keepspaces=true,
  numbers=left,
  numbersep=5pt,
  showspaces=false,
  showstringspaces=false,
  showtabs=false,
  tabsize=2
}

\lstset{style=mystyle}

\lstinputlisting[language=python]{filtered_sage.txt}

\end{document}