%% if you are submitting an initial manuscript then you should have submission as an option here
%% if you are submitting a revised manuscript then you should have revision as an option here
%% otherwise options taken by the article class will be accepted
\documentclass[submission]{FPSAC2019}
%% but DO NOT pass any options (or change anything else anywhere) which alters page size / layout / font size etc

\articlenumber{64}
\addbibresource{64.bib}

%% note that the class file already loads {amsmath, amsthm, amssymb}

%\newtheorem{thm}{Theorem}
%\newtheorem{lem}{Lemma}

\usepackage{lipsum}



%%% Our own packages and definitions:

\usepackage{amsfonts,mathtools}
\usepackage{graphicx,xcolor}
%\usepackage{hyperref}
%\hypersetup{
%    colorlinks=true,
%    linkcolor=blue,
%    citecolor=darkgray
%}

\usepackage[T1]{fontenc}
\usepackage[mathscr]{eucal}
%\usepackage{fullpage}
\usepackage{thmtools}
\usepackage{enumerate}
\usepackage{color}
\usepackage{mathrsfs}
\usepackage{subcaption}
\usepackage{longtable} 
\usepackage{verbatim}
%\usepackage{showlabels}

\setlength{\parskip}{1em}

\theoremstyle{plain}
\newtheorem{thm}{Theorem} 
\newtheorem*{untheorem}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{pr}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{defn}[thm]{Definition}
\newtheorem{defns}[thm]{Definitions}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{example}[thm]{Example}
\newtheorem{question}{Question}
\newtheorem*{unquestion}{Question}
\theoremstyle{remark}
\newtheorem*{unremark}{Remark}
\newtheorem{remark}{Remark}
\newtheorem*{unremarks}{Remarks}

\definecolor{darkgreen}{rgb}{0.0, 0.8, 0.08}

\Crefname{thm}{Theorem}{Theorems}

\allowdisplaybreaks

\def\E{\mathbb{E}}
\def\J{\mathcal{J}}
\def\P{\mathbb{P}}
\def\Z{\mathbb{Z}}
\def\ee{\varepsilon}
\def\la{\lambda}
\def\xx{{\bf x}}
\def\yy{{\bf y}}
\def\XX{{\bf X}}
\def\Mt{\tilde{M}}
\def\mN{\mathcal{N}}
\def\Var{{\rm Var} \,}
\def\Cov{{\rm Cov} \,}
\def\Cox{\hfill \Box}
\def\disp{\displaystyle}
\def\one{{\bf 1}}
\def\dilog{{\rm dilog}\,}
\def\region{{\mathcal R}}
\def\regiona{{\mathcal R}_1}
\def\regionb{{\mathcal R}_2}
\def\regionc{{\mathcal R}_3}
\def\phihat{{\ov{\phi}}}
\def\Sbar{{\overline{S}}}
\def\Tbar{{\overline{T}}}
\def\Lbar{{\overline{L}}}

\newcommand\ov[1]{\widehat{#1}}
%%%%

%% define your title in the usual way
\title[Counting partitions inside a rectangle]{Counting partitions inside a rectangle}

%% define your authors in the usual way
%% use \addressmark{1}, \addressmark{2} etc for the institutions, and use \thanks{} for contact details
%\author{Stephen Melczer, Greta Panova, and Robin Pemantle}

\author{Stephen Melczer\thanks{\href{mailto:smelczer@math.upenn.edu}{smelczer@math.upenn.edu}. Stephen Melczer was partially supported by an NSERC postdoctoral fellowship and NSF grant DMS-1612674}\addressmark{1}, Greta Panova\thanks{\href{mailto:gpanova@usc.edu}{gpanova@usc.edu}. Greta Panova was partially supported by NSF grant DMS-1500834.}\addressmark{2}, \and Robin Pemantle\thanks{\href{mailto:pemantle@math.upenn.edu}{pemantle@math.upenn.edu}. Robin Pemantle was partially supported by NSF grant DMS-16122674.}\addressmark{1}}

%% then use \addressmark to match authors to institutions here
\address{\addressmark{1}Department of Mathematics, University of Pennsylvania, Philadelphia, PA, USA.\\ \addressmark{2}Department of Mathematics, University of Southern California, Los Angeles, CA, USA.}


%% put the date of submission here
\received{\today}

%% leave this blank until submitting a revised version
%\revised{}

%% put your English abstract here, or comment this out if you don't have one yet
%% please don't use custom commands in your abstract / resume, as these will be displayed online
%% likewise for citations -- please don't use \cite, and instead write out your citation as something like (author year)
\abstract{We consider the number of partitions of $n$ whose Young diagrams fit inside an $m \times \ell$ rectangle; equivalently, we study the coefficients of the $q$-binomial coefficient $\binom{m+\ell}{m}_q$.  We obtain sharp asymptotics throughout the regime $\ell = \Theta (m)$ and $n = \Theta (m^2)$ where a limit shape exists. Previously, sharp asymptotics were derived by Tak{\'a}cs only in the regime where $|n - \ell m /2| = O(\sqrt{\ell m (\ell + m)})$ using a local central limit theorem.  Our approach is to solve a related large deviation problem: we describe the tilted measure that produces configurations whose bounding rectangle has the given aspect ratio and is filled to the given proportion. Our results are sufficiently sharp to yield the first asymptotic estimates on the consecutive differences of these numbers when $n$ is increased by one and $m, \ell$ remain the same, hence quantifying and significantly refining Sylvester's unimodality theorem.}

\resumetitle{R\'esum\'e}
%% put your French abstract here, or comment this out if you don't have one
\resume{Nous trouvons asymptotique pour le nombre de partitions de $n$ dont les tableaux de Young s'inscrivent dans un rectangle $m \times \ell$; {\'e}galement compt{\'e} par le coefficient $q$-binomial $\binom{m+\ell}{m}_q$.  Notre technique consiste {\'a} utiliser un th{\'e}or{\'e}me central limite local, et nous affinions le th{\'e}or{\'e}me de l'unimodalit{\'e} de Sylvester en donnant des estimations asymptotiques {\`a} des diff{\'e}rences cons{\'e}cutives.}

%% put your keywords here, or comment this out if you don't have them yet
\keywords{ partitions, q-binomial coefficients, 
large deviations, local CLT, unimodality}

%% you can include your bibliography however you want, but using an external .bib file is STRONGLY RECOMMENDED and will make the editor's life much easier
%% regardless of how you do it, please use numerical citations, ie. [xx, yy] in the text

%% this sample uses biblatex, which (among other things) takes care of URLs in a more flexible way than bibtex
%% but you can use bibtex if you want
%\usepackage[backend=bibtex]{biblatex}
%\addbibresource{bibl.bib}
%% note the \printbibliography command at the end of the file which goes with these biblatex commands

\begin{document}

\maketitle
%% note that you DO NOT have to put your abstract here -- it is generated by \maketitle and the \abstract and \resume commands above

\section{Introduction}

A partition $\la$ of $n$ is a sequence of weakly decreasing nonnegative integers $\la=(\la_1\geq \la_2\geq \ldots)$ whose sum $|\la|=\la_1+\la_2+\cdots$ is equal to $n$. They are at the heart of much of Enumerative and Algebraic Combinatorics, and connect with Representation Theory (specifically $S_n$ and $GL_n$) and the theory of special functions. Their study bloomed with the remarkable discoveries of Ramanujan and started the field of partition theory~\cite{Andrews1976}.  

The number of partitions of $n$, typically denoted by $p(n)$ but here unconventionally
%\footnote{We use the notation $N_n$ to distinguish scenarios of probability with those of enumeration, both of which occur in the present manuscript.} 
by $N_n$ to avoid confusion with probabilities, was implicitly determined by Euler via the generating function 
\[ \sum_{n=0}^{\infty} N_n q^n = \prod_{i=1}^\infty \frac{1}{1-q^i} \, . \]
There is no exact explicit formula for the numbers $N_n$.  The asymptotic formula
\begin{align}
\label{eq:hardy-ram}
N_n:=\#\{ \lambda \vdash n \} \sim \frac{1}{4n \sqrt{3}} \exp\left( \pi \sqrt{\frac{2n}{3}} \right)\,,
\end{align}
of Hardy and Ramanujan~\cite{HardyRamanujan1918}, is considered to be the beginning of the use of complex variable methods for asymptotic enumeration of partitions (the so-called circle method).

Here we obtain asymptotic formulas similar to~\eqref{eq:hardy-ram} for the number of partitions $\la$ of $n$ whose Young diagram fits inside an $m \times \ell$ rectangle, denoted 
\[ N_n(\ell,m):=\# \{ \la \vdash n: \la_1 \, \leq \, \ell, \quad \text{length}(\la) \, \leq \, m\}\, .\] 
The generating function of $N_n(\ell,m)$ is the, also ubiquitous, $q$-binomial coefficient 
\[
\binom{\ell +m}{m}_q = \frac{ \prod_{i=1}^{\ell+m} (1-q^i)} {\prod_{i=1}^\ell (1-q^i) \prod_{i=1}^m (1-q^i)} = \sum_{n=0}^{\ell m} N_n(\ell,m)q^n \, . 
\]

\vspace{-0.2in}

Notably, the numbers $N_n(\ell,m)$ form a symmetric unimodal sequence 
\[ 1 = N_0(\ell,m)\leq N_1(\ell,m) \leq \cdots \leq N_{\lfloor m\ell/2\rfloor}(\ell,m) \geq \cdots \geq N_{m\ell}(\ell,m)=1, \]
a fact conjectured by Cayley in 1856 and proven by Sylvester in 1878 via the representation theory of $sl_2$~\cite{Sylvester1878} and followed by other algebraic  and combinatorial proofs (see the next section and the journal version~\cite{MelczerPanovaPemantle2018} for full bibliography and history of the problem). Over the last one hundred forty years, no previous asymptotic methods have been able to prove this unimodality. As a consequence of our refined asymptotics of $N_n(\ell,m)$ we derive not just the unimodality, but the asymptotics of the difference $N_{n}(\ell,m)-N_{n-1}(\ell,m)$. 

\section{The asymptotics: main results}

Our main result is an asymptotic formula for $N_n (\ell,m)$ in the regime $\ell/m \to A$ and $n/m^2 \to B$ for any fixed $A > B > 0$, i.e., when  the portion of the $m \times \ell$ rectangle that is filled approaches a value that is neither zero nor 1.  Then there is a limit shape, whose existence also follows from our methods (see \cref{sec:shape}). By ``asymptotic formula'' we mean a formula giving $N_n(\ell,m)$ up to a factor of $1 + o(1)$; such asymptotic equivalence is denoted with the symbol $\sim$.  By the symmetry $N_{n}(\ell,m) = N_{m\ell -n}(\ell,m)$ it suffices to consider only the case $A \geq 2B > 0$.

Given $A \geq 2B > 0$ we define three quantities $c, d$ and $\Delta$. Consider the equations \vspace{-0.1in}
%
\begin{align} 
A &= \int_0^1 \frac{1}{1-e^{-c-td}}dt - 1 = \frac{1}{d}\log\left( \frac{e^{c+d}-1}{e^c-1}\right) -1  \, , 
   \label{eq:integrals A} \\
B &= \int_0^1 \frac{t}{1-e^{-c-td}}dt - \frac{1}{2} = \frac{d\log(1\!-\!e^{-c-d})+\dilog(1\!-\!e^{-c})-\dilog(1\!-\!e^{-c-d})}{d^2}
   \label{eq:integrals B} \, ,
\end{align}
%
using the dilogarithm function 
$\displaystyle  \dilog(x) = \int_1^x \frac{\log t}{1-t}dt = \sum_{k=1}^{\infty} \frac{(1-x)^k}{k^2} $
for $|x-1|<1$. The quantities $c,d$ are the unique solution to the system of Equations~\eqref{eq:integrals A},~\eqref{eq:integrals B}:
\begin{lem}
\label{lem:uniquecd}
For any $A>0$ and $B \in (0,A/2)$ there exist unique $c,d>0$ satisfying Equations~\eqref{eq:integrals A} and~\eqref{eq:integrals B}. Moreover, for a fixed $A$, when $B$ decreases from $A/2$ to $0$ then $d$ increases strictly from $0$ to $\infty$ and $c$ decreases strictly from $\log\left(\frac{A+1}{A}\right)$ to $1$. When $B>0$ is fixed and $A$ goes to $\infty$ then $c$ goes to $0$ and $d$ goes to the root of 
$\displaystyle d^2 =B \left( d\log (1-e^{-d}) -\dilog(1-e^{-d}) \right).$
\end{lem}
\vspace{-0.2in}

The quantity $\Delta$, which is seen to be strictly positive, is defined by \vspace{-0.1in}
\begin{equation} 
\label{eq:Delta}
\Delta = 
\frac{2Be^c(e^d-1) + 2A(e^c-1)-1}{d^2(e^{d+c}-1)(e^c-1)} - \frac{A^2}{d^2}\, .
%\frac{2Be^c(e^d-1)-A^2(e^c-1)(e^{d+c}-1)  + 2A(e^c-1)-1}{d^2(e^{d+c}-1)(e^c-1)} \, .
\end{equation}


\begin{thm} \label{th:main}
Given $m, \ell$ and $n$, let $A := \ell/m$ and $B := n/m^2$ and define $c, d$ and $\Delta$ as above.  Let $K$ be any compact subset of $\{ (x,y) : x \geq 2y > 0 \}$.  As $m \to \infty$ with $\ell$ and $n$ varying so that $(A,B)$ remains in $K$, \vspace{-0.2in}
\begin{equation} \label{eq:N}
N_n(\ell,m) \sim \frac{e^{m \left[cA + 2dB - \log(1-e^{-c-d}) \right ]}}{2\pi m^2 \sqrt{\Delta \, (1-e^{-c})\, (1-e^{-c-d})}} \,,
\end{equation}
where $c$ and $d$ vary in a Lipschitz manner with $(A,B) \in K$.
\end{thm}

\begin{unremark}
In the special case $B = A/2$, the parameters take on the elementary values 

\vspace{-0.2in}
\[ d = 0 \, , \qquad c = \log \left(\frac{A+1}{A}\right) \, , \qquad \mbox{ and } \qquad \Delta = \frac{A^2 (A+1)^2}{12} \, . \]
\vspace{-0.1in}
In this case the exponent and leading constant are the limits as $d \to 0$, giving
\[ N_{Am^2/2} (Am,m) \sim \frac{\sqrt{3}}{A\pi m^2} \left [ \frac{(A+1)^{A+1}}{A^A} \right ]^m \, . \] \vspace{-0.2in}

In the special case when $A \to \infty$, so that the restriction on the size of the parts is removed, one has $c=0$ and $d$ is a solution to an  explicit equation given in \cref{lem:uniquecd}. In this case the result matches the 
one obtained first by Szekeres using complex analysis,
then by Canfield using a recursion, and most recently
by Romik using probabilistic methods based on 
Fristedt's ensemble.  These works and others
are explained in~\cite{MelczerPanovaPemantle2018}.
%In this case the result matches the one obtained by Romik~\cite{Romik} via similar methods.
\end{unremark}

\begin{figure}[!ht]
\centering
\includegraphics[width=0.3\linewidth]{ExpGrowth.pdf}
\caption{Exponential growth of $N_{Bm^2}(m,m)$ predicted by Tak{\'a}cs' formula (blue, above) compared to the actual exponential growth given by \cref{th:main} (red, below).}
\label{fig:expgrow} \vspace{-0.4in}
\end{figure}


Tak{\'a}cs~\cite{Takacs1986} observed that for typical partitions of size $m\ell/2$, the gaps between part sizes behave like independent geometric random variables with mean $A$.  Counting the partitions is therefore equivalent  to computing the probability that these $m+1$ geometric random variables will sum precisely to $\ell$ and that the area of the ensuing Young diagram will be precisely $n$. A local central limit theorem (LCLT) immediately yields a sharp asymptotic estimate. 
%
However, when $|B - A/2| \gg m^{-1/2} \log m$ the error in this asymptotic is much bigger than the main term of the Gaussian estimate provided by the LCLT. We refer the reader to the full version~\cite{MelczerPanovaPemantle2018} for the history of this problem (from Erd\"os and Lehner, through Szekeres, Mann and Whitney, Tak\'acs, Romik, and Richmond) and the limitations of previous methods (most notably the circle method and CLT). 

We circumvent this limitation on the use of the LCLT using a technique from the theory of large deviations.  Specifically, we employ a so-called tilted measure for which maximum likelihood occurs at any desired pair $(A,B)$.  The tilted measure replaces the IID geometric random variables giving us the part sizes of $\lambda$ by still independent but no longer identically distributed geometric random variables, where the parameter $1 - p_i$ for the $i$th variable varies in a log-linear manner. The restrictions given by $A$ and $B$ are linear conditions on the part sizes, and the choice of parameters $p_i$ ensures that the maximum likely outcome occurs at the given restrictions. The refined LCLT then gives precise asymptotics. 

\begin{unremark}
In~\cite{JiangWang}, the authors, independently and concurrently with our paper, used the generating function for $q$-binomial coefficients and a saddle point analysis to derive the asymptotics for $N_n(m,\ell)$ in the cases when $m,\ell \geq 4\sqrt{n}$, corresponding to $B \leq \min\{1,A^2\}/16$ in our notation. Those authors express their result using the root of a hypergeometric identity similar to~\eqref{eq:integrals B}, however their methods give weaker error bounds and consequently cannot answer questions of unimodality.
\end{unremark}

%\subsection*{Previous results on $N_n(m)$ and $N_n(\ell,m)$} 
%\label{sec:history}
%
%There are numerous previous results on $N_n(m)$, the number of partitions of $n$ with part sizes bounded by $m$. Erd{\"o}s and Lehner~\cite{ErdosLehner1941} showed $N_n(m) \sim \frac{n^{m-1}}{m!(m-1)!}$ for $m = o(n^{1/3})$ in 1941, which was generalized by Szekeres, and others, ultimately leading to asymptotics of $N_n(m)$ for all $m$ in 1953~\cite{Szekeres1953}.  Szekeres simplified his arguments a number of times, ultimately giving asymptotics using only a saddle-point analysis, without needing results on modular functions; his argument has been referred to as the Szekeres circle method. More recently, Romik~\cite{Romik} obtained asymptotics on $N_n(m)$ via a LCLT approach similar to ours, which coincides when $A=\infty$, $c=0$. 
%
%Mann and Whitney~\cite{MannWhitney1947} showed, through the study of an equivalent statistical problem, that the size of a uniform random partition in the $\ell \times m$ rectangle satisfies a normal distribution.  As previously noted, Tak{\'a}cs~\cite{Takacs1986} used a local central limit theorem to show that 
%\begin{equation} 
%\label{eq:takacs}
%N_n(\ell,m) \sim \binom{\ell+m}{\ell} \phi \left ( \frac{n-\ell m/2}{\sigma_{\ell,m}} \right ) \frac{1}{\sigma_{\ell,m}}
%\end{equation}
%when
%\[ |n-\ell m/2| < K\sigma_{\ell,m} =O\left(\sqrt{\ell m(\ell+m)}\right) \,, \]
%where $\sigma_{\ell,m} = \sqrt{lm(\ell+m+1)/12}$, $\phi(x) = e^{-x^2/2} / \sqrt{2\pi}$, and $K$ is a positive constant; see also~\cite{AlmkvistAndrews1991}. Figure~\ref{fig:expgrow} shows the predicted exponential growth of Tak{\'a}cs compared to the actual exponential growth of partitions outside the valid asymptotic region.
%
%\begin{figure}[!ht]
%\centering
%\includegraphics[width=0.4\linewidth]{ExpGrowth.pdf}
%\caption{Exponential growth of $N_{Bm^2}(m,m)$ predicted by Tak{\'a}cs' formula (blue, above) compared to the actual exponential growth given by Theorem~\ref{th:main} (red, below).}
%\label{fig:expgrow}
%\end{figure}
%
%The results of Erd{\"o}s and Lehner~\cite{ErdosLehner1941} imply that the expected maximal part (and thus also number of parts) in a partition of size $n$ is typically $f_n\log(f_n)$, where $f_n := \frac{\sqrt{6n}}{\pi}$. Near this expected maximum, $N_n(m)$ behaves like a doubly-exponential distribution in $m$~\cite{Szekeres1990}. When 
%\[ \frac{\sqrt{6n} \, \log n}{4\pi} < \ell,m < \frac{\sqrt{6}\, n^{3/4}}{\pi \log n}\]
%Szekeres~\cite[Theorem 1]{Szekeres1990} used saddle-point techniques to express $N_n(\ell,m)$ in terms of $N_n$, $\lambda := \frac{\pi \ell}{\sqrt{6n}}$ and $\mu := \frac{\pi m}{\sqrt{6n}}$. If, in fact, 
%\[\frac{\sqrt{6n}}{\pi}\left(\frac{1}{4} + \ee \right) \log n < \ell,m < \frac{\sqrt{6n} \, \log n}{\pi}\] 
%for some $\ee > 0$, then the distributions defined by $\ell$ and $m$ are independent and equal, and Szekeres' formula simplifies to
%\[ N_n(\ell,m) \sim N_n \, \exp\left[-(\lambda + \mu) - \sqrt{\frac{6n}{\pi}}\left(e^{-\lambda}+e^{-\mu}\right)\right]. \]
%The Szekeres circle method has more recently been applied to the study of partitions by Richmond~\cite{Richmond2018}. In~\cite{JiangWang}, the authors, independently and concurrently with our paper, used the generating function for $q$-binomial coefficients and a saddle point analysis to derive the asymptotics for $N_n(m,\ell)$ in the cases when $m,\ell \geq 4\sqrt{n}$, corresponding to $B \leq \min\{1,A^2\}/16$ in our notation. Those authors express their result using the root of a hypergeometric identity similar to~\eqref{eq:integrals B}, however their methods give weaker error bounds and consequently cannot answer questions of unimodality.

\subsection*{Unimodality}

Sylvester's proof~\cite{Sylvester1878} of unimodality of $N_n (\ell,m)$ in $n$, and most subsequent proofs (notably of Stanley via the hard Lefshetz theorem and later the linear algebra paradigm, refined by Proctor) are algebraic, viewing $N_n(\ell,m)$ as dimensions of certain vector spaces, or their differences as multiplicities of representations. While there are also purely combinatorial proofs of unimodality, notably O'Hara's and the more abstract one  of Pouzet and Rosenberg, they do not give the desired symmetric chain decomposition of the subposet of the partition lattice. These methods do not give ways of estimating the asymptotic size of the coefficients or their difference. It is now known that $N_n (\ell , m)$ is strictly unimodal (first shown by Pak and Panova, later also by Zanello and others), and the following lower bound on the consecutive difference was obtained in~\cite[Theorem 1.2]{PakPanova2017} using a connection between integer partitions and Kronecker coefficients $g$ of the symmetric group $S_{m\ell}$: \vspace{-0.2in}
\begin{equation} \label{eq:pak-panova}
g((m\ell-n,n), (m^\ell),(m^\ell)) = N_n(\ell,m)-N_{n-1}(\ell,m) \geq 0.004 \frac{2^{\sqrt{s}}}{s^{9/4}}, \vspace{-0.1in}
\end{equation}
where $n\leq\ell m/2$ and $s=\min\{2n,\ell^2,m^2\}$.  In particular, when $\ell=m$ we have $s=2n$.  

Any sharp asymptotics of the difference appears to be out of reach of these algebraic methods, however as a consequence of \cref{th:main} we obtain the following estimate.

\begin{thm} \label{th:difference}
Given $m, \ell$ and $n$, let $A := \ell/m$ and $B := n/m^2$ and define $d$ as above. Suppose $m, \ell$ and $n$ go to infinity so that $(A,B)$ remains in a compact subset of $\{ (x,y) : x \geq 2y > 0 \}$ and  \vspace{-0.1in}
\[ m^{-1} \, |n-lm/2| \rightarrow \infty . \]
Then for the consecutive difference of $N_n$ and via \eqref{eq:pak-panova} for the Kronecker coefficient of a two-row partition and two rectangles we have \vspace{-0.2in}
\[ g((m\ell-n-1,n+1),m^\ell,m^\ell)=  N_{n+1}(\ell,m) - N_n(\ell,m) \sim \frac{d}{m}N_n(\ell,m). \]
\end{thm}

\begin{unremark}
The condition $m^{-1} \, |n-lm/2| \rightarrow \infty$ is equivalent to $m \, \left|A-B/2\right| \rightarrow \infty$ and also to $d \notin O(m^{-1})$. It is automatically satisfied whenever $(A,B)$ is in a compact subset of $\{ (x,y) : x > 2y > 0 \}$. 
\end{unremark}

\section{The proofs via a discretized analogue to \cref{th:main}}
\label{sec:discrete}

%\subsection*{Large deviations heuristic}

We will explain our argument with
a probability model by which the proof of \cref{th:main}
is reduced to a local central limit theorem.  We start with the simple case when $B\approx A/2$ as in~\cite{Takacs1986}.  Let $\{ \lambda_j : 1 \leq j \leq m \}$
denote the parts, in decreasing size, of a partition of $n$ into 
at most $m$ parts of size at most $\ell$, padded with zeros at the end
if necessary.  Defining $\lambda_0 := \ell$ and $\lambda_{m+1} := 0$,
the \emph{gaps} $x_i := \lambda_i - \lambda_{i+1}$ satisfy the following
two identities (see \cref{fig:1}),
%
\begin{equation} \label{eq:diagram}
\sum_{i=0}^m x_i = \ell \, ; \qquad \sum_{i=0}^m i x_i = n \, .\vspace{-0.2in}
\end{equation}

\begin{figure}[!ht]
\centering
\includegraphics[width=3.5in]{diagram1.pdf} \vspace{-0.2in}
\caption{The total area $n$ of a partition is composed of rectangles of area $j x_j$}
\label{fig:1} \vspace{-0.1in}
\end{figure}


By the {\em reduced geometric distribution with parameter $p$} we mean the random variable $X$ with $\P (X=k) = p \cdot q^k$ where $q := 1-p$. In~\cite{Takacs1986}, Tak{\'a}cs sets $\{ X_j : 0 \leq j \leq m \}$ to be a collection of independent reduced geometric random variables with parameter $p = 1/2$.  This distribution has the crucial property that for any set of values $x_0 , \ldots , x_m$, the probability $\P(X_j = x_j: j=0, \ldots , m)$ depends only on the sum $\ell := \sum_{j=1}^m x_j$ and is equal to $p^{m+1} q^{\ell}$.  Let $P(\ell)$ denote the sum of $\P (\XX = \xx)$ over all $(m+1)$-vectors $\xx$ with coordinate sum $\ell$.  If $N(\ell)$ denotes the number of such vectors summing to $\ell$, we see immediately that $1 \geq P(\ell) = p^{m+1} q^\ell N(\ell)$, hence $N(\ell) \leq [p^{m+1} q^\ell]^{-1}$. This inequality is good because $P(\ell)$ is not that small: it is of order $m^{-1/2}$.  Now let $N(\ell,n)$ count those vectors satisfying both identities in~\eqref{eq:diagram} and $P(\ell , n)$ be the probability that the geometric variables lie in this set.  Tak{\'a}cs gave a sharp asymptotic estimate of $P(\ell,n) \sim c m^{-2}$ when $n = m^2/2 + O(m^{3/2})$, thereby showing that $N(\ell , n) \sim c m^{-2} [p^{m+1} q^\ell]^{-1}$.

Central limit theorems do not provide a sharp estimate when $|n - m^2/2| \gg m^{3/2}$.  However, because the constraints on the vectors counted by $N(\ell , n)$ are linear, the theory of large deviations~\cite{DemboZeitouni1998} implies that $P(\ell , n)$ is well estimated by ``tilting'' the independent laws of the $\{ X_j \}$ so that one is in the central limit regime of the tilted laws.  Having solved for the correct tilt, we may dispense with the large deviations theory and prove the estimates directly. Tilting preserves the reduced geometric family, altering only the parameters; it turns out that the correct tilt makes $q_j := 1 - p_j$ log-linear.

%\subsection*{Statement of discretized result}

With $c_m , d_m$ to be specified later, let 
\[q_j := e^{-c_m - j d_m/m} \, , \quad p_j := 1-q_j\, , \quad  L_m := \sum_{j=0}^m \log p_j.\]  
Let $\P_m$ be a probability law making the random variables $\{ X_j : 0 \leq j \leq m \}$ independent reduced geometrics with respective parameters $p_j$.  Define random variables $S_m$ and $T_m$ by \vspace{-0.2in}
\begin{equation} 
\label{eq:S and T}
S_m := \sum_{i=0}^m X_i \, ; \qquad T_m:=\sum_{i=1}^m i X_i \, , %\vspace{-0.1in}
\end{equation}
corresponding to the unique partition $\lambda$ satisfying $X_j = \lambda_j - \lambda_{j+1}$.
%
We first prove a result similar to \cref{th:main}, except that the parameters $c$ and $d$ that solve integral Equations~\eqref{eq:integrals A} and~\eqref{eq:integrals B} are replaced by $c_m$ and $d_m$ satisfying the discrete summation equations~\eqref{eq:munu_m} below.  These equations say that $\E S_m = \ell$ and $\E T_m = n$.  Writing this out, using $\disp \E X_j = 1/p_j - 1 = 1 / \left ( 1 - e^{-c_m - d_m j/m} \right ) - 1$, gives
\begin{align}
\ell & =  \sum_{j=0}^m \frac{1}{1 - e^{-c_m - d_m j/m}} - (m+1) \, , \qquad \label{eq:munu_m} 
n  = m \sum_{j=0}^m \frac{j/m}{1 - e^{-c_m - d_m j/m}} - \frac{m(m+1)}{2} \, .%\label{eq:nu_m}  \, .
\end{align}

Let $M_m$ denote the covariance matrix for $(S_m , T_m)$.  The entries may be computed from the basic identity $\Var (X_j) = q_j / p_j^2$, resulting in
\begin{align}
\Var (S_m) & = \sum_{j=0}^m \frac{e^{-c_m - d_m j/m}}
   {\left ( 1 - e^{-c_m - d_m j/m} \right )^2} \label{eq:alpha_m} \\
\Cov (S_m , T_m) & = \sum_{j=0}^m j \frac{e^{-c_m - d_m j/m}}
   {\left ( 1 - e^{-c_m - d_m j/m} \right )^2} \label{eq:beta_m} \\
\Var (T_m) & = \sum_{j=0}^m j^2 \frac{e^{-c_m - d_m j/m}}
   {\left ( 1 - e^{-c_m - d_m j/m} \right )^2} \label{eq:gamma_m} \, .
\end{align}

\begin{thm}[discretized analogue] \label{th:1'}
Let $c_m$ and $d_m$ satisfy equations~\eqref{eq:munu_m}. Define $\alpha_m, \beta_m$ and $\gamma_m$ to be the normalized
entries of the covariance matrix
\[
	\alpha_m := m^{-1} \Var(S_m) \; ; \qquad
   	\beta_m := m^{-2} \Cov(S_m , T_m) \; ; \qquad
   	\gamma_m := m^{-3} \Var(T_m) \; ,
\]
which are $O(1)$ as $m \rightarrow\infty$. Again, let $A := \ell / m$ and $B := n/m^2$ and $\Delta_m := \alpha_m
\gamma_m - \beta_m^2$.  Then
\begin{equation} 
\label{eq:N'}
N_n(\ell,m) \sim \frac{1}{2\pi m^2 \sqrt{\Delta_m}} \exp \left \{ m \left( -\frac{L_m}{m} + c_m A + d_m B \right ) \right \} \, .
\end{equation}
\end{thm}

%\subsection*{Proof of discretized result}

\begin{proof}[Proof outline]
The atomic probabilities $\P_m (\XX = \xx)$ depend only on $S_m$ and $T_m$ as
\begin{align*}
\log \P_m (\XX = \xx) & = \sum_{j=0}^m \left(\log p_j + x_j \log q_j\right) \\
& = L_m - \sum_{j=0}^m \left ( c_m + j \frac{d_m}{m} \right ) x_j 
= L_m - c_m \left ( \sum_{j=0}^m x_j \right ) - \frac{d_m}{m} \left ( \sum_{j=0}^m j x_j \right ).
\end{align*}
In particular, for any $\xx$ satisfying~\eqref{eq:diagram},
%
\begin{equation} \label{eq:xx}
\log \P_m (\XX = \xx) = L_m - c_m \ell - \frac{d_m}{m} n \, .
\end{equation}
%
The following are equivalent: $(i)$ the vector $\XX$ satisfies the identities~\eqref{eq:diagram}; $(ii)$ the pair $(S_m , T_m)$ is equal to $(\ell,n)$; $(iii)$ the partition $\lambda= (\lambda_1 , \ldots , \lambda_m)$ defined by $\lambda_j - \lambda_{j+1} = X_j$ for $2 \leq j \leq m-1$, together with $\lambda_1 = \ell - X_0$ and $\lambda_m = X_m$, is a partition of $n$ fitting inside a $m \times \ell$ rectangle.  Thus, setting $p_m(\ell,n) := \P_m \left [ (S_m,T_m) = (\ell , n) \right ]$ we have
\begin{align}
N_n(\ell , m) =\frac{p_m(\ell,n)}{ \P_m(\XX=\xx)}  %\exp \left(- L_m + c_m \ell + \frac{d_m}{m} n\right) 
&= p_m(\ell,n) \, \exp \left [ m \left ( -\frac{L_m}{m} + c_m A + d_m B \right ) \right ] \label{eq:P_m} \, .
\end{align}
%
Comparing~\eqref{eq:N'} to~\eqref{eq:P_m}, the proof is completed by an application of the following LCLT, for which a proof is sketched below.  It is stated for an arbitrary sequence of parameters $p_0, \ldots , p_m$ bounded away from 0 and 1, we use it with $p_j = 1 - e^{-c_m - d_m j/m}$. 
\end{proof} \vspace{-0.1in}

Denote by $M(s,t):= [s\, , \,\, t] \, M\, [s\,,\,\,t]^T$ the quadratic form corresponding to a matrix $M$, then we can state the LCLT and its refinement as follows.
\begin{lem}[LCLT]\label{lem:lclt}
Fix $0 < \delta < 1$ and let $p_0, \ldots , p_m$ be any real numbers in the interval $[\delta , 1 - \delta]$.  Let $\{ X_j \}$ be independent reduced geometrics with respective parameters $\{ p_j \}$, $S_m := \sum_{j=0}^m X_j,$ and $T_m := \sum_{j=0}^m j X_j$. Let $M_m$ be the covariance matrix for $(S_m , T_m)$, written
\[ M_m = \disp \left ( \begin{array}{cc} \alpha_m m & \beta_m m^2 \\ \beta_m m^2 & \gamma_m m^3 \end{array} \right ) \, ,\]
$Q_m$ denote the inverse matrix to $M_m$, and $\Delta_m = m^{-4} \det M_m = \alpha_m \gamma_m - \beta_m^2$.   Let $\mu_m$ and $\nu_m$ denote the respective means $\E S_m$ and $\E T_m$. %Denote $p_m(a,b) := \P ((S_m , T_m) = (a,b))$.  
Then
\begin{equation} 
\label{eq:LCLT}
\sup_{a,b \in \Z} m^2 \left | p_m (a,b) - \frac{1}{2 \pi (\det M_m)^{1/2}} e^{-\frac{1}{2} Q_m (a - \mu_m , b - \nu_m)} \right | \to 0
\end{equation}
as $m \to \infty$, uniformly in the parameters $\{ p_j \}$ in the allowed range.  In particular, if the sequence $(a_m , b_m)$ satisfies $Q_m (a_m - \mu_m , b_m - \nu_m) \to 0$ then 
\[ p_m( a_m , b_m) = \frac{1}{2\pi \sqrt{\Delta_m} m^2} \left(1+O\left(m^{-3/2}\right)\right) \,. \]
\end{lem}

The following consequence is used to prove \cref{th:difference}.

\begin{cor}[LCLT consecutive differences]\label{cor:lclt_error}
Let $\mN(a,b) := \frac{1}{2 \pi (\det M)^{1/2}} e^{-\frac{1}{2} Q (a - \mu , b - \nu)}$ be the normal approximation in Equation~\eqref{eq:LCLT}. Using the notation of \cref{lem:lclt}, 
\[ \sup_{a,b\in \mathbb{Z}} \bigg|p(a,b+1)-p(a,b) - \big(\mN(a,b+1)-\mN(a,b)\big) \bigg|  = O(m^{-4}). \]
\end{cor}  

\subsection*{Sketch  of the proofs of \cref{th:main,th:difference} and the LCLT \cref{lem:lclt}} 
\label{sec:implication}

\cref{th:main} follows from the discretized \cref{th:1'}  after analyzing $c_m$, $d_m$ (in particular showing their existence and uniqueness), and their relation to $c$ and $d$ defined in the introduction. Asymptotics follow from careful analysis of the error bounds.

%Here we show how $c_m$ and $d_m$ from the discretized result are related to $c,d$ defined independently of $m$. The proof below also shows that $c_m$ and $d_m$ exist and are unique. 
%
%
%The Euler-MacLaurin summation formula~\cite[Section 3.6]{Bruijn1958} gives an expansion
%\begin{align}
%\frac{L_m}{m} &= \int_0^1 \log(1-e^{-c_m-d_mt})\, dt + \frac{\log(1-e^{-c_m})+\log(1-e^{-c_m-d_m})}{2m} + O(m^{-2}) \notag \\[+2mm]
%&=  \frac{\dilog(1 - e^{-c_m-d_m}) - \dilog(1-e^{-c_m})}{d_m} + \frac{\log(1-e^{-c_m})+\log(1-e^{-c_m-d_m})}{2m} + O(m^{-2}) \label{eq:Lm1}
%\end{align}
%of the sum $L_m$ in terms of $c_m$ and $d_m$. Assume that there is an asymptotic expansion
%\begin{eqnarray} 
%c_m & = & c + u m^{-1} + O(m^{-2}) \label{eq:c+} \\
%d_m & = & d + v m^{-1} + O(m^{-2}) \label{eq:d+}
%\end{eqnarray}
%as $m\rightarrow\infty$, where $u$ and $v$ are constants depending only on $A$ and $B$. Under such an assumption, substitution of Equations~\eqref{eq:c+} and~\eqref{eq:d+} into Equation~\eqref{eq:Lm1} implies
%\begin{align}
%\label{eq:L+}
%\frac{L_m}{m} &=  \frac{\dilog(1 - e^{-c-d}) - \dilog(1-e^{-c})}{d} + \frac{u A + v B}{m} + O(m^{-2}) \notag \\
%&= \log(1-e^{-c-d}) - dB + \frac{u A + v B}{m} + O(m^{-2}).
%\end{align}
%Substituting Equations~\eqref{eq:c+}--\eqref{eq:L+} into Equation~\eqref{eq:N'} of Theorem~\ref{th:1'} and taking the limit as $m \rightarrow \infty$ then gives Theorem~\ref{th:main}, as
%\[ 
%\Delta_m\rightarrow \left(\int_0^1 \frac{e^{-c-dt}}{(1-e^{-c-dt})^2}\,dt\right)\left(\int_0^1 \frac{t^2e^{-c-dt}}{(1-e^{-c-dt})^2}\,dt\right) - \left(\int_0^1 \frac{te^{-c-dt}}{(1-e^{-c-dt})^2}\,dt\right)^2 = \Delta. 
%\]
%
%It remains to show the expansions in Equations~\eqref{eq:c+} and~\eqref{eq:d+}. For $x,y>0$, define 
%\begin{align*}
%\Sbar_m(x,y) & := \frac{1}{m} \sum_{j=0}^m \frac{1}{1 - e^{-(x+yj/m)}} - 1 \, , \\
%\Tbar_m(x,y) & := \frac{1}{m} \sum_{j=0}^m \frac{j/m}{1 - e^{-(x+yj/m)}} - \frac{1}{2}  \, .
%\end{align*}
%Another application of the Euler-MacLaurin summation formula implies
%\begin{align}
%\Sbar_m(c,d) &=  A + A_1 (c,d) m^{-1} + O(m^{-2}) \, , \label{eq:A1} \\
%\Tbar_m(c,d) &=  B + B_1 (c,d) m^{-1} + O(m^{-2}) \, , \label{eq:B1}
%\end{align}
%with
%\[ A_1 = \frac{1}{2}\left(\frac{1}{1-e^{-c}} + \frac{1}{1-e^{-c-d}}\right) \qquad \text{and} \qquad B_1 = \frac{1}{2(1-e^{-c-d})}. \]
%Let $\J$ denote the Jacobian $D[\psi]$ of the map $\psi$ with respect to $c$ and $d$, and let
%\[ (c_m' , d_m') = (c,d) - m^{-1} \J^{-1} \cdot (A_1-1 , B_1-1/2)^T.\]
%A Taylor expansion around the point $(c,d)$ gives
%\begin{align*}
%\begin{pmatrix}
%\Sbar_m(c_m',d_m') \\
%\Tbar_m(c_m',d_m')
%\end{pmatrix}
%&= \begin{pmatrix}
%\Sbar_m(c,d) \\
%\Tbar_m(c,d)
%\end{pmatrix} - \left(\J + O\left(m^{-1}\right) \right) \cdot \left(m^{-1} \J^{-1} \begin{pmatrix}
%A_1 \\
%B_1
%\end{pmatrix}
%\right) + O(m^{-2}) \\
%&= 
%\begin{pmatrix}
%A-1/m \\
%B-1/2m
%\end{pmatrix} + O\left(m^{-2}\right) \\
%&= 
%\begin{pmatrix}
%\Sbar_m(c_m,d_m) \\
%\Tbar_m(c_m,d_m)
%\end{pmatrix} + O\left(m^{-2}\right),
%\end{align*} 
%where Equations~\eqref{eq:A1} and~\eqref{eq:B1} were used to approximate the Jacobian of $\psi_m: (x,y) \mapsto \left(\Sbar_m(x,y),\Tbar_m(x,y)\right)$ with respect to $x$ and $y$.
%
%The map $\psi_m$ is Lipschitz for a similar reason as its continuous analogue. Namely, consider the partial derivatives
%\begin{eqnarray*}
%J_{S,x} & = & \frac{1}{m}\sum_{j=0}^m \  -\frac{e^{-x-yj/m}}{(1-e^{-x-yj/m})^2}\, \\
%J_{S,y} & = & \frac{1}{m^2}\sum_{j=0}^m \  -\frac{j\ e^{-x-yj/m}}{(1-e^{-x-yj/m})^2}\, \\
%J_{T,x} & = & \frac{1}{m^2}\sum_{j=0}^m \  -\frac{j\ e^{-x-yj/m}}{(1-e^{-x-yj/m})^2}\, \\
%J_{S,y} & = & \frac{1}{m^3}\sum_{j=0}^m \  -\frac{j^2\ e^{-x-yj/m}}{(1-e^{-x-yj/m})^2}.
%\end{eqnarray*}
%Let $\rho_m$ be a discrete finite measure on $R_m:=\{0,1/m,2/m,\ldots,1\}$ with density $e^{-x-yt}/(1-e^{-x-yt})$ for $t\in R_m$ and 0 otherwise, and let $\E_{\rho_m}$ be the expectation with respect to $\rho_m$. Then 
%\[ J_{S,x} = \E_{\rho_m}[-1] \, , \qquad J_{T,x}=J_{S,y} = \E_{\rho_m}[-t] \, , \qquad J_{T,y} =\E_{\rho_m}[-t^2]\]
%and
%\[ \det D[\psi_m] = \E_{\rho_m}[1]\E_{\rho_m}[t^2] - \E_{\rho_m}[t]^2 = \E_{\rho_m}[1]^2 \Var_{\sigma_m} [t]\, ,\]
%where $\sigma_m$ is the probability function $\rho_m/\E_{\rho_m}[1]$. For any fixed $m$ and $(x,y)$ in a compact neighborhood of $(A,B)$, both the variance and the expectation are finite and bounded away from 0, as is the Jacobian determinant. Moreover, the trace ${\rm Tr} D[\psi] = -\E_{\rho_m}[1+t^2]$ is  bounded away from 0 and infinity, so the Jacobian is negative definite with locally bounded eigenvalues, and hence $\psi_m$ is locally Lipschitz.
% Since the norm of the Jacobian is bounded away from 0 and infinity, we have that the inverse map $\psi_m^{-1}$ is also locally Lipschitz in a neighborhood of $\psi^{-1}(A,B)$.  Moreover, similarly to proof of existence and uniqueness of $c$ and $d$ in Section~\ref{sec:constants}, we have that there indeed are $c_m$ and $d_m$ as unique solutions of Equations~\eqref{eq:mu_m} and~\eqref{eq:nu_m} since the Jacobian is negative semi-definite.  
%
%The trapezoid formula implies $\left|J_{S,c}-J_{A,c}\right| = O(m^{-1})$, and similar bounds for the other differences of partial derivatives in the continuous and discrete settings.  Hence, the bounds for the norms and eigenvalues of $D[\psi_m]$ are within $O(m^{-1})$ of the ones for $D[\psi]$, and $\psi_m$ (and its inverse) is Lipschitz with a constant independent of $m$. Thus,
%\[ O(m^{-2})=\|\psi_m(c'_m,d'_m) -\psi_m(c_m,d_m)\|\geq C^{-1} \| (c_m'-c_m,d'_m-d_m)\| \]
%for some constant $C$, so that the expansions~\eqref{eq:c+} and~\eqref{eq:d+} hold. 
%$\Cox$

%\section{Proof of Theorem~\protect{\ref{th:difference}}}
%\label{sec:proof}
\cref{th:difference} follows from Equation~\eqref{eq:P_m} and \cref{cor:lclt_error}. Let 
\begin{align*}%\label{eq:discrete_funcs} 
L_m(x,y) &:= \sum_{j=0}^m \log(1-e^{-x-yj/m}) \ .
%A_m(x,y) &:= \sum_{j=0}^m \frac{1}{1-e^{-x-yj/m}} - (m+1) \ ,\\
%B_m(x,y) &:= \sum_{j=0}^m \frac{j/m}{1-e^{-x-yj/m}} - \frac{m+1}{2} \ .
\end{align*}
Then if $A_m(x,y) = (\partial/\partial x) L_m(x,y)$ and $B_m(x,y)=(\partial/\partial y) L_m(x,y)$, we have $c_m$ and $d_m$ are the solutions to $A_m(c_m,d_m) =\ell$ and $B(c_m,d_m)=n/m$.
%\[ \frac{\partial L_m(x,y)}{\partial x}|_{x=c_m,y=d_m} = \ell= Am  \, , \qquad \frac{\partial L_m(x,y)}{\partial y}|_{x=c_m,y=d_m} = n/m = Bm \, . \]
Let $c'_m,d'_m$ be the solutions to $A_m(c'_m,d'_m)=\ell$ and $B_m(c'_m,d'_m)=(n+1)/m$, and let $\Delta x = c'_m-c_m=O(m^{-2})$ and $\Delta y = d'_m-d_m=O(m^{-2})$ with these bounds obtained from an analysis of $c_m,c,d_m,d$. See~\cite{MelczerPanovaPemantle2018} for details. 

%Observe that 
%\begin{equation}\label{eq:derivatives}
% \frac{\partial L_m(x,y) }{\partial x} = A_m(x,y) \quad  \text{and} \quad \frac{\partial L_m(x,y)}{\partial y} = B_m(x,y).
%\end{equation}
Taylor expansion for $L_m':=L_m(c'_m,d'_m)$ around $(c_m,d_m)$ and the $L_m$ partials gives
%from Equation~\eqref{eq:derivatives},
%\[ -L_m(c_m', d_m') = -L_m(c_m+\Delta x, d_m +\Delta y) = -L_m(c_m,d_m) - \Delta x \, A_m(c_m,d_m) - \Delta y \, B_m(c_m,d_y) + O(m^{-3}), \]
%so that
{\small
\begin{align*}
-L_m(c_m', d_m') + (c_m+\Delta x) \ell + (d_m + \Delta y) (n + 1) \, m^{-1} =-L_m(c_m,d_m) + c_m\ell  + d_m(n+1) \, m^{-1}  + O(m^{-3}).
\end{align*}
}
Then the consecutive differences from Sylvester's unimodality can be expressed as a sum of terms which can be individually bounded as follows,
%To lighten notation, we now write $L_m := L_m(c_m,d_m)$ and $L_m' := L_m(c_m',d_m')$. Then
\begin{align}
N_{n+1}(\ell,m) - N_n(\ell,m) 
%&= p_m(\ell,n+1)\exp \left[ -L_m' + c_m' \ell + \frac{d_m'}{m}(n+1) \right] - p_m(\ell,n)\exp \left[ -L_m + c_m \ell + \frac{d_m}{m}n \right] \notag \\[+2mm]
&= p_m(\ell,n)\exp \left[ -L_m + c_m \ell + \frac{d_m}{m}n \right]\left[e^{d_m/m}-1\right] \label{eq:diffE1} \\
+ \, &\left[p_m(\ell,n+1)-p_m(\ell,n)\right]\exp \left[ -L_m + c_m \ell + \frac{d_m}{m}(n+1) \right] \label{eq:diffE2} \\
 + \, &p_m(\ell,n+1)\left( e^{-L_m' + c_m' \ell +d_m'(n+1)/m} -  e^{-L_m + c_m \ell + d_m(n+1)/m} \right). \label{eq:diffE3}
\end{align}
 Since $d_m = d + O(m^{-1})$, Equation~\eqref{eq:P_m} gives that line~\eqref{eq:diffE1} equals 
	\[ N_n(\ell,m)\left(\frac{d}{m} + O(m^{-2}) \right) \]
as long as $d \notin O(m^{-1})$. This holds when $|A-B/2| \notin O(m^{-1})$ as $d=0$ when $A=B/2$ and the map taking $(A,B)$ to $(c,d)$ is Lipschitz. 

The quantity on line~\eqref{eq:diffE2} is $O(m^{-4} \cdot m^2 N_n(\ell,m)) = O(m^{-2}N_n(\ell,m))$ since  
	\begin{align*} 
	\left[p_m(\ell,n+1)-p_m(\ell,n)\right] &\leq \left|\mathcal{N}(\ell,n+1)-\mathcal{N}(\ell,n)\right| + O(m^{-4}) \\
	&=  O\left(m^{-2} \cdot \left|1 - e^{\frac{1}{2} Q_m (0,1)} \right| \right) + O(m^{-4}) = O(m^{-4}),
	\end{align*}
by \cref{cor:lclt_error}, where $Q_m$ is the inverse of the covariance matrix of $(S_m,T_m)$. 

The quantity on line~\eqref{eq:diffE3} is
	{\small
	\begin{align*}
	p_m(\ell,n+1) \, e^{-L_m + c_m \ell + d_m(n+1)/m} \, \psi_m &= N_n(\ell,m) \, \psi_m \, e^{d_m/m} + O(m^{-4} \, e^{d_m/m} \, e^{-L_m + c_m \ell + d_m n/m} \, \psi_m) \\&= O(m^{-3} N_n(\ell,m)).
	\end{align*}
	}
since $p_m(\ell,n+1) = p_m(\ell,n) + O(m^{-4})$, where
	\[ \psi_m := \exp\bigg[ -L_m' + c_m' \ell +d_m'(n+1) \, m^{-1} - \left(-L_m + c_m \ell +d_m(n+1) \, m^{-1}\right) \bigg] - 1 = O(m^{-3}). \]
	
\vspace{-0.3in}

\noindent
Putting everything together, we reach the desired
\[\,\hspace{1in}  N_{n+1}(\ell,m) - N_n(\ell,m) = N_n(\ell,m)\left(\frac{d}{m} + O(m^{-2}) \right). \hspace{1in} \Cox \]


%\section*{Appendix: Proof of the Local Central Limit Theorem}

The proof of the LCLT \cref{lem:lclt} consists of several steps. First, assuming that the $p_j$s are arbitrary numbers in some  interval
 $[\delta , 1-\delta]$ we show that the constants $\alpha_m, \beta_m, \gamma_m$ and $\Delta_m$ are bounded below and above by positive constants depending only on $\delta$.


We then estimate the characteristic function for 
 a reduced geometric r.v. $X_p$ with parameter $p$. For each $\delta \in (0,1/2)$ there is a $K$ such that simultaneously for all \mbox{$p \in [\delta , 1-\delta]$},
\[ \left | \log \E \exp(i u X_p) - \left ( i \frac{q}{p} u - \frac{q^2}{2 p^2} u^2 \right ) \right | \leq K u^3 \, . \]

Finally, the proof of \cref{lem:lclt} comes from expressing the probability as an integral of the characteristic function $\phi(s,t) := \E e^{i (s S + t T)}$, via the inversion formula, and then estimating the integrand in various regions.


In order to estimate the error terms in the approximation of $p(a,b)$ for \cref{cor:lclt_error} we consider the partial differences and repeat the approximation arguments for the original LCLT, estimating an expression of the form
{\small
\begin{equation*}  \bigg|p(a,b+1)-p(a,b) - \big(\mN(a,b+1)-\mN(a,b)\big) \bigg| = \int_{[-\pi,\pi]^2} \left|1-e^{-it}\right| \left|\phihat(s,t) - e^{-1/2M(s,t)}\right|dsdt. 
\end{equation*}
}
\vspace{-0.2in} 

As in the analysis for the LCLT, we  estimate the integrals in different regions where $\phihat = \phi e^{-is\mathbb{E}[S] -it\mathbb{E}[T]}$ behaves differently, and ultimately determine that the above integral is $O(m^{-4})$. 


\section{Limit shape} \label{sec:shape}

The limit shape of an unrestricted partition, i.e. the curve which approximates most Young diagrams of $\la \vdash n$, was posed as a 
problem by Vershik and first answered by Szalay and Turan; later Vershik and Yakubovich described the limit shape for singly restricted partitions. The limit shape for
partitions inside a rectangle in the regime $m, \ell = \Theta (\sqrt{n})$ was first
described by Petrov, where it is identified with 
a portion of the curve $e^{-x} + e^{-y} = 1$, the 
limit shape of unrestricted partitions.  Fluctuations have also been obtained; see~\cite{MelczerPanovaPemantle2018} for additional historical details and references.   

Here, using the independent random variables $X_i$ we can rederive the limit shape for the partitions of $n$ inside a rectangle. The existence, i.e. the concentration phenomenon, of the limit curve follows from the fact that the maximum discrepancy $\displaystyle \max_{j \leq m} \left|\sum_{i=0}^j (X_i - 1/p_i)\right|$, conditional on $\sum_{i=0}^m X_i = \ell$, is $o(m)$ in probability; see~\cite{MelczerPanovaPemantle2018} for a rigorous proof.  



\begin{figure}[!ht] 
\centering
\begin{subfigure}{0.315\textwidth}
\centering
\includegraphics[width=\linewidth]{limcurves} 
\subcaption*{$(A,B)=(1,1/k)$ \\ $k=2,\dots,15$}
\end{subfigure}
%
\begin{subfigure}{0.315\textwidth}
\centering
\includegraphics[width=\linewidth]{limmul}
\subcaption*{$(A,B)=(5/k,1/k)$ \\ $k=2,\dots,15$}
\end{subfigure}
%
\begin{subfigure}{0.35\textwidth}
\centering
\includegraphics[width=0.9\linewidth]{limsample}
\subcaption*{Limit curve of $(A,B)=(1,1/3)$ and random partitions of size {\color{red}120}, {\color{darkgreen}201} and {\color{blue}300}.}
\end{subfigure}
\caption{Limit shapes of scaled partitions as $m\rightarrow \infty$.}
\label{fig:limtcurve}
\end{figure}

We have $\la_i = \ell - (X_0+X_1+\cdots+X_{i-1})$ and hence $\E[ \la_i] = \ell - \sum_{j=0}^{i-1} (1/p_j -1)$. Setting $x=i/m$ we approximate the sum by an integral as $m\to \infty$, namely we have
\[ y := \E\left[ \frac{\la_i}{m} \right] = A + x - \int_0^x \frac{1}{1-e^{-c-td}}dt =A+x - \frac{1}{d}\ln\left(\frac{e^{xd+c}-1}{e^c-1}\right), \]
and the limit curve of partitions scaled to the $1\times A$ rectangle is given by points $(x,y)$ satisfying this equation, or equivalently
\begin{align}
\label{eq:lim_curve}
%e^{(A+1)d}-1 &= (e^d-1) e^{d(A-y)} + (e^{Ad}-1)e^{d(1-x)} \\ \Longleftrightarrow \qquad 
1 &= (1-e^{-c})e^{d(A-y)} + e^{-c}e^{-dx} \, , %\notag
\end{align}
when $A > 2B$, and 
$y=A(1-x)$ 
when $A=2B$ and $d=0$; see \cref{fig:limtcurve}.

%Note that the transformation $(x,y) \mapsto (1-x,A-y)$ gives the shape of the complementary partition inside the $1\times A$ rectangle.

%\section{Existence and Uniqueness of \texorpdfstring{$c,d$}{c,d}}
%\label{sec:constants}

%We now show that for any $A \geq 2B > 0$ there exists unique positive constants $c$ and $d$ satisfying Equations~\eqref{eq:integrals A} and~\eqref{eq:integrals B}. If $A=B/2$ then $d=0$ and $c$ can be determined uniquely, so we may assume $A > 2B > 0$. The following lemma will be used to show uniqueness.
%
%\begin{lem} \label{lem:J}
%Let $\psi$ denote the map taking the pair $(c,d)$ to $(A,B)$ defined by the two integrals in Equations~\eqref{eq:integrals A} and~\eqref{eq:integrals B}, and let $K$ be a compact subset of $\{ (x,y) : x > 2y > 0 \}$. The Jacobian matrix $J := D[\psi]$ is negative definite for all $(c,d) \in (0,\infty)^2$, and all entries of $\psi$ and $J$ (respectively $\psi^{-1}$ and $J^{-1}$) are Lipshitz continuous on $\psi^{-1}[K]$ (respectively $K$).
%\end{lem}
%
%\begin{proof}
%Differentiating under the integral sign shows that the partial derivatives comprising the entries of $D[\psi]$ are given by
%\begin{eqnarray*}
%J_{A,c} & = & \int_0^1 \frac{- e^{-(c+dt)}}{(1 - e^{-(c+dt)})^2} \, dt \\
%J_{A,d} & = & \int_0^1 \frac{- t \, e^{-(c+dt)}}{(1 - e^{-(c+dt)})^2} \, dt \\
%J_{B,c} & = & \int_0^1 \frac{- t \, e^{-(c+dt)}}{(1 - e^{-(c+dt)})^2} \, dt \\
%J_{B,d} & = & \int_0^1 \frac{- t^2 \, e^{-(c+dt)}}{(1 - e^{-(c+dt)})^2} 
%   \, dt  \, ;
%\end{eqnarray*}
%note that each term is negative. 
%%
%Let $\rho$ denote the finite measure on $[0,1]$ with density $e^{-(c+dt)} / (1 - e^{-(c+dt)})^2$ and let $\E_\rho$ denote expectation with respect to $\rho$.  Then
%\[ J_{A,c} =  \E_\rho [-1], \qquad J_{A,d} = J_{B,c} =  \E_\rho [-t], \qquad J_{B,d} = \E_\rho [-t^2], \]
%and
%\[ \det J =  \E_\rho [1] \cdot \E_\rho [t^2] - \left(\E_\rho [t]\right)^2 = \E_{\rho}[1]^2 \cdot \Var_{\sigma}[t], \]
%where $\Var_{\sigma}[t]$ denotes the variance of $t$ with respect to the normalized measure $\sigma = \rho/\E_{\rho}[1]$. In particular, $\det J$ is positive, and bounded above and below when $c$ and $d$ are bounded away from 0, implying the stated results on Lipshitz continuity. As $J$ is real and symmetric, it has real eigenvalues. Since the trace of $J$ is negative while its determinant is positive, the eigenvalues of $J$ have negative sum and positive product, meaning both are strictly negative and $J$ is negative definite for any $c,d>0$.
%\end{proof}



%\begin{proof}
%Solving Equation~\eqref{eq:integrals A} for $c$ (assuming $d\geq 0$) gives 
%\[ c=\log \left( \frac{e^{(A+1)d}-1}{e^{(A+1)d}-e^d}\right). \]
%Substituting this into Equation~\eqref{eq:integrals B} gives an explicit expression for $B$ in terms of $A$ and $d$, and shows that for fixed $A>0$ as $d$ goes from 0 to infinity $B$ goes from $A/2$ to 0. By continuity, this implies the existence of the desired $c$ and $d$. It also shows that,  for a fixed $A$, $c$ is a decreasing function of $d$ with the given maximal and minimal values as $d$ goes from $0$ to $\infty$.
%
%To prove uniqueness, we note that for $\xx,\yy \in \mathbb{R}^2$ Stokes' theorem implies
%\[ \psi(\yy) - \psi(\xx) = \int_0^1 D[\psi]\left( t\xx + (1-t)\yy \right) \cdot (\xx - \yy) \, dt  \]
%so that
%\[ (\xx-\yy)^T \cdot \left(\psi(\yy) - \psi(\xx)\right) = \int_0^1 \left[(\xx-\yy)^T \cdot D[\psi]\left( t\xx + (1-t)\yy \right) \cdot (\xx - \yy)\right] dt.  \]
%When $\xx \neq \yy$, negative-definiteness of $D[\psi]$ implies that the last integrand is strictly negative on $[0,1]$, and $\psi(\yy) \neq \psi(\xx)$. Thus, distinct values of $c$ and $d$ give distinct values of $A$ and $B$.
%
%To see the monotonicity, let $A$ be fixed and let $F_B(d)=B$ be the equation obtained after substituting $c=c(A,d)$ above in Equation~\eqref{eq:integrals B}, i.e. $F_B(d) = \psi_2(c(A,d),d)$. Then $d$ is a decreasing function of $B$ and vice versa since
%\[ \frac{\partial F_B(d)}{\partial d} = \frac{J_{B,d}J_{A,c} - J_{A,d}J_{B,c}}{J_{A,c}} = \frac{\det D[\psi]}{J_{A,c}} <0\, . \]
%
%For the last part, the explicit formula for $c$ in terms of $A$ and $d$ shows that $c\to 0$. Substitution in Equation~\eqref{eq:integrals B} gives the desired equation.
%
%\end{proof}



 
 
%% if you use biblatex then this generates the bibliography
%% if you use some other method then remove this and do it your own way
\printbibliography



\end{document}
