\label{main-2}  Let $R$ be a finite family of slopes containing $0,1,\infty$ of some cardinality $k+3$, and let $s$ be a slope not lying in $R$.
\begin{itemize}
    \item[(i)] (Three slopes) If $k=0$, then
\begin{equation}\label{2ab} 2 - \frac{c_2}{D(R;s)} \leq \SD\left(R; s\right) \leq 2 - \frac{c_1}{D(R;s)}
\end{equation}
    for some absolute constants $c_2 > c_1 > 0$.
    \item[(ii)]  (Many slopes) In general, one has
    \begin{equation}\label{sam} 2 - \frac{C_k \log(2+D(R;s))}{D(R;s)} \leq \SD(R; s) \leq 2 - \frac{c_k}{D(R;s)^{k+1}}
    \end{equation}
    for some absolute constants $c_k, C_k > 0$.
\end{itemize}

\begin{equation}\label{dxy}
d[X;Y], d[Y;Y] \ll \log K.
\end{equation}

For $a \in \Q$, define $g(a) \coloneqq \H[Y-aY'] - \H[Y]$, where $Y'$ is an independent copy of $Y$. From \eqref{hx}, \eqref{ruzsa}, \eqref{ruzsa-diff} we have $g(r) \ll \log K$ for $r \in R \backslash \{\infty\}$.  By Proposition \ref{dilate}(iv), we conclude that $g(s) \ll D^{k+1} \log K$, thus $d[Y; sY] \ll D^{k+1} \log K$.  Combining with \eqref{dxy} and \eqref{ruzsa}, \eqref{ruzsa-diff}, we obtain \eqref{dxsy} as required.

\section{A continuous limit}\label{cts-sec}

In this section we establish \Cref{cts-limit}.  Let $\alpha$, $a$, $b$, $f$, $f_0, f_1, f_\infty$ be as in that theorem.  We allow implied constants in the asymptotic notation to depend on $\alpha, f$. We will establish the lower bound
\begin{equation}\label{sd-targ}
 \SD\left(\{0,1,\infty\},\frac{a}{b}\right) \geq 2 - \frac{h_2(f_\alpha) - \max(h(f_0), h(f_\infty), h(f_1))+o(1)}{\log b}.
 \end{equation}

\subsection{The arithmetic Kakeya conjecture}

Define a \emph{slope} to be an element $r$ of the projective rational\footnote{One could also formulate the arithmetic Kakeya conjecture in other fields than the rationals, and in fact most of the results here apply to arbitrary infinite fields, with minor modifications in the case where the field has positive characteristic.  But in this paper we shall restrict attention for simplicity to the rational case, which is the case of interest for applications to the Kakeya problem.} line $\Q \cup \{\infty\}$.  We then define the projection operators $\pi_r \colon \Q \times \Q \to \Q$ by setting
$$ \pi_r(x,y) \coloneqq x + ry$$
for $r \neq \{\infty\}$, and
$$ \pi_\infty(x,y) \coloneqq y.$$
Given a finite set $R$ of slopes and a further slope $s$ not in $R$, we define the \emph{sum-difference constant} $\SD(R;s)$ to be the least exponent such that the bound
\begin{equation}\label{sdef}
\H[ \pi_s(X,Y) ] \leq \SD(R;s) \max_{r \in R} \H[\pi_r(X,Y)]
\end{equation}
holds for $\Q$-valued random variables\footnote{In this paper, all random variables are understood to be discrete, and in fact take only finitely many values.} $X,Y$ (not necessarily independent), where
$$ \H[X] \coloneqq \sum_{x} \h(\P(X=x))$$
is the Shannon entropy of a random variable $X$, with $\h(t) \coloneqq t \log \frac{1}{t}$ using the convention $\h(0) \coloneqq 0$.  Thus for instance
$$\H[ X-Y ] \leq \SD(\{0,1,\infty\};-1) \max\left( \H[X], \H[X+Y], \H[Y] \right)$$
whenever $X,Y$ are (possibly dependent) $\Q$-valued random variables.

The quantity $\SD(R;s)$ can equivalently be defined as the least exponent such that the bound
\begin{equation}\label{pise}
|\pi_{s}(E)| \leq (\max_{r \in R} |\pi_s(E)|)^{\SD(R;s)}
\end{equation}
for all finite non-empty $E \subset \Q$, where $|A|$ denotes the cardinality of a finite set $A$; see \cite{green}.  However, it will be convenient in this paper to work with the entropy formulation, in order to take advantage of the ``entropic Pl\"unnecke--Ruzsa calculus'' that are founded on the Shannon entropy inequalities.

It is easy to see that one has the projective invariance
$$ \SD(\phi(R); \phi(s)) = \SD(R; s)$$
for any projective transformation $\phi \colon \Q \cup \{\infty\} \to \Q \cup \{\infty\}$, that is to say a map of the form $\phi(r) \coloneqq \frac{ar+b}{cr+d}$ for some $a,b,c,d \in \Q$ with $ad-bc \neq 0$, with the usual conventions when $r$ is infinite or $cr+d$ vanishes.  For instance, by using a dilation transformation, we have
$$ \SD(\{0,1,\infty\}; s) = \SD(\{0,-1/s,\infty\}; -1)$$
for any slope $s$ other than $0,1,\infty$.
In the literature it is conventional to use this $3$-transitive projective symmetry to normalize $s = -1$ and $0, \infty \in R$ (assuming that $|R|\geq 2$ of course), though in this paper it will be more convenient to adopt the normalization $0,1,\infty \in R$ (assuming $|R| \geq 3$).

It is easy to see that $\SD(R;s)=\infty$ when $|R|<2$.
From the entropy inequality $\H[X-Y] \leq \H[X,Y] \leq \H[X]+\H[Y]$ we see that $\SD(R;-1) \leq 2$ when $0,\infty \in S$, and it is easy to see (using the uniform distribution on a long arithmetic progression) that we have equality when $R = \{0,\infty\}$.  By projective invariance, this implies that $\SD(R;s)=2$ whenever $|R|=2$.  As these quantities are clearly non-decreasing in $R$, we then have the trivial bound
\begin{equation}\label{sdf-upper}
\SD(R;s) \leq 2
\end{equation}
for $|R| \geq 2$.

Improvements upon \eqref{sdf-upper} directly lead to improved upper bounds on the dimension of Kakeya and Nikodym sets in high dimensions.  Indeed, in \cite{bourgain} it was observed that a bound of the form $\SD(R;-1) \leq \alpha$ implies that Kakeya and Nikodym sets in dimension $d$ have (upper) Minkowski dimension\footnote{It was recently observed by Thomas Bloom (private communication) that, by combining Bourgain's arguments with the recent quantitative progress on Szemer\'edi's theorem by Leng, Sawhney, and Sah \cite{lss}, that one also obtains this bound for the Hausdorff dimension as well.  For the corresponding results for packing dimension, see \cite{cowen}.} at most $\frac{d-1}{\alpha}+1$.  In particular, if one can establish the \emph{arithmetic Kakeya conjecture}
\begin{equation}\label{infr}
\inf_R \SD(R;-1) = 1
\end{equation}
then this would imply that Kakeya and Nikodym sets in $\R^d$ have full Minkowski and Hausdorff dimension for all $d$.  This is currently only known for $d \leq 3$ \cite{wang}. We refer the reader to \cite{green}, \cite{cowen}, \cite{pohoata} for a discussion of this conjecture (and other equivalent forms of it), and its connection with other variants of the Kakeya conjecture.

Nontrivial progress towards the arithmetic Kakeya conjecture was first obtained in  \cite{bourgain}, who in our notation showed that
$$ \SD(\{0,1,\infty\};-1)  \leq 2 - \frac{1}{13} = 1.923\dots,$$
and used this to obtain new bounds on the Kakeya conjecture in high dimensions.
Further improvements were then obtained in \cite{katz-tao}, \cite{katz-tao-new}. For instance, it is known that
$$ 1.77898 \leq \SD(\{0,1,\infty\};-1) \leq 2 - \frac{1}{6} = 1.833\dots$$
and
$$ 1.668 \leq \SD(\{0,1,2,\infty\};-1) \leq 2 - \frac{1}{4} = 1.75,$$
with the upper bounds established in \cite{katz-tao}, and the lower bounds in \cite{lemm}, \cite{gdm} respectively.
At present, the best upper bound known towards \eqref{infr} is
$$\inf_R \SD(R;-1) \leq 1.67513\dots;$$
see \cite{katz-tao-new}.

\subsection{Asymptotic behavior}

Informally, the arithmetic Kakeya conjecture asserts that in the asymptotic regime where the number of slopes $R$ is large, the constants $\SD(R;s)$ converge to $1$.  Here we consider a complementary regime, in which the number of slopes $R$ is fixed, but we instead let the elements of $R$ (or $s$) vary.  Our main results assert, roughly speaking, that the behavior of these constants is determined by the \emph{rational complexity} of $s$ relative to $R$, with the constants approaching $2$ as it becomes harder to express $s$ in terms of a rational expression of the $R$.  We give a (slightly artificial) definition of this quantity, restricting attention to the normalized setting $\{0,1,\infty\} \subset R$ for simplicity.

\begin{definition}[Rational complexity] Given a family of slopes $R = \{0,1,\infty,r_1,\dots,r_k\}$ containing $0,1,\infty$ and a further slope $s$ not in $R$, we define the \emph{rational complexity} $D = D(R;s)$ of $s$ relative to $R$ to be the least natural number $D$ for which one has a representation of the form
\begin{equation}\label{rat}
 s = \frac{P(r_1,\dots,r_k)}{Q(r_1,\dots,r_k)}
 \end{equation}
where $P,Q$ are polynomials of degree at most $D$ with integer coefficients of magnitude at most $2^D$, with $Q(r_1,\dots,r_k)$ non-zero; this complexity is finite since $s$ is rational.
\end{definition}

Informally, if the complexity of $s$ with respect to $R$ is equal to $D$, then $s$ can be expressed in terms of the slopes in $R$ by a rational expression whose length (when expressed as string of characters) is comparable to $D$.  The rational complexity is reminiscent of the \emph{arithmetic circuit complexity} of $s$ in terms of $R$, but with the key difference that the circuit must take the specific rational form \eqref{rat}.

\begin{example}  $D(\{0,1,\infty\};s)$ is the least natural number for which one can express $s$ as $a/b$ where $a,b$ are integers of magnitude at most $2^D$.  In particular, if $a,b$ are coprime then
$$D \left( \{0,1,\infty\};\frac{a}{b} \right) \asymp \log(2+|a|+|b|).$$
\end{example}

Our main result, proven in Section \ref{main-sec}, is then as follows.

Define a \emph{slope} to be an element $r$ of the projective rational\footnote{One could also formulate the arithmetic Kakeya conjecture in other fields than the rationals, and in fact most of the results here apply to arbitrary infinite fields, with minor modifications in the case where the field has positive characteristic. But in this paper we shall restrict attention for simplicity to the rational case, which is the case of interest for applications to the Kakeya problem.} line $\Q \cup \{\infty\}$. We then define the projection operators $\pi_r \colon \Q \times \Q \to \Q$ by setting
$$ \pi_r(x,y) \coloneqq x + ry$$
for $r \neq \{\infty\}$, and
$$ \pi_\infty(x,y) \coloneqq y.$$
Given a finite set $R$ of slopes and a further slope $s$ not in $R$, we define the \emph{sum-difference constant} $\SD(R;s)$ to be the least exponent such that the bound
\begin{equation}\label{sdef}
\H[ \pi_s(X,Y) ] \leq \SD(R;s) \max_{r \in R} \H[\pi_r(X,Y)]
\end{equation}
holds for $\Q$-valued random variables\footnote{In this paper, all random variables are understood to be discrete, and in fact take only finitely many values.} $X,Y$ (not necessarily independent), where
$$ \H[X] \coloneqq \sum_{x} \h(\P(X=x))$$
is the Shannon entropy of a random variable $X$, with $\h(t) \coloneqq t \log \frac{1}{t}$ using the convention $\h(0) \coloneqq 0$. Thus for instance
$$\H[ X-Y ] \leq \SD(\{0,1,\infty\};-1) \max\left( \H[X], \H[X+Y], \H[Y] \right)$$
whenever $X,Y$ are (possibly dependent) $\Q$-valued random variables.

It is easy to see that $\SD(R;s)=\infty$ when $|R|<2$.
From the entropy inequality $\H[X-Y] \leq \H[X,Y] \leq \H[X]+\H[Y]$ we see that $\SD(R;-1) \leq 2$ when $0,\infty \in S$, and it is easy to see (using the uniform distribution on a long arithmetic progression) that we have equality when $R = \{0,\infty\}$. By projective invariance, this implies that $\SD(R;s)=2$ whenever $|R|=2$. As these quantities are clearly non-decreasing in $R$, we then have the trivial bound
\begin{equation}\label{sdf-upper}
\SD(R;s) \leq 2
\end{equation}
for $|R| \geq 2$.

Improvements upon \eqref{sdf-upper} directly lead to improved upper bounds on the dimension of Kakeya and Nikodym sets in high dimensions. Indeed, in \cite{bourgain} it was observed that a bound of the form $\SD(R;-1) \leq \alpha$ implies that Kakeya and Nikodym sets in dimension $d$ have (upper) Minkowski dimension\footnote{It was recently observed by Thomas Bloom (private communication) that, by combining Bourgain's arguments with the recent quantitative progress on Szemer\'edi's theorem by Leng, Sawhney, and Sah \cite{lss}, that one also obtains this bound for the Hausdorff dimension as well. For the corresponding results for packing dimension, see \cite{cowen}.} at most $\frac{d-1}{\alpha}+1$. In particular, if one can establish the \emph{arithmetic Kakeya conjecture}
\begin{equation}\label{infr}
\inf_R \SD(R;-1) = 1
\end{equation}
then this would imply that Kakeya and Nikodym sets in $\R^d$ have full Minkowski and Hausdorff dimension for all $d$. This is currently only known for $d \leq 3$ \cite{wang}. We refer the reader to \cite{green}, \cite{cowen}, \cite{pohoata} for a discussion of this conjecture (and other equivalent forms of it), and its connection with other variants of the Kakeya conjecture.

\begin{definition}[Rational complexity] Given a family of slopes $R = \{0,1,\infty,r_1,\dots,r_k\}$ containing $0,1,\infty$ and a further slope $s$ not in $R$, we define the \emph{rational complexity} $D = D(R;s)$ of $s$ relative to $R$ to be the least natural number $D$ for which one has a representation of the form
\begin{equation}\label{rat}
 s = \frac{P(r_1,\dots,r_k)}{Q(r_1,\dots,r_k)}
 \end{equation}
where $P,Q$ are polynomials of degree at most $D$ with integer coefficients of magnitude at most $2^D$, with $Q(r_1,\dots,r_k)$ non-zero; this complexity is finite since $s$ is rational.
\end{definition}

\begin{example} $D(\{0,1,\infty\};s)$ is the least natural number for which one can express $s$ as $a/b$ where $a,b$ are integers of magnitude at most $2^D$. In particular, if $a,b$ are coprime then
$$D \left( \{0,1,\infty\};\frac{a}{b} \right) \asymp \log(2+|a|+|b|).$$
\end{example}

Our main result, proven in Section \ref{main-sec}, is then as follows.

\label{main-sec}

We now prove Theorem \ref{main-2}.  We begin with part (i).  Write $s=a/b$, where $b \geq 1$ and $a \neq 0,b$ is coprime to $b$, then $D(R;s) \asymp \log(2+|a|+|b|)$.  Let $N$ be the

\begin{definition}[Rational complexity] Given a family of slopes $R = \{0,1,\infty,r_1,\dots,r_k\}$ containing $0,1,\infty$ and a further slope $s$ not in $R$, we define the \emph{rational complexity} $D = D(R;s)$ of $s$ relative to $R$ to be the least natural number $D$ for which one has a representation of the form
\begin{equation}\label{rat}
 s = \frac{P(r_1,\dots,r_k)}{Q(r_1,\dots,r_k)}
 \end{equation}
where $P,Q$ are polynomials of degree at most $D$ with integer coefficients of magnitude at most $2^D$, with $Q(r_1,\dots,r_k)$ non-zero; this complexity is finite since $s$ is rational.
\end{definition}

Our main result, proven in Section \ref{main-sec}, is then as follows.

\begin{figure}
 \centering
\centerline{\includegraphics[width=\linewidth]{best.png}}
 \caption{Lower bounds on $\SD(\{0,1,\infty\}; s)$ obtained by \texttt{AlphaEvolve} for various $s=a/b$, plotted against $2 - 0.16 / \log(|a|+b|)$. The horizontal axis is $|a|+|b|$ (so in some cases, multiple fractions $a/b$ are plotted on a single vertical line).}
 \label{fig:kak}
\end{figure}

\begin{theorem}[Continuous limit]\label{cts-limit} Let $\alpha$ be a real number, and let $a,b$ be coprime integer parameters with $b \to \infty$ and $a/b \to \alpha$. Then
\begin{equation}\label{up}
 \SD\left(\{0,1,\infty\};\frac{a}{b}\right) \geq 2 - \frac{c_\alpha+o(1)}{\log b}
 \end{equation}
 as $b\to \infty$ and $a/b \to \alpha$, where $0 < c_\alpha < \infty$ is the infimum of all quantities
\begin{equation}\label{hf}
 h_2(f_{(\alpha)}) - \max(h(f_0), h(f_\infty), h(f_\alpha))
 \end{equation}
where $f \colon \R^2 \to \R^+$ ranges over smooth compactly supported functions with total mass $\int_{\R^2} f(x,y)\ dx dy$ equal to $1$, $f_{(\alpha)} \colon \R \times [0,1) \to \R^+$ is a ``folded'' version
\begin{equation}\label{falpha-def}
 f_{(\alpha)}(x,y) \coloneqq \sum_{j \in \Z} f(x-\alpha j, y+j)
 \end{equation}
of $f$, $f_0, f_\infty, f_1 \colon \R \to \R^+$ are the projections
\begin{align}
f_0(x) &\coloneqq \int_\R f(x,y)\ dy\label{f0-def}\\
f_\infty(y) &\coloneqq \int_\R f(x,y)\ dx\label{finfty-def}\\
f_1(z) &\coloneqq \int_\R f(x,z- x)\ dx,\label{f1-def}
\end{align}
the two-dimensional differential entropy $h_2(f_{(\alpha)})$ of $f_{(\alpha)}$ is defined as
$$h_2(f_{(\alpha)}) \coloneqq \int_0^1 \int_\R \h(f_{(\alpha)}(x,y))\ dx dy,$$
and the one-dimensional differential entropies $h(f_r)$ for $r=0,1,\infty$ is defined as
$$ h(f_r) \coloneqq \int_\R \h(f_r(x))\ dx.$$
\end{theorem}

\begin{proposition}\label{dilate} Let $X$ be an $\Q$-valued random variable, and for any $a \in \Q$, let $g(a)$ denote the quantity $g(a) \coloneqq \H[X-aX'] - \H[X]$, where $X'$ is an independent copy of $X$.
\begin{itemize}
 \item[(i)] $g(0) = 0$ and $g(1)=d[X;X]$.
 \item[(ii)] For any $a \in \Q$, we have $g(-a) \leq 3g(a)$, and if $a$ is non-zero, $g(a^{-1}) = g(a)$.
 \item[(iii)] For any $k \geq 1$ and $a_1,\dots,a_k \in \Q$, we have $g(a_1 \dots a_k) \leq g(a_1)+ \dots + g(a_k)$ and $g(a_1 + \dots + a_k) \leq g(a_1)+\dots+g(a_k)+(k-1) g(1)$.
 \item[(iv)] If $a$ is a non-zero integer, then $g(a) \leq (4 + 10 \lfloor \log_2 |a| \rfloor) g(1)$.
 \item[(v)] If $R$ is a finite set of slopes containing $0,1,\infty$ of cardinality $k+3$, then
 $$ g(a) \ll D(R;a)^{k+1} \max_{r \in R \backslash \{\infty\}} g(r).$$
\end{itemize}
\end{proposition}

In this section we establish \Cref{cts-limit}. Let $\alpha$, $a$, $b$, $f$, $f_0, f_1, f_\infty$ be as in that theorem. We allow implied constants in the asymptotic notation to depend on $\alpha, f$. We will establish the lower bound
\begin{equation}\label{sd-targ}
 \SD\left(\{0,1,\infty\},\frac{a}{b}\right) \geq 2 - \frac{h_2(f_\alpha) - \max(h(f_0), h(f_\infty), h(f_1))+o(1)}{\log b}.
 \end{equation}
Comparing this with Theorem \ref{main-2}, we conclude that the expression $h_2(f_\alpha) - \max(h(f_0), h(f_\infty), h(f_1))$ is bounded from below, hence $c_\alpha > 0$; by taking an arbitrary test function for $f$ we also see that $c_\alpha < \infty$. Taking $h_2(f_\alpha) - \max(h(f_0), h(f_\infty), h(f_1))$ arbitrarily close to $c_\alpha$, we obtain the desired claim \eqref{up}.

It remains to establish \eqref{sd-targ}.
By the Poisson summation formula, the rapid decrease of the Fourier transform of the smooth compactly supported $f$, and the mass one hypothesis, we have
\begin{equation}\label{bib}
 \frac{1}{b^2} \sum_{n,m \in \Z} f\left(\frac{n}{b}, \frac{m}{b}\right) = 1 + \eps
 \end{equation}
for some $\eps = O(1/b)$; in fact one can get much better decay than this, but for our purposes any decay faster than $1/\log b$ will suffice. We then take $X,Y$ to be supported on the grid $\Z^2$ with probability distribution
$$ \P((X,Y) = (n,m)) \coloneqq \frac{1}{(1+\eps) b^2} \left(\frac{n}{b}, \frac{m}{b}\right)$$
thus $(X,Y)$ takes values in a ball of radius $O(b)$ and
\begin{equation}\label{pnx}
\P((X,Y) = (n,m)) = \frac{1}{b^2} f\left(\frac{n}{b}, \frac{m}{b}\right) + O\left( \frac{1}{b^3} \right).
\end{equation}
By Bezout's theorem, any integer can be uniquely written in the form $bn+am$ for some $0 \leq m < b$, and any other representation of the form $bn'+am'$ takes the form $b(n-aj) + a(m+bj)$. Thus
$$ \P(bX+aY = bn+am) = \sum_{j \in\Z} \P( (X,Y) = (n-aj, m+bj) ).$$
There are only $O(1)$ values of $j$ for which this sum is non-zero, so from \eqref{pnx} one has
$$ \P(bX+aY = bn+m) = \frac{1}{b^2} f_{(a/b)}\left(\frac{n}{b}, \frac{m}{b}\right) + O\left( \frac{1}{b^3} \right).$$
where $f_{(a,b)}: \R \times [0,1) \to \R^+$ is the function
$$f_{(a/b)}(x,y) \coloneqq \sum_{j \in \Z} f\left(x-\frac{a}{b} j, y+j\right).$$
Applying the entropy function $\h$, we conclude that
$$ \h(\P(bX+aY = bn+am)) = \frac{2 \log b}{b^2} f_{(a/b)}\left(\frac{n}{b}, \frac{m}{b}\right) +
\frac{1}{b^2} \h\left(f_{(a/b)}\left(\frac{n}{b}, \frac{m}{b}\right)\right) + O\left( \frac{\log b}{b^3} \right).$$
From \eqref{bib} one has
$$ \frac{1}{b^2} \sum_{n \in\Z; 0 \leq m < b} f_{(a/b)}\left(\frac{n}{b}, \frac{m}{b}\right) = 1 + \eps = 1 + O\left(\frac{1}{b} \right)$$
and from (uniform) Riemann integrability of the $f_{(a/b)}$ one has
$$ \frac{1}{b^2} \sum_{n \in\Z; 0 \leq m < b} \h\left(f_{(a/b)}\left(\frac{n}{b}, \frac{m}{b}\right)\right) = h_2(f_{(a/b)}) + o(1).$$
Finally, from dominated convergence one has
$$ h_2(f_{(a/b)}) = h_2(f_{(\alpha)})+o(1)$$
so we conclude that
$$ \H\left[\pi_{a/b}(X,Y)\right] = \H[bX+aY] = 2 \log b + h_2(f_{(\alpha)}) + o(1).$$
In a similar vein, from another application of Poisson summation and \eqref{f0-def} we see that
$$ \P(X=n) = \frac{1}{b} f_0\left(\frac{n}{b}\right) + O\left(\frac{1}{b^2}\right)$$
for any integer $n$, hence
$$ \h(\P(X=n)) = \frac{\log b}{b} f_0\left(\frac{n}{b}\right) + \frac{1}{b} \h\left(f_0 \left(\frac{n}{b}\right)\right) + O\left(\frac{\log b}{b^2}\right).$$
Since $X = O(b)$, one can sum using Riemann integrability and \eqref{bib} to conclude that
$$ \H[\pi_0(X,Y)] = \H[X]= \log b + h(f_0) + o(1).$$
Similar arguments give
$$ \H[\pi_\infty(X,Y)] = \H[Y] = \log b + h(f_\infty) + o(1)$$
and
$$ \H[\pi_1(X,Y)] = \H[X+Y] = \log b + h(f_1) + o(1).$$
Comparing this with \eqref{sdef}, we obtain \eqref{sd-targ}.

\begin{figure}
    \centering
\centerline{\includegraphics[width=\linewidth]{best.png}}
    \caption{Lower bounds on $\SD(\{0,1,\infty\}; s)$ obtained by \texttt{AlphaEvolve} for various $s=a/b$, plotted against $2 - 0.16 / \log(|a|+b|)$.  The horizontal axis is $|a|+|b|$ (so in some cases, multiple fractions $a/b$ are plotted on a single vertical line).}
    \label{fig:kak}
\end{figure}

The logarithmic convergence in \eqref{2ab} was suggested to us by experiments in \cite{gdm} using \texttt{AlphaEvolve} to obtain lower bounds for $\SD(\{0,1,\infty\}; s)$ for various slopes $s$.  This data was of low accuracy, as \texttt{AlphaEvolve} could only provide lower bounds and not upper bounds for these quantities; nevertheless, a logarithmic decay was numerically evident (see Figure \ref{fig:kak}), and furthermore the approximate discrete gaussian shape of the joint distributions of the random variables $X,Y$ obtained by this tool (see \cite[Figure 18]{gdm}) suggested an approach to make the lower bound in \eqref{2ab} rigorous.  Once this was accomplished, the author was also able to obtain the matching upper bound in \eqref{2ab} using the entropic Pl\"unnecke--Ruzsa calculus.   A modification of these arguments, with some inefficiencies, then gives \eqref{sam}. We tentatively conjecture that the bounds in \eqref{sam} can be improved to be of the form \eqref{2ab} for all $k$, not just $k=0$ (possibly after some slight adjustments to the definition of rational complexity).

In the limit as $a/b$ converges to some real number $\alpha$ and $b \to \infty$, we can obtain a more precise lower bound (also suggested by the aforementioned \texttt{AlphaEvolve} numerics) as follows.

\begin{theorem}[Continuous limit]\label{cts-limit}  Let $\alpha$ be a real number, and let $a,b$ be coprime integer parameters with $b \to \infty$ and $a/b \to \alpha$.  Then
\begin{equation}\label{up}
 \SD\left(\{0,1,\infty\};\frac{a}{b}\right) \geq 2 - \frac{c_\alpha+o(1)}{\log b}
 \end{equation}
 as $b\to \infty$ and $a/b \to \alpha$, where $0 < c_\alpha < \infty$ is the infimum of all quantities
\begin{equation}\label{hf}
 h_2(f_{(\alpha)}) - \max(h(f_0), h(f_\infty), h(f_\alpha))
 \end{equation}
where $f \colon \R^2 \to \R^+$ ranges over smooth compactly supported functions with total mass $\int_{\R^2} f(x,y)\ dx dy$ equal to $1$, $f_{(\alpha)} \colon \R \times [0,1) \to \R^+$ is a ``folded'' version
\begin{equation}\label{falpha-def}
 f_{(\alpha)}(x,y) \coloneqq \sum_{j \in \Z} f(x-\alpha j, y+j)
 \end{equation}
of $f$, $f_0, f_\infty, f_1 \colon \R \to \R^+$ are the projections
\begin{align}
f_0(x) &\coloneqq \int_\R f(x,y)\ dy\label{f0-def}\\
f_\infty(y) &\coloneqq \int_\R f(x,y)\ dx\label{finfty-def}\\
f_1(z) &\coloneqq \int_\R f(x,z- x)\ dx,\label{f1-def}
\end{align}
the two-dimensional differential entropy $h_2(f_{(\alpha)})$  of $f_{(\alpha)}$ is defined as
$$h_2(f_{(\alpha)}) \coloneqq \int_0^1 \int_\R \h(f_{(\alpha)}(x,y))\ dx dy,$$
and the one-dimensional differential entropies $h(f_r)$ for $r=0,1,\infty$ is defined as
$$ h(f_r) \coloneqq \int_\R \h(f_r(x))\ dx.$$
\end{theorem}

We establish this result in \Cref{cts-sec}.
We tentatively conjecture that the upper bound in \eqref{up} is in fact an asymptotic equality, so that the asymptotic behavior of
$ \SD\left(\{0,1,\infty\}, \frac{a}{b}\right)$ is controlled not only by the rational complexity (as represented by the $\log b$ denominator), but also by the variational quantity $c_\alpha$ appearing in the numerator.  It is not clear whether this quantity $c_\alpha$ can be computed exactly; numerically, two-dimensional gaussians are reasonably good candidates for $f$, but in practice they do not extremize the functional \eqref{hf} precisely.

\subsection{Notation}

We use the asymptotic notation $X = O(Y)$, $X \ll Y$, or $Y \gg X$ to denote the assertion that $|X| \leq CY$ for some absolute constant $C$; if we need this implied constant $C$ to depend on some fixed quantities (such as the number $k$ of slopes), we will indicate this in the text.

When there is no possibility of ambiguity, we omit parentheses from pairs $(X,Y)$ of random variables, for instance abbreviating $\H[(X,Y)]$ as $\H[X,Y]$.  Given a random variable $Y$ taking values in some set $S$ and some function $f \colon S \to \R$, we define the expectation
$$ \E_{Y=y} f(y) \coloneqq \sum_y \P(Y=y) f(y)$$
where $y$ ranges over the essential range of $Y$.  While this expression could also be abbreviated as $\E f(Y)$, it will be notationally useful to distinguish between the random variable $Y$ and the possible values $y$ that this variable could take.  For instance, with this notation, the \emph{conditional entropy} $\H[X|Y]$ of one random variable $X$ with respect to another $Y$ can now be defined by the formula
$$ \H[X|Y] \coloneqq \E_{Y=y} \H[ X | Y = y ]$$
where $(X|Y=y)$ is $X$ conditioned to the event $Y=y$ (again, we omit parentheses when there is no possibility of ambiguity).  The chain rule asserts that $\H[X|Y]$ can also be expressed by the formula
$$ \H[X|Y] = \H[X,Y] - \H[Y].$$
The \emph{mutual information} $\I(X:Y)$ between two random variables is given by the formula
$$ \I(X:Y) = \H[X] - \H[X|Y] = \H[Y] - \H(Y|X) = \H[X] + \H[Y] - \H[X,Y].$$
As is well known, $\I(X:Y)$ is non-negative, and vanishes precisely when $X,Y$ are independent.  Equivalently, one has the subadditivity property
$$ \H[X,Y] \leq \H[X] + \H[Y]$$
with equality precisely when $X,Y$ are independent.

We also define the conditional mutual information
$$ \I[X:Y|Z] \coloneqq \E_{Z=z} \I[(X|Z=z):(Y|Z=z)].$$
Clearly, $\I[X:Y|Z]$ is non-negative, and vanishes precisely when $X,Y$ are independent conditionally on $Z$.
From the chain rule we have
\begin{equation}\label{i-split}
\begin{split}
\I[X:Y|Z] &= \H[X|Z] - \H[X|Y,Z] \\
&= \H[Y|Z] - \H[Y|X,Z] \\
&= \H[X|Z] + \H[Y|Z] - \H[X,Y|Z].
\end{split}
\end{equation}

\subsection{Acknowledgments}

The author was supported by the James and Carol Collins Chair, the Mathematical Analysis \& Application Research Fund, and by NSF grants DMS-2347850, and is particularly grateful to recent donors to the Research Fund.  He particularly thanks his coauthors Bogdan Georgiev, Javier G\'omez-Serrano, and Adam Zsolt Wagner for the highly productive and enjoyable collaboration \cite{gdm}, and for generously sharing the outputs of that collaboration for the purposes of writing the current paper.

While some of the results proven here were suggested by the outcome of AI-assisted experiments, the arguments in this paper are completely human-generated.

The post-theorem introduction does not give a step-by-step proof, but it does outline the methods used to establish the bounds in Theorem~\ref{main-2}. For the three-slope case \eqref{2ab}, the “logarithmic convergence” was “suggested… by experiments… using \texttt{AlphaEvolve} to obtain lower bounds,” and the “approximate discrete gaussian shape of the joint distributions of the random variables $X,Y$… suggested an approach to make the lower bound in \eqref{2ab} rigorous.” “Once this was accomplished, the author was also able to obtain the matching upper bound in \eqref{2ab} using the entropic Pl\"unnecke--Ruzsa calculus.” Finally, “a modification of these arguments, with some inefficiencies, then gives \eqref{sam}.”

The post-theorem introduction does not give a step-by-step proof, but it does outline the methods used to establish the bounds in the main theorem. For the three-slope case
\begin{equation}\label{2ab} 2 - \frac{c_2}{D(R;s)} \leq \SD\left(R; s\right) \leq 2 - \frac{c_1}{D(R;s)}
\end{equation}
, the “logarithmic convergence” was “suggested… by experiments… using \texttt{AlphaEvolve} to obtain lower bounds,” and the “approximate discrete gaussian shape of the joint distributions of the random variables $X,Y$… suggested an approach to make the lower bound in the equation above rigorous.” “Once this was accomplished, the author was also able to obtain the matching upper bound in the equation above using the entropic Pl\"unnecke--Ruzsa calculus.” Finally, “a modification of these arguments, with some inefficiencies, then gives
\begin{equation}\label{sam} 2 - \frac{C_k \log(2+D(R;s))}{D(R;s)} \leq \SD(R; s) \leq 2 - \frac{c_k}{D(R;s)^{k+1}}
    \end{equation}
.”

Question:
Let a slope mean an element of \(\mathbb{Q}\cup\{\infty\}\). For each slope \(r\), define \(\pi_r:\mathbb{Q}\times\mathbb{Q}\to\mathbb{Q}\) by \(\pi_r(x,y)=x+ry\) if \(r\neq\infty\), and \(\pi_\infty(x,y)=y\). For a finite family of slopes \(R\) and a slope \(s\notin R\), let \(\mathrm{SD}(R;s)\) be the least exponent such that
\[
H[\pi_s(X,Y)]\le \mathrm{SD}(R;s)\max_{r\in R} H[\pi_r(X,Y)]
\]
for all finitely supported \(\mathbb{Q}\)-valued random variables \(X,Y\) (not necessarily independent), where \(H[Z]=\sum_z h(\mathbb{P}(Z=z))\) is Shannon entropy and \(h(t)=t\log(1/t)\) with \(h(0)=0\). Now let \(R=\{0,1,\infty,r_1,\dots,r_k\}\subset \mathbb{Q}\cup\{\infty\}\) be a finite family of slopes of cardinality \(k+3\), and let \(s\notin R\). Define the rational complexity \(D(R;s)\) to be the least natural number \(D\) for which
\[
s=\frac{P(r_1,\dots,r_k)}{Q(r_1,\dots,r_k)}
\]
for some polynomials \(P,Q\) of degree at most \(D\) with integer coefficients of magnitude at most \(2^D\), with \(Q(r_1,\dots,r_k)\neq 0\). Which statement holds for every such \(R\) and \(s\)?

If \(k=0\) (so \(R=\{0,1,\infty\}\)), then there exist absolute constants \(c_2>c_1>0\) such that
\[
2-\frac{c_2}{D(R;s)}\le \mathrm{SD}(R;s)\le 2-\frac{c_1}{D(R;s)}.
\]
More generally, for arbitrary \(k\), there exist constants \(c_k,C_k>0\) depending only on \(k\) such that
\[
2-\frac{C_k\log(2+D(R;s))}{D(R;s)}\le \mathrm{SD}(R;s)\le 2-\frac{c_k}{D(R;s)^{k+1}}.
\]

Choices:
B.
If \(k=0\) (so \(R=\{0,1,\infty\}\)), then there exist absolute constants \(c_2>c_1>0\) such that
\[
2-\frac{c_2\log(2+D(R;s))}{D(R;s)}\le \mathrm{SD}(R;s)\le 2-\frac{c_1\log(2+D(R;s))}{D(R;s)}.
\]
More generally, for arbitrary \(k\), there exist constants \(c_k,C_k>0\) depending only on \(k\) such that
\[
2-\frac{C_k}{D(R;s)}\le \mathrm{SD}(R;s)\le 2-\frac{c_k}{D(R;s)^{k+1}}.
\]
C.
For arbitrary \(k\), there exist constants \(c_k,C_k>0\) depending only on \(k\) such that
\[
2-\frac{C_k\log(2+D(R;s))}{D(R;s)}\le \mathrm{SD}(R;s)\le 2.
\]
In particular, when \(k=0\), one has \(2-\frac{C_0\log(2+D(R;s))}{D(R;s)}\le \mathrm{SD}(R;s)\le 2\).
D.
If \(k=0\) (so \(R=\{0,1,\infty\}\)), then there exist absolute constants \(c_2>c_1>0\) such that
\[
2-\frac{c_2}{D(R;s)}\le \mathrm{SD}(R;s)\le 2-\frac{c_1}{D(R;s)^2}.
\]
More generally, for arbitrary \(k\), there exist constants \(c_k,C_k>0\) depending only on \(k\) such that
\[
2-\frac{C_k\log(2+D(R;s))}{D(R;s)}\le \mathrm{SD}(R;s)\le 2-\frac{c_k}{D(R;s)^k}.
\]
E.
If \(k=0\) (so \(R=\{0,1,\infty\}\)), then there exist absolute constants \(c_2>c_1>0\) such that
\[
2-\frac{c_2}{D(R;s)}\le \mathrm{SD}(R;s)\le 2-\frac{c_1}{D(R;s)}.
\]
More generally, there exist absolute constants \(c,C>0\), independent of \(k\), \(R\), and \(s\), such that for every \(k\)
\[
2-\frac{C\log(2+D(R;s))}{D(R;s)}\le \mathrm{SD}(R;s)\le 2-\frac{c}{D(R;s)^{k+1}}.
\]

special k=0 logarithmic-vs-linear behavior

nontrivial upper bound improvement below 2

upper-bound exponent in D for many slopes and three-slope matching rate


[Chitrao-Ghate \cite{CG23}]\label{Main theorem in the second part of my thesis}
      For $k \in [3, p + 1]$ and for primes $p \geq 5$, the semi-simplification of the reduction mod $p$ of the
      semi-stable representation $V_{k, \mathcal{L}}$ on $\mathrm{Gal}(\brqp/\mathbb{Q}_p)$ is given by an alternating
      sequence of irreducible and reducible representations:
    \[
    \overline{V}_{k, \mathcal{L}} \sim
    \begin{cases}
        \mathrm{ind}\> (\omega_2^{r+1 + (i-1)(p-1)}), & \text{ if $(i-1) - r/2 < \nu < i - r/2$} \\
        \mu_{\lambda_i}\omega^{r+1-i} \oplus \mu_{\lambda_i^{-1}}\omega^{i}, & \text{ if $\nu = i - r/2$},
    \end{cases}
\]
where
  \begin{eqnarray*}
    \begin{cases}
      1 \leq i \leq (r+1)/2 & \text{if $r$ is odd} \\
                          1 \leq i \leq (r+2)/2 & \text{if $r$ is even,}
    \end{cases}
 \end{eqnarray*}
  and the mod $p$ constants $\lambda_i$ are determined by the formulas:
    \begin{eqnarray*}
        \lambda_i & = & \br{(-1)^i \> i {r+1-i \choose i}\frac{(\mathcal{L} - H_{-} - H_{+})}{p^{i-r/2}}}, \quad \text{ if } 1 \leq i < \dfrac{r + 1}{2} \\
        \lambda_{i} + \lambda_i^{-1} & = & \br{(-1)^i \> i{r + 1 - i \choose i}\frac{(\mathcal{L} - H_{-} - H_{+})}{p^{i-r/2}}}, \quad \text{ if } i = \dfrac{r + 1}{2} \text{ and } r \text{ is odd}.
    \end{eqnarray*}

\begin{theorem}[Chitrao-Ghate \cite{CG23}]\label{Main theorem in the second part of my thesis}
      For $k \in [3, p + 1]$ and for primes $p \geq 5$, the semi-simplification of the reduction mod $p$ of the
      semi-stable representation $V_{k, \cL}$ on $\mathrm{Gal}(\brqp/\qp)$ is given by an alternating
      sequence of irreducible and reducible representations:
    \[
    \br{V}_{k, \cL} \sim
    \begin{cases}
        \ind (\omega_2^{r+1 + (i-1)(p-1)}), & \text{ if $(i-1) - r/2 < \nu < i - r/2$} \\
        \mu_{\lambda_i}\omega^{r+1-i} \oplus \mu_{\lambda_i^{-1}}\omega^{i}, & \text{ if $\nu = i - r/2$},
    \end{cases}
\]
where
  \begin{eqnarray*}
    \begin{cases}
      1 \leq i \leq (r+1)/2 & \text{if $r$ is odd} \\
                          1 \leq i \leq (r+2)/2 & \text{if $r$ is even,}
    \end{cases}
 \end{eqnarray*}
  and the mod $p$ constants $\lambda_i$ are determined by the formulas:
    \begin{eqnarray*}
        \lambda_i & = & \br{(-1)^i \> i {r+1-i \choose i}\frac{(\cL - H_{-} - H_{+})}{p^{i-r/2}}}, \quad \text{ if } 1 \leq i < \dfrac{r + 1}{2} \\
        \lambda_{i} + \lambda_i^{-1} & = & \br{(-1)^i \> i{r + 1 - i \choose i}\frac{(\cL - H_{-} - H_{+})}{p^{i-r/2}}}, \quad \text{ if } i = \dfrac{r + 1}{2} \text{ and } r \text{ is odd}.
    \end{eqnarray*}
\end{theorem}

Let $p$ be a prime. It has been over 10 years now since I started working on mathematics connected with the $p$-adic Local
Langlands correspondence for $p$ a prime. The theory was initiated by Breuil about 20 years ago, and caused a mini-revolution
in the field of number theory. I remember him speaking about his vision at the ICM in Hyderabad in 2010 \cite{Breuil ICM}.
A few years later Colmez made the
next quantum leap forward by making Breuil's correspondences functorial \cite{Col10b}. I was fortunate to have a ringside view of these
developments especially since some of them were made during the years 2007-2010 when we ran a joint Indo-French CEFIPRA project.
Meanwhile many other prominent mathematicians such as Berger, Dospinescu, Pa\u{s}k\={u}n{a}s, to name just a few,
contributed deep results along the way.

I entered the subject for the following reason. About 13 years ago, I was trying to show that certain mod $p$ Galois representations
attached to modular forms had large image. Indeed, I was trying to generalize Serre's famous conjecture
that the global mod $p$ Galois representation attached to a non-CM rational elliptic curve has full image for all primes $p$ larger than
an absolute constant to the setting of modular forms. It turns out that the na\"ive generalization of this statement is necessarily false
but Pierre Parent and I could state a variant of this conjecture and make some mild progress on it for weight $2$ forms
\cite{GP12}.

One way to tackle this problem is to show that the corresponding restricted local mod $p$ Galois representation has large image.
Nothing like showing a group is large by showing that it has a large subgroup. This approach works to some extent but not entirely, not least because it turns out that the mod $p$ reductions of local Galois
representations attached to modular forms have not yet been written down in all cases. It was very disconcerting to me that there was such a glaring
gap in the subject.
I decided to devote a good chunk of my future research time in making some
headway with this question.

It turns out  the $p$-adic Local Langlands program is ideally suited to studying the mod $p$ images of local
modular Galois representations.
Indeed, Breuil invented his theory to tackle exactly this problem. In the beginning he restricted to the so called crystalline case
where $p$ does not divide the level of the modular form. Let us from now on always restrict to odd primes $p$ (though in
some results in this Introduction we assume without warning that $p \geq 5$). Breuil showed that one could compute the local mod $p$ reductions for all
forms of weights $k \leq 2p+1$ and positive slope \cite{Bre03}, \cite{Bre03b}. Here the slope of a form is the $p$-adic valuation of its $p$-th Fourier
coefficient, where the valuation is normalized so that the valuation of $p$ is 1.
(The case of slope $0$ and all weights is classical and is due to Deligne.)
This generalized the work of his advisor Fontaine, although the details were worked out in \cite{Edi92},
who had earlier computed the reductions for weights $k \leq p+1$ and positive slope.

One obvious restriction
in these theorems is that the weight is bounded above, but there is no restriction on the slope. In an orthogonal direction, in a
short but influential paper, Buzzard and Gee \cite{BG09} used the $p$-adic Local Langlands correspondence to compute the mod $p$
reductions of crystalline Galois representations of slopes in the small range
$(0,1)$, but for all weights. Some
difficulties encountered at slope $1/2$ were only cleared up in a second paper \cite{BG13}.
(The case of $p=2$ for slopes in this range is being treated in a forthcoming thesis of Arathy Venugopal.)
For historical completeness, let us
mention that earlier and using a different method, Berger, Li and Zhu \cite{BLZ04}
had treated the case of slopes which are large compared to the weight, namely slopes which are larger
than $\lfloor \frac{k-2}{p-1} \rfloor$ (an interesting variant of this results was recently proved by Bergdall-Levin \cite{BL22}
who treated the
case of slope larger than $\lfloor \frac{k-1}{p} \rfloor$).

This is where I entered the problem. In a series of papers with my coauthors (students, postdocs, colleagues), I first extended the result of
Buzzard-Gee to all slopes in $(0,2)$. This does not seem like much, but this marginal gain of a unit interval's worth of slopes
was to consume me for the better part of the first half of the
following decade. At first, the answers we got for the reduction seemed unpredictable, almost as if one was entering a fractal. There
were no general guidelines (other than a folklore conjecture of Breuil, Buzzard and Emerton which said that for fractional
slopes and even weights the reduction should be irreducible). Murphy's law (if things can go wrong, they will)
seemed to rule the roost - if a particular exception to a general rule for the shape of the reduction was in principle possible,
then it always wound up occurring.

Some initial headway for the case of slopes in $(1,2)$ was made with Abhik Ganguli for bounded weights \cite{GG15}, and then in a very nice paper with
Shalini Bhattacharya for all weights \cite{BG15} but again we were only able to partially treat the case of slope $3/2$.
The missing case of slope $1$ was then
treated with Shalini Bhattacharya and Sandra Rozensztajn \cite{BGR18}. The complete picture for
slope $3/2$ was finally provided only a few years ago with Vivek Rai, though the paper \cite{GR19} appeared just this year.
(Beyond this range, I also wish to mention forthcoming work of Sudipta Majumder for slope $2$, some partial
results of Nagell-Pande and Arsovski for slopes in $(2,3)$, and a
forthcoming project \cite{BGR25} with Shalini Bhattacharya and Ravitheja Vangala which aims to treat all fractional slopes
in the range $(0,p)$ building on the foundations laid in \cite{GV22}.)
All these papers use the functoriality of
the $p$-adic Local Langlands Correspondence with respect to reduction (established by Berger if one is willing to work up to semi-simplification - as we mostly
were - and in general by Colmez), to reduce the question of studying the reductions of local crystalline Galois representations
to studying the reduction of the standard lattice in a certain $p$-adic Banach space. The slope 1 paper \cite{BGR18} also computes the reductions
of several other lattices, and in particular establishes criteria to distinguish between {\it peu} and {\it tr\`es ramifi\'ee}
cases.

Part of the problem encountered at the half-integral slopes $1/2$, $1$, $3/2, \ldots$ was that the reduction seemed to behave even more
erratically than usual at the so called exceptional weights $k$ (these are weights which are congruent to two more
than twice the slope modulo $(p-1)$).
Based on the results in slope $1/2$ and $1$, and some cautionary computations of Rozensztajn,
I eventually wound up making a conjecture
which I called the {\it zig-zag conjecture} which described the behaviour of the reduction for all positive half-integral
slopes less than or equal to $\frac{p-1}{2}$ and all sufficiently large exceptional weights.
Roughly, the conjecture predicted that the reductions varied through an
alternating sequence of irreducible and reducible representations
depending on the (relative) sizes of two parameters. The statement appeared in a proceedings of an annual number theory conference
at RIMS in Kyoto, Japan \cite{Gha21}, where I was thrown to the wolves by my kind host Shinichi Kobayashi as the opening speaker (I thank him for this honor).
At the time it had become my  mission to settle the case of slope $3/2$ if only to prove that the conjecture
had some merit. However, over the years there was an uncomfortable truth that
began to emerge. The paper \cite{BG13} for slope $1/2$ was about 10 pages long, the one \cite{BGR18} for slope $1$ was about 50 pages long (though not all of it dealt with zig-zag), and the (unabridged arXiv version of the)
one \cite{GR19} for slope $3/2$ was just under 80 pages long (its entire focus was zig-zag at $3/2$). So clearly another approach would be required to prove the conjecture in general.
To my complete surprise this was to surface a few years later.

To explain this, let us return to Breuil's early foundational work. Apart from treating the crystalline case, Breuil also wrote some important papers in
the so called semi-stable case. This case occurs for modular forms for which $p$ exactly divides the level of the form (and does not divide the conductor
of the nebentypus character). In an important work with M\'ezard dating to more than 20 years ago, Breuil computed the mod $p$ reductions
of all semi-stable Galois representations of {\it even} weight $k \leq p-1$ using techniques from integral $p$-adic Hodge theory \cite{BM}. The case of {\it odd} weights
in this range was completed much later (about 6 years ago) in another {\it tour de force} by Guerberoff and Park \cite{GP} (and Lee and Park \cite{LP22}), though several constants
remained to be determined completely. For completeness, we also mention that an alternate algebro-geometric approach to computing the reduction involving the global sections of certain
bundles on the $p$-adic upper half-plane was developed by Breuil-M\'ezard in some cases \cite{BM10}, though this approach does indeed seem to require that the weight $k$ be even
since it involved $k/2$-powers of certain line bundles.

In any case, some time in 2022, I realized that all of these works in the parallel universe of semi-stable representations could be used to give a proof
of the zig-zag conjecture in the crystalline world, at least for most slopes and on the inertia group. This was perhaps one of the more important
observations that I have made in the past 10 years. Let us explain how it came about. A bit earlier than this, Anand Chitrao, Seidai Yasuda and I had been trying to use the above
mentioned works in the crystalline world to try and deduce results about $V_{k,\mathcal{L}}$ in the semi-stable world, using a limiting argument in Colmez's blow-up space of
non-split rank $2$ trianguline $(\varphi,\Gamma)$-modules. We wrote a nice paper about this which appeared this year \cite{CGY21} and
which allowed one, for instance, to predict the exact shape of
some of the above mentioned missing constants for small odd weights (e.g., for $k=5$ from the slope ${3}/{2}$ paper),
and, in general, to recover the work of
Breuil-M\'ezard and Guerberoff-Park on inertia {\it assuming} my zig-zag conjecture. The breakthrough came when I realized that one could reverse the
entire argument and instead deduce information about crystalline representations - in particular, a large portion of the zig-zag phenomenon -
from the literature in the semi-stable case. In fact, after this realization I could
immediately prove zig-zag up to slope $\frac{p-3}{2}$
(though in the first instance I could only prove it on the inertia group since, as already mentioned, the constants in the semi-stable world had not yet been
completely determined for odd weights). The missing cases of slope $\frac{p-2}{2}$ and $\frac{p-1}{2}$
would require extending the work of Guerberoff-Park \cite{GP} to the odd weight $k=p$ and the classical work of Breuil-M\'ezard \cite{BM} to the case of the even weight $k = p+1$.

The possible extension to these two weights was more than just a technicality. There was a theoretical obstruction. It turned out that the strongly
divisible modules occurring in integral $p$-adic Hodge theory were either not as well behaved ($k = p$,  see
\cite{Gao17}) or not even available (for $k \geq p+1$)
(although since then a theory of Breuil-Kisin modules has become available which works for all weights $k$). So an entirely new perspective was required.
Based on my experience with computing the reduction using the functoriality of the $p$-adic Local Langlands Correspondences in the crystalline world (a method initiated by Breuil and
Buzzard-Gee), I wondered whether Anand Chitrao and I might
be able to tackle the reduction problem in the semi-stable case in a similar manner. We were given to understand
that one
might have to wait for a very long time for this hope to be realized.

However, not ones to shy away from a challenge, Chitrao and I started work on this ambitious project. Initial gains were few and
far between. But, to make a long story short, we were eventually able to
compute the mod $p$ reductions of all semi-stable representations for weights $k \leq p+1$, including the cases of weight $k = p$
and $k = p+1$. We were also able to provide a complete and uniform treatment of all the constants involved.
The goal of this expository paper is to
explain this result and to expand on some of the mathematical background that goes into its proof.
But before I go further, let me record that this work
allowed one to complete the proof of my zig-zag conjecture (i.e., to extend the initial proof up to slope $\frac{p-1}{2}$,
and to determine all the constants that occur in the unramified characters on the decomposition group in the reduction, see \cite{Gha22}).

Already, in the early days, Breuil had written two important papers describing the Banach space attached to
a semi-stable representation $V_{k,\mathcal{L}}$ of weight $k$ and $\mathcal{L}$-invariant $\mathcal{L}$ under the $p$-adic Local Langlands Correspondence. The first description, denoted by
$B(k,\mathcal{L})$ in \cite{Bre04},
involved some work of Schneider and Teitelbaum and used Morita duality
and seemed a bit abstract to us. But the second description, denoted by $\tilde{B}(k, \mathcal{L})$ in \cite{Bre10}, `only' used $p$-adic
functional analysis (a beautiful summary of which can be found in \cite{Col10a}, see $\S 3$) and this definition
seemed much more amenable to computation.
In this model, the Banach space $\tilde{B}(k, \mathcal{L})$ was nothing but the space of differentiable functions
on $\mathbb{Q}_p$ of order $r/2$ where $r = k-2$ (more precisely of type $\mathscr{C}^{r/2}$, these notions are slightly different),
with a similar differentiability condition at $\infty$, modulo polynomial functions of degree at most $r$ and certain finite sums of  polynomial
times logarithmic ({poly$\cdot$log!}) functions (with the polynomial part having degree less than $r/2$). This description was something that you
could explain to a clever high school student learning calculus. Using it, we began to search for an integral structure (lattice)
on this Banach space.

It was not immediately clear how to proceed, but we soon realized that one could uniformize this
Banach space (much as in the crystalline world) by the compactly induced space $\mathrm{ind}_{IZ}^G \mathrm{Sym}^{k-2} E^2$ of
certain rational polynomial valued functions allowing us to define the (standard) lattice
in the Banach space as the (closure of the) image of the space $\mathrm{ind}_{IZ}^G \mathrm{Sym}^{k-2}{\mathcal O}_E^2$ of
integral polynomial valued functions under this uniformization. Here
$I$ is the Iwahori subgroup of $G = \GL_2(\mathbb{Q}_p)$ and $Z$ is the center of $G$. It then `remained' to compute the reduction of this
lattice. In hindsight, this required several new creative computations. After much effort we were able to compute all
the Jordan-H\"older (JH) factors in the reduction
in terms of certain mod $p$ compactly induced spaces modulo the images of certain Iwahori-Hecke operators. Applying a
reformulation of Breuil's mod $p$ Local Langlands correspondence worked out by Chitrao, which is
called the Iwahori mod $p$ Local Langlands correspondence in \cite{Chi23},
we could then return to the Galois side and compute the reductions of the semi-stable Galois representations $V_{k,\mathcal{L}}$.
Our target to treat all weights in the range $3 \leq k \leq p+1$ was achieved in the paper \cite{CG23}, though we remark that
in principle our method can be used to treat  all weights $k \geq 3$ at least in principle (unlike the initial approach with strongly divisible modules).
Indeed, Anand and I have just begun to see whether our approach to computing the reduction of semi-stable representations
using $p$-adic Langlands can be used to recover very recent work of Bergdall, Levin, and Liu \cite{BLL22}
which uses Breuil-Kisin modules
to study the reduction of $V_{k,\mathcal{L}}$ with $\mathcal{L}$-invariant having very negative $p$-adic valuation.

Let us state the main result in the paper \cite{CG23} with Anand Chitrao.
Let $p \geq 5$ be a prime and $E$ be a finite extension of $\mathbb{Q}_p$ containing $\sqrt{p}$.
We describe completely the semi-simplification of the reduction mod $p$ of
the irreducible two-dimensional semi-stable representation $V_{k, \mathcal{L}}$ of $\mathrm{Gal}(\brqp/\mathbb{Q}_p)$
over $E$ with Hodge-Tate weights $(0,k-1)$ for $k \in [3, p + 1]$ and
$\mathcal{L}$-invariant $\mathcal{L} \in E$. To do this
we need a little bit more notation. Let as usual $r = k-2$ so that $1 \leq r \leq p-1$.
    Let $v_-$ and $v_+$ be
    the largest and smallest integers, respectively, such that $v_- < r/2 < v_+$ for $r \geq 1$.
    For $n \geq 1$, let $H_n = \sum_{i = 1}^{n}\frac{1}{i}$ be the $n$-th partial harmonic sum.
    Set $H_0 = 0$ and $H_{\pm} = H_{v_{\pm}}$. Let $v_p$ be the $p$-adic valuation on $\brqp$
    normalized such that $v_p(p) = 1$.
    Let $$\nu = v_p(\mathcal{L} - H_{-} - H_{+})$$
    be the $p$-adic valuation of $\mathcal{L}$ shifted by the
    partial harmonic sums $H_{-}$ and $H_{+}$.
    Everything hinges on the size of the parameter $\nu$. Let $\omega$ be the fundamental character of
    $\mathrm{Gal}(\br{{\mathbb Q}}_p/\mathbb{Q}_p)$ of
    level $1$.     Similarly, for an integer $c$ (with
    $p + 1 \nmid c$), let $\omega_2^c$ be an extension from the inertia subgroup $I_{\mathbb{Q}_p}$ to $\mathrm{Gal}(\brqp/\bq_{p^2})$
    of the $c$-th power of the
    fundamental character $\omega_2$     of level $2$ chosen
    so that the (irreducible) representation $\mathrm{ind}\> (\omega_2^c)$ obtained
    by inducing this character from $\mathrm{Gal}(\brqp/\bq_{p^2})$ to $\mathrm{Gal}(\brqp/\mathbb{Q}_p)$ has
    determinant $\omega^c$. Let $\mu_{\lambda}$ be the unramified character of $\mathrm{Gal}(\brqp/\mathbb{Q}_p)$     sending geometric Frobenius to $\lambda \in \br{\mathbb{F}}_p^{*}$.     Our main theorem is the following result.

To explain this, let us return to Breuil's early foundational work. Apart from treating the crystalline case, Breuil also wrote some important papers in
the so called semi-stable case. This case occurs for modular forms for which $p$ exactly divides the level of the form (and does not divide the conductor
of the nebentypus character). In an important work with M\'ezard dating to more than 20 years ago, Breuil computed the mod $p$ reductions
of all semi-stable Galois representations of {\it even} weight $k \leq p-1$ using techniques from integral $p$-adic Hodge theory \cite{BM}. The case of {\it odd} weights
in this range was completed much later (about 6 years ago) in another {\it tour de force} by Guerberoff and Park \cite{GP} (and Lee and Park \cite{LP22}), though several constants
remained to be determined completely. For completeness, we also mention that an alternate algebro-geometric approach to computing the reduction involving the global sections of certain
bundles on the $p$-adic upper half-plane was developed by Breuil-M\'ezard in some cases \cite{BM10}, though this approach does indeed seem to require that the weight $k$ be even
since it involved $k/2$-powers of certain line bundles.

However, not ones to shy away from a challenge, Chitrao and I started work on this ambitious project. Initial gains were few and
far between. But, to make a long story short, we were eventually able to
compute the mod $p$ reductions of all semi-stable representations for weights $k \leq p+1$, including the cases of weight $k = p$
and $k = p+1$. We were also able to provide a complete and uniform treatment of all the constants involved.
The goal of this expository paper is to
explain this result and to expand on some of the mathematical background that goes into its proof.
But before I go further, let me record that this work
allowed one to complete the proof of my zig-zag conjecture (i.e., to extend the initial proof up to slope $\frac{p-1}{2}$,
and to determine all the constants that occur in the unramified characters on the decomposition group in the reduction, see \cite{Gha22}).

It was not immediately clear how to proceed, but we soon realized that one could uniformize this
Banach space (much as in the crystalline world) by the compactly induced space $\mathrm{ind}_{IZ}^G \mathrm{Sym}^{k-2} E^2$ of
certain rational polynomial valued functions allowing us to define the (standard) lattice
in the Banach space as the (closure of the) image of the space $\mathrm{ind}_{IZ}^G \mathrm{Sym}^{k-2}{\mathcal O}_E^2$ of
integral polynomial valued functions under this uniformization. Here
$I$ is the Iwahori subgroup of $G = \GL_2(\mathbb{Q}_p)$ and $Z$ is the center of $G$. It then `remained' to compute the reduction of this
lattice. In hindsight, this required several new creative computations. After much effort we were able to compute all
the Jordan-H\"older (JH) factors in the reduction
in terms of certain mod $p$ compactly induced spaces modulo the images of certain Iwahori-Hecke operators. Applying a
reformulation of Breuil's mod $p$ Local Langlands correspondence worked out by Chitrao, which is
called the Iwahori mod $p$ Local Langlands correspondence in \cite{Chi23},
we could then return to the Galois side and compute the reductions of the semi-stable Galois representations $V_{k,\mathcal{L}}$.
Our target to treat all weights in the range $3 \leq k \leq p+1$ was achieved in the paper \cite{CG23}, though we remark that
in principle our method can be used to treat all weights $k \geq 3$ at least in principle (unlike the initial approach with strongly divisible modules).
Indeed, Anand and I have just begun to see whether our approach to computing the reduction of semi-stable representations
using $p$-adic Langlands can be used to recover very recent work of Bergdall, Levin, and Liu \cite{BLL22}
which uses Breuil-Kisin modules
to study the reduction of $V_{k,\mathcal{L}}$ with $\mathcal{L}$-invariant having very negative $p$-adic valuation.

Let us state the main result in the paper \cite{CG23} with Anand Chitrao.
Let $p \geq 5$ be a prime and $E$ be a finite extension of $\mathbb{Q}_p$ containing $\sqrt{p}$.
We describe completely the semi-simplification of the reduction mod $p$ of
the irreducible two-dimensional semi-stable representation $V_{k, \mathcal{L}}$ of $\mathrm{Gal}(\brqp/\mathbb{Q}_p)$
over $E$ with Hodge-Tate weights $(0,k-1)$ for $k \in [3, p + 1]$ and
$\mathcal{L}$-invariant $\mathcal{L} \in E$. To do this
we need a little bit more notation. Let as usual $r = k-2$ so that $1 \leq r \leq p-1$.
 Let $v_-$ and $v_+$ be
 the largest and smallest integers, respectively, such that $v_- < r/2 < v_+$ for $r \geq 1$.
 For $n \geq 1$, let $H_n = \sum_{i = 1}^{n}\frac{1}{i}$ be the $n$-th partial harmonic sum.
 Set $H_0 = 0$ and $H_{\pm} = H_{v_{\pm}}$. Let $v_p$ be the $p$-adic valuation on $\brqp$
 normalized such that $v_p(p) = 1$.
 Let $$\nu = v_p(\mathcal{L} - H_{-} - H_{+})$$
 be the $p$-adic valuation of $\mathcal{L}$ shifted by the
 partial harmonic sums $H_{-}$ and $H_{+}$.
 Everything hinges on the size of the parameter $\nu$. Let $\omega$ be the fundamental character of
 $\mathrm{Gal}(\br{{\mathbb Q}}_p/\mathbb{Q}_p)$ of
 level $1$. Similarly, for an integer $c$ (with
 $p + 1 \nmid c$), let $\omega_2^c$ be an extension from the inertia subgroup $I_{\mathbb{Q}_p}$ to $\mathrm{Gal}(\brqp/\bq_{p^2})$
 of the $c$-th power of the
 fundamental character $\omega_2$ of level $2$ chosen
 so that the (irreducible) representation $\mathrm{ind}\> (\omega_2^c)$ obtained
 by inducing this character from $\mathrm{Gal}(\brqp/\bq_{p^2})$ to $\mathrm{Gal}(\brqp/\mathbb{Q}_p)$ has
 determinant $\omega^c$. Let $\mu_{\lambda}$ be the unramified character of $\mathrm{Gal}(\brqp/\mathbb{Q}_p)$ sending geometric Frobenius to $\lambda \in \br{\mathbb{F}}_p^{*}$. Our main theorem is the following result.

Let us state the main result in the paper \cite{CG23} with Anand Chitrao.
Let $p \geq 5$ be a prime and $E$ be a finite extension of $\qp$ containing $\sqrt{p}$.
We describe completely the semi-simplification of the reduction mod $p$ of
the irreducible two-dimensional semi-stable representation $V_{k, \cL}$ of $\mathrm{Gal}(\brqp/\qp)$
over $E$ with Hodge-Tate weights $(0,k-1)$ for $k \in [3, p + 1]$ and
$\cL$-invariant $\cL \in E$. To do this
we need a little bit more notation. Let as usual $r = k-2$ so that $1 \leq r \leq p-1$.
 Let $v_-$ and $v_+$ be
 the largest and smallest integers, respectively, such that $v_- < r/2 < v_+$ for $r \geq 1$.
 For $n \geq 1$, let $H_n = \sum_{i = 1}^{n}\frac{1}{i}$ be the $n$-th partial harmonic sum.
 Set $H_0 = 0$ and $H_{\pm} = H_{v_{\pm}}$. Let $v_p$ be the $p$-adic valuation on $\brqp$
 normalized such that $v_p(p) = 1$.
 Let $$\nu = v_p(\sL - H_{-} - H_{+})$$
 be the $p$-adic valuation of $\sL$ shifted by the
 partial harmonic sums $H_{-}$ and $H_{+}$.
 Everything hinges on the size of the parameter $\nu$. Let $\omega$ be the fundamental character of
 $\mathrm{Gal}(\br{{\mathbb Q}}_p/\qp)$ of
 level $1$. Similarly, for an integer $c$ (with
 $p + 1 \nmid c$), let $\omega_2^c$ be an extension from the inertia subgroup $I_{\qp}$ to $\mathrm{Gal}(\brqp/\bq_{p^2})$
 of the $c$-th power of the
 fundamental character $\omega_2$ of level $2$ chosen
 so that the (irreducible) representation $\ind (\omega_2^c)$ obtained
 by inducing this character from $\mathrm{Gal}(\brqp/\bq_{p^2})$ to $\mathrm{Gal}(\brqp/\qp)$ has
 determinant $\omega^c$. Let $\mu_{\lambda}$ be the unramified character of $\mathrm{Gal}(\brqp/\qp)$ sending geometric Frobenius to $\lambda \in \br{\mathbb{F}}_p^{*}$. Our main theorem is the following result.

\subsection{Idea of proof of Theorem~\ref{Main theorem in the second part of my thesis}}
A picture is worth a thousand words, and so we draw one to explain the proof.
Let $B_{k,\sL} = \tilde{B}(k,\sL)$.
The following diagram commutes:

\begin{theorem}[Iwahori mod $p$ LLC]\label{Iwahori mod p LLC}
 For $r \in \{0, \ldots, p - 1\}$, $\lambda \in \brFp$ and $\eta: \Qp^* \to \brFp^*$ a smooth
 character, we have the following correspondence between mod
 $p$ representations of $G_{{\mathbb Q}_p}$ and certain smooth mod $p$ representations of $G = \mathrm{GL}_2(\qp)$.
\begin{itemize}
 \item If $\lambda = 0$:
 \[
 (\ind \omega_2^{r + 1}) \otimes \eta \>\> \longmapsto
 \>\> \pi(r,0,\eta) \quad \qquad \qquad \qquad \qquad \quad
 \]
 \item If $\lambda \neq 0$:
 \begin{eqnarray*}
 \> \> \> \> \> (\mu_{\lambda}\omega^{r + 1} \oplus
\mu_{\lambda^{-1}})\otimes \eta & \longmapsto &
 \pi(r,\lambda,\eta)^{\rmss} \oplus \pi([p-3-r],\lambda^{-1},\eta \omega^{r+1})^{\rmss},
\\
 \end{eqnarray*}
where $[a] \in \{0,\ldots,p-2\}$ represents the class of $a$ modulo $(p-1)$.
 \end{itemize}
\end{theorem}

\begin{remark}
For all $i,j \geq 0$, set
$$\alpha_{i,j} = \frac{1}{p^{l(i)}} \sum_{\zeta \in \mu_{p^{l(i)}}}\zeta^{-i} (\zeta - 1)^j$$
\vspace{1cm}
Using some algebraic number theoretic arguments (see \cite[Lemma I.3.5]{Col10a}), it can be shown that
$$\begin{cases}
 \alpha_{i,j} =0 & \text{if } j < i \\
 \alpha_{i,j} = 1 & \text{if } j = i \\
 v_p(\alpha_{i,j}) \geq \left\lfloor \dfrac{j - p^{l(i) -1}}{p^{l(i)} - p^{l(i) -1}} \right\rfloor & \text{if } j > i.
 \end{cases}
 $$
Now
$${\mathbbm 1}_{i+p^{l(i)}\zp}(x) = \frac{1}{p^{l(i)}} \sum_{\zeta \in \mu_{p^{l(i)}}} \zeta^{x-i}
 = \sum_{n = 0}^\infty {x \choose n} \sum_{\zeta \in \mu_{p^{l(i)}}} \frac{1}{p^{l(i)}} \zeta^{-i} (\zeta -1)^n$$
 so its Mahler coefficients $a_n({\mathbbm 1}_{i+p^{l(i)}\zp})$ equal $\alpha_{i,n}$, which clearly tend to $0$ as $n \to \infty$.
 This gives another proof of the surjectivity of the map in Theorem~\ref{mahler}, ii). Indeed considering
 that map to be taking values in the bigger space $l_\infty({\mathbb N}_{\geq 0},E)$, we note that the pre-image $B$
 of the closed subspace $l_\infty^0({\mathbb N}_{\geq 0}, E)$ is closed and, by the above remarks and
 Proposition~\ref{LC basis}, part ii), contains
 $\mathrm{LC}(\zp,E)$. Then $B = \overline{B} \supset \overline{\mathrm{LC}(\zp,E)} = \sC^0(\zp, E)$,
 by Lemma~\ref{LC dense in C^0}. So $B = \sC^0(\zp, E)$.
\end{remark}

\begin{theorem}{\cite[Theorem 9.7]{CG23}} \label{Final theorem for leq}
 Let $i = 1, \> 2, \> \ldots, \> \lceil r/2 \rceil - 1$. If $\nu = i - r/2$, then the map $\IZind a^i d^{r - i} \twoheadrightarrow F_{2i, \> 2i + 1}$ factors as
 \[
 \IZind a^i d^{r - i} \twoheadrightarrow \frac{\IZind a^i d^{r - i}}{\im(T_{1, 2} - \lambda_i)} \twoheadrightarrow F_{2i, \> 2i + 1},
 \]
 where $$\lambda_i = (-1)^i i {r - i + 1 \choose i}p^{r/2 - i}\cL.$$ Moreover, the second map in the display above induces a surjection
 \[
 \pi(r - 2i, \lambda_i, \omega^i) \twoheadrightarrow F_{2i, \> 2i + 1}.
 \]
 \end{theorem}
 \begin{proof}
 All congruences in this proof are in the space $\br{\latticeL{k}}$ modulo the image of the subspace $\IZind \oplus_{j < r - i}\Fq X^{r - j}Y^j$ under $\IZind \SymF{k - 2} \twoheadrightarrow \br{\latticeL{k}}$.

\subsection{Reduction mod $p$ of $\latticeL{k}$}
 \label{Section containing the proof of the main theorem}
 In this section, we summarize all the results proved in \cite{CG23} (such as Theorem~\ref{Final theorem for leq} above)
 and mention how they are used to prove Theorem \ref{Main theorem in the second part of my thesis}.
 Recall that $$\nu = v_p(\cL - H_{-} - H_{+}).$$
\begin{theorem}{\cite[Theorem 12.1]{CG23}}\label{Main final theorem in the second part of my thesis}
 For $3 \leq k \leq p + 1$ and $p \geq 5$, the semi-simplification of the reduction $\br{V}_{k,\sL}$ of
 the semi-stable representation $V_{k,\sL}$ of $G_{\Qp}$ of Hodge-Tate weights $(0,k-1)$ and $\sL$-invariant $\sL$
 satisfies:
 \[
 \br{V}_{k, \cL} \sim
 \begin{cases}
 \ind (\omega_2^{r+1 + (i-1)(p-1)}), & \text{ if $(i-1) - r/2 < \nu < i -r/2$} \\
 \mu_{\lambda_i}\omega^{r+1-i} \oplus \mu_{\lambda_i^{-1}}\omega^{i}, & \text{ if $\nu = i -r/2$},
 \end{cases}
 \]
 where $1 \leq i \leq \dfrac{r+1}{2}$ if $r$ is odd and $1 \leq i \leq \dfrac{r+2}{2}$ if $r$ is even. The constants $\lambda_i$ are determined by
 \begin{eqnarray*}
 \lambda_i & = & \br{(-1)^i \> i {r+1-i \choose i}p^{r/2-i}(\cL - H_{-} - H_{+})}, \quad \text{ if } 1 \leq i < \dfrac{r + 1}{2} \\
 \lambda_{i} + \lambda_i^{-1} & = & \br{(-1)^i \> i{r + 1 - i \choose i}p^{r/2 - i}(\cL - H_{-} - H_{+})}, \quad \text{ if } i = \dfrac{r + 1}{2} \text{ and } r \text{ is odd}.
 \end{eqnarray*}
 We follow the conventions stated in the Introduction.
\end{theorem}
\begin{proof}
 We collect the necessary results proved in \cite{CG23} here.
 We first state the common results for odd and even weights (the fourth of which was
 sketched in Theorem \ref{Final theorem for leq}):
 \begin{enumerate}
 \item For $i = 1, 2, \ldots, \lceil r/2 \rceil - 1$ if $\nu > i - r/2$, then $F_{2i - 2, \> 2i - 1} = 0$.
 \item For $i = 1, 2, \ldots, \lceil r/2 \rceil - 1$ if $\nu = i - r/2$, then $\pi([2i - 2 - r], \lambda_i^{-1}, \omega^{r - i + 1}) \twoheadrightarrow F_{2i - 2, \> 2i - 1}$.
 \item For $i = 1, 2, \ldots, \lceil r/2 \rceil - 1$ if $\nu < i - r/2$, then $F_{2i, \> 2i + 1} = 0$.
 \item For $i = 1, 2, \ldots, \lceil r/2 \rceil - 1$ if $\nu = i - r/2$, then $\pi(r - 2i, \lambda_i, \omega^{i}) \twoheadrightarrow F_{2i, \> 2i + 1}$.
 \end{enumerate}
 Next, we state the extra results for odd weights around the point $\nu = \frac{1}{2}$.
 \begin{enumerate}
 \item[5.] If $\nu \geq 0.5$, then $\pi(p - 2, \lambda_{\frac{r + 1}{2}}, \omega^{\frac{r + 1}{2}}) \oplus \pi(p - 2, \lambda_{\frac{r + 1}{2}}^{-1}, \omega^{\frac{r + 1}{2}}) \twoheadrightarrow F_{r - 1, \> r}$.
 \item[6.] If $-0.5 < \nu < 0.5$, then
 $\dfrac{\IZind a^{\frac{r - 1}{2}}d^{\frac{r + 1}{2}}}{\im T_{-1, 0}} \twoheadrightarrow F_{r-1, \> r}$.

\noindent We remark that we have adopted
  the following conventions in the statement of the theorem:
   \begin{itemize}
    \item The first interval $- r/2 < \nu < 1 - r/2$ is interpreted as $\nu < 1 - r/2$.
    \item If $r$ is odd, then the last case $\nu = 1/2$ should be interpreted as $\nu \geq 1/2$. If $r$ is even,
          then the interval $0 < \nu < 1$ should be interpreted as $\nu > 0$ and we drop the case $\nu = 1$.
    \end{itemize}
In any case, the theorem says that the reduction $\overline{V}_{k,\mathcal{L}}$ varies through an alternating sequence of
irreducible and reducible mod $p$
representations as $\nu$ varies through finitely many marked points.

\subsection{Idea of proof of Theorem~\ref{Main theorem in the second part of my thesis}}
A picture is worth a thousand words, and so we draw one to explain the proof.
Let $B_{k,\mathcal{L}} = \tilde{B}(k,\mathcal{L})$.
The following diagram commutes:

 \[
\begin{tikzcd}
  V_{k,\mathcal{L}} \arrow[rrr, mapsto, "p-\text{adic LLC}"]  \arrow[dd, mapsto] & & & B_{k,\mathcal{L}} \arrow[dd, mapsto] \\
   & &\\
  \overline{V}_{k,\mathcal{L}} \arrow[rrr, mapsto, "\text{Iwahori mod $p$ LLC}"]  &  & & \overline{B}_{k,\mathcal{L}}
\end{tikzcd}
\]
where the vertical maps are (semi-simplifications of) reductions of lattices in the corresponding spaces in the
top row.
One is trying to compute the left vertical map. But one computes instead the  right vertical
map since the bottom map is injective.

We now give a broad outline of the remaining text in terms of this picture.
The paper is broken into four further sections.
The bottom map is explained in $\S 2$. The top right corner is explained in $\S 4$ based on
the foundational material described in $\S 3$. The computation of the right vertical map is then
explained in $\S 5$.

\subsection{Notation}
\begin{itemize}
        \item $p \geq 5$ is a prime.
        \item $E$ is a finite extension of $\mathbb{Q}_p$ containing $\sqrt{p}$ and $\mathcal{L}$.
              $\co_E$ is the ring of integers in $E$ with a uniformizer $\pi = \pi_E$ and residue field
$\mathbb{F}_q$. Note $\sqrt{p} \equiv 0 \mod \pi$.
        \item $k$ denotes the weight of a semi-stable
representation and $r = k - 2$.
        \item $v_-$, $v_+$ are the largest, smallest integers,
respectively, such that $v_- < r/2 < v_+$ for $r \geq 1$.
        \item For $n \geq 1$, $H_n = \sum\limits_{i = 1}^{n}\frac{1}{i}$
and $H_0 = 0, H_{\pm} = H_{v_{\pm}}$.
        \item $v_p$ is the $p$-adic valuation normalized such that $v_p(p)
= 1$.
        \item $\nu = v_p(\mathcal{L} - H_{-} - H_{+})$ is the valuation
of $\mathcal{L}$ shifted by the partial
harmonic sums $H_{-}$ and $H_{+}$.
        \item $I_{\mathbb{Q}_p}$ is the inertia subgroup of $\mathrm{Gal}(\brqp/\mathbb{Q}_p)$.
        \item $\omega$ is the fundamental character of $I_{\mathbb{Q}_p}$ of level
$1$;
        it has a canonical extension to $\mathrm{Gal}(\br{{\mathbb
Q}}_p/\mathbb{Q}_p)$.
        \item $\omega_2$ is the fundamental character of $I_{\mathbb{Q}_p}$ of
level $2$; for an integer $c$ with $p
+ 1 \nmid c$,
        choose an extension of $\omega_2^c$ to
$\mathrm{Gal}(\brqp/\bq_{p^2})$ so that the irreducible representation
        $\mathrm{ind}(\omega_2^c)$ obtained
        by inducing this extension from $\mathrm{Gal}(\brqp/\bq_{p^2})$ to
$\mathrm{Gal}(\brqp/\mathbb{Q}_p)$ has determinant $\omega^c$.
        \item $G$ is the group $\mathrm{GL}_2(\mathbb{Q}_p)$.
        \item $K$ is the maximal compact subgroup $\mathrm{GL}_2(\mathbb{Z}_p)$ of $G$.
        \item $I$ is the Iwahori subgroup of $G$ consisting of matrices in $K$
that are upper triangular $\!\!\!\!\mod p$.
        \item $B$ is the Borel subgroup of $G$ consisting of upper
triangular matrices.
        \item $\alpha = \begin{pmatrix}1 & 0 \\ 0 & p\end{pmatrix}$,
$\beta = \begin{pmatrix}0 & 1 \\ p & 0\end{pmatrix}$ and $w =
\begin{pmatrix}0 & 1 \\ 1 & 0\end{pmatrix}$. Note that $\beta =
\alpha w$.
        \item $I_n = \{[a_0] + [a_1]p + \cdots + [a_{n - 1}]p^{n - 1}
\> \vert \> a_i \in \mathbb{F}_p\}$ for $n \geq 1$, where $[\quad]$ denotes Teichm\"uller representative. $I_0 = \{0\}$.
        \item $V_{r} = \mathrm{Sym}^{r}\Fq^2$ and         $\SymE{k - 2} := \vert \det \vert^{\frac{k - 2}{2}} \otimes
\mathrm{Sym}^{k - 2}E^2$ for $k \geq 2$.
        \item $d^r$ for an integer $r$ denotes the character $IZ \to
\mathbb{F}_p^*$ which sends $\begin{pmatrix}a & b \\ c & d\end{pmatrix} \in
I$ to $d^r \!\!\! \mod p$ and which is trivial on the scalar
matrix $p$.
        \item For a representation $(\rho, V)$ of $IZ$ over $E$ or $\mathbb{F}_q$,
let $\mathrm{ind}_{IZ}^G\> \rho$ be the vector space of functions $f : G \to V$
that are compactly supported modulo $IZ$ such that $f(hg) =
\rho(h)
        \cdot f(g)$, for all $h \in IZ$ and $g \in G$. The vector space
$\mathrm{ind}_{IZ}^G\> \rho$ has a $G$ action:
        $g \cdot f(g') = f(g' g)$, for all $g, g' \in G$ and $f \in \mathrm{ind}_{IZ}^G\>
\rho$. For $g \in G$ and $v \in V$, define the function $\llbracket g, v \rrbracket
\in \mathrm{ind}_{IZ}^G\> \rho$ by
    \[
        \llbracket g, v\rrbracket(g') =
        \begin{cases}
            \rho(g'g) \cdot v, & \text{ if }g'g \in IZ \\
            0, & \text{ otherwise}.
        \end{cases}
    \]
        \item Let $(\mathrm{ind}_B^G \> E)^{\mathrm{smooth}}$ be the $E$-vector space of locally
constant functions from $G$ to $E$, with the action of $G$ given
by $g \cdot f(g') = f(g'g)$ for any $g, g' \in G$ and $f \in
(\mathrm{ind}_B^G \> E)^{\mathrm{smooth}}$.
        \item Let $\mathrm{St}$ be the Steinberg representation of $G$ over $E$,
i.e., $\mathrm{St}$ is the vector space of all locally constant functions
$H : \mathbb{P}^1(\bQ_p) \to E$ modulo constant functions with the action
of $G$ given by $\left(\begin{pmatrix} a & b \\ c & d
\end{pmatrix}\cdot H\right)(z) = H\left(\dfrac{az + c}{bz +
d}\right)$.
        \item $[a] \in \{0, \ldots, p - 2\}$ denotes the class of $a \!\!
\mod p - 1$.
        \item $\delta_{a, b} = 1$ if $a = b$ and is $0$ otherwise.
\end{itemize}

To prove Theorem~\ref{Main theorem in the second part of my thesis}, the text explains it via a commutative diagram
\[
\begin{tikzcd}
  V_{k,\mathcal{L}} \arrow[rrr, mapsto, "p-\text{adic LLC}"]  \arrow[dd, mapsto] & & & B_{k,\mathcal{L}} \arrow[dd, mapsto] \\
   & &\\
  \overline{V}_{k,\mathcal{L}} \arrow[rrr, mapsto, "\text{Iwahori mod $p$ LLC}"]  &  & & \overline{B}_{k,\mathcal{L}}
\end{tikzcd}
\]
where “the vertical maps are (semi-simplifications of) reductions of lattices in the corresponding spaces in the top row.” The goal is “to compute the left vertical map,” i.e. the reduction of $V_{k,\mathcal{L}}$, but the strategy is to “compute instead the right vertical map since the bottom map is injective.” Concretely, the outline given is organized by sections: “The bottom map is explained in \S 2. The top right corner is explained in \S 4 based on the foundational material described in \S 3. The computation of the right vertical map is then explained in \S 5.”

To prove the main theorem, the text explains it via a commutative diagram
\[
\begin{tikzcd}
  V_{k,\mathcal{L}} \arrow[rrr, mapsto, "p-\text{adic LLC}"]  \arrow[dd, mapsto] & & & B_{k,\mathcal{L}} \arrow[dd, mapsto] \\
   & &\\
  \overline{V}_{k,\mathcal{L}} \arrow[rrr, mapsto, "\text{Iwahori mod $p$ LLC}"]  &  & & \overline{B}_{k,\mathcal{L}}
\end{tikzcd}
\]
where “the vertical maps are (semi-simplifications of) reductions of lattices in the corresponding spaces in the top row.” The goal is “to compute the left vertical map,” i.e. the reduction of $V_{k,\mathcal{L}}$, but the strategy is to “compute instead the right vertical map since the bottom map is injective.” Concretely, the outline is organized as follows: first the bottom map is explained; next the top right corner is explained based on earlier foundational material; finally, the computation of the right vertical map is carried out.

Question: Let $p \ge 5$ be a prime, let $k$ be an integer with $3 \le k \le p+1$, and set $r=k-2$ (so $1 \le r \le p-1$). Let $V_{k,\mathcal L}$ be the two-dimensional semi-stable representation of $G_{\mathbb Q_p}=\operatorname{Gal}(\overline{\mathbb Q}_p/\mathbb Q_p)$ with Hodge--Tate weights $(0,k-1)$ and $\mathcal L$-invariant $\mathcal L$. Define $v_-$ and $v_+$ to be the largest and smallest integers, respectively, such that $v_-<r/2<v_+$; for $n\ge1$ let $H_n=\sum_{j=1}^n \frac1j$, set $H_0=0$, and put $H_-=H_{v_-}$ and $H_+=H_{v_+}$. Let $\nu=v_p(\mathcal L-H_- -H_+)$, where $v_p(p)=1$. Here $\omega$ denotes the mod $p$ cyclotomic character, $\omega_2$ a fundamental character of niveau $2$, $\mu_\lambda$ the unramified character sending Frobenius to $\lambda$, $\operatorname{ind}(\omega_2^m)$ the corresponding irreducible induced two-dimensional mod $p$ representation, and $\overline{x}$ means reduction mod $p$. Which statement holds for the semisimplified mod $p$ reduction of every such $V_{k,\mathcal L}$?

The semisimplified reduction satisfies
\[
\overline{V}_{k,\mathcal L}\sim
\begin{cases}
\operatorname{ind}(\omega_2^{\,r+1+(i-1)(p-1)}), & \text{if } (i-1)-r/2<\nu<i-r/2,\\[4pt]
\mu_{\lambda_i}\omega^{r+1-i}\oplus \mu_{\lambda_i^{-1}}\omega^{i}, & \text{if } \nu=i-r/2,
\end{cases}
\]
where
\[
1\le i\le \frac{r+1}{2}\ \text{if $r$ is odd},\qquad 1\le i\le \frac{r+2}{2}\ \text{if $r$ is even},
\]
and the mod $p$ constants $\lambda_i$ are given by
\[
\lambda_i=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}},\qquad \text{if }1\le i<\frac{r+1}{2},
\]
while, if $r$ is odd and $i=\frac{r+1}{2}$,
\[
\lambda_i+\lambda_i^{-1}=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}}.
\]

Choices:
B.
The semisimplified reduction satisfies
\[
\overline{V}_{k,\mathcal L}\sim
\begin{cases}
\operatorname{ind}(\omega_2^{\,r+1+i(p-1)}), & \text{if } (i-1)-r/2<\nu<i-r/2,\\[4pt]
\mu_{\lambda_i}\omega^{r+1-i}\oplus \mu_{\lambda_i^{-1}}\omega^{i}, & \text{if } \nu=i-r/2,
\end{cases}
\]
where
\[
1\le i\le \frac{r+1}{2}\ \text{if $r$ is odd},\qquad 1\le i\le \frac{r+2}{2}\ \text{if $r$ is even},
\]
and the mod $p$ constants $\lambda_i$ are given by
\[
\lambda_i=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}},\qquad \text{if }1\le i<\frac{r+1}{2},
\]
while, if $r$ is odd and $i=\frac{r+1}{2}$,
\[
\lambda_i+\lambda_i^{-1}=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}}.
\]
C.
Whenever \(\nu=i-r/2\) for some index in the range
\[
1\le i\le \frac{r+1}{2}\ \text{if $r$ is odd},\qquad 1\le i\le \frac{r+2}{2}\ \text{if $r$ is even},
\]
one has a reducible semisimplified reduction of the form
\[
\overline{V}_{k,\mathcal L}\sim \mu_{\lambda_i}\omega^{r+1-i}\oplus \mu_{\lambda_i^{-1}}\omega^{i},
\]
with the endpoint case for odd \(r\) determined by
\[
\lambda_i+\lambda_i^{-1}=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}}.
\]
D.
The semisimplified reduction satisfies
\[
\overline{V}_{k,\mathcal L}\sim
\begin{cases}
\operatorname{ind}(\omega_2^{\,r+1+(i-1)(p-1)}), & \text{if } (i-1)-r/2\le \nu\le i-r/2,\\[4pt]
\mu_{\lambda_i}\omega^{r+1-i}\oplus \mu_{\lambda_i^{-1}}\omega^{i}, & \text{if } \nu=i-r/2,
\end{cases}
\]
where
\[
1\le i\le \frac{r+1}{2}\ \text{if $r$ is odd},\qquad 1\le i\le \frac{r+2}{2}\ \text{if $r$ is even},
\]
and the mod $p$ constants $\lambda_i$ are given by
\[
\lambda_i=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}},\qquad \text{if }1\le i<\frac{r+1}{2},
\]
while, if $r$ is odd and $i=\frac{r+1}{2}$,
\[
\lambda_i+\lambda_i^{-1}=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}}.
\]
E.
The semisimplified reduction satisfies
\[
\overline{V}_{k,\mathcal L}\sim
\begin{cases}
\operatorname{ind}(\omega_2^{\,r+1+(i-1)(p-1)}), & \text{if } (i-1)-r/2<\nu<i-r/2,\\[4pt]
\mu_{\lambda_i}\omega^{r+1-i}\oplus \mu_{\lambda_i^{-1}}\omega^{i}, & \text{if } \nu=i-r/2,
\end{cases}
\]
where
\[
1\le i\le \frac{r+1}{2}\ \text{if $r$ is odd},\qquad 1\le i\le \frac{r}{2}\ \text{if $r$ is even},
\]
and the mod $p$ constants $\lambda_i$ are given by
\[
\lambda_i=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}},\qquad \text{if }1\le i<\frac{r+1}{2},
\]
while, if $r$ is odd and $i=\frac{r+1}{2}$,
\[
\lambda_i+\lambda_i^{-1}=\overline{(-1)^i\, i\binom{r+1-i}{i}\frac{\mathcal L-H_- -H_+}{p^{\,i-r/2}}}.
\]

dropped the open-interval irreducible case and retained only the boundary reducible case

strict versus non-strict boundary conditions in the \(\nu\)-intervals