# Unwanted negative vertical spacing

So here is my problem :

I would love to add a minimal working example, but even my example "does not work". This only happens when these two precise environments I wrote down in my text (the custom-defined proof environment being the one with its line on the left-hand side and the corollary environment being the AMS-Math environment) are located precisely at that location in the text. After hundreds of pages written, it's the first time I witnessed it. If I add some vertical spacing (say page 133) so that the end of proof/beginning of corollary does not happen at the end of the page, the vertical spacing between the two goes back to normal.

I know the words "custom-defined proof environment" raise alarm sounds, but it's not a very big tweak. I am using the tcolorbox package to surround the standard AMSmath proof environment with a box which is essentially a line at the left of the box and no lines on the other sides to obtain the result you see there :

\renewcommand{\qedsymbol}{}
\xpatchcmd{\proof}{\itshape}{\bfseries\itshape}{}{}
\tcolorboxenvironment{proof}{%
blanker,
before skip=20pt,
after skip=24pt,
borderline west={0.4pt}{0.4pt}{black},
breakable,
left=12pt,
}


So what could be the cause of the problem? Does anyone know what to look for?

Added : This is not a MWE, but it's the best I could do. The problem does not occur if I fill in the environment only with text (as in text via \lipsum for instance). But with my mathematical content, it does appear.

\documentclass[a4paper,11 pt,twoside]{book}

%%%%% AMS Math packages and more %%%%%

\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsopn}
\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{needspace}
\usepackage{stmaryrd}
\usepackage{graphicx}
\usepackage[many]{tcolorbox}
\usepackage{xpatch}
\usepackage[a4paper, top=1in, bottom=1.25in, left=2 cm, right=2 cm]{geometry}
\usepackage{lipsum}

%%%%% Fonts and typesetting %%%%%

%%%%% Commutative Diagram Package %%%%%

\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}

%%%%% Symbols and expressions %%%%%

\newcommand{\dera}[1]{\mathscr D{#1}}
\newcommand{\id}[1]{\operatorname{\mathrm{id}}_{#1}}
\newcommand{\gl}[1]{\operatorname{\mathfrak{gl}} \left(#1 \right)}
\newcommand{\undersetbrace}[2]{\underset{#1}{\underbrace{#2}}}
\renewcommand{\a}{\mathfrak a}
\renewcommand{\c}{\mathfrak c}
\newcommand{\m}{\mathfrak m}
\newcommand{\defn}{\overset{\mathrm{def}}{=}}

\makeatletter
\@openrightfalse
\makeatother

\fancypagestyle{empty}
{
\fancyfoot{} % Clear all footers
\fancyfootoffset{0 pt}
\renewcommand{\headrulewidth}{0pt} % Separates Header and Body with a rule
\renewcommand{\footrulewidth}{0pt} % Separates Footer and Body with a rule
}
\fancypagestyle{plain}
{
\fancyfoot{} % Clear all footers
\fancyfoot[LE,RO]{\thepage}
\fancyfootoffset{0 pt}
\renewcommand{\headrulewidth}{0pt} % Separates Header and Body with a rule
\renewcommand{\footrulewidth}{0pt} % Separates Footer and Body with a rule
}
{
\pagestyle{fancy}
\fancyfoot{} % Clear all footers
\fancyfoot[LE,RO]{\thepage}
\fancyfootoffset{0 pt}
\renewcommand{\headrulewidth}{0.2pt} % Separates Header and Body with a rule
\renewcommand{\footrulewidth}{0pt} % Separates Footer and Body with a rule
%\usepackage{showframe}
}
\renewcommand{\chaptermark}[1]
{
\markboth{\chaptername\ \thechapter}
{\noexpand\firstsubsectiontitle}
}
\makeatletter
\AtBeginDocument{\def\@citecolor{black}}
\makeatother

%%%%% Environments %%%%%

\renewcommand{\qedsymbol}{}
\tcolorboxenvironment{proof}{%
blanker,
before skip=20pt,
after skip=24pt,
borderline west={0.4pt}{0.4pt}{black},
breakable,
left=12pt,
%right=12pt,
}

\theoremstyle{definition}
\newtheorem{thm}{Theorem}
\theoremstyle{definition}
\newtheorem{cor}{Corollary}

%%%%% Title page %%%%%

\title{\textbf{Algebraic Groups and Lie Algebras}}
\newcommand{\chapterno}{I}
\newcommand{\chaptertitle}{Introduction to Lie Algebras}
\date{\today}
\author{Patrick Da Silva}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\mainmatter
\pagestyle{empty}

\begin{proof}
We proceed in steps.

\vspace{250 pt}
\begin{enumerate}
\item[] \textbf{Step 1}~: We assume $L$ is reductive, i.e. $[L,\rad L] = 0$. This means that $L = \rad L \oplus \dera L$, hence $\dera L$ is a Levi subalgebra of $L$. If $S$ is a Levi subalgebra of $L$, Then $S = \dera S \subseteq \dera L$, so since $S$ and $\dera L$ are both Levi subalgebras of $L$, they have the same dimension, hence $S = \dera L$, which proves (i). This means that in the reductive case, the Levi subalgebra is unique, which also proves (ii) since $\id L = e^0$ is special.

\item[] \textbf{Step 2}~: We assume that $[L,\rad L] = \rad L$ is a non-zero abelian ideal and that the only solvable ideals of $L$ are $0$ and $\rad L$. It follows that $Z(L) = 0$ since $Z(L) \subseteq \rad L$ but $Z(L) \neq \rad L$ (because we assume $[L,\rad L] = \rad L \neq 0$). We wish to give $\gl L$ an $L$-module structure and construct the following $L$-submodules of $\gl L$, which we will define shortly~:
$P \le N \le M \le \gl L$
Write $\langle \id{\rad L} \rangle_F$ for the set of $F$-multiples of $\id{\rad L}$. Let
$M \defn \{ \alpha \in \gl L \mid \alpha(L) \subseteq \rad L, \quad \alpha|_{\rad L} \in \langle \id{\rad L} \rangle_F \}.$
For $\alpha \in M$, let $\lambda_{\alpha} \in F$ be the unique element satisfying $\alpha|_{\rad L} = \lambda_{\alpha} \id{\rad L}$. Notice that $\lambda : M \to F$ is a surjective linear map. Set $N \defn \ker \lambda$, whence $\dim M = \dim N + 1$. \\

Consider the two-fold composition of the adjoint representation, which we denote by $\sigma$. More explicitly, $\sigma = \Adj \circ \Adj : L \to \gl L \to \gl{\gl L}$, so that for $x \in L$ and $\alpha \in \gl L$, we have
$\sigma_x(\alpha) \defn \adj{\adj x}(\alpha) = [\adj x, \alpha] = \adj x \circ \alpha - \alpha \circ \adj x.$
In other words, for $x,y \in L$ and $\alpha \in \gl L$,
$\sigma_x(\alpha)(y) = [x,\alpha(y)] - \alpha([x,y]).$
This turns $\gl L$ into an $L$-module. From this formula, we deduce that if $x \in L$ and $\alpha \in M$, then $\sigma_x(\alpha) \in N$ since for $y \in \rad L$,
$\sigma_x(\alpha)(y) = [x,\alpha(y)] - \alpha(\undersetbrace{\in \rad L}{[x,y]}) = [x,\lambda_{\alpha} y] - \lambda_{\alpha} [x,y] = 0 \implies \lambda_{\sigma_x(\alpha)} = 0.$
In other words, $\sigma_x(M) \subseteq N$ for all $x \in L$, which shows simultaneously that $M$ and $N$ are $L$-submodules of $\gl L$. Furthermore, if $x \in \rad L$, $\alpha \in M$ and $y \in L$, since $\rad L$ is abelian and $\alpha(y) \in \rad L$, we obtain
$\sigma_x(\alpha)(y) = \undersetbrace{\in \dera{\rad L} = 0}{[x,\alpha(y)]} - \alpha([x,y]) = - \lambda_{\alpha}[x,y] \implies \sigma_x(\alpha) = -\lambda_{\alpha} \adj x = \adj{-\lambda_{\alpha} x}.$
Since $Z(L) = 0$, the adjoint representation of $L$ is injective, so restricting it to $\rad L$ defines an isomorphism of Lie algebras onto a subspace $P$ given by $\phi : \rad L \to P \subseteq \gl L$ via $x \mapsto \phi(x) \defn \adj x$. Since $\rad L$ is abelian, $\adj x|_{\rad L} = 0$, which means that $P \subseteq N$. From the equality $\sigma_x(\alpha) = \adj{-\lambda_{\alpha} x}$ above, one sees that for any $x \in \rad L$, we have $\sigma_x(M) \subseteq P$. The subspace $P$ is also an $L$-submodule of $\gl L$ because for $x \in L$ and $x' \in \rad L$, the assumption $[L,\rad L] = \rad L$ implies
$\sigma_x(\phi(x')) = [\adj x, \adj{x'}] = \adj{\undersetbrace{\in \rad L}{[x,x']}} = \phi([x,x']) \in P.$
Consider the quotient $L$-module $M/P$. Since $\sigma_x(M) \subseteq P$ for $x \in \rad L$, we obtain $(\rad L)(M/P) = 0$, hence the $L$-module $M/P$ becomes an $L/\rad L$-module. Since $L/\rad L$ is semisimple, by Weyl's Theorem, $M/P$ is a completely reducible $L/\rad L$-module, and since the Lie module structures agree, it is also a completely reducible $L$-module. Therefore, the $L$-submodule $N/P \le M/P$ admits a complement which is $1$-dimensional, thus this complement can be generated by some element $\beta + P \in M/P$ where $\beta \in M$ is chosen to satisfy the following conditions~:
$\lambda_{\beta} = 1, \quad \forall x \in L, \quad \sigma_x(\beta) \in P.$
The condition on $\lambda_{\beta}$ is possible after rescaling since $\beta \in M \setminus N$ implies $\lambda_{\beta} \neq 0$~; the second condition follows by \autoref{affine-Lie-algebra-lemma-to-levi-subalgebra} (i) since $L/\rad L$ is semisimple and $\langle \beta + P \rangle$ is a $1$-dimensional $L/\rad L$-module. \\

Consider the linear map $\psi : L \to \rad L$ given by $x \mapsto \psi(x) \defn -\phi^{-1}(\sigma_x(\beta))$. For $x \in \rad L$, the equation $\sigma_x(\alpha) = \adj{-\lambda_{\alpha}x}$ applied to $\alpha \defn \beta$ shows that $\psi|_{\rad L}$ is the identity, which gives $\ker \psi \cap \rad L = 0$. The exact sequence of vector spaces
$\begin{tikzcd} 0 \ar{r}{} & \ker \psi \ar{r}{} & L \ar{r}{} & \rad L \ar{r}{} & 0 \end{tikzcd}$
is therefore split and $\psi$ is a projection onto the subspace $\rad L$. Describing $\ker \psi$ more explicitly as
$\ker \psi = \{ x \in L \mid \sigma_x(\beta) = 0 \},$
we see that $\ker \psi$ is a Lie subalgebra of $L$~: for $x,y \in \ker \psi$,
$\sigma_{[x,y]}(\beta) = \sigma_x(\sigma_y(\beta)) - \sigma_y(\sigma_x(\beta)) = 0 - 0 = 0.$
This means $\ker \psi \oplus \rad L = L$, meaning that $S \defn \ker \psi$ is a Levi subalgebra of $L$, which proves (i) for this step. \\

As for (ii), let $S'$ be another Levi subalgebra of $L$. By definition, for any $x \in S' \subseteq L = \rad L \oplus S$, we have $x = \psi(x) + (x-\psi(x))$ and $\psi(x) \in \rad L$, $x-\psi(x) \in S$. Therefore, the fact that $\rad L$ is abelian implies
$[x,y] - [\psi(x),y] - [x,\psi(y)] = [x-\psi(x), y - \psi(y)] \in S,$
meaning that $\psi([x,y]) = \adj x(\psi(y)) - \adj y(\psi(x))$. By restricting, we obtain maps of Lie algebras $\psi|_{S'} : S' \to \rad L$ and $\Adj|_{S'} : S' \to \gl{\rad L}$. Using \autoref{affine-Lie-algebra-lemma-to-levi-subalgebra} (ii), there exists some $r \in \rad L$ such that for all $x \in S'$, $\psi(x) = \adj x(r)$. It follows that
$x - \psi(x) = x - [x,r] = x + [r,x] = (\id L + \adj r)(x).$
Since $\rad L$ is abelian, we have $\adj r^2 = 0$, which implies $\id L + \adj r = e^{\adj r}$. We infer from the equality $\rad L = [L,\rad L] = \nrad L$ that $e^{\adj r}$ is a special automorphism of $L$, showing that $S' = e^{\adj r}(S)$ is the image of $S$ by a special automorphism of $L$.

\item[] \textbf{Step 3}~: We argue by induction on $\dim \rad L$. If $\dim \rad L = 0$, we have $[L,\rad L]=0$, so we can make use of Step 1. By \autoref{relation-between-radicals-equalities}, $[L,\rad L]$ is nilpotent, hence has non-trivial center $\c \defn Z([L,\rad L]) \neq 0$. By Step 2, we can assume that $[L,\rad L]$ contains a non-zero ideal of $L$ properly contained in $[L,\rad L]$. If $\a$ is such an ideal (i.e. an $L$-submodule of $L$), let $(V_0,\cdots,V_m)$ be a Jordan-H\"older series for the $L$-module $\a$. Since $\a \subseteq [L,\rad L] = \nrad L$, the sequence
$\a_0 = \a, \quad \a_1 = [L,\a_0], \quad \cdots \quad \a_n \defn [L,\a_{n-1}]$
eventually reaches zero when $n=m$ since $\a_n \subseteq V_{m-n}$ for $0 \le n \le m$. If $n$ is chosen such that $\a_n \neq 0$ and $\a_{n+1} = [L,\a_n] = 0$, then $\a_n \subseteq \c$. \\

Let $\m$ be a non-zero ideal of $L$ contained in $\c$ and properly contained in $[L,\rad L]$, which exists by the above argument (the assumption $\m \subseteq \c$ will only be relevant to prove (ii)). The ideal $\m$ is solvable, so if $\pi_{\m} : L \to L/\m$ denotes the canonical projection, $\rad{L/\m} = \rad L/\m$ by \autoref{rad-of-L-over-rad} and $\dim \rad{L/\m} < \dim \rad L$. By the induction hypothesis, $L/\m$ admits a Levi subalgebra $L'/\m$. It follows that $L'$ is a Lie subalgebra of $L$ such that $L'/\m$ is semisimple, which means $\rad{L'} = \m$ since $\m$ is solvable (because $\m \subseteq \rad L$). By the induction hypothesis applied to the pair $(\m,L')$, since $\dim \m < \dim \rad L$, the Lie algebra $L'$ admits a Levi subalgebra $S$ which is semisimple, so that $L' = \m + S$. The equality $L/\m = L'/\m + \rad L/\m$ implies
$L = L' + \rad L = (\m + S) + \rad L = \rad L + S,$
hence $S$ is also a Levi subalgebra of $L$. This proves (i). \\

For (ii), let $S'$ be another Levi subalgebra of $L$. It follows that $\pi_{\m}(S)$ and $\pi_{\m}(S')$ are two Levi subalgebras of $L/\m$, so by the induction hypothesis, there exists an element $r_1 \in [L,\rad L]$ such that $r_1 + \m \in [L,\rad L]/\m = [L/\m,\rad{L/\m}]$ satisfies $e^{\adj{r_1+\m}}(\pi_{\m}(S')) = \pi_{\m}(S)$. This implies
$S'' \defn e^{\adj{r_1}}(S') \subseteq S + \m = L',$
i.e. $S$ and $S''$ are two Levi subalgebras of $L'$. By the induction hypothesis, there exists an element
$r_2 \in [L',\rad{L'}] \subseteq \rad{L'} = \m \subseteq \c = Z([L,\rad L])$
such that $[r_1,r_2]=0$ (because $r_1 \in [L,\rad L]$), $r_1 + r_2 \in [L,\rad L]$ and
$e^{\adj{r_1+r_2}}(S') = e^{\adj{r_2}}(e^{\adj{r_1}}(S')) = e^{\adj{r_2}}(S'') = S.$
As for (iii), if $e^{\adj a}$ is a special automorphism, since $e^{\adj a}(\rad L) \subseteq L$ is solvable, we have $e^{\adj a}(\rad L) \subseteq \rad L$. They have the same dimension as vector spaces over $F$, so we have equality. Since
$\rad L + e^{\adj a}(S) = e^{\adj a}(\rad L) + e^{\adj a}(S) = e^{\adj a}(\rad L + S) = e^{\adj a}(L) = L,$
we see that $e^{\adj a}(S)$ is a Levi subalgebra of $L$, which completes the proof.
\end{enumerate}\end{proof}

\begin{cor}
\end{cor}

\end{document}

• I don't know if it helps you (it depends on your class), but like mentioned in tex.stackexchange.com/questions/10743/… maybe you should switch between \flushbottom and \raggedbottom. – TeXnician Feb 6 '17 at 16:51
• @user124577 : I tried adding either \flushbottom or \raggedbottom in my preamble but no change at all. Perhaps it is worth mentioning that I use the book documentclass. – Patrick Da Silva Feb 6 '17 at 16:57
• Maybe you should try giving \parskip a plus component (from tex.stackexchange.com/questions/65355/…), e.g. \setlength{\parskip}{0pt plus \baselineskip}. – TeXnician Feb 6 '17 at 17:01
• Sorry, but I tried in several ways to reproduce the issue, but have not being able to. – egreg Feb 6 '17 at 17:10
• you can construct a test example by removing everything before the text that begins the affected page, then including about two pages' worth of material. that should be enough to trigger the effect. we really do need an example to experiment. – barbara beeton Feb 6 '17 at 18:19