64c3814
==== TABLE OF CONTENTS ====
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//paper.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/00-introduction.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/01-comparisons.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/02-terminal-models.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/02a-difficulty-setup.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/03-branch-topology.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/04-local-valuations.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/05-difficulty.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/06-lc-and-existence.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/07-field-transfer.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/08-consequences.tex
Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//references.bib
===========================

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//paper.tex ====
\documentclass[11pt]{article}
\input{glyphtounicode}
\pdfgentounicode=1
\pdfglyphtounicode{arrowhookleft}{21AA}
\pdfglyphtounicode{mapsto}{007C}
\pdfglyphtounicode{axisshort}{002D}
\pdfglyphtounicode{arrowaxisright}{2192}
\pdfglyphtounicode{parenleftbig}{0028}
\pdfglyphtounicode{parenrightbig}{0029}
\pdfglyphtounicode{bracketleftbig}{005B}
\pdfglyphtounicode{bracketrightbig}{005D}
\pdfglyphtounicode{braceleftbig}{007B}
\pdfglyphtounicode{bracerightbig}{007D}
\pdfglyphtounicode{parenleftBig}{0028}
\pdfglyphtounicode{parenrightBig}{0029}
\pdfglyphtounicode{parenleftBigg}{0028}
\pdfglyphtounicode{parenrightBigg}{0029}
\pdfglyphtounicode{circleplusdisplay}{2A01}
\pdfglyphtounicode{circlemultiplydisplay}{2A02}
\pdfglyphtounicode{summationtext}{2211}
\pdfglyphtounicode{uniontext}{22C3}
\pdfglyphtounicode{summationdisplay}{2211}
\pdfglyphtounicode{uniondisplay}{22C3}
\pdfglyphtounicode{coproducttext}{2210}
\pdfglyphtounicode{hatwide}{0302}
\pdfglyphtounicode{tildewide}{0303}
\pdfglyphtounicode{parenlefttp}{239B}
\pdfglyphtounicode{parenleftbt}{239D}
\pdfglyphtounicode{parenrighttp}{239E}
\pdfglyphtounicode{parenrightbt}{23A0}
\pdfinfoomitdate=1
\pdftrailerid{}
\pdfsuppressptexinfo=15
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb,amsthm,mathrsfs,mathtools}
\usepackage{enumitem,booktabs,array}
\usepackage{tikz-cd}
\usepackage{microtype}
\usepackage{xcolor}
\definecolor{linkblue}{RGB}{25,55,105}
\usepackage[colorlinks=true,linkcolor=linkblue,citecolor=linkblue,urlcolor=linkblue]{hyperref}
\hypersetup{pdftitle={Termination for projective log canonical fourfolds with rational boundary},pdfauthor={OpenAI},pdfsubject={Fourfold termination, log canonical pairs, branch bounds and weighted difficulty}}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}[theorem]{Remark}
\numberwithin{equation}{section}
\setlist[enumerate]{itemsep=3pt,topsep=5pt}
\setlist[itemize]{itemsep=3pt,topsep=5pt}
\setcounter{tocdepth}{1}
\title{Termination for projective log canonical fourfolds\protect\\ with rational boundary}
\author{OpenAI}
\date{September 24, 2026}
\begin{document}
\maketitle
\begin{abstract}
We prove that every permitted minimal model program for a projective log canonical fourfold with rational boundary over an algebraically closed field of characteristic zero terminates. The result allows arbitrary negative extremal rays and mixed birational steps on the given models, without pseudo-effectivity or initial $\mathbb Q$-factoriality.
\end{abstract}
\tableofcontents
\input{sections/00-introduction}
\input{sections/01-comparisons}
\input{sections/02-terminal-models}
\input{sections/02a-difficulty-setup}
\input{sections/03-branch-topology}
\input{sections/04-local-valuations}
\input{sections/05-difficulty}
\input{sections/06-lc-and-existence}
\input{sections/07-field-transfer}
\input{sections/08-consequences}
\begingroup
\raggedright
\bibliographystyle{plain}
\bibliography{references}
\endgroup
\end{document}
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//paper.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/00-introduction.tex ====
\section{Introduction and statement}
\label{sec:introduction}

The minimal model program seeks to simplify a projective variety by operations
on which its canonical divisor, or an adjoint divisor $K_X+B$, is negative.
A divisorial contraction removes a divisor. A flip replaces a small
contraction by a birational model on which the adjoint becomes relatively
ample. The expected endpoint is a nef adjoint or a Mori fibre space.
Existence of the required operations makes the program possible;
termination ensures that a sequence of choices actually reaches an endpoint.
It is stronger than the existence of one minimal model or the termination
of a particular program with scaling.

The three-dimensional log minimal model program established the basic
pattern; see \cite{KollarEtAl1992,KM98}. In higher dimensions,
Birkar--Cascini--Hacon--McKernan proved klt flip existence and
minimal-model existence for klt pairs with big boundary and
pseudo-effective adjoint \cite{BCHM}.
Fujino's cone and contraction theorem and Birkar's lc flip theorem
supply the corresponding operations for log canonical pairs
\cite{FujinoFoundations,BirkarLC}. In dimension four, Shokurov's
ordered-termination method constructed minimal models or Mori fibre
spaces; Birkar gave a short proof of the klt case
\cite{ShokurovOrdered,BirkarShokurov}. These constructions use
selected programs, and do not establish termination for every
successive choice of negative ray.

The difficulty method studies arbitrary sequences by combining
discrepancy improvement with the geometry of the exceptional loci.
Shokurov introduced discrepancy-counting difficulty
\cite[Definition~2.15 and Corollaries~2.16--2.17]{Shokurov1985}.
Kawamata proved termination for terminal fourfolds
\cite{KMM87}, and Fujino extended the method to
canonical pairs with rational boundary; the weighted difficulty
and precise hypotheses are corrected in
\cite{FujinoCanonical,FujinoCanonicalAddendum}.
Algebraic cycle classes account for the remaining flips of
type $(2,1)$ in these arguments. Alexeev--Hacon--Kawamata developed
weighted difficulties that subtract the families of valuations
arising along a boundary component and include cycle-rank terms
on its normalization \cite{AHK}. Their Theorem~3.2 proves
termination of klt fourfold flips when $-(K_X+B)$ is numerically equivalent to an
effective divisor. This numerical effectivity hypothesis does
not follow from non-pseudo-effectivity of $K_X+B$.

Arbitrary termination for pseudo-effective lc fourfolds is now
available through the generalized-pair theorem of
Chen--Tsakanikas \cite[Theorem~1.1]{ChenTsakanikas} and Moraga's
termination theorem \cite[Theorem~1]{Moraga2025}. Both cover
ordinary pairs with real boundary and impose no initial
$\mathbb Q$-factoriality in their statements about sequences of
flips. The unrestricted theorem of Chen--Tsakanikas is
three-dimensional. More recently, Han--Liu--Zhuang proved
termination of every klt fourfold MMP with big boundary, including
the non-pseudo-effective case
\cite[Corollary~3.2(3)]{HanLiuZhuang2025}.

The result below treats ordinary lc fourfolds with rational
boundary without a pseudo-effectivity or big-boundary hypothesis.
It also includes mixed birational operations on models which
need not be $\mathbb Q$-factorial. The proof follows the difficulty
approach: its additional ingredient controls the normalization
branches that enter the correction terms when coefficients on
the auxiliary terminal models continue to decrease.

We prove the projective four-dimensional case of the Termination of Flips
Conjecture for ordinary log canonical pairs with rational boundary;
see \cite[Introduction]{ChenTsakanikas} for the conjecture and its
generalized-pair formulation. Our program always starts from the given
model. We first prove the theorem over $\mathbb C$, where the branch
estimate uses topology, and then transfer the full assertion to every
algebraically closed characteristic-zero field.

Throughout, a pair $(X,B)$ consists of a normal integral variety and an effective $\mathbb Q$-divisor such that $K_X+B$ is $\mathbb Q$-Cartier. Canonical divisors on birational models are chosen using the same rational top differential. For a normalized divisorial valuation $v=\operatorname{ord}_E$, with $E$ on a smooth model $p:W\to X$, our convention is
\[
 a(v;X,B)=1+\operatorname{coeff}_E\bigl(K_W-p^*(K_X+B)\bigr).
\]
Thus $a$ is the \emph{log discrepancy}. Its center $c_X(v)$ is the closed irreducible center. A valuation is exceptional over $X$ when this center has codimension at least two. Log canonical (lc) and klt mean, respectively, that every log discrepancy is nonnegative and positive. A terminal pair is klt and has $a(v;X,B)>1$ for every exceptional valuation. The boundaries in the pair statements are effective; the crepant pullback divisors used on log resolutions may have negative coefficients.

\begin{definition}[Programs and mixed steps]\label{def:program}
Let $(X,B)$ be a projective lc pair. Set $(X_0,B_0)=(X,B)$ and $D_i=K_{X_i}+B_i$. At a non-nef stage choose any $D_i$-negative extremal ray of $\overline{\operatorname{NE}}(X_i)$ and its projective contraction
\[
 f_i:X_i\longrightarrow Z_i,
 \qquad (f_i)_*\mathcal O_{X_i}=\mathcal O_{Z_i},
 \qquad \rho(X_i/Z_i)=1.
\]
The target is normal, and $-D_i$ is relatively ample. Stop if $f_i$ is of fibre type. If it is birational, a permitted step is
\[
 X_i\xrightarrow{\ f_i\ }Z_i
 \xleftarrow{\ f_i^+\ }X_{i+1},
\]
where $f_i^+$ is small and projective birational, possibly an isomorphism, $(X_{i+1},B_{i+1})$ is lc, $B_{i+1}$ is the strict transform of $(f_i)_*B_i$, and $D_{i+1}$ is $\mathbb Q$-Cartier and $f_i^+$-ample. There is no condition on $\rho(X_{i+1}/Z_i)$.

This includes divisorial contractions, flips, and a divisorial contraction followed by a small modification. We call the last possibility a \emph{mixed step}. Stop at a nef adjoint as well. Flops, extra blowups, and inserted isomorphisms are not steps. A program is maximal if it is continued whenever neither stopping condition holds. The broader face-contracting convention in \cite[Definition~2.5]{HanLiuZhuang2025} also allows such birational diagrams; here the negative contraction is required to contract one extremal ray.
\end{definition}

\begin{theorem}\label{thm:main}
Let $k$ be an algebraically closed field of characteristic zero, and let $(X,B)$ be a projective lc pair of dimension four with rational boundary. No $\mathbb Q$-factoriality or pseudo-effectivity is assumed.
\begin{enumerate}[label=\textup{(\roman*)}]
\item Every negative extremal ray at every stage has the contraction and, when birational, a positive model required by Definition~\ref{def:program}.
\item Every program of Definition~\ref{def:program} starting from $(X,B)$ has finitely many birational steps, for every sequence of permitted choices.
\item Every maximal program ends either at a projective lc pair with nef adjoint, or at a Mori fibre space: a projective contraction with connected fibres, relative Picard number one, lower-dimensional normal base, and relatively ample negative adjoint.
\end{enumerate}
An already nef input has a zero-step completed program.
\end{theorem}

The auxiliary terminal and dlt models used in the proof retain the
initial model and every prescribed downstairs choice.  Theorem~\ref{thm:main}
is a termination statement; semiampleness of a nef endpoint requires
abundance.  Section~\ref{sec:endpoints} gives that consequence using
\cite{OpenAILogAbundance2026}.  It also obtains uniform local complements
and Cartier sections at $\epsilon$-lc Mori endpoints over $\mathbb C$
from \cite{OpenAIComplements2026} and \cite{OpenAICartier2026}, respectively.

\subsection*{The difficulty and the branch estimate}

The proof reduces termination to a numerical problem on auxiliary
terminal models.  Ranks of divisor cycle classes first remove all
steps that lose divisors, including mixed steps.  A remaining klt
small tail lifts to crepant terminal junctions, joined by coefficient
decreases and finite small terminal programs.  The same finite set
of boundary labels persists throughout this chain.  Surface minimal
log discrepancy ACC confines every label whose coefficient keeps
varying to a divisor mapped downstairs to a curve or a point.

A weighted discrepancy count on these models has an ordinary family
of contributions at each surface on a single boundary component.
We subtract that family's default weight locally, before summing,
and add divisor-cycle ranks on the boundary normalizations.  This
produces a finite integer $\mathcal D$.  The weights are ceilings
\(w(u)=\lceil N\max\{u,0\}\rceil\), with $N$ clearing only the
original and fixed coefficients; a valuation of log discrepancy $a$
has weight $w(2-a)$.  At a surface $V$ with $r\geq1$ varying
normalization branches, the sum of their individual defaults can
exceed the weight paid by the first blowup.  The elementary inequality
\[
 \lceil x_1+\cdots+x_r\rceil
 \geq\sum_{j=1}^r\lceil x_j\rceil-(r-1)
\]
identifies the possible deficit as $r-1$.  Section~\ref{sec:difficulty-setup}
constructs $\mathcal D$ and proves this local bound, including the
higher default contributions.

The geometric input, Theorem~\ref{thm:branch}, bounds the total excess
of normalization branches along surfaces of the varying boundary.
It pays for that excess using divisor-cycle ranks of its normalized
components and distinct valuations centered on curves, with log
discrepancy below two.  These are already positive terms in
$\mathcal D$, so the estimate makes $\mathcal D$ nonnegative at every
crepant junction.  The branches are algebraic prime divisors over
the generic field of the surface; residue degrees enter their
cycle pushforward.

To prove the estimate, normalization relations first give a bound
through weight-four degree-five cohomology.  Projective decomposition
and a support estimate isolate punctured degree-two local systems
along singular curves.  Finite monodromy and norms represent invariant
classes by line bundles over each curve's original function field.
Formal existence and approximation extend these bundles to a pointed \'etale
neighbourhood with unchanged residue field.  Degrees on a small
model produce distinct divisorial valuations of the original function
field, each with zero-boundary log discrepancy two.  The positive
boundary lowers their discrepancies strictly.  The topological and
valuation arguments occupy Sections~\ref{sec:branch-topology}
and~\ref{sec:local-valuations}.

Section~\ref{sec:difficulty} returns to the terminal chain.  Exact
cancellation between normalization ranks and branch defaults makes
$\mathcal D$ nonincreasing.  Every positive-side bad surface forces
a unit decrease: the relevant endpoint discrepancy has an integral
scaled deficit, so strict discrepancy improvement crosses a ceiling
threshold.  Hence only finitely many such surfaces occur.  A second
cycle-rank comparison and the graph dimension bound finish klt
termination.  Section~\ref{sec:lc} uses special termination and
nonempty dlt bridges to transfer this conclusion to each prescribed
lc program, and proves continuation through every chosen negative
ray.  Section~\ref{sec:field} transfers an entire hypothetical
countable program to $\mathbb C$ and spreads the finite continuation
data back to the stated characteristic-zero fields.

\subsection*{Foundational inputs}

We use the cone and contraction theorems, the klt existence and
relative big results of BCHM, surface minimal log discrepancy ACC,
lower-dimensional log MMP and dlt special termination, and Birkar's
rational complemented-pair existence theorem.  Their hypotheses are
specified at their applications.  On the topological side, Deligne's
mixed Hodge theory \cite{Deligne1971,Deligne1974}, the intersection
complexes of Goresky--MacPherson \cite{GM1983}, and the decomposition
theorem of Beilinson--Bernstein--Deligne--Gabber \cite{BBD1982}, with
Saito's Hodge-module refinement \cite{Saito1988,Saito1989}, supply
the weights and support bounds.  Formal functions, Grothendieck
existence and Artin approximation are used with the actual scheme
fibres.  Sections~\ref{sec:comparisons}--\ref{sec:lc} work over
$\mathbb C$; the field transfer applies to every program in the
theorem.  The termination proof is independent of the companion
results used for the endpoint consequences.
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/00-introduction.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/01-comparisons.tex ====
\section{Graph comparisons and cycle ranks}
\label{sec:comparisons}

We work over $\mathbb C$.  We will reduce termination to controlling how
often the positive model of a step contains a surface above the base
locus where either morphism fails to be an isomorphism.  The graph
comparison identifies exactly where discrepancies improve, including
in a mixed step.  Ranks of algebraic cycle classes then remove the
steps that lose divisors; after these positive-side surfaces have
disappeared, a second rank comparison removes the corresponding
negative-side surfaces as well.

We use the negativity lemma in the following form: if $q:T\to V$ is
projective birational, $E$ is an $\mathbb R$-Cartier divisor, $-E$ is
$q$-nef, and $q_*E\geq0$, then $E\geq0$; see
\cite[Lemma~3.39]{KM98}.  In particular, an exceptional divisor which
is relatively numerically trivial is zero, by applying the lemma to
both signs.  All varieties in this section are projective.

\subsection{The full bad loci}

Consider a birational diagram
\begin{equation}\label{eq:step-diagram}
 X^-\xrightarrow{\,f^-\,} Z
 \xleftarrow{\,f^+\,}X^+,
\end{equation}
where the varieties are normal fourfolds, the morphisms have connected fibres, $f^+$ is small, and the divisors
$D^\pm=K_{X^\pm}+B^\pm$ are $\mathbb Q$-Cartier. The boundary on $X^+$ is the strict transform of $f^-_*B^-$, and
$-D^-$ and $D^+$ are ample over $Z$. The arguments here do not require the positive pair to be lc in advance.

Let $U\subset Z$ be the largest open over which both morphisms are isomorphisms, and put
\begin{equation}\label{eq:bad-loci}
 \Sigma=Z\setminus U,\qquad
 W^-=(f^-)^{-1}\Sigma,\qquad W^+=(f^+)^{-1}\Sigma,
\end{equation}
with reduced structures. These sets include the inverse image of the bad locus of the other morphism. In particular, $W^+$ can be nonempty when $f^+$ is an isomorphism.

\begin{lemma}\label{lem:graph}
Let $G$ be the normalization of the graph of the birational map in \eqref{eq:step-diagram}, with projections $u:G\to X^-$ and $v:G\to X^+$. Then
\[
 H=u^*D^- -v^*D^+\geq0,
 \qquad
 \operatorname{Supp}H=(G\to Z)^{-1}\Sigma.
\]
The divisor $H$ is exceptional over $X^+$, and $-H$ is ample over $Z$. For every divisorial valuation $\xi$ of the common function field,
\begin{equation}\label{eq:discrepancy-comparison}
 a(\xi;X^+,B^+)-a(\xi;X^-,B^-)=\xi(H)\geq0.
\end{equation}
The inequality is strict exactly when $c_{X^-}(\xi)\subset W^-$, equivalently when $c_{X^+}(\xi)\subset W^+$.

For a nontrivial step,
\begin{equation}\label{eq:graph-dimension}
 \dim W^-+\dim W^+\geq3.
\end{equation}
Always $\dim W^+\leq2$. If $f^-$ is also small, then $\dim W^-\leq2$ and $\dim\Sigma\leq1$.
\end{lemma}

\begin{proof}
Every prime divisor on $X^+$ maps to a prime divisor on $Z$, since $f^+$ is small. Its strict transform on $X^-$ has the same adjoint coefficient: use the compatible canonical divisors and the stated boundary transform. Thus $v_*H=0$. The normalization map from $G$ to its closed graph in $X^-\times_Z X^+$ is finite. The sum of the pullbacks of the relatively ample divisors $-D^-$ and $D^+$ is relatively ample on that product; its finite pullback is $-H$. In particular, $-H$ is $v$-nef, and negativity gives $H\geq0$.

For a proper birational morphism onto a normal variety, its nonisomorphism locus on the target is exactly its positive-dimensional-fibre locus. Indeed, over the zero-dimensional-fibre locus the morphism is finite locally on the target, hence an isomorphism by normality. Consequently each graph fibre over $\Sigma$ has positive dimension: it maps surjectively to each of the two fibres and at least one of those fibres has positive dimension. Graph fibres are connected, by Stein factorization for the proper birational map $G\to Z$.

Every closed point of a connected positive-dimensional projective fibre lies on a curve in that fibre. To see this, a point which lies on no positive-dimensional irreducible component would be an isolated zero-dimensional component, contradicting connectedness; a positive-dimensional projective component contains a curve through each of its points. If a point of the graph fibre were outside $\operatorname{Supp}H$, choose such a curve through it. That curve is not contained in the effective $\mathbb Q$-Cartier divisor $H$, so its intersection with $H$ is nonnegative. This contradicts the relative ampleness of $-H$. Thus the whole inverse image of $\Sigma$ lies in the support. On the common isomorphism open the adjoints agree, so the reverse inclusion holds as well.

Pull the divisor identity back to a smooth common model carrying $\xi$. Compatible canonical divisors give \eqref{eq:discrepancy-comparison}. The order of an effective $\mathbb Q$-Cartier divisor at a valuation is positive exactly when its center lies in the support. Since this support is the full inverse image of $\Sigma$, the two descriptions of strictness follow.

For a nontrivial step the support is nonempty and contains a prime divisor of the fourfold $G$. This divisor has dimension three. Its map into $W^-\times W^+$ is finite onto its image, giving \eqref{eq:graph-dimension}.

The assertion about $W^+$ also follows from $v_*H=0$: a prime divisor in $W^+$ would have a divisorial strict transform on $G$ lying in $\operatorname{Supp}H$, contrary to the zero pushforward. If $f^-$ is small, codimension-one comparison similarly gives $u_*H=0$, so $\dim W^-\leq2$. Finally each component of $\Sigma$ is a positive-dimensional-fibre locus for at least one of the two morphisms. Its full inverse image on that side has dimension at least one larger, so $\dim\Sigma\leq1$.
\end{proof}

\begin{corollary}\label{cor:singularities-preserved}
Under the hypotheses of Lemma~\ref{lem:graph}, lc and klt are preserved. For a small step, an effective terminal pair remains terminal. At a divisor-losing step the discrepancy of every lost prime divisor increases strictly.
\end{corollary}

\begin{proof}
Use \eqref{eq:discrepancy-comparison}. In a small step the same valuations are exceptional on both models. A lost prime divisor is contained in $W^-$.
\end{proof}

\subsection{Ranks of cycle classes}

The use of algebraic cycle classes to count fourfold flips goes back to
\cite{KMM87}; see also \cite[Lemma~10, preprint version]{FujinoCanonical}.
We use the same homological principle for the full bad loci, so that it
also detects divisor loss in a mixed step.

For a projective variety $V$ define
\[
 \rho_r(V)=
 \dim_{\mathbb Q}
 \operatorname{span}\{[A]\in H_{2r}(V,\mathbb Q):
                  A\subset V\text{ irreducible},\ \dim A=r\}.
\]
For an open variety use Borel--Moore homology in the same definition. On a normal projective threefold $S$ we write
$\rho_*(S)=\rho_2(S)$. This is a rank of divisor cycle classes; we do not identify it with a Picard number on a singular variety.

\begin{lemma}\label{lem:cycle-rank}
Let $V$ be projective and $A\subset V$ closed of dimension at most $r$. Restriction to $V\setminus A$ maps the span of $r$-cycle classes onto the corresponding Borel--Moore cycle span. Its kernel is exactly the span of the classes of the $r$-dimensional irreducible components of $A$. In particular,
\begin{enumerate}[label=\textup{(\roman*)}]
\item removing a set of dimension less than $r$ does not change this rank;
\item removing a set with an $r$-dimensional component strictly lowers the rank.
\end{enumerate}
For a sequence of diagrams as in Lemma~\ref{lem:graph}, only finitely many steps lose a prime divisor. On a small tail with no positive-side bad surfaces, only finitely many steps have a negative-side bad surface.
\end{lemma}

\begin{proof}
Every irreducible closed $r$-dimensional subvariety of the open complement is the restriction of its closure in $V$. Hence the restriction of cycle spans is onto. The localization sequence
\[
 H_{2r}(A,\mathbb Q)\longrightarrow H_{2r}(V,\mathbb Q)
 \longrightarrow H^{\mathrm{BM}}_{2r}(V\setminus A,\mathbb Q)
\]
is exact. Since $\dim A\leq r$, its first group is generated by the fundamental classes of its $r$-dimensional components. These images already belong to the cycle span, proving the kernel assertion. If such a component exists, its class in $V$ is nonzero: intersection with the $r$th power of an ample divisor has positive degree.

In a step the complements of $W^-$ and $W^+$ are isomorphic. Apply the first assertion with $r=3$. The positive bad set has dimension at most two, so the positive-side rank equals the rank on this common open. The negative-side rank is at least that rank, and is strictly larger if a divisor is lost. These nonnegative integer ranks cannot strictly decrease infinitely often. This proves the first finiteness assertion, including mixed steps.

After passing to a small tail, both bad sets have dimension at most two. If the positive sets have dimension at most one, repeat the argument with $r=2$. Each negative-side surface gives a strict rank decrease.
\end{proof}

\begin{corollary}\label{cor:surfaces-suffice}
To prove termination of a fourfold program it suffices to show that, on its small tail, positive-side bad surfaces occur only finitely often.
\end{corollary}

\begin{proof}
After the two applications of Lemma~\ref{lem:cycle-rank}, both bad sets have dimension at most one. Their dimensions then contradict \eqref{eq:graph-dimension} at every further nontrivial step.
\end{proof}

\subsection{Identifying a prescribed ample end}

The following elementary comparison will be used for both terminal and dlt bridges. All divisor equalities are equalities of actual $\mathbb Q$-divisors with compatible canonical choices.
It is the usual comparison of nef birational ends by negativity;
see also \cite[Remark~2.7]{BirkarLC}.

\begin{lemma}\label{lem:two-ends}
Let $V_1$ and $V_2$ be normal projective birational models over a normal base $Z$, with relatively nef $\mathbb Q$-Cartier divisors $D_1,D_2$. On a smooth common model $W$, with projections $q_j:W\to V_j$, suppose
\[
 A=q_1^*D_1+F_1=q_2^*D_2+F_2,
\]
where $F_j\geq0$ is exceptional over $V_j$. Then
$q_1^*D_1=q_2^*D_2$. If $D_2$ is ample over $Z$, the birational map $V_1\dashrightarrow V_2$ is a morphism $h$, and $D_1=h^*D_2$.
\end{lemma}

\begin{proof}
Put $E=q_1^*D_1-q_2^*D_2=F_2-F_1$. Its pushforward to $V_1$ is effective. On curves contracted by $q_1$, the divisor $E$ is the negative of a nef divisor, so $-E$ is $q_1$-nef. Negativity gives $E\geq0$. Interchanging the two ends gives $-E\geq0$, hence $E=0$.

If $D_2$ is relatively ample, every curve in a fibre of $q_1$ has zero degree against $q_2^*D_2$, and is therefore contracted by $q_2$. The image under $q_2$ of that projective connected fibre must be a point. Indeed a positive-dimensional projective image would contain a curve, and projective hyperplane sections of its inverse image supply a curve mapping onto it. The graph factorization lemma for a proper morphism with connected fibres onto a normal variety gives $q_2=hq_1$. Equality of pullbacks and birational pushforward yield $D_1=h^*D_2$.
\end{proof}

For a finite negative birational program extracting no prime divisor, repeated use of Lemma~\ref{lem:graph} writes the input adjoint pullback as the final pullback plus an effective final-exceptional divisor. Thus Lemma~\ref{lem:two-ends} applies to finite programs and a prescribed ample model whenever both comparisons have this form.
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/01-comparisons.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/02-terminal-models.tex ====
\section{Terminal junctions and the coefficients that can vary}
\label{sec:terminal}

We work over $\mathbb C$.  Lemma~\ref{lem:cycle-rank} reduces a
hypothetical infinite klt program to a small tail.  We lift that tail
to crepant terminal models, joined by coefficient decreases and finite
strings of small flips, and show that every coefficient which keeps
varying belongs to a divisor whose downstairs center has codimension
at least three.

Two finiteness statements make this construction useful.  Finiteness of
the exceptional valuations with log discrepancy at most one lets us
stabilize the divisors extracted on the terminal models.  The description
of valuations below discrepancy two then identifies the ordinary
families that must be subtracted to obtain a finite difficulty.  Both
follow from the same log-smooth calculation.

\subsection{A log-smooth calculation}

We use characteristic-zero resolution and principalization in the
form originating with Hironaka \cite{Hironaka1964I,Hironaka1964II}:
the chosen resolution can make the finitely many divisor supports
and ideal transforms simple normal crossings while preserving the
open set where they already have that form.

\begin{lemma}\label{lem:snc-valuations}
Let $\pi:W\to X$ be a log resolution of a klt pair, and include the exceptional locus and the crepant boundary support in a simple normal crossings (SNC) divisor $\sum_jT_j$. Write $a_j=a(T_j;X,B)>0$, assigning $a_j=1$ to any auxiliary component of coefficient zero. If $J$ indexes the components through the generic center of a divisorial valuation $\xi$ on $W$, then
\begin{equation}\label{eq:snc-formula}
 a(\xi;X,B)=\sum_{j\in J}\xi(T_j)a_j+e(\xi).
\end{equation}
Here $e(\xi)$ is a nonnegative integer, the log discrepancy for the reduced SNC boundary near that center. If the center has codimension $c$ in $W$, then
\[
 e(\xi)\geq c-|J|.
\]
If $e(\xi)=0$, then $\xi$ is the monomial valuation associated to a primitive positive integral vector over the generic point of an SNC stratum. In particular there are finitely many such valuations when their orders $\xi(T_j)$ are bounded.
\end{lemma}

\begin{proof}
Near the center the crepant boundary is
$\sum_{j\in J}(1-a_j)T_j$. Subtracting it from the reduced boundary gives \eqref{eq:snc-formula}. The reduced SNC pair is lc and has integral Cartier adjoint, so its log discrepancies are nonnegative integers. At the generic center choose $c-|J|$ additional regular parameters cutting that center inside its stratum. Adjoining their divisors with coefficient one still gives an SNC pair locally. Log canonicity of this larger reduced boundary implies
$e(\xi)\geq\sum_\ell\xi(t_\ell)\geq c-|J|$.

For completeness, the zero-error assertion can be seen by a toroidal modification. The orders along the crossing equations give a positive integral vector in the cone of the stratum. Make a regular fan subdivision containing its primitive ray; the resulting local toric modification, pulled back through the crossing coordinates, is log crepant for the reduced SNC structure. The lifted center lies in the open stratum of the divisor for this ray. If it were a proper subvariety of that stratum, the preceding transverse-parameter argument would give positive reduced-SNC discrepancy. Thus it is the generic point of that divisor, and the normalized valuation is its order. The toric construction is split over the residue field of the original stratum, so a primitive vector determines one divisor there. There are finitely many strata and finitely many bounded integral vectors.
\end{proof}

\begin{lemma}\label{lem:small-discrepancies}
For a fixed klt pair $(X,B)$ there are finitely many exceptional divisorial valuations with $a(\xi;X,B)\leq1$.
\end{lemma}

\begin{proof}
Choose the resolution of Lemma~\ref{lem:snc-valuations} with SNC exceptional divisor. If the lifted center meets that SNC divisor and contributes discrepancy at most one, positivity of its $a_j$ forces $e(\xi)=0$ and bounds every positive order in \eqref{eq:snc-formula}. There are finitely many resulting monomial valuations. If the center avoids the SNC divisor, an exceptional valuation has center of codimension at least two on the smooth isomorphism open, and hence log discrepancy at least two. Divisors already on the resolution form a finite list of possible exceptionals. These cases exhaust the valuations.
\end{proof}

\begin{lemma}[Echoes below log discrepancy two]\label{lem:echoes}
Let $(Y,\Theta)$ be an effective terminal pair on a projective $\mathbb Q$-factorial fourfold. Label finitely many prime divisors $S_h$ containing $\operatorname{Supp}\Theta$, and write
$\Theta=\sum_hb_hS_h$, allowing $b_h=0$.
Then:
\begin{enumerate}[label=\textup{(\roman*)}]
\item Only finitely many exceptional valuations with $a(\xi;Y,\Theta)<2$ have center of codimension at least three.
\item At each fixed surface center there are only finitely many exceptional valuations with log discrepancy less than two.
\item Apart from finitely many surface centers, every valuation with surface center and log discrepancy less than two is centered on the one-label smooth open. In regular parameters $x,t$ at its generic point, with $x=0$ defining that label $S_h$, the contributing valuations are exactly the monomial orders
\begin{equation}\label{eq:echo-values}
 \xi(x)=j,\quad \xi(t)=1,\qquad
 a(\xi;Y,\Theta)=1+j(1-b_h)<2,\qquad j\geq1.
\end{equation}
\end{enumerate}
More strongly, all exceptional valuations below two which are not of the form \eqref{eq:echo-values} on that one-label smooth open belong to a finite list.
\end{lemma}

\begin{proof}
The underlying variety $Y$ is terminal. Indeed $\Theta$ is effective and $\mathbb Q$-Cartier, so its removal only increases discrepancies. In particular $Y$ is smooth in codimension two. Choose a closed set $A$ of codimension at least two containing $\operatorname{Sing}Y$, the nonsmooth loci of the labels, and every intersection of two distinct labels. On $Y\setminus A$ the ambient space is smooth and at most one smooth label is present.

Resolve and principalize the ideal of $A$, simultaneously with the label divisors, by a morphism isomorphic over $Y\setminus A$. The full inverse image of $A$ has SNC divisorial support, all of whose components are exceptional over $Y$. Their log discrepancies for $(Y,\Theta)$ are strictly greater than one. Any valuation centered in $A$ has its lifted center in one of these exceptional components. If its discrepancy is less than two, \eqref{eq:snc-formula} therefore forces $e(\xi)=0$; all orders are bounded because all coefficients $a_j$ are positive. Lemma~\ref{lem:snc-valuations} gives only finitely many such valuations.

On the smooth open away from all labels, an exceptional valuation has discrepancy at least two. At a center of codimension $c$ in a single label of coefficient $b_h$, the same formula gives
\[
 a(\xi;Y,\Theta)=(1-b_h)\xi(S_h)+e(\xi),
 \qquad e(\xi)\geq c-1.
\]
Since $1-b_h>0$, discrepancy less than two forces $c=2$. At its generic point choose regular parameters $x,t$, with $x$ the label equation. Add $t=0$ as an auxiliary component of coefficient zero to the SNC calculation. Then
\[
 a(\xi;Y,\Theta)=(1-b_h)\xi(x)+\xi(t)+e'(\xi).
\]
The strict bound and positivity force $\xi(t)=1$ and $e'(\xi)=0$. The zero-error characterization gives precisely \eqref{eq:echo-values}. Conversely each such primitive vector defines the indicated divisorial order and discrepancy. Only finitely many $j$ satisfy the displayed inequality. Combining this with the finite list over $A$ proves every assertion.
\end{proof}

The local classification in Lemma~\ref{lem:echoes} is the echo phenomenon underlying the difficulties of \cite[Example~1.4 and Lemma~1.5]{AHK}; their discrepancy convention is one less than ours. We have included the argument in order to specify the finite correction terms used later.

\subsection{Crepant terminalizations and the finite bridges}

Lifting a prescribed program to terminal models with decreasing
exceptional coefficients is also used in
\cite[Lemma~2.8]{HanLiuZhuang2025}. We give the construction here,
including the comparison that identifies the prescribed positive end.

Suppose now that
$(X_i,B_i)\dashrightarrow(X_{i+1},B_{i+1})$
is a small klt tail, with step bases $Z_i$.
By Lemmas~\ref{lem:graph} and \ref{lem:small-discrepancies}, the sets
\[
 I_i=\{\xi:\xi\text{ exceptional over }X_i,\ a(\xi;X_i,B_i)\leq1\}
\]
are nested finite sets: exceptional status is unchanged under a small map. After truncation they equal one fixed set $I_0$. Write $a_i(\xi)=a(\xi;X_i,B_i)$.

\begin{proposition}\label{prop:terminal-chain}
There are projective birational morphisms $p_i:Y_i\to X_i$ extracting exactly $I_0$, with $Y_i$ $\mathbb Q$-factorial and
\begin{equation}\label{eq:terminal-crepant}
 K_{Y_i}+\Theta_i=p_i^*(K_{X_i}+B_i),\qquad
 \Theta_i=B_i^{\mathrm{str}}+
       \sum_{s\in I_0}(1-a_i(s))E_{i,s},
\end{equation}
such that each $(Y_i,\Theta_i)$ is effective terminal. Consecutive junctions can be joined by:
\begin{enumerate}[label=\textup{(\roman*)}]
\item decreasing the coefficient of each $E_{i,s}$ to $1-a_{i+1}(s)$ on $Y_i$;
\item a finite sequence, possibly empty, of small negative terminal flips over $Z_i$.
\end{enumerate}
Every labeled prime persists through the chain. All coefficients are nonincreasing, and the discrepancy of every valuation is nondecreasing, including across coefficient changes.
\end{proposition}

\begin{proof}
For klt input, \cite[Corollary~1.4.3]{BCHM} extracts precisely any prescribed finite set of exceptional valuations with log discrepancies at most one by a projective birational morphism with $\mathbb Q$-factorial source. The restriction in that corollary on discrepancy-one centers is vacuous for a klt pair. Apply it to $I_0$. The boundary in \eqref{eq:terminal-crepant} is effective with coefficients less than one. Any valuation exceptional over $Y_i$ is exceptional over $X_i$ and is not one of the extracted divisors; it therefore has discrepancy greater than one. This proves terminality.

Put
\[
 \Theta'_i=B_i^{\mathrm{str}}+
       \sum_{s\in I_0}(1-a_{i+1}(s))E_{i,s},
 \qquad A_i=K_{Y_i}+\Theta'_i.
\]
The new coefficients lie in $[0,1)$ and are no larger than their old values. Since $Y_i$ is $\mathbb Q$-factorial, the removed effective boundary is $\mathbb Q$-Cartier. Its order at every valuation is nonnegative, so this move preserves terminality and increases discrepancies weakly.

On a smooth common model $W$ of $Y_i$ and $X_{i+1}$ over $Z_i$, with projections $q$ and $r$, consider
\[
 E=q^*A_i-r^*D_{i+1}.
\]
The divisor $A_i$ is the divisorial trace on $Y_i$ of the pullback of $D_{i+1}$. At primes from $X_i$ this follows from smallness downstairs. At each marked prime $E_{i,s}$ it is exactly the definition of its new coefficient using $a_{i+1}(s)$. Thus $q_*E=0$. Also $-E$ is $q$-nef because $D_{i+1}$ is ample over $Z_i$. Negativity gives $E\geq0$. Every prime on $X_{i+1}$ corresponds to a prime on $Y_i$ with the same coefficient, so $E$ is exceptional over $X_{i+1}$ as well.

Run a chosen finite klt MMP for $A_i$ over $Z_i$. The precise existence input is \cite[Theorem~1.2 and Corollary~1.4.2]{BCHM}: a $\mathbb Q$-factorial klt pair with relatively big boundary admits a terminating program with suitable scaling. Here $Y_i\to Z_i$ is birational, so both its boundary and its adjoint are relatively big; their generic fibre is a point, as in \cite[Definition~3.1.1(7)]{BCHM}. Choose a general effective rational scaling divisor with sufficiently positive class and sufficiently small component coefficients, so the augmented pair remains klt and its adjoint is relatively nef. A fibre-type output over $Z_i$ is impossible by dimensions. Hence a finite choice reaches a relatively nef end $(\widehat Y,\widehat\Theta)$.

For this finite program, the input pullback equals the nef-end pullback plus an effective end-exceptional divisor. We already have the comparison with the ample divisor $D_{i+1}$ on $X_{i+1}$. Lemma~\ref{lem:two-ends} therefore gives a morphism
$\widehat p:\widehat Y\to X_{i+1}$ and the actual crepant identity
\[
 K_{\widehat Y}+\widehat\Theta=\widehat p^*D_{i+1}.
\]
No marked divisor can have been contracted during the finite program: its discrepancy at the input after the coefficient decrease is $a_{i+1}(s)$, and crepancy gives the same value at the end, whereas a contraction losing it would give strict improvement by Lemma~\ref{lem:graph}. No other prime can have been lost either. Such a prime comes from $X_i$, hence from $X_{i+1}$, and a birational morphism to the normal $X_{i+1}$ has a strict transform of that prime. The program extracts no divisors, so a lost prime could not reappear.

Every step was consequently small. Terminality persists by Corollary~\ref{cor:singularities-preserved}, and the end again extracts exactly $I_0$. Set it equal to $Y_{i+1}$. This constructs the junctions inductively and proves all discrepancy and coefficient assertions. Figure~\ref{fig:terminal-bridge} summarizes the construction.
\end{proof}

\begin{figure}[ht]
\centering
\begin{tikzcd}[column sep=large,row sep=large]
 (Y_i,\Theta_i) \arrow[r,"\Theta_i\searrow\Theta_i'"]
 \arrow[d,"p_i"']
 & (Y_i,\Theta_i') \arrow[r,dashed,"\text{finite small flips}"{yshift=3pt}]
 & (Y_{i+1},\Theta_{i+1}) \arrow[d,"p_{i+1}"]\\
 (X_i,B_i) \arrow[r,"f_i"']
 & Z_i
 & (X_{i+1},B_{i+1}) \arrow[l,"f_i^+"]
\end{tikzcd}
\caption{The terminal junctions are crepant over the prescribed downstairs models. Coefficients decrease before the finite relative bridge; the original downstairs choices remain fixed.}
\label{fig:terminal-bridge}
\end{figure}

Let $S_h$ label the strict transforms of the original boundary components and the finitely many marked extractions throughout this chain, retaining labels whose coefficient becomes zero. \mbox{Write the current boundary as}
$\Theta=\sum_h b_hS_h$. The coefficient $b_h$ is constant at the original boundary labels and nonincreasing at every extracted label. Call a label \emph{fixed} if its coefficient is eventually constant, and \emph{varying} otherwise. After truncating once more, all fixed coefficients are constant. A varying coefficient is positive at every remaining junction, since reaching zero would make it fixed.

\subsection{Surface mld ACC and the centers of varying labels}

For a codimension-two subvariety $V\subset X_i$, write
\[
 \operatorname{mld}_{\eta_V}(X_i,B_i)
 =\inf\{a_i(\xi):c_{X_i}(\xi)=V\}.
\]
We use two surface facts. Minimal log discrepancies at points of klt surfaces with coefficients in a fixed finite set satisfy ACC; this follows from \cite[Theorems~3.1 and 3.8]{Alexeev1993}. To spell out the fixed-set reduction, omit zero coefficients. If the smallest permitted positive coefficient is $c$, the local coefficient-sum bound $\sum b_j\leq2$ bounds the number of components through the point by $\lfloor2/c\rfloor$. Only finitely many coefficient multisets occur. A strictly increasing sequence of mld values would therefore have a subsequence with one constant coefficient vector, contradicting Theorem~3.8 of that reference. If the positive coefficient set is empty, the vector is already constant and empty. This argument also allows coefficients repeated by splitting on a surface section. A singular codimension-two point of an effective log pair has mld at most one; see \cite[Proposition~3.2, arXiv version]{Ambro1999}.

\begin{lemma}\label{lem:transverse-mld}
The numbers $\operatorname{mld}_{\eta_V}(X_i,B_i)$, as $i$ and $V$ vary, belong to the set of surface mld values with the same finite set of boundary coefficients. Each minimum is attained.
\end{lemma}

\begin{proof}
Fix a model and a center $V$. Choose a projective log resolution which also principalizes the ideal of $V$. Its divisorial inverse image has finitely many components dominating $V$. The mld in question is the minimum of their log discrepancies. Indeed every valuation centered at $\eta_V$ has its lifted center in at least one such component, and the positive-coefficient formula \eqref{eq:snc-formula} bounds its discrepancy below by that component's discrepancy. Conversely those component valuations have center $V$.

Cut the fourfold by two general sufficiently ample hyperplanes so that the resulting surface meets $V$ at general points and avoids the proper closed images in $V$ of resolution strata which do not dominate it. Use simultaneous Bertini for the finitely many relevant strata. The downstairs surface is normal; the two pulled-back cuts on the smooth resolution are smooth and transverse to the SNC data. They contain no exceptional divisor as a component, because neither general hyperplane contains an exceptional image. Their complete intersection has no component contained in the exceptional locus: each exceptional divisor has image of dimension at most two, and two general pulled-back cuts leave dimension at most one there.

Adjunction cancels the two normal determinant factors on the source and target of the restricted resolution. Thus the crepant coefficients on the surface resolution are the restrictions of the original coefficients. The boundary on the normal surface has the original finite coefficient set: generic hyperplane sections of each boundary prime are reduced, and no new boundary divisor is introduced. All sliced crepant coefficients have positive log discrepancy, so the surface pair is klt. Components of the principalized inverse image dominating $V$ cut to divisors with the same discrepancies over each chosen general intersection point. Strata with proper image were avoided. Applying \eqref{eq:snc-formula} on the slice now gives the same minimum as above. This proves the assertion.
\end{proof}

\begin{proposition}\label{prop:codim-two}
After truncating the small downstairs tail, every surface contained in either bad locus of every remaining step has generic-point mld greater than one and is generically in the smooth locus of its ambient model. At each remaining crepant junction, every varying label has downstairs center of codimension at least three. Consequently the reduced union of varying labels is mapped by $p_i$ to a set of dimension at most one.
\end{proposition}

\begin{proof}
Suppose infinitely many steps have a bad surface with mld at most one on one specified side. A computing divisor is exceptional downstairs and belongs to the stabilized finite set $I_0$. Some fixed member $s$ computes the mld at infinitely many such occurrences. Its discrepancies along this subsequence increase strictly. On the negative side, strict improvement occurs in the step immediately following the occurrence; on the positive side, it occurs immediately before the occurrence. Monotonicity between occurrences then gives strict increase in either case. By Lemma~\ref{lem:transverse-mld}, these are surface mld values with a fixed finite coefficient set, contradicting ACC. Apply this to both sides and discard finitely many initial steps. Ambro's bound gives generic ambient smoothness at the remaining bad surfaces.

If an extracted label with discrepancy at most one has a codimension-two center $V$ downstairs at some remaining junction, $V$ cannot be contained in the following negative bad locus. Otherwise its mld would be at most the discrepancy of that label, contradicting the first assertion. The birational step is therefore an isomorphism near the generic point of $V$, and the center and its discrepancy persist on the next model. The same argument repeats at every later step. This label's coefficient is hence constant from that junction onward. A varying label cannot have such a center. It is exceptional downstairs, so its center has codimension at least three; in dimension four its image has dimension at most one.
\end{proof}
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/02-terminal-models.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/02a-difficulty-setup.tex ====
\section{The difficulty and its local deficit}
\label{sec:difficulty-setup}

We now construct the integer that will measure progress along the
terminal chain of Proposition~\ref{prop:terminal-chain}.  Its definition
subtracts the ordinary families of codimension-two valuations from a
weighted discrepancy count and adds divisor-cycle ranks on the boundary
normalizations, following the framework of \cite[Section~2]{AHK}.
The ceiling weight used here can leave a negative correction where
several normalization branches meet.  We identify that correction
before proving the geometric estimate needed to bound it.

Work over $\mathbb C$ and suppose that a small klt program is infinite.
Use its terminal chain, with persistent prime labels $S_h$ and
nonincreasing coefficients $b_h\in[0,1)$, as constructed in
Section~\ref{sec:terminal}.  Retain zero-coefficient labels.  Make the
truncation in Proposition~\ref{prop:codim-two}, so that the fixed
coefficients are constant and, at every crepant junction, the varying
labels have positive coefficients and map downstairs to dimension at
most one.  Coefficients change only before each finite string of
small terminal flips.

In the big-boundary application of \cite{HanLiuZhuang2025}, uniform
Cartier-index bounds make discrepancies discrete, so the finitely many
extracted coefficients eventually stabilize
\cite[Lemma~3.4 and the proof of Theorem~3.1]{HanLiuZhuang2025}.
Here they may continue to decrease.  We clear denominators only for the
coefficients that have stabilized and control the rounding error from
the remaining labels by the branch inequality.

\subsection{Weights and finite local corrections}

Choose a positive integer \(N\) clearing the denominators of the
original downstairs boundary coefficients and of the fixed
coefficients on the terminal chain.  No denominator condition is
imposed on the varying coefficients.  Define
\begin{equation}
\label{eq:difficulty-weights}
 w(u)=\left\lceil N\max\{u,0\}\right\rceil,
 \qquad
 w_v(Y,\Theta)=w\bigl(2-a(v;Y,\Theta)\bigr),
 \qquad
 d_h=\sum_{j\geq 1}w\bigl(1-j(1-b_h)\bigr).
\end{equation}
By Lemma~\ref{lem:echoes}, $d_h$ is the default total echo weight
at a surface on the smooth one-label locus of $S_h$.
Only exceptional valuations over \(Y\) will enter the difficulty.
The notation \(w_v\) will be used when the pair is understood.

\begin{lemma}
\label{difficulty:preparation}
Each \(d_h\) is a finite nonnegative integer and is nonincreasing
along the terminal chain.  After discarding finitely many junctions,
all \(d_h\) are constant, including throughout every intervening
finite bridge.
\end{lemma}

\begin{proof}
Since \(b_h<1\), a summand in \eqref{eq:difficulty-weights} can be
positive only if \(j<1/(1-b_h)\).  Thus the sum is finite.  Each
summand is nonincreasing when \(b_h\) decreases.  At all subsequent
stages the possible indices \(j\) are bounded by the bound at the
initial stage under consideration.  Consequently \(d_h\) is a
nonincreasing sequence of nonnegative integers and is eventually
constant.  There are only finitely many labels.  Coefficients change
only at the coefficient-decrease move of a bridge, and stay unchanged
during its small flips.  Constancy at consecutive junctions therefore
gives constancy throughout the bridge as well.
\end{proof}

We henceforth make the truncation in
Lemma~\ref{difficulty:preparation}.  The constants \(d_h\) may depend
on the chosen infinite tail; a bound uniform over different programs
is neither asserted nor needed.

For an irreducible surface \(V\subset Y\), let \(r_{V,h}\) be the
number of prime divisors of \(S_h^\nu\) mapping onto \(V\), with
\(r_{V,h}=0\) when \(V\not\subset S_h\).  Here and below this is a
count of algebraic prime divisors over \(\kappa(\eta_V)\), not of
their geometric sheets.  Recall that
\(\rho_*(S_h^\nu)=\rho_2(S_h^\nu)\) is the rank of the span of
divisor cycle classes in \(H_4(S_h^\nu,\mathbb Q)\).

\begin{definition}
\label{def:difficulty}
For a terminal pair \((Y,\Theta)\) on the prepared chain, define
\begin{align}
\label{eq:difficulty}
 \mathcal D(Y,\Theta)
 ={}&\sum_{\operatorname{codim}_Y c_Y(v)\geq3}w_v
 \\
 &+\sum_{\substack{V\subset Y\text{ irreducible}\\\dim V=2}}
 \left(
       \sum_{c_Y(v)=V}w_v-\sum_h r_{V,h}d_h
 \right)
 +\sum_h d_h\rho_*(S_h^\nu).
 \notag
\end{align}
The correction in parentheses is performed at each individual surface
before summing over surfaces.
\end{definition}

Lemma~\ref{lem:echoes} makes this an integer defined by finite sums
of nonzero terms.  Indeed, the positive-weight contributions in
codimension at least three are finite, as are those at any one
surface center.  Outside finitely many exceptional surface centers,
a surface with a nonzero contribution lies generically in the
log-smooth locus on a single positive-coefficient label.  Its
contributing valuations are exactly the echoes with orders
\((j,1)\), whose log discrepancies are
\(1+j(1-b_h)\).  Their total weight is exactly \(d_h\), and the
local correction is zero.  Zero-coefficient labels have
\(d_h=0\) and do not affect this cancellation.  Thus
\eqref{eq:difficulty} is not a formal subtraction of two divergent
valuation sums.  Its local brackets, and initially its entire value
at an intermediate stage, are allowed to be signed.

\subsection{The local ceiling error}

\begin{lemma}
\label{lem:ceiling-error}
Let \(V\subset Y\) be an irreducible surface on a terminal model in
the prepared chain, and set
\[
 r_V^{\mathrm{var}}=\sum_{h\text{ varying}}r_{V,h}.
\]
Then
\begin{equation}
\label{eq:local-ceiling-bound}
 \sum_{c_Y(v)=V}w_v-\sum_h r_{V,h}d_h
 \ \geq\ -\max\{r_V^{\mathrm{var}}-1,0\}.
\end{equation}
The assertion does not require the boundary to have simple normal
crossings at \(\eta_V\).
\end{lemma}

\begin{proof}
The variety \(Y\) is terminal and hence smooth in codimension two.
Its local ring at \(\eta_V\) is therefore regular of dimension two.
Write \(m_h\) for the multiplicity there of \(S_h\), taking
\(m_h=0\) if the label does not contain \(V\).  The ordinary
blowup of the closed point of this local surface defines a valuation
\(v_1\) with
\begin{equation}
\label{eq:surface-first-blowup}
 a(v_1;Y,\Theta)=2-\sum_hm_hb_h>1.
\end{equation}
In particular \(\sum_hm_hb_h<1\), and the weight supplied by this
valuation is \(w(\sum_hm_hb_h)\).

We first justify the branch multiplicity inequality
\begin{equation}
\label{eq:branch-multiplicity}
 r_{V,h}\leq m_h.
\end{equation}
For a label containing \(V\), let \(R\) be the one-dimensional
local domain defined by its prime equation in this regular local
surface.  Its finite normalization \(\overline R\) is semilocal.
For a general parameter \(t\),
\[
 m_h=\operatorname{length}_R(R/tR)
     =\operatorname{length}_R(\overline R/t\overline R)
     =\sum_{\mathfrak q}
       [\kappa(\mathfrak q):\kappa(\eta_V)]
       \operatorname{ord}_{\mathfrak q}(t),
\]
where the sum runs over the branches of the normalization above the
closed point.  The middle equality follows by applying multiplication
by \(t\) to the finite-length module \(\overline R/R\): its kernel
and cokernel have equal length.  Each summand in the last expression
is a positive integer.  This proves
\eqref{eq:branch-multiplicity}, with the residue degrees included.

For fixed labels \(Nb_h\) is integral.  Apply the elementary
inequality
\(\lceil x_1+\cdots+x_r\rceil\geq
\sum_{\ell=1}^r\lceil x_\ell\rceil-(r-1)\) for \(r\geq1\)
to the varying branches, repeating \(Nb_h\) once for each branch
of that label.  When there are no varying branches the same comparison
is an equality for the fixed part.  Effectiveness and
\eqref{eq:branch-multiplicity} give
\begin{equation}
\label{eq:first-default-error}
 w\left(\sum_hm_hb_h\right)
 \geq \sum_h r_{V,h}w(b_h)
       -\max\{r_V^{\mathrm{var}}-1,0\}.
\end{equation}
Only the varying branches can cause this rounding error.

It remains to pay the terms with \(j\geq2\) in the defaults.
A positive such term requires \(b_h>1/2\).  By
\eqref{eq:surface-first-blowup}, at most one label through \(V\)
has this property, and its multiplicity must be one.  Its prime
equation is therefore a regular parameter, which we denote by \(x\);
complete it to regular parameters \((x,t)\).  In particular this
label has precisely one normalization branch at \(V\).
For each \(j\geq2\) with positive default, the monomial valuation
with orders \(v_j(x)=j\), \(v_j(t)=1\) is a normalized divisorial
valuation centered at \(V\).  These valuations are pairwise distinct
and different from \(v_1\).  If \(b_h\) is the coefficient of
\(x=0\), effectiveness of the other boundary components gives
\[
 a(v_j;Y,\Theta)
 =1+j-jb_h-\sum_{\ell\ne h}b_\ell v_j(S_\ell)
 \leq1+j(1-b_h).
\]
Thus \(w_{v_j}\geq w(1-j(1-b_h))\).  These distinct valuations
pay all higher default terms, while \(v_1\) gives
\eqref{eq:first-default-error}.  Summing proves
\eqref{eq:local-ceiling-bound}.
\end{proof}


\subsection{The geometric bound still needed}

At a crepant junction $p:Y\to X_i$, let
\[
 Q=\bigcup_{h\text{ varying}}S_h
\]
with its reduced structure.  For a surface $V\subset Q$, the number
$r_V^{\mathrm{var}}$ counts the prime divisors above $V$ on the disjoint
normalizations of the components of $Q$, and is at least one.
Surfaces outside $Q$ have no negative allowance in
Lemma~\ref{lem:ceiling-error}.  Summing that lemma therefore gives
\begin{equation}\label{eq:difficulty-local-deficit}
 \mathcal D(Y,\Theta)\geq
 \sum_{\operatorname{codim}_Y c_Y(v)\geq3}w_v
 +\sum_h d_h\rho_*(S_h^\nu)
 -\sum_{V\subset Q}(r_V^{\mathrm{var}}-1).
\end{equation}
If $Q$ is empty, this already proves nonnegativity.  Otherwise every
component of $Q$ has positive coefficient, so its default satisfies
$d_h\geq w(b_h)\geq1$.  Every valuation centered on a curve in $Q$
with log discrepancy below two likewise contributes at least one to
the first sum.  None of these valuations has a surface center.

Thus nonnegativity will follow if the total branch excess in the last
sum is bounded by the unweighted divisor-cycle ranks of the components
of $Q$, together with the number of these curve-centered valuations.
The next two sections prove precisely that bound, in
Theorem~\ref{thm:branch}.  Its geometric hypotheses hold here because
$\dim p(Q)\leq1$.  The lower bound is needed at the crepant junctions;
Section~\ref{sec:difficulty} will show that neither the coefficient
changes nor the small flips between them increase~$\mathcal D$.
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/02a-difficulty-setup.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/03-branch-topology.tex ====
\section{The branch inequality: topology and weights}
\label{sec:branch-topology}

The negative term in \eqref{eq:difficulty-local-deficit} counts excess
normalization branches along surfaces of the varying boundary.  We now
bound this branch excess by divisor-cycle ranks on the normalizations
and valuations centered on singular curves.  The estimate applies to
any terminal pair and birational morphism satisfying the hypotheses
below.

The proof has two parts.  Normalization relations and the comparison
with intersection cohomology first bound the excess by divisor-cycle
ranks and punctured degree-two cohomology along singular curves.  In
Section~\ref{sec:local-valuations}, classes in that local cohomology
fixed by monodromy produce distinct divisorial valuations of the original
function field.  Those valuations supply the remaining term of the
estimate.

All cohomology and homology in these two sections have rational
coefficients and refer to the complex analytic topology.  We use the
perverse normalization of intersection complexes: if $Y$ is smooth of
dimension four, then $\mathrm{IC}_Y=\mathbb Q_Y[4]$.

\begin{theorem}[Branch inequality]\label{thm:branch}
Let $p\colon Y\to X$ be a projective birational morphism of normal
projective fourfolds over $\mathbb C$.  Suppose that $Y$ is
$\mathbb Q$-factorial and terminal and that $(Y,\Theta)$ is an effective
terminal pair with rational boundary.  Let
\[
 Q=\bigcup_{j=1}^{m}Q_j
\]
be a reduced union of distinct positive-coefficient components of
$\Theta$, and assume $\dim p(Q)\leq 1$.
Write $Q_j^\nu$ for the normalization of $Q_j$.  For each irreducible
surface $V\subset Q$, let $r_V$ be the number of prime divisors of
$\coprod_jQ_j^\nu$ mapping onto $V$.  Then
\begin{equation}\label{eq:branch-inequality}
 \begin{aligned}
 \sum_{V\subset Q}(r_V-1)
 &\leq\sum_{j=1}^{m}\rho_*(Q_j^\nu)\\
 &\quad+\#\bigl\{v:\operatorname{codim}_Yc_Y(v)=3,\;
          c_Y(v)\subset Q,\;a(v;Y,\Theta)<2\bigr\}.
 \end{aligned}
\end{equation}
Here the valuations are normalized divisorial orders, and the sum on
the left has only finitely many nonzero terms.
\end{theorem}

The branches in this statement are algebraic prime divisors.
In particular, an irreducible divisor mapping to $V$ with degree
greater than one counts as one branch; its degree will occur in the
pushforward map.  No crepancy assumption on $p$ is made.

Set
\begin{equation}\label{eq:branch-loci}
 C=p(Q)_{\mathrm{red}},\qquad
 P=(p^{-1}C)_{\mathrm{red}}.
\end{equation}
Let $P_1$ be the reduced union of the three-dimensional components
of $P$.  Thus $Q\subset P_1\subset P$, and $P\setminus P_1$ has complex
dimension at most two.  If $Q$ is empty, the theorem is immediate; in
what follows we may assume otherwise.

\subsection{Normalization relations}

For a projective variety $R$, its homology carries the mixed Hodge
structure dual to its cohomology.  In particular the top homology
$H_4(F)$ of a projective variety of dimension at most two is freely
generated by the fundamental classes of its irreducible surfaces and
is pure of weight $-4$.  We write $W$ for the weight filtration.

\begin{lemma}[Conductor estimate]\label{lem:conductor}
With the notation above,
\begin{equation}\label{eq:conductor-rank}
 \sum_{V\subset Q}(r_V-1)-\sum_j\rho_*(Q_j^\nu)
 \leq
 \operatorname{rank}\operatorname{Gr}^{W}_{4}
       \bigl[H^5(P)\longrightarrow H^5(Q)\bigr].
\end{equation}
\end{lemma}

\begin{proof}
For a reduced projective pure threefold $R$, let
$\nu_R\colon N_R\to R$ be its normalization.  Choose a closed reduced
subset $A_R\subset R$ of dimension at most two such that $\nu_R$ is an
isomorphism away from $A_R$, and put
$F_R=(\nu_R^{-1}A_R)_{\mathrm{red}}$.  The normalization square is a
proper excision square.  Its homology sequence, compatible with mixed
Hodge structures, contains
\begin{equation}\label{eq:normalization-excision}
 H_5(R)\xrightarrow{\partial_R} H_4(F_R)
 \longrightarrow H_4(A_R)\oplus H_4(N_R).
\end{equation}
This follows by comparing the localization sequences for
$(R,A_R)$ and $(N_R,F_R)$, whose open complements are isomorphic;
the mixed Hodge structures and their functoriality are those of
\cite[Proposition~8.2.2 and Proposition~8.3.9]{Deligne1974}.

Apply this construction first to $R=P_1$, taking $A_{P_1}$ to contain
the nonisomorphism locus of its normalization.  For $R=Q$ take
$A_Q=Q\cap A_{P_1}$.  The normalization $N_Q=\coprod_j Q_j^\nu$ is a
union of entire components of $N_{P_1}$, so these choices give a
morphism between the two normalization squares.

Let $V$ run over the surface components of $A_Q$.  Write
$E_{V,1},\ldots,E_{V,r_V}$ for the surface components of $F_Q$ over
$V$, and let $e_{V,\alpha}=[\mathbb C(E_{V,\alpha}):\mathbb C(V)]$.
On their fundamental classes, the first component of the map in
\eqref{eq:normalization-excision} is
\[
 \bigoplus_{\alpha=1}^{r_V}\mathbb Q[E_{V,\alpha}]
 \longrightarrow \mathbb Q[V],\qquad
 \sum_\alpha t_\alpha[E_{V,\alpha}]
 \longmapsto \Bigl(\sum_\alpha e_{V,\alpha}t_\alpha\Bigr)[V].
\]
Its kernel has dimension $r_V-1$.  Every surface with $r_V>1$ lies
in $A_Q$, because normalization is an isomorphism elsewhere.
Consequently the kernel $B$ of $H_4(F_Q)\to H_4(A_Q)$ satisfies
\[
 \dim B=\sum_{V\subset Q}(r_V-1).
\]
All these terms are finite in number.  The image of
$B\to H_4(N_Q)$ lies in the span of divisor classes, whose dimension
is $\sum_j\rho_*(Q_j^\nu)$.  Therefore
\[
 U:=\ker\bigl[B\longrightarrow H_4(N_Q)\bigr],\qquad
 \dim U\geq\sum_{V\subset Q}(r_V-1)-\sum_j\rho_*(Q_j^\nu).
\]
By exactness, $U$ is the image of $\partial_Q$.

The map $H_4(F_Q)\to H_4(F_{P_1})$ is injective: each surface
generator of the source is the same surface in one of the selected
normalization components of $P_1$, and different such generators
remain distinct.  Naturality of the boundary maps now shows that
$\partial_{P_1}$ maps the image of $H_5(Q)\to H_5(P_1)$ onto a
space containing a copy of $U$.  Since $H_4(F_{P_1})$ is pure of
weight $-4$, strictness of morphisms of mixed Hodge structures
\cite[Th\'eor\`eme~2.3.5(iii)]{Deligne1971} gives
\[
 \dim U\leq
 \operatorname{rank}\operatorname{Gr}^{W}_{-4}
          \bigl[H_5(Q)\longrightarrow H_5(P_1)\bigr].
\]
Finally the localization sequence in Borel--Moore homology contains
\[
 H^{\mathrm{BM}}_6(P\setminus P_1)
 \longrightarrow H_5(P_1)\longrightarrow H_5(P).
\]
Its first term vanishes by the dimension bound, so its second arrow
is injective.  Duality between homology and cohomology, with weight
sign reversed, proves \eqref{eq:conductor-rank}.
\end{proof}

\subsection{A purity statement over a curve}

The conductor estimate has reduced the problem to the weight-four
part of $H^5(P)\to H^5(Q)$.  We next prove that
$\mathbb H^1(P,\mathrm{IC}_Y|_P)$ is pure of weight five.  Comparison
with ordinary cohomology will then isolate the weight-four contribution
on singular curves.  The decomposition theorem is applied before
restriction to $C$;
the support estimates below identify which of its summands can
contribute in degree one.

\begin{lemma}[Intersection-complex restriction]\label{lem:restriction-purity}
Let $p\colon Y\to X$ be a projective birational morphism of normal
projective fourfolds over $\mathbb C$, and let $C\subset X$ be a
closed reduced subset of dimension at most one.  Put
$P=(p^{-1}C)_{\mathrm{red}}$.  Then
\[
 \mathbb H^1(P,\mathrm{IC}_Y|_P)
\]
is pure of weight five.
\end{lemma}

\begin{proof}
We use intersection complexes and direct images in the derived
category of mixed Hodge modules, and use the same symbols for their
underlying rational complexes.  The intersection complex of the
irreducible fourfold $Y$ is pure of weight four.  The projective
decomposition theorem gives a finite direct sum
\begin{equation}\label{eq:ic-decomposition}
 Rp_*\mathrm{IC}_Y\simeq
 \mathrm{IC}_X\oplus\bigoplus_{(Z,i)}M_{Z,i}[-i],
\end{equation}
where each $Z$ is a proper irreducible closed subset of $X$, and
$M_{Z,i}$ is a pure Hodge module of strict support $Z$ and weight
$4+i$.  Multiple summands with the same support and index are
allowed.  Birationality gives the unique full-support summand
$\mathrm{IC}_X$ in degree zero.  The weight and decomposition
statements used here are \cite[\S\S1.6--1.8, 1.12--1.13]{Saito1989}.

We claim that every proper-support summand in
\eqref{eq:ic-decomposition} satisfies
\begin{equation}\label{eq:proper-support-bound}
 i+z\leq 2,\qquad z=\dim Z.
\end{equation}
Choose an algebraic stratification adapted to $\mathrm{IC}_Y$ and
refine it by $p^{-1}Z$.  Also stratify the target so that over a
dense smooth open subset $Z^\circ$ of $Z$ every source stratum
meeting a fibre has constant fibre dimension; strata whose images
are not dense in $Z$ are avoided by shrinking $Z^\circ$.
This is possible by constructibility and generic stratified
triviality.  In particular it includes the strata introduced by
fibre-dimension jumps before shrinking.

Let $B\subset p^{-1}Z$ be one of the refined strata dominating
$Z$, and put $u=\dim B$.  Since $p$ is birational and $Z$ is
proper, $p^{-1}Z$ is a proper closed subset of $Y$, and hence
$u\leq3$.  On $B$ we have
\begin{equation}\label{eq:source-stalk-bound}
 \mathcal H^q(\mathrm{IC}_Y)|_B=0\quad\text{for }q>-u-1.
\end{equation}
Indeed, if $B$ lies in the smooth open stratum, the only degree is
$-4\leq-u-1$.  Otherwise let $t\geq u$ be the dimension of the
original stratum containing it.  The strict support condition for
an intersection complex gives vanishing for $q>-t-1$, and this
implies \eqref{eq:source-stalk-bound}.  This is the stalk support
condition in the middle-extension axioms
\cite[\S2.3 and \S3.3, axiom {\rm[AX1]}(c)]{GM1983}.

For $x\in Z^\circ$, the stratum $B\cap p^{-1}(x)$ has dimension
$u-z$.  Compactly supported cohomology on this stratum vanishes
above degree $2(u-z)$.  By \eqref{eq:source-stalk-bound} its
contribution to the cohomology of the fibre with coefficients in
$\mathrm{IC}_Y$ vanishes in degrees greater than
\[
 -u-1+2(u-z)=u-2z-1\leq2-2z.
\]
A finite filtration by strata and proper base change give the
same upper bound for the stalk of $Rp_*\mathrm{IC}_Y$ at $x$.
On a sufficiently small $Z^\circ$, the nonzero stalk of
$M_{Z,i}[-i]$ is in degree $i-z$.  Since it is a direct summand,
$i-z\leq2-2z$, proving \eqref{eq:proper-support-bound}.

Consider now a support $Z$ not contained in $C$.  Stratify $Z\cap C$
compatibly with $M_{Z,i}$, and let $S$ be a stratum of dimension
$s$.  Then $s\leq z-1$.  The stalks of $M_{Z,i}$ on $S$ vanish
above degree $-s-1$: on the local-system open of $Z$ their only
degree is $-z\leq-s-1$, and elsewhere this follows from the
strict support condition, including after refinement as above.
Thus the largest possible degree of a contribution from $S$ to
the compactly supported cohomology of $M_{Z,i}[-i]|_C$ is
\[
 i-s-1+2s=i+s-1\leq i+z-2\leq0.
\]
Filtration by strata shows that this summand contributes nothing
to degree one on $C$.  For the full-support summand
$\mathrm{IC}_X$, each stratum of $C$ has dimension $s\leq1$ and
the same stalk argument gives the upper bound
$-s-1+2s=s-1\leq0$.  It too contributes nothing in degree one.

It remains to consider $Z\subset C$.  Such a support is projective,
and its contribution is
\[
 \mathbb H^{1-i}(Z,M_{Z,i}),
\]
which is pure of weight $(4+i)+(1-i)=5$ by projective direct-image
purity.  Proper base change identifies the degree-one cohomology
of \eqref{eq:ic-decomposition} restricted to $C$ with
$\mathbb H^1(P,\mathrm{IC}_Y|_P)$.  All its nonzero summands are
therefore pure of weight five, as claimed.
\end{proof}

\subsection{The comparison cone and singular curves}

Return to the hypotheses of Theorem~\ref{thm:branch}, and write
$j\colon Y_{\mathrm{reg}}\hookrightarrow Y$ for the smooth-locus
inclusion.  Terminality implies
$\dim\operatorname{Sing}Y\leq1$.  For every irreducible curve
$T\subset\operatorname{Sing}Y$, choose a connected smooth dense
open subset $T^\circ$ on which the complexes below have locally
constant cohomology.  We may remove further finitely many points
whenever needed.  Define
\begin{equation}\label{eq:curve-local-system}
 \mathcal V_T=(R^2j_*\mathbb Q_{Y_{\mathrm{reg}}})|_{T^\circ},
 \qquad
 b_T=\dim H_c^2(T^\circ,\mathcal V_T).
\end{equation}
Equivalently, $b_T$ is the dimension of the coinvariant space of
a fibre of $\mathcal V_T$ under its monodromy representation.
Removing finitely many further points does not change this number.

\begin{lemma}[Local-system bound]\label{lem:local-system-bound}
For $P$ and $Q$ in \eqref{eq:branch-loci},
\begin{equation}\label{eq:local-system-rank}
 \operatorname{rank}\operatorname{Gr}^{W}_{4}
       \bigl[H^5(P)\longrightarrow H^5(Q)\bigr]
 \leq
 \sum_{\substack{T\text{ irreducible curve}\\
                  T\subset\operatorname{Sing}Y\cap Q}}b_T.
\end{equation}
\end{lemma}

\begin{proof}
There is a comparison morphism, equal to the identity on
$Y_{\mathrm{reg}}$, in the derived category of mixed Hodge modules
\cite[\S1.14]{Saito1989}.  Let $\mathcal T$ be its cone:
\begin{equation}\label{eq:comparison-triangle}
 \mathbb Q_Y[4]\longrightarrow\mathrm{IC}_Y
 \longrightarrow\mathcal T\longrightarrow\mathbb Q_Y[5].
\end{equation}
The same comparison complex is studied by Park--Popa
\cite[Definition~6.1]{ParkPopaHodge} as their rational-homology-manifold
defect complex shifted by one.
Restricting to $P$ yields the exact sequence of mixed Hodge
structures
\begin{equation}\label{eq:comparison-cohomology}
 \mathbb H^0(P,\mathcal T|_P)
 \xrightarrow{\delta_P}H^5(P)
 \longrightarrow\mathbb H^1(P,\mathrm{IC}_Y|_P).
\end{equation}
Lemma~\ref{lem:restriction-purity} makes the last term pure of
weight five.  Consequently
\[
 W_4H^5(P)\subset\operatorname{im}\delta_P.
\]
Naturality under $Q\subset P$ implies that the image of
$W_4H^5(P)$ in $H^5(Q)$ is contained in the image of
\[
 \delta_Q\colon\mathbb H^0(Q,\mathcal T|_Q)\longrightarrow H^5(Q).
\]
Strictness of the restriction map for the weight filtration
therefore gives
\begin{equation}\label{eq:cone-rank}
 \operatorname{rank}\operatorname{Gr}^{W}_{4}
       \bigl[H^5(P)\longrightarrow H^5(Q)\bigr]
 \leq\dim\mathbb H^0(Q,\mathcal T|_Q).
\end{equation}

The cone is supported on $\operatorname{Sing}Y$.  On a stratum
of this locus of dimension $s\in\{0,1\}$, the strict stalk bound
for $\mathrm{IC}_Y$ and the triangle
\eqref{eq:comparison-triangle} give
\[
 \mathcal H^q(\mathcal T)=0\qquad(q>-s-1).
\]
In particular a point stratum has no contribution in degree zero.
On $T^\circ$ the only possible contribution in total degree zero
is
\[
 H_c^2(T^\circ,\mathcal H^{-2}(\mathcal T)|_{T^\circ}).
\]
At the generic codimension-three stratum, the middle-extension
construction retains the cohomology of $Rj_*\mathbb Q$ through
unshifted degree two.  Thus, by the attaching truncation in
\cite[\S3.1 and \S3.3, axiom {\rm[AX1]}(d)]{GM1983},
\begin{equation}\label{eq:cone-stalk}
 \mathcal H^{-2}(\mathcal T)|_{T^\circ}
 =\mathcal H^{-2}(\mathrm{IC}_Y)|_{T^\circ}
 =\mathcal V_T.
\end{equation}
The first equality also follows directly from
\eqref{eq:comparison-triangle}, since the constant complex has
stalk cohomology only in degree $-4$.

Take the $T^\circ$ to be disjoint and to omit every intersection
point of singular curves.  The intersection of a singular curve
not contained in $Q$ with $Q$ consists of finitely many points.
Hence the complement in $\operatorname{Sing}Y\cap Q$ of the
$T^\circ$ for curves $T\subset Q$ is finite.  The open--closed
cohomology sequence and the point-stratum vanishing give a
surjection
\[
 \bigoplus_{T\subset\operatorname{Sing}Y\cap Q}
 \mathbb H_c^0(T^\circ,\mathcal T|_{T^\circ})
 \longrightarrow\mathbb H^0(Q,\mathcal T|_Q).
\]
The compact-support spectral sequence on a curve, together with
the stalk bound and \eqref{eq:cone-stalk}, identifies its summands
with $H_c^2(T^\circ,\mathcal V_T)$.  The dimension bound from this
surjection and \eqref{eq:cone-rank} prove the lemma.
\end{proof}

\begin{proof}[Proof of Theorem~\ref{thm:branch}]
Lemmas~\ref{lem:conductor} and \ref{lem:local-system-bound} give
\begin{equation}\label{eq:branch-before-valuations}
 \sum_{V\subset Q}(r_V-1)
 \leq\sum_j\rho_*(Q_j^\nu)
   +\sum_{T\subset\operatorname{Sing}Y\cap Q}b_T.
\end{equation}
Proposition~\ref{prop:local-valuations}, proved in the next section,
constructs for each such curve $T$ at least $b_T$ distinct
normalized divisorial valuations $v$ satisfying
\[
 c_Y(v)=T,\qquad a(v;Y,0)=2,\qquad a(v;Y,\Theta)<2.
\]
Valuations arising from different curves have different centers
and are distinct.  Lemma~\ref{lem:echoes} ensures that the set of
valuations of discrepancy below two with codimension-three center
is finite.  Substituting their number for the last sum in
\eqref{eq:branch-before-valuations} gives
\eqref{eq:branch-inequality}.
\end{proof}
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/03-branch-topology.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/04-local-valuations.tex ====
\section{From local cohomology to divisorial valuations}
\label{sec:local-valuations}

We prove the local assertion used in Theorem~\ref{thm:branch}.  Throughout
this section the ground field is $\mathbb C$.  A fibre is its scheme fibre
unless explicitly given the reduced structure.  In particular, line
bundles and coherent cohomology on a resolution fibre are taken on that
scheme, including its possible nilpotents.

\begin{proposition}\label{prop:local-valuations}
Let $Y$ be a normal projective $\mathbb Q$-factorial fourfold, and let
$(Y,\Theta)$ be an effective terminal pair with rational boundary.  Let
$T$ be an irreducible curve in $\operatorname{Sing}Y$ contained in a
positive-coefficient component of $\Theta$.  Put
\[
 j:Y_{\mathrm{reg}}\hookrightarrow Y,
 \qquad
 \mathcal V_T=(R^2j_*\mathbb Q)|_{T^\circ},
 \qquad
 b_T=\dim_{\mathbb Q}H_c^2(T^\circ,\mathcal V_T),
\]
where $T^\circ$ is a sufficiently small smooth dense open on which the
indicated sheaf is a local system.  There are at least $b_T$ distinct
normalized divisorial valuations $v$ of $\mathbb C(Y)$ such that
\[
 c_Y(v)=T,\qquad a(v;Y,0)=2,\qquad a(v;Y,\Theta)<2.
\]
The valuations obtained for different curves $T$ are distinct.
\end{proposition}

The argument has two descent steps.  Norms first produce line bundles
over the function field of $T$ itself.  Approximation then extends those
bundles to a pointed \emph{ordinary} \'etale
neighbourhood, with the same residue field at the chosen point.  This
last condition is needed to keep the resulting valuations distinct.
On a small $\mathbb Q$-factorial model of this neighbourhood, the extended
bundles give independent degree vectors on the irreducible curve components
of the fibre over the chosen point.  These components are counted over the
function field of $T$ (Lemma~\ref{local:degree-independence}).
Blowing up their surface closures at their generic points gives
log-discrepancy-two valuations, and Lemma~\ref{local:restriction-injective}
makes their restrictions to $\mathbb C(Y)$ distinct.

\subsection{Resolution fibres and their monodromy}

Fix a projective resolution
\[
 \pi:\widetilde Y\longrightarrow Y
\]
which is an isomorphism over $Y_{\mathrm{reg}}$.  Since terminal
singularities are smooth in codimension two, $\dim\operatorname{Sing}Y
\leq1$.  After shrinking $T^\circ$, the fibres of $\pi$ over $T^\circ$
have dimension at most two.  Indeed, a component of $\pi^{-1}(T)$
dominating $T$ has dimension at most three, because it is a proper
closed subset of the fourfold $\widetilde Y$.  Upper semicontinuity then
removes the finitely many possible dimension jumps.  We also shrink so
that
\[
 \mathcal F=\widetilde Y\times_Y T^\circ\longrightarrow T^\circ
\]
is flat and projective and
$\mathcal W=(R^2\pi_*\mathbb Q)|_{T^\circ}$ is a local system.

\begin{lemma}\label{local:split-punctured}
Restriction to the smooth open defines a split surjection of rational
local systems
\[
 r:\mathcal W\longrightarrow\mathcal V_T.
\]
The splitting is available on $T^\circ$ itself, before passing to any
cover.
\end{lemma}

\begin{proof}
Use the perverse normalization for $\mathrm{IC}_Y$, so that its restriction to
$Y_{\mathrm{reg}}$ is $\mathbb Q[4]$.  The decomposition theorem for the
projective morphism $\pi$ provides an inclusion of the full-support
summand
\[
 s:\mathrm{IC}_Y\longrightarrow R\pi_*\mathbb Q[4]
\]
whose restriction to $Y_{\mathrm{reg}}$ is the identity; see
\cite[Theorem~5.3.1]{Saito1988} and
\cite[\S\S1.7--1.13]{Saito1989}.
Restriction upstairs gives a natural morphism
\[
 R\pi_*\mathbb Q[4]\longrightarrow Rj_*\mathbb Q[4].
\]
Its composite with $s$ is the canonical comparison
$\mathrm{IC}_Y\to Rj_*\mathbb Q[4]$.  In fact, adjunction identifies morphisms
from $\mathrm{IC}_Y$ to $Rj_*\mathbb Q[4]$ with morphisms from
$j^*\mathrm{IC}_Y=\mathbb Q[4]$ to itself, and the indicated composite restricts
to the identity.

At the generic curve stratum, which has complex codimension three,
the middle-extension construction retains the ordinary unshifted
cohomology through degree two.  Consequently the comparison induces
\[
 \mathcal H^{-2}(\mathrm{IC}_Y)|_{T^\circ}
   \xrightarrow{\ \sim\ }(R^2j_*\mathbb Q)|_{T^\circ}.
\]
This is the middle-perversity truncation description of intersection
cohomology \cite[\S2]{GM1983}; subsequent extension across the
zero-dimensional strata does not change this restriction.  Taking
degree $-2$ in the two morphisms above proves the assertion: the map
induced by $s$, composed with the inverse of this comparison
isomorphism, is a right inverse to $r$.
\end{proof}

\begin{lemma}\label{local:scheme-fibre-vanishing}
Let $y\in Y$ be a point for which the scheme fibre
$F_y=\widetilde Y\times_Y\operatorname{Spec}\kappa(y)$ has dimension at
most two.  Then
\[
 H^2(F_y,\mathcal O_{F_y})=0.
\]
If $y$ is a closed complex point, first Chern classes of algebraic line
bundles span $H^2(F_y,\mathbb Q)$.
\end{lemma}

\begin{proof}
The variety $Y$ has rational singularities, since it is klt
\cite[Theorem~5.22]{KM98}.  In particular,
$R^2\pi_*\mathcal O_{\widetilde Y}=0$.  Write
$A=\mathcal O_{Y,y}$, let $\mathfrak m$ be its maximal ideal, and put
\[
 F_n=\widetilde Y\times_Y
       \operatorname{Spec}(A/\mathfrak m^{n+1})\qquad(n\geq0).
\]
Every $F_n$ has the same underlying topological space as $F_0=F_y$.
In the exact sequence
\[
 0\longrightarrow J_n\longrightarrow\mathcal O_{F_{n+1}}
   \longrightarrow\mathcal O_{F_n}\longrightarrow0,
\]
the coherent kernel has $H^3(J_n)=0$, by the dimension bound.
Therefore
$H^2(F_{n+1},\mathcal O_{F_{n+1}})\to
H^2(F_n,\mathcal O_{F_n})$ is surjective.  Proper formal functions
\cite[Tag~02OD]{Stacks} gives
\[
 \varprojlim_n H^2(F_n,\mathcal O_{F_n})
   =(R^2\pi_*\mathcal O_{\widetilde Y})_y^{\wedge}=0.
\]
For an inverse sequence of surjective maps the limit maps
surjectively to each term, by successive lifting.  Hence every term,
in particular $H^2(F_y,\mathcal O_{F_y})$, is zero.  This argument
applies also when $y$ is the generic point of $T$; no flatness at $y$
is required.

For closed $y$, the analytic exponential sequence on the projective
complex scheme $F_y$ gives
\[
 \operatorname{Pic}(F_y^{\mathrm{an}})
  \xrightarrow{\ c_1\ } H^2(F_y^{\mathrm{an}},\mathbb Z)
  \longrightarrow H^2(F_y^{\mathrm{an}},\mathcal O_{F_y^{\mathrm{an}}}).
\]
The exponential sequence remains exact in the presence of nilpotents:
the exponential and logarithm are inverse on a nilpotent ideal, and
the usual sequence is exact on the reduction.  The scheme form of
GAGA \cite[Corollary~4.3 and Theorem~4.4]{RaynaudSGA1XII},
extending Serre's projective comparison \cite{SerreGAGA},
identifies the last group with the group already proved to vanish
and identifies analytic line bundles with algebraic ones, including
on this possibly nonreduced proper scheme. Thus $c_1$ is surjective
integrally, and tensoring with $\mathbb Q$ proves the assertion.
\end{proof}

\begin{lemma}\label{local:generic-lines}
The local systems $\mathcal W$ and $\mathcal V_T$ have finite
monodromy.  Put $K_T=\kappa(\eta_T)$ and
$F_{\eta_T}=\widetilde Y\times_Y\operatorname{Spec}K_T$.  There are
$b_T$ line bundles
\[
 L_1,\ldots,L_{b_T}\in\operatorname{Pic}(F_{\eta_T})
\]
whose spreads over a sufficiently small $T^\circ$ have linearly
independent images under $r$ in every fibre of $\mathcal V_T$.
\end{lemma}

\begin{proof}
We give the parameter argument because the bundles are needed over
$K_T$, rather than only over its algebraic closure.  Fix a relatively
ample line bundle $\mathcal O_{\mathcal F}(1)$.  Every line bundle on
a closed fibre is a quotient of some
$\mathcal O_{F_t}(-m)^{\oplus N}$.  Let $m$, $N$, and the Hilbert
polynomial vary. Grothendieck's Quot-scheme theorem
\cite[Theorems~3.1--3.2]{GrothendieckHilbert1961} gives the
corresponding countable collection of schemes of finite type over $T^\circ$.
On each, take the open locus where the universal quotient is
invertible on the whole pulled-back fibre family.  These loci still
parameterize every line bundle on every closed fibre.  To justify
openness, the family and the universal quotient are flat over the
Quot scheme; a fibrewise locally free quotient of rank one is locally
free near that fibre by the local criterion for flatness.  Properness
then removes the image of the complementary closed locus.

There are only countably many irreducible components of these
parameter spaces.  Choose a very general $t\in T^\circ(\mathbb C)$
outside the closures of the images of all components which do not
dominate $T^\circ$.  Lemma~\ref{local:scheme-fibre-vanishing} supplies
finitely many line bundles on $F_t$ whose classes
$c_1,\ldots,c_N$ span $\mathcal W_t$.  Each is represented by a point
of a dominating irreducible parameter component.  The first Chern
class of the universal line bundle gives a section of the pullback
of $\mathcal W$ to that component: this follows by restricting its
class on the total family to the fibres and applying proper base
change.  The analytic space of this irreducible complex parameter
component is path connected.

Choose a closed point of the generic fibre of this parameter
component.  Its residue field is finite over $K_T$.  Spreading the
point, normalizing, and shrinking the base yields a connected finite
\'etale cover of a dense open of $T^\circ$, together
with a line bundle on the pulled-back family. Choose a path in the
parameter component from the original quotient point to a point
on this cover. Flatness of the universal Chern class identifies
the transported $c_i$ with the class at that cover point. The
finite-index subgroup fixing the chosen sheet fixes this class;
conjugating by the projected path gives a finite-index subgroup
fixing $c_i$ at the original basepoint. Shrinking a smooth complex curve does
not diminish the monodromy image of a local system originally
defined on it: the induced map on fundamental groups is surjective.
It follows that each $c_i$ has a finite orbit under
$\Gamma=\pi_1(T^\circ,t)$.  Intersecting the stabilizers of this
finite spanning set gives a subgroup of finite index acting trivially
on $\mathcal W_t$.  The image $G$ of $\Gamma$ in
$\operatorname{GL}(\mathcal W_t)$ is therefore finite.
Lemma~\ref{local:split-punctured} gives the same conclusion for
$\mathcal V_T$.
Take a common dense open where all these covers are finite
\'etale, move the basepoint into it, and transport
the $c_i$ along one common path to the new basepoint, still denoted
$t$.  They still span $\mathcal W_t$.  Each cover class is a
monodromy translate of the corresponding transported $c_i$.
Changing its sheet realizes every element of that orbit, so choose
a sheet giving $c_i$ itself.

We next take norms of actual line bundles, not merely invariant
points of a Picard functor.  For the connected cover associated with
$c_i$, let $H_i\subset\Gamma$ be the subgroup fixing its chosen
sheet, and let $d_i=[\Gamma:H_i]$.  The cover carries a line bundle
$\mathcal L_i$ whose class at that sheet is $c_i$ and is fixed by $H_i$.  Its norm
along the finite locally free map of fibre families is a line bundle
on the original family; norms commute with base change
\cite[Tags~0BCY and~0BD2]{Stacks}.  At $t$ its first Chern class is
\begin{equation}\label{eq:local-norm-average}
 c_1(\operatorname{Nm}\mathcal L_i)
   =\sum_{\gamma\in\Gamma/H_i}\gamma c_i
   =d_i\operatorname{Av}_G(c_i),
 \qquad
 \operatorname{Av}_G(c)=\frac1{|G|}\sum_{g\in G}gc.
\end{equation}
For completeness, $H_i$ need not contain the kernel of
$\Gamma\to G$.  Nevertheless its image fixes $c_i$, and each element
of the finite $G$-orbit of $c_i$ occurs equally often in the coset
sum.  Both expressions in \eqref{eq:local-norm-average} are
$d_i$ times the orbit average, which proves the equality with its
stated factor.

The averages of a spanning set span $\mathcal W_t^G$.  Moreover,
the surjection $r$ induces a surjection on invariants: averaging any
lift of an invariant vector gives an invariant lift.  Poincar\'e
duality on the connected oriented real surface $T^\circ$ identifies
the dimension of $H_c^2(T^\circ,\mathcal V_T)$ with the dimension of
the coinvariants of its monodromy representation.  For a finite
group over $\mathbb Q$, invariants and coinvariants have the same
dimension, since averaging identifies the latter with the former.
Thus
\[
 b_T=\dim(\mathcal V_{T,t})^G.
\]
The norm bundles have generic fibres defined over $K_T$ itself, and
their images span these invariants.  Select $b_T$ of them whose
images form a basis and rename their generic fibres $L_1,\ldots,L_{b_T}$.
On a common smaller open, their images are independent flat
sections, proving the claim.  Their invariant dimension, and hence
$b_T$, is unchanged by further shrinking.
\end{proof}

\subsection{Extending line bundles without changing the residue field}

The independent punctured classes are now represented by line bundles
on the generic scheme fibre over $K_T$.  We next extend these bundles
in transverse directions while keeping that residue field unchanged.

\begin{lemma}\label{local:etale-lines}
Let $L_1,\ldots,L_b$ be finitely many line bundles on $F_{\eta_T}$.
There exist a normal integral quasi-projective variety $Y_e$, an
\'etale morphism $q:Y_e\to Y$, and a point
$\eta'\in Y_e$ above $\eta_T$ such that
\[
 K_T=\kappa(\eta_T)\xrightarrow{\ \sim\ }\kappa(\eta')
\]
is the residue-field map, and every $L_i$ extends to a line bundle
$\widetilde L_i$ on
$\widetilde Y_e=\widetilde Y\times_Y Y_e$.  The extensions restrict
to the specified $L_i$ on the same scheme fibre.  The variety
$\widetilde Y_e$ is smooth and integral, and
$\widetilde Y_e\to Y_e$ is projective and birational.
\end{lemma}

\begin{proof}
Write $A=\mathcal O_{Y,\eta_T}$, $\mathfrak m=\mathfrak m_A$, and
$Z=\widetilde Y\times_Y\operatorname{Spec}A$.  The ring $A$ is an
excellent local ring essentially of finite type over $\mathbb C$,
with residue field $K_T$.  Let $\widehat A$ be its completion, and
write $F_n=Z\times_A A/\mathfrak m^{n+1}$ as in the proof of
Lemma~\ref{local:scheme-fibre-vanishing}.

For $n\geq0$, the square-zero ideal for $F_n\subset F_{n+1}$ is
\[
 J_n=\mathfrak m^{n+1}\mathcal O_Z/
                       \mathfrak m^{n+2}\mathcal O_Z.
\]
Multiplication gives a surjection
\[
 (\mathfrak m^{n+1}/\mathfrak m^{n+2})
       \otimes_{K_T}\mathcal O_{F_0}\twoheadrightarrow J_n.
\]
Its source is a finite direct sum of $\mathcal O_{F_0}$.  The kernel
is coherent and has vanishing third cohomology, since $\dim F_0\leq2$.
Lemma~\ref{local:scheme-fibre-vanishing} therefore implies
$H^2(J_n)=0$.  The exact sequence of units for a square-zero
thickening, with $1+J_n\simeq J_n$ additively, shows that the
obstruction to lifting a line bundle from $F_n$ to $F_{n+1}$ lies in
this zero group \cite[Tag~0C6R]{Stacks}.  Each $L_i$ consequently has
compatible lifts to every $F_n$.

Grothendieck's existence theorem \cite{EGAIII1}, in the projective
form \cite[Tag~0885]{Stacks}, for the scheme $Z_{\widehat A}$
algebraizes these compatible systems of coherent sheaves
and their morphisms. It produces invertible sheaves: algebraize
the systems of inverse line bundles at the same time, and use full
faithfulness to algebraize their tensor-product isomorphisms with
$\mathcal O$.  Denote the resulting line bundles on
$Z_{\widehat A}$ by $\widehat L_i$.  Their restrictions to $F_0$
are the specified $L_i$, with the chosen identifications.

\begingroup\emergencystretch=1em
The finite-presentation limit property for invertible sheaves and
their isomorphisms \cite[Tags~0B8W and~01ZR]{Stacks} descends all
$\widehat L_i$ to line bundles on $Z_R$ for a single finitely
generated $A$-algebra $R$ equipped with a map
$\phi:R\to\widehat A$.  One may include their inverses and the
evaluation isomorphisms in these data.  Since $A$ is noetherian,
$R$ has a finite presentation.  Applying Artin approximation to its
finite system of equations gives a map
\[
 \psi:R\longrightarrow A^h
\]
whose reduction in $K_T$ agrees with that of $\phi$, where $A^h$ is
the ordinary henselization of $A$, whose completion is $\widehat A$.
Only approximation modulo
$\mathfrak m$ is used.  This is the approximation theorem for an
essentially finite-type local ring over a field
\cite[Theorem~1.10]{Artin1969}; the pointed \'etale
formulation, including equality of residue fields, is
\cite[Tag~07QZ]{Stacks}.
\par\endgroup

Pulling the descended line bundles back by $\psi$ gives line bundles
on $Z_{A^h}$ with the required special fibres.  More explicitly, the
two maps $R\to K_T$ are identical, so their restrictions are the
same pullbacks of the line bundles on $Z_R$ to $Z_{K_T}=F_0$.
Thus the argument preserves bundles on the entire scheme fibre;
it does not merely preserve their numerical classes.

The ordinary henselization is the filtered colimit of pointed
\'etale neighbourhoods with unchanged residue
field \cite[Tags~0A02 and~0A03]{Stacks}.  The same
finite-presentation property descends our finite list of bundles to
one such neighbourhood.  Spreading it from $\operatorname{Spec}A$
to an affine open of $Y$ gives $q:Y_e\to Y$ and $\eta'$ as claimed,
after shrinking around $\eta'$.  Since $Y$ is normal, its
\'etale neighbourhood is normal.  Its irreducible
components are open and closed; take the one containing $\eta'$.
It is integral and dominant over $Y$, since an
\'etale map is open.  We may take $Y_e$
quasi-projective by the affine construction.

Finally $\widetilde Y_e$ is smooth, since it is
\'etale over the smooth variety $\widetilde Y$.
Its irreducible components are disjoint and open.  Every component
has nonempty open image in $\widetilde Y$, and hence meets
$\pi^{-1}(Y_{\mathrm{reg}})$.  Over this dense open the base change
is the nonempty integral open $q^{-1}(Y_{\mathrm{reg}})$ of $Y_e$.
Every component meeting that integral open forces there to be just
one component.  Hence $\widetilde Y_e$ is integral.  Its map to
$Y_e$ is projective and is an isomorphism over
$q^{-1}(Y_{\mathrm{reg}})$, so it is birational.
\end{proof}

Apply the lemma to the bundles in Lemma~\ref{local:generic-lines},
put $b=b_T$, and let $T'\subset Y_e$ be the closure of $\eta'$.
Write $\pi_e:\widetilde Y_e\to Y_e$ for the base-changed resolution and
$j_e:(Y_e)_{\mathrm{reg}}\hookrightarrow Y_e$ for the smooth-locus inclusion.
The induced map
$T'\to T$ is an isomorphism on suitable dense opens: it is
generically an isomorphism by the residue-field identity.  On that
open the restrictions of $\widetilde L_i$ agree with the spreads used
in Lemma~\ref{local:generic-lines}.  Indeed, their isomorphisms on the
generic scheme fibre spread after shrinking, by finite presentation.
At a closed complex point an \'etale map is a
local analytic isomorphism.  The local systems of punctured
cohomology and the maps from resolution-fibre cohomology are
therefore identified near these points.  It follows that the images
of $c_1(\widetilde L_1),\ldots,c_1(\widetilde L_b)$ in punctured
degree-two cohomology along a dense open of $T'$ remain independent.

\subsection{Degrees on a small model}

Although $Y$ is $\mathbb Q$-factorial, its \'etale neighbourhood
$Y_e$ need not be.  We pass to a small $\mathbb Q$-factorial model
to make the extended divisor classes $\mathbb Q$-Cartier and measure
them by degrees on its fibre curves.  The variety $Y_e$ is terminal,
so the small
$\mathbb Q$-factorialization theorem, the empty-extraction case of
\cite[Corollary~1.4.3]{BCHM}, supplies a projective small morphism
\[
 g:Y'\longrightarrow Y_e
\]
with $Y'$ $\mathbb Q$-factorial.  Since $g$ is small and $K_{Y_e}$
is $\mathbb Q$-Cartier,
\begin{equation}\label{eq:local-small-crepant}
 K_{Y'}=g^*K_{Y_e};
\end{equation}
in particular $Y'$ is terminal.

The morphism $g$ is an isomorphism over the smooth locus of $Y_e$.
To see this directly, push a relatively ample divisor on $Y'$ down
to a Weil divisor on $Y_e$.  On the smooth locus it is Cartier, and
its pullback equals the original divisor there, since $g$ has no
exceptional divisors.  Positive-dimensional fibres would then have
both positive and zero degree against this divisor, a contradiction.
A proper quasi-finite birational morphism to a normal variety is an
isomorphism.

After shrinking $Y_e$ around $\eta'$, all its singular points lie
on $T'$, and every fibre of $g$ has dimension at most one.  For the
last assertion, a component of $g^{-1}(T')$ with generic fibre
dimension at least two would be a divisor in $Y'$ contracted to a
curve, contradicting smallness; the remaining fibre-dimension jumps
form a closed set which does not contain $\eta'$ and may be removed.

Choose Cartier divisors $\widetilde D_i$ representing the line
bundles $\widetilde L_i$ on the smooth integral variety
$\widetilde Y_e$.  Let $D_i$ be their pushforwards to $Y_e$ and
$D_i'$ their strict transforms on $Y'$.  Each $D_i'$ is
$\mathbb Q$-Cartier.  Let
\[
 C_1,\ldots,C_s
\]
be the distinct irreducible curve components of $g^{-1}(\eta')$,
with their reduced structures, counted over
$\kappa(\eta')=K_T$.

\begin{lemma}\label{local:degree-independence}
The vectors
\[
 \bigl(D_i'\cdot C_1,\ldots,D_i'\cdot C_s\bigr)
       \in\mathbb Q^s,\qquad 1\leq i\leq b,
\]
are linearly independent.  In particular $s\geq b$.
\end{lemma}

\begin{proof}
Suppose that
$D'=\sum_i\lambda_iD_i'$, with $\lambda_i\in\mathbb Q$, has zero
degree on every $C_j$.  We will show that $D'$ is numerically trivial
over a neighbourhood of $\eta'$ and that a multiple therefore
descends to $Y_e$.  A line bundle from $Y_e$ has zero punctured Chern
class, so this descent will contradict the independence of the
original classes unless every $\lambda_i$ is zero.

Choose an algebraic closure of $K_T$.  The geometric irreducible
components of an integral $K_T$-curve $C_j$ are permuted transitively
by the absolute Galois group.  The divisor $D'$ is defined over
$K_T$, so its degrees on these components are equal.  Degree is
preserved under extension of the ground field and adds over the
components of the fundamental cycle.  The equality
$D'\cdot C_j=0$ therefore implies zero degree on every geometric
curve component.  This argument also accounts for any multiplicities
if the whole scheme fibre is nonreduced.

All the reduced geometric components are defined over one finite
extension of $K_T$.  Normalize a dense open of $T'$ in that
extension, and shrink until the resulting curve cover is finite
\'etale.  Take the closures of the geometric
components in the pulled-back projective family.  By generic
flatness and openness of geometric integrality, we may make their
curve families flat with geometrically integral fibres.  Their
degrees against a Cartier multiple of $D'$ are then constant and
equal to zero.  Include any zero-dimensional generic components in
this construction as well; after shrinking, their fibres remain
zero-dimensional.  The union of these closures accounts
set-theoretically for the whole family after another shrinking.
Indeed its complement has constructible image in the base curve,
and this image does not contain the generic point, so its closure
is a finite set.  Thus every curve in every remaining fibre over
$T'$ has degree zero.  There are no vertical curves away from $T'$,
where $g$ is an isomorphism.  Removing the finitely many discarded
points from $Y_e$ proves the desired relative numerical triviality.

Choose a positive integer $m$ such that $L=mD'$ is Cartier.  It is
$g$-nef.  By \eqref{eq:local-small-crepant}, $L-K_{Y'}$ is also
$g$-nef.  It is $g$-big: relative bigness is tested on the generic
fibre, which is a point for this birational morphism.  The relative
base point free theorem for the effective klt pair $(Y',0)$ therefore
makes $L$ semiample over $Y_e$; the saturation hypothesis in its
sub-klt formulation is automatic here
\cite[Theorem~2.1 and Remark~3.16]{FujinoBPF}.

We explain why a multiple descends all the way to $Y_e$.  Its
semiample morphism, followed by Stein factorization, gives
\[
 Y'\xrightarrow{h} W\xrightarrow{k}Y_e,
\]
where $h$ has connected fibres, $W$ is normal, $k$ is projective,
and a positive multiple of $L$ is the pullback of a $k$-ample line
bundle on $W$.  Because $L$ has degree zero on all $g$-vertical
curves, $h$ contracts every curve in every $g$-fibre.  These fibres
have dimension at most one and are connected, the latter because
$g$ is proper birational with normal target.  Their images under
$h$ are consequently single points.  Thus every fibre of $k$ is
zero-dimensional.  The morphism $k$ is finite and birational, and
normality of $Y_e$ makes it an isomorphism.  We have proved that
\begin{equation}\label{eq:local-line-descent}
 \mathcal O_{Y'}(m'D')\simeq g^*M
\end{equation}
for a positive integer $m'$ and a line bundle $M$ on $Y_e$, with
$m'$ also clearing all the $\lambda_i$.

On the smooth open of $Y_e$, both $g$ and the resolution are
isomorphisms.  By construction of the pushforwards $D_i$,
\eqref{eq:local-line-descent} identifies the restriction there of
\[
 \bigotimes_i\widetilde L_i^{\otimes m'\lambda_i}
\]
with the pullback of $M$.  At a general closed point of $T'$, the
bundle $M$ is trivial on a neighbourhood in the base.  Its first
Chern class on the punctured smooth neighbourhood is therefore zero.
Naturality of
$R\pi_{e*}\mathbb Q\to Rj_{e*}\mathbb Q$ says that the image of a
resolution-fibre Chern class is precisely this punctured Chern class
of the same bundle.  Hence
\[
 \sum_i\lambda_i\,r\bigl(c_1(\widetilde L_i)\bigr)=0
\]
along a dense open of $T'$.  The independence established after
Lemma~\ref{local:etale-lines} forces every $\lambda_i$ to be zero.
This proves the lemma.
\end{proof}

\subsection{Restriction of the valuations}

We isolate the residue-field argument that prevents distinct
valuations from merging under restriction.  The \'etale
neighbourhood in this statement is not required to be finite.

\begin{lemma}\label{local:restriction-injective}
Let $q:Y_e\to Y$ be a dominant \'etale morphism of
normal integral complex varieties, let $\eta\in Y$, and fix
$\eta'\in Y_e$ above $\eta$ such that
$\kappa(\eta)\to\kappa(\eta')$ is an isomorphism.  Suppose that $Y$
is $\mathbb Q$-Gorenstein.  On normalized divisorial valuations of
$\mathbb C(Y_e)$ with centre the closure of $\eta'$, restriction to
$\mathbb C(Y)$ is already normalized, remains divisorial, and is
injective.  Moreover
\[
 a(w;Y_e,0)=a(w|_{\mathbb C(Y)};Y,0).
\]
\end{lemma}

\begin{proof}
The function-field extension
$\mathbb C(Y_e)/\mathbb C(Y)$ is finite, because the dominant
\'etale morphism is quasi-finite.  The elementary
finite-extension inequalities for valuations imply that the
restriction of a nontrivial discrete valuation is nontrivial and
discrete, that its value group has finite index in the original
group, and that the residue-field extension is finite
\cite[Tag~0ASH]{Stacks}.  Consequently, if $w$ is divisorial, the
normalized restriction $v$ has residue transcendence degree
$\dim Y-1$ and is divisorial.  One can see the last assertion without
any choice of a completion: choose $\dim Y-1$ value-zero rational
functions with algebraically independent residues, resolve their
maps to $\mathbb P^1$ on a proper birational model of $Y$, and then
resolve that model.  The centre of $v$ has dimension at least
$\dim Y-1$, by those residues, and is not the generic point, since
$v$ is nontrivial.  Thus it is a divisor.

Choose a projective birational morphism $\mu:Z\to Y$ with $Z$ smooth
and carrying the prime divisor $E$ with $v=\operatorname{ord}_E$,
and form
\[
 \begin{tikzcd}[column sep=large,row sep=large]
 Z_e=Z\times_Y Y_e \arrow[r,"p"] \arrow[d,"\mu_e"']
     & Z \arrow[d,"\mu"] \\
 Y_e \arrow[r,"q"'] & Y.
 \end{tikzcd}
\]
The scheme $Z_e$ is smooth, because $p$ is
\'etale.  It is also integral with function field
$\mathbb C(Y_e)$.  Indeed, its irreducible components are disjoint
and open, and each has nonempty open image in $Z$.  Every component
therefore meets the inverse image of a dense open $U\subset Y$
over which $\mu$ is an isomorphism.  That inverse image is the
nonempty integral open $q^{-1}(U)\subset Y_e$.  There can be only
one component.  The projective map $\mu_e$ is an isomorphism over
$q^{-1}(U)$, proving the function-field assertion.

By properness of $\mu_e$, the valuation $w$ has a centre $x$ on
$Z_e$.  Its image on $Z$ is $\eta_E$, since its restriction is a
positive multiple of $v$, and its image on $Y_e$ is $\eta'$.
The points lying above this specified pair are the points of
\begin{equation}\label{eq:local-residue-point}
 \operatorname{Spec}\bigl(
   \kappa(\eta_E)\otimes_{\kappa(\eta)}\kappa(\eta')\bigr)
       =\operatorname{Spec}\kappa(\eta_E).
\end{equation}
There is therefore exactly one possible point $x$.  Since $p$ is
\'etale, its local ring
$\mathcal O_{Z_e,x}$ is a discrete valuation ring, and its maximal
ideal is generated by a uniformizer of
$\mathcal O_{Z,\eta_E}$.  Thus the ramification index is one.
Any normalized valuation of $\mathbb C(Y_e)$ centred at this DVR
equals its order: every nonzero element of the fraction field is a
power of a uniformizer times a unit of the DVR, and a centred
valuation is zero on such units.  It follows that $w$ is uniquely
determined by $v$ and $\eta'$.  Its restriction is exactly $v$,
not a larger integral multiple.  This proves both injectivity and
the normalization assertion.

Finally choose compatible canonical divisors in the displayed
\'etale square.  Then
\[
 K_{Z_e}-\mu_e^*K_{Y_e}
       =p^*(K_Z-\mu^*K_Y).
\]
The coefficient at the divisor with generic point $x$ is the
coefficient at $E$, because its ramification index is one.  Adding
one to these coefficients proves equality of log discrepancies.
\end{proof}

\begin{proof}[Proof of Proposition~\ref{prop:local-valuations}]
If $b_T=0$ there is nothing to prove.  Otherwise apply
Lemmas~\ref{local:generic-lines} and~\ref{local:etale-lines} and use
the small model $g:Y'\to Y_e$ constructed above.
Lemma~\ref{local:degree-independence} gives at least $b_T$ distinct
arithmetic curve components $C_i$ of $g^{-1}(\eta')$.  Their closures
$S_i\subset Y'$ are distinct surfaces.  They have codimension two,
so terminality makes $Y'$ smooth at their generic points.  The
ordinary blowup of each smooth generic centre $S_i$ has a unique
exceptional prime there.  Let $w_i$ be its normalized divisorial
valuation.  The codimension-two blowup formula gives
\[
 a(w_i;Y',0)=2.
\]
Their centres $S_i$ distinguish them.  By
\eqref{eq:local-small-crepant}, they have the same log discrepancy
over $Y_e$, and their centres on $Y_e$ are exactly $T'$.

Lemma~\ref{local:restriction-injective} now gives distinct normalized
divisorial valuations
$v_i=w_i|_{\mathbb C(Y)}$, each with centre $T$ and with
\[
 a(v_i;Y,0)=2.
\]
Choose a prime component $D$ of $\Theta$ with positive coefficient
and containing $T$.  Since $Y$ is $\mathbb Q$-factorial, a positive
multiple of $D$ is Cartier near $\eta_T$, with a local equation in
the maximal ideal of $\mathcal O_{Y,\eta_T}$.  A valuation centred
there has strictly positive value on this equation.  Effectivity of
$\Theta$ consequently gives $v_i(\Theta)>0$, and hence
\[
 a(v_i;Y,\Theta)=2-v_i(\Theta)<2.
\]
The centres distinguish the valuations arising from different
curves.  This completes the proof.
\end{proof}

Summing this proposition over the singular curves contained in $Q$
bounds the final sum in \eqref{eq:branch-before-valuations} by the
codimension-three valuation count.  Lemma~\ref{lem:echoes} makes this
count finite, completing the branch inequality as explained at the end
of Section~\ref{sec:branch-topology}.
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/04-local-valuations.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/05-difficulty.tex ====
\section{Descent of the difficulty and klt termination}
\label{sec:difficulty}

Return to the prepared terminal chain of
Section~\ref{sec:difficulty-setup}.  Its labels $S_h$ persist, their
coefficients are nonincreasing, and their default echo weights $d_h$
are constant.  The integer $\mathcal D$ is the finite corrected sum
in Definition~\ref{def:difficulty}.

The branch theorem now supplies the lower bound isolated in
\eqref{eq:difficulty-local-deficit}.  To obtain termination, we must
also compare this integer across every move of the chain.  The
normalization-rank correction was chosen so that its change cancels
exactly the change in the subtracted branch defaults.  We prove this
identity first, then show that each positive-side surface downstairs
forces an integer weight to drop between consecutive junctions.

\subsection{Divisor ranks on the normalizations}

We record explicitly the homological fact which will cancel the
changes of the defaults under a small flip.

\begin{lemma}
\label{difficulty:normalization-independence}
Let \(q:S\to T\) be a projective birational morphism of normal
projective threefolds.  The cycle classes in \(H_4(S,\mathbb Q)\)
of the prime divisors contracted by \(q\) are linearly independent.
\end{lemma}

\begin{proof}
Take a projective resolution \(r:\widetilde S\to S\) which is an
isomorphism over \(U=S_{\mathrm{reg}}\), and put
\(E=r^{-1}(S\setminus U)\).  Normality gives
\(\dim(S\setminus U)\leq1\), so \(\dim E\leq2\).
Suppose a rational combination of the contracted divisors has zero
class in \(H_4(S,\mathbb Q)\).  The corresponding combination of
their strict transforms has zero restriction to
\(H_4^{\mathrm{BM}}(U,\mathbb Q)\).  The localization sequence
\[
 H_4(E,\mathbb Q)\longrightarrow
 H_4(\widetilde S,\mathbb Q)\longrightarrow
 H_4^{\mathrm{BM}}(U,\mathbb Q)
\]
is exact.  Its first group is generated by the fundamental classes
of the irreducible surface components of \(E\); components of
dimension at most one contribute nothing in degree four.  Consequently
one can correct the strict-transform combination by a rational
combination of resolution-exceptional divisors to obtain a divisor
with zero homology class on \(\widetilde S\).

Every divisor in this corrected combination is exceptional over
\(T\).  This is true for the original strict transforms by
assumption.  For a resolution-exceptional divisor it follows because
its image in \(S\) has dimension at most one, and hence so does
its image in \(T\).  On the smooth projective threefold
\(\widetilde S\), a homologically trivial divisor is numerically
trivial.  Applying the negativity lemma to this exceptional divisor
and to its negative shows that it is zero as a divisor.  None of
the strict transforms is resolution-exceptional, so all original
coefficients vanish.
\end{proof}

Consider now one of the small terminal flips of our chain, written
\(Y^-\to Z\leftarrow Y^+\), with the full bad sets
\(W^-,W^+\).  For a label \(S_h\), let \(T_h\) be the
normalization of its common image in \(Z\).  Since the ambient maps
are small, the two maps
\[
 (S_h^-)^\nu\longrightarrow T_h
 \longleftarrow(S_h^+)^\nu
\]
are projective birational morphisms.  Let \(e_h^\pm\) be the number
of divisors in these normalizations lying over the corresponding
bad set.  They are exactly the divisors counted by
\(r_{V,h}\) for surfaces \(V\subset W^\pm\).

Indeed, normalization is finite and so preserves the dimension of
these images in \(S_h^\pm\).  A divisor in the normalization has
a surface image.  The bad locus on the ambient base has dimension
at most one by Lemma~\ref{lem:graph}; consequently all these divisors
are contracted over \(T_h\).  Conversely, outside the bad set
the ambient maps, and hence the normalizations of their labeled
divisors, identify.  Thus all exceptional divisors of the displayed
morphisms occur in this list.

Restriction to the common open identifies the spans of the
restricted divisor cycle classes: every divisor on that open has
a closure on either projective normalization.  By localization,
the kernels of these restrictions are the spans of the bad-locus
divisors.  Lemma~\ref{difficulty:normalization-independence} computes
their dimensions as \(e_h^\pm\).  We obtain the exact equality
\begin{equation}
\label{difficulty:rank-difference}
 \rho_*((S_h^-)^\nu)-\rho_*((S_h^+)^\nu)
   = e_h^- - e_h^+.
\end{equation}
This equality concerns divisor cycle classes on the normalizations;
it does not require a Picard-number identity for the ambient flip.

\subsection{Boundedness and monotonicity}

\begin{proposition}
\label{prop:difficulty}
On the prepared terminal chain, the integer
\(\mathcal D(Y,\Theta)\) has the following properties.
\begin{enumerate}[label=\textup{(\roman*)}]
\item It is nonnegative at every crepant junction.
\item It is nonincreasing under every coefficient decrease and
every small terminal flip.
\item If the weight of one exceptional valuation strictly decreases
in one of these moves, then the difficulty strictly decreases.
\end{enumerate}
No separate nonnegativity assertion is required for the intermediate
models in a bridge.
\end{proposition}

\begin{proof}
At a crepant junction \(p:Y\to X_i\), let \(Q\) be the reduced
union of the varying labels.  If this union is empty,
Lemma~\ref{lem:ceiling-error} already makes every surface bracket
nonnegative, and all other terms of \eqref{eq:difficulty} are
nonnegative.  Otherwise each component of \(Q\) has positive
coefficient and, by Proposition~\ref{prop:codim-two},
\(\dim p(Q)\leq1\).  For every surface in \(Q\), its branch
number in Theorem~\ref{thm:branch} equals
\(r_V^{\mathrm{var}}\).  Surfaces outside \(Q\) have no negative
allowance in \eqref{eq:local-ceiling-bound}.

For a varying label \(b_h>0\), so \(d_h\geq w(b_h)\geq1\).
Moreover, every valuation in the right-hand count of
Theorem~\ref{thm:branch} has a codimension-three center and weight
at least one, and thus is counted in the first term of
\eqref{eq:difficulty}.  It follows from that theorem that
\[
 \sum_{V\subset Q}(r_V^{\mathrm{var}}-1)
 \leq
 \sum_{h\text{ varying}}d_h\rho_*(S_h^\nu)
 +\sum_{\operatorname{codim}_Y c_Y(v)\geq3}w_v.
\]
Substitution in \eqref{eq:difficulty-local-deficit} proves (i).
The valuations on the right have codimension-three centers, so none
has been reused as a valuation in a surface bracket.

For a coefficient decrease the variety, all centers, all branch
numbers, and all normalization ranks remain fixed.  The boundary
removed is effective and \(\mathbb Q\)-Cartier; hence every
discrepancy is nondecreasing and every weight is nonincreasing.
The \(d_h\) remain unchanged by our preparation.  To check that
this comparison is a finite one, take the union of the exceptional
surface centers in Lemma~\ref{lem:echoes} for the two boundaries.
Outside this finite set a nonzero local contribution consists of
the echoes on a single label.  Each of their finitely many possibly
positive weights is nonincreasing, while their sum is the unchanged
\(d_h\).  Thus each such echo weight is unchanged.  The
codimension-at-least-three contributions, and the contributions at
the finitely many exceptional surface centers, can therefore be
compared as finite sums with unchanged corrections.  Their weights
only decrease; a strict decrease of any exceptional valuation
strictly decreases the total.  This proves (ii) and (iii) for a
coefficient move.

For a small flip, all prime labels and all exceptional divisorial
valuations correspond on the two sides.  By
Lemma~\ref{lem:graph}, the set
\[
\begin{split}
 \mathcal A
 &=\{v:\ v\text{ is exceptional and }c_{Y^-}(v)\subset W^-\}\\
 &=\{v:\ v\text{ is exceptional and }c_{Y^+}(v)\subset W^+\}
\end{split}
\]
is the same on both sides.  Set
\[
 \mathcal A_0=
 \{v\in\mathcal A:\ w_v(Y^-,\Theta^-)+w_v(Y^+,\Theta^+)>0\}.
\]
This is finite.  Each bad set has dimension at most two and has
finitely many surface components; a valuation with a surface center
contained in it has one of these centers.  Lemma~\ref{lem:echoes}
gives finiteness at each of them and finiteness of all positive-weight
terms with centers of codimension at least three.

The generic centers not contained in the bad sets identify on the
common open.  Their discrepancies, local corrections, and labels
therefore agree.  Write \(w_v^\pm=w_v(Y^\pm,\Theta^\pm)\).
Separating the finite bad-set contributions in
\eqref{eq:difficulty} gives
\begin{align}
\label{difficulty:flip-difference}
 \mathcal D(Y^-,\Theta^-)-\mathcal D(Y^+,\Theta^+)
 ={}&\sum_{v\in\mathcal A_0}(w_v^- - w_v^+)
       -\sum_h d_h(e_h^- - e_h^+) \\
    &+\sum_h d_h
      \bigl(\rho_*((S_h^-)^\nu)-\rho_*((S_h^+)^\nu)\bigr)
 \notag\\
 ={}&\sum_{v\in\mathcal A_0}(w_v^- - w_v^+).
 \notag
\end{align}
The second equality is exactly
\eqref{difficulty:rank-difference}.  Discrepancy monotonicity makes
every summand in the last expression nonnegative.  A strict weight
drop gives a positive summand and hence a strict drop of the
difficulty.  Valuations whose centers change from a surface to a
curve, or conversely, are still counted once in the raw part on each
side; they merely move between the first two displayed sums of
\eqref{eq:difficulty}.  Positive weights becoming zero are included
in \(\mathcal A_0\).  Thus neither kind of change is lost in the
comparison.  This completes (ii) and (iii).
\end{proof}

\begin{remark}
The local bracket at a bad surface may cancel the weight of a
generic echo.  Formula~\eqref{difficulty:flip-difference} shows why
this cannot absorb a strict decrease: the change of that default is
matched exactly by the normalization-rank term.  This remains true
when a varying coefficient tends to zero while its positive default
stays constant.  An intermediate difficulty may initially have been
defined as a signed integer; Proposition~\ref{prop:difficulty}
then bounds it below by the nonnegative value at the next junction.
\end{remark}

\subsection{Detecting positive-side surfaces}

\begin{theorem}
\label{thm:klt-termination}
Every program in Definition~\ref{def:program} starting with a
projective klt fourfold pair over \(\mathbb C\) with rational boundary has finitely
many birational steps.  No pseudo-effectivity hypothesis is needed.
\end{theorem}

\begin{proof}
Suppose that such a program has infinitely many birational steps.
Lemma~\ref{lem:cycle-rank}, applied in cycle dimension three,
removes all divisor-losing steps after a finite prefix.  The
remaining program is small.  Construct its terminal chain by
Proposition~\ref{prop:terminal-chain}, and make the truncations in
Proposition~\ref{prop:codim-two} and
Lemma~\ref{difficulty:preparation}.  By
Proposition~\ref{prop:difficulty}, the difficulties at its crepant
junctions are nonnegative integers and are nonincreasing.

Consider a downstairs step with an irreducible surface
\(V\subset W_i^+\).  Proposition~\ref{prop:codim-two} says that
the ambient variety is smooth at \(\eta_V\) and that its
minimal log discrepancy there exceeds one.  The ordinary generic
blowup of \(V\) defines a normalized valuation \(v\) whose
positive-side discrepancy is
\[
 a^+=a(v;X_{i+1},B_{i+1})
     =2-\sum_hm'_h b'_h>1,
\]
where \(m'_h\) are boundary multiplicities at \(\eta_V\) and
\(b'_h\) are the original boundary coefficients carried by strict
transform downstairs.  Effectiveness gives \(a^+\leq2\), and
the choice of \(N\) gives
\[
 M:=N(2-a^+)=N\sum_hm'_h b'_h\in\mathbb Z_{\geq0}.
\]
By the full bad-set strictness in Lemma~\ref{lem:graph},
\(a^-:=a(v;X_i,B_i)<a^+\).  Consequently
\begin{equation}
\label{eq:difficulty-unit-drop}
 w(2-a^-)\geq M+1,
 \qquad w(2-a^+)=M.
\end{equation}
In particular the argument includes \(a^+=2\), when the
positive-side weight is zero.  Strict discrepancy increase alone
would not imply this unit drop without the integral final deficit.

The valuation \(v\) is exceptional downstairs on both sides,
since the step is small.  It does not belong to the stabilized list
\(I_0\): its positive-side discrepancy exceeds one, whereas
\(I_0\) is the common list of exceptional valuations of discrepancy
at most one.  The terminal junctions extract exactly \(I_0\), so
\(v\) is exceptional on both junction models.  Every intervening
birational move is small, and a coefficient change does not alter
the model.  Hence \(v\) stays exceptional throughout this finite
bridge.  Crepancy at its endpoints identifies its junction weights
with those in \eqref{eq:difficulty-unit-drop}.  At least one move
in the bridge therefore strictly lowers its weight.  By
Proposition~\ref{prop:difficulty}, the difficulty strictly decreases
between these consecutive junctions.

A nonincreasing sequence of nonnegative integers has only finitely
many strict decreases.  Thus only finitely many downstairs steps
have positive-side bad surfaces.  Discard them.  On the remaining
small tail, Lemma~\ref{lem:cycle-rank} in cycle dimension two
removes negative-side bad surfaces after finitely many further
steps.  Both bad loci of every subsequent step would then have
dimension at most one, contradicting the inequality
\(\dim W_i^-+\dim W_i^+\geq3\) of Lemma~\ref{lem:graph}.
This contradiction proves termination.
\end{proof}
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/05-difficulty.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/06-lc-and-existence.tex ====
\section{Log canonical pairs and continuation of the program}\label{sec:lc}

We continue to work over $\mathbb C$.  We first deduce termination for
elementary $\mathbb Q$-factorial dlt programs from
Theorem~\ref{thm:klt-termination}.  We then lift a prescribed small tail of
an arbitrary lc program to such a program.  The lift is an auxiliary
construction in the proof: it does not replace the given initial model
in Definition~\ref{def:program}.
For the standard definition of dlt pairs, see \cite{KM98}.

\subsection{Elementary dlt steps and special termination}

An elementary step in this subsection means the usual divisorial
contraction or flip of a negative extremal ray on a
$\mathbb Q$-factorial dlt pair.  Their existence follows from the klt
contraction and flip theorems and relative base point freeness.

\begin{lemma}\label{lem:dlt-elementary}
Let $(U,\Delta)$ be a projective $\mathbb Q$-factorial dlt pair with rational boundary,
and let $R$ be a $(K_U+\Delta)$-negative extremal ray.  Its elementary
contraction exists.  If it is birational and small, its flip exists,
is projective, and is a $(K_U+\Delta)$-flip.  Divisorial contractions and
flips preserve $\mathbb Q$-factoriality and the dlt property.
\end{lemma}

\begin{proof}
Put $D=K_U+\Delta$ and $F=\lfloor\Delta\rfloor$.  For a sufficiently
small positive rational number $\varepsilon$, the pair
\[
  (U,\Delta_\varepsilon),\qquad
  \Delta_\varepsilon=\Delta-\varepsilon F,
\]
is klt, and $D_\varepsilon=K_U+\Delta_\varepsilon$ is negative on $R$.
Here $F$ is $\mathbb Q$-Cartier by $\mathbb Q$-factoriality.  Decreasing
an effective $\mathbb Q$-Cartier part of a dlt boundary preserves dlt,
and a dlt boundary with no coefficient one is klt; see
\cite[Corollary~2.39 and Proposition~2.41]{KM98}.  Negativity on $R$
is an open condition on $\varepsilon$, since it can be checked on one
nonzero numerical class in this ray.

The klt cone and contraction theorem gives the contraction
$f:U\to V$ of $R$, with normal projective target and connected fibres.
It has relative Picard number one.  If $f$ is small, klt flip existence
gives a projective small map $f^+:U^+\to V$ on which
$D_\varepsilon^+=K_{U^+}+\Delta_\varepsilon^+$ is relatively ample;
see \cite[Corollary~1.4.1]{BCHM}.  The output is
$\mathbb Q$-factorial; the elementary statements are also recorded in
\cite[Lemma~3.10.2]{BCHM}.

We check the positive sign for the full boundary.  In $N^1(U/V)$ there
is a positive rational number $t$ such that
\[
 D\equiv_V tD_\varepsilon.
\]
Indeed both classes have negative degree on $R$, this relative space
has dimension one, and their degrees on an integral curve are
rational.  The $\mathbb Q$-Cartier divisor
$L=D-tD_\varepsilon$ is numerically trivial over $V$.  A Cartier
multiple of $L$ is relatively nef, and its difference from
$D_\varepsilon$ is relatively ample.  Relative klt base point
freeness therefore makes a positive multiple of $L$ semiample over
$V$; the applicable statement is
\cite[Theorem~3.9.1]{BCHM}.  Its associated morphism contracts every
curve in every $f$-fibre.  A projective image of positive dimension
contains a curve, and a curve in such an image has a curve lift.
Consequently that morphism is constant on each connected $f$-fibre.
Normality and the usual factorization through a proper morphism with
connected fibres show that it factors through $V$.  Equivalently,
after a further multiple its semiample model is finite and
birational over $V$, hence is $V$.  Thus
\[
 L\sim_{\mathbb Q} f^*M
\]
for a $\mathbb Q$-Cartier divisor $M$ on $V$.

Since the flip is small on both sides, this identity of rational
line bundles transforms into
\[
 K_{U^+}+\Delta^+
   \sim_{\mathbb Q}tD_\varepsilon^++(f^+)^*M.
\]
The full adjoint is therefore ample over $V$.  The graph comparison
of Lemma~\ref{lem:graph} applies to these adjoints and their strict
boundaries and proves discrepancy improvement; in particular the
full positive pair is lc.  The same comparison gives the usual dlt
preservation.  More explicitly, every valuation of log discrepancy
zero on the positive side had discrepancy zero on the negative
side, and its centre was not contained in the bad locus.  Its generic
centre is consequently in the unchanged snc neighbourhood supplied
by the dlt property.  The characterization of dlt by such snc
neighbourhoods, or directly
\cite[Lemma~3.10.10(1)]{BCHM}, gives dlt on $U^+$.

For an elementary divisorial contraction the target is
$\mathbb Q$-factorial by the usual klt contraction theorem, so the
pushforward full adjoint is $\mathbb Q$-Cartier.  The same discrepancy
argument gives dlt preservation; see also
\cite[Remark~3.10.5 and Lemma~3.10.10(1)]{BCHM}.
\end{proof}

\begin{theorem}\label{thm:dlt-termination}
Every program of elementary negative birational steps starting from
a projective $\mathbb Q$-factorial dlt fourfold pair with rational boundary has finitely
many steps, independently of its successive ray choices.
\end{theorem}

\begin{proof}
Suppose such a program were infinite.  By
Lemma~\ref{lem:cycle-rank}, only finitely many of its steps lose a
prime divisor.  Discard that finite prefix, leaving a sequence of
elementary dlt flips.

We use special termination in its ordinary dlt form:
\cite[Theorem~4.2.1 and Remark~4.2.2]{FujinoSpecial}.  This theorem
assumes the log MMP for $\mathbb Q$-factorial dlt pairs in dimensions
at most one less than the dimension in question.  For rational
boundaries it needs only the rational-boundary forms of those
lower-dimensional results.  Here they are the classical
at-most-three-dimensional log MMP, including flip existence and
arbitrary termination, as in \cite{KollarEtAl1992}.  In particular
we do not invoke termination for four-dimensional lc pairs.  The
required fourfold special-termination conclusion is also stated
directly in \cite[Theorem~1.2]{FujinoFourfold}: eventually both the
flipping and the flipped loci are disjoint from the round-down of
the boundary.

After this further truncation, replace each boundary $\Delta_i$ by
$\Delta_i-\lfloor\Delta_i\rfloor$.  These pairs are klt.  The
removed divisors miss the surgery on both sides, so they have degree
zero on all curves of the two elementary contractions.  Thus the
same negative rays and the same two relative signs remain valid
for the decreased boundaries.  Relative ampleness is unchanged
by this relatively numerically trivial difference.  We have
obtained an infinite program from a projective klt fourfold pair with rational
boundary, contrary to Theorem~\ref{thm:klt-termination}.
\end{proof}

\subsection{Lifting every prescribed lc tail}

Lifting prescribed birational steps to finite dlt programs is standard;
see \cite[Lemma~3.1]{LazicMoragaTsakanikas} and
\cite[Lemma~2.6]{HanLiuZhuang2025}; compare the scaling construction in
\cite[Remark~2.9]{BirkarLC}.  We record the construction here, including
the nonemptiness of each bridge and its identification with the
prescribed positive model.

The following elementary convex observation is useful because a
crepant dlt lift has adjoint-zero curves over the model downstairs.

\begin{lemma}\label{lem:vertical-ray}
Let $(U,\Delta)$ be a projective lc pair, and let $h:U\to Z$ be a
projective morphism to a projective variety.  If $K_U+\Delta$ is not
nef over $Z$, there is a $(K_U+\Delta)$-negative extremal ray of the
absolute cone $\overline{\mathrm{NE}}(U)$ which is contracted by $h$.
Its contraction factors $h$.  If $h$ is birational, that contraction
is birational.
\end{lemma}

\begin{proof}
Choose ample divisors $A$ on $U$ and $H$ on $Z$.  The cone
\[
 F_h=\overline{\mathrm{NE}}(U)\cap(h^*H)^\perp
\]
is a closed face of the absolute cone.  A negative vertical curve
exists by the failure of relative nefness.  Hence the linear
functional $K_U+\Delta$ has negative minimum on the compact slice
$F_h\cap\{A\cdot\gamma=1\}$.  It has a negative extreme point
there, which generates an extremal ray of $F_h$ and therefore of
$\overline{\mathrm{NE}}(U)$.  The lc cone theorem represents this
negative ray by a curve.  Its zero intersection with $h^*H$ says
that it is vertical, since $H$ is ample.

The absolute contraction contracts only curves in this ray.
It follows that $h$ is constant on each of its connected fibres:
otherwise a positive-dimensional projective image would contain
a curve, which could be lifted to a curve in the fibre.  The
factorization through its normal target follows by the usual
proper connected-fibre factorization.  If $h$ is birational, a
fibre-type contraction would force the dimension of that target
to be smaller than $\dim Z=\dim U$, although it dominates $Z$.
This is impossible.
\end{proof}

\begin{proposition}\label{prop:lc-lift}
Every program in Definition~\ref{def:program} starting from a
projective lc fourfold pair over $\mathbb C$ with rational boundary has finitely many
birational steps.
\end{proposition}

\begin{proof}
Suppose the contrary.  Lemma~\ref{lem:cycle-rank} discards only
finitely many steps and leaves an infinite small tail
\[
 (X_i,B_i)\longrightarrow Z_i\longleftarrow(X_{i+1},B_{i+1}),
 \qquad i\ge i_0,
\]
in which both morphisms are small.  All choices in this tail are
kept fixed.

Take a projective crepant $\mathbb Q$-factorial dlt modification
\[
 p_{i_0}:(U_{i_0},\Delta_{i_0})\longrightarrow(X_{i_0},B_{i_0}).
\]
The dlt blowup theorem provides such a morphism, with
\[
 \Delta_{i_0}=(p_{i_0})_*^{-1}B_{i_0}
                   +\operatorname{Exc}(p_{i_0})_{\mathrm{red}},
 \qquad
 K_{U_{i_0}}+\Delta_{i_0}=p_{i_0}^*D_{i_0};
\]
see \cite[Theorem~10.4]{FujinoFoundations}.  In particular every
extracted prime has coefficient one and log discrepancy zero.

Inductively suppose that $p_i:(U_i,\Delta_i)\to(X_i,B_i)$ is such
a crepant dlt lift.  Over $Z_i$ run elementary dlt MMP steps for
$K_{U_i}+\Delta_i$ until it becomes relatively nef.  At any non-nef
intermediate stage,
Lemma~\ref{lem:vertical-ray} gives a negative \emph{absolute}
extremal ray inside the vertical face.  The face need not be
entirely negative.  The elementary step exists by
Lemma~\ref{lem:dlt-elementary}, its contraction factors the map
to $Z_i$, and it is birational because that map is birational.
Every total space is projective and $\mathbb Q$-factorial dlt.
An infinite choice of such relative steps would consequently be
an infinite absolute elementary dlt program, excluded by
Theorem~\ref{thm:dlt-termination}.  The chosen relative program
therefore reaches a nef end, say $(U_i',\Delta_i')$.

This finite bridge is nonempty.  Choose a curve $C$ contracted by
$X_i\to Z_i$.  It has $D_i\cdot C<0$.  Projectivity of $p_i$
provides a curve $\widetilde C$ dominating $C$: take a component
of the inverse image dominating $C$ and cut by sufficiently many
general ample divisors.  Crepancy gives
\[
 (K_{U_i}+\Delta_i)\cdot\widetilde C
     =\deg(\widetilde C/C)D_i\cdot C<0.
\]
Thus the starting lift was not nef over $Z_i$.

We identify the end with a crepant lift of the \emph{prescribed}
positive model $X_{i+1}$.  On a common smooth model of $U_i$,
$U_i'$, and $X_{i+1}$, the pullback of the starting adjoint can be
written in two ways.  The relative MMP writes it as the pullback
of $K_{U_i'}+\Delta_i'$ plus an effective divisor exceptional over
$U_i'$.  Crepancy of $p_i$ and Lemma~\ref{lem:graph} write it as
the pullback of $D_{i+1}$ plus an effective divisor exceptional over
$X_{i+1}$.  One end is nef over $Z_i$ and the other is ample there.
Lemma~\ref{lem:two-ends} gives a projective birational morphism
\[
 p_{i+1}:U_i'\longrightarrow X_{i+1},\qquad
 K_{U_i'}+\Delta_i'=p_{i+1}^*D_{i+1}.
\]
Every prime exceptional for $p_{i+1}$ is the transform of a prime
already exceptional for $p_i$.  Indeed the downstairs map is
small, every downstairs prime persists, and the elementary
program upstairs extracts no primes.  Each remaining extracted
prime therefore still has coefficient one.  Setting
$(U_{i+1},\Delta_{i+1})=(U_i',\Delta_i')$ supplies the next
crepant dlt lift without any additional modification.

Concatenating these finite nonempty bridges produces an infinite
absolute elementary dlt program from $(U_{i_0},\Delta_{i_0})$.
This again contradicts Theorem~\ref{thm:dlt-termination}.  The
argument has followed every prescribed downstairs step; it has
not replaced their ray choices by a program with scaling.
\end{proof}

\subsection{Continuation through mixed steps}

It remains to construct an output whenever the chosen negative
contraction is birational.  The relative lc existence theorem supplies
a good model over its base; the graph comparison will show that its
ample model gives a permitted step.

\begin{proposition}\label{prop:continuation}
Let $(X,B)$ be a projective lc fourfold pair over $\mathbb C$ with rational boundary,
with $D=K_X+B$ $\mathbb Q$-Cartier.  Every $D$-negative extremal
ray has a projective contraction with normal projective target,
connected fibres, relative Picard number one, and relatively
ample $-D$.  If this contraction is birational, it has an output
in the precise convention of Definition~\ref{def:program}:
the positive map is small, possibly an isomorphism, and its
actual adjoint with the strict boundary is relatively ample
and lc.  If it is of fibre type, it is a Mori fibre-space
endpoint in that convention.
\end{proposition}

\begin{proof}
The lc cone and contraction theorem applies without
$\mathbb Q$-factoriality; see
\cite[Theorem~1.1]{FujinoFoundations}.  It gives, for the chosen
negative extremal ray, the stated contraction $f:X\to Z$.
Its target is projective.  Relative Picard number one and the
negative degree of $D$ give relative ampleness of $-D$.
The fibre-type case already has precisely the required endpoint
properties, so assume $f$ birational.

Choose a sufficiently divisible integer $r>1$ and an ample
Cartier divisor $H$ on $Z$ such that
\[
 \mathcal O_X(-rD+f^*H)
\]
is generated by global sections.  This is possible by relative
ampleness and an ample base twist.  A general member $G$ gives
an effective rational $\mathbb Q$-Cartier divisor $A=G/r$ with
\[
 D+A\sim_{\mathbb Q}0/Z,
 \qquad (X,B+A)\ \text{lc}.
\]
For the latter assertion, take a log resolution of $(X,B)$ and
choose $G$ generally in the free system.  Its pullback has no
exceptional component and is transverse to the finitely many
SNC strata on the resolution.  Adding its coefficient $1/r$
keeps every coefficient at most one in the crepant log-smooth
calculation.  This proves lc, including when the original pair
has coefficient-one components.

We apply \cite[Theorem~1.1(1)--(2)]{BirkarLC} in its published
rational complemented-pair form.  Its hypotheses are that
$(X/Z,B+A)$ is lc, $B,A$ are effective rational divisors, $A$ is
$\mathbb Q$-Cartier, the structural morphism is projective and
surjective, and $K_X+B+A\sim_{\mathbb Q}0/Z$.  It does not assume
$\mathbb Q$-factoriality or ampleness of $A$.  It gives a log
minimal model or a Mori fibre space for $(X/Z,B)$, and the
adjoint on a nef log minimal model is semiample over $Z$.
A Mori fibre space over $Z$ is impossible here: its intermediate
base would have dimension less than four and would dominate the
four-dimensional birational base $Z$.  We therefore obtain a
good log minimal model $(M,B_M)$ over $Z$.

Let $q:M\to V$ be its relative semiample contraction.  Since
$M\to Z$ is birational, this is a birational contraction, and
$V\to Z$ is projective and birational.  There is an ample-over-$Z$
$\mathbb Q$-Cartier divisor $L$ on $V$ with
$K_M+B_M\sim_{\mathbb Q}q^*L$.  Put $B_V=q_*B_M$.  Pushing the
linear equivalence forward shows that the actual divisor
\[
 D_V=K_V+B_V
\]
is $\mathbb Q$-Cartier and $\mathbb Q$-linearly equivalent to $L$.
Moreover
\[
 K_M+B_M=q^*D_V.
\]
Indeed the difference is $q$-exceptional and relatively
numerically trivial, so negativity in both signs makes it zero.
Thus the ample divisor on $V$ is its actual adjoint, not just a
numerical substitute.

The log-minimal-model discrepancy comparison gives, on a smooth
common resolution $a:W\to X$, $b:W\to M$,
\[
 a^*D=b^*(K_M+B_M)+E,
 \qquad E\ge0,
 \qquad E\ \text{exceptional over }M;
\]
see \cite[Remark~2.6]{BirkarLC}.  This also explains possible
extractions in the definition of a log minimal model.  A prime
extracted on $M$ is given coefficient one; its coefficient in
$E$ is then $-a(v;X,B)\le0$.  Effectivity forces this coefficient
to vanish, so that extraction is crepant.  After composition
with $q$, the same $E$ is effective and exceptional over $V$.

We prove that $V\to Z$ is small, although $X\to Z$ need not be.
Let $G_0$ be the normalized graph of $X\dashrightarrow V$, with
projections $u:G_0\to X$ and $v:G_0\to V$, and set
\[
 H_0=u^*D-v^*D_V.
\]
The pullback of $H_0$ to a smooth model dominating $W$ and $G_0$
is $E$ pulled back.  Pushing down gives
\[
 H_0\ge0,\qquad v_*H_0=0.
\]
Its negative is ample over $Z$: it is the sum of the pullbacks
of $-D$ and $D_V$ from the two factors, and the graph maps
finitely into their fibre product.  As in the support argument
of Lemma~\ref{lem:graph}, every graph fibre over a point where
one of the two maps to $Z$ is nonisomorphic is contained in
$\operatorname{Supp}H_0$.  Indeed that fibre is connected and
positive-dimensional, every closed point lies on a contracted
curve, and anti-ampleness contradicts effectivity on a curve
not contained in the support.

If a prime divisor on $V$ were exceptional over $Z$, the preceding
support property would force a component of $H_0$ to dominate
it.  This contradicts $v_*H_0=0$.  Hence $V\to Z$ is small.
Every prime on $V$ consequently corresponds to a prime on $X$
through their common codimension-one open over $Z$.  Thus
$B_V$ is exactly the strict transform of $f_*B$; there are no
additional boundary primes on $V$.  The effective discrepancy
difference gives
\[
 a(\xi;X,B)\le a(\xi;V,B_V)
\]
for every divisorial valuation, so $(V,B_V)$ is lc.  The diagram
$X\to Z\leftarrow V$ is the required step, including a mixed
step when $f$ loses a divisor and $V\to Z$ is a nontrivial small
modification.  No positive-side relative Picard-number assertion
has been used.
\end{proof}

\begin{remark}
The existence input in Proposition~\ref{prop:continuation} is
Theorem~1.1 of \cite{BirkarLC}, not merely its Corollary~1.2,
whose literal formulation begins with a small contraction.
The effective supplement and the graph argument supply the
additional mixed-step scope needed here.  The ACC-dependent
generalization in that paper is unnecessary for this rational
complemented application.
\end{remark}
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/06-lc-and-existence.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/07-field-transfer.tex ====
\section{Change of algebraically closed field}\label{sec:field}

The preceding arguments use complex topology.  We now explain
both transfers needed for Theorem~\ref{thm:main}: a whole
countable hypothetical program is transferred to $\mathbb C$
for the termination argument, whereas existence is transferred
one finite diagram at a time.  These are different assertions;
existence of one terminating complex program would not suffice
for the first of them.

\begin{lemma}\label{lem:numerical-extension}
Let $k_0\subset K$ be algebraically closed fields of
characteristic zero and let $X_0$ be a projective variety over
$k_0$.  Base extension identifies their real numerical divisor
and curve spaces and their closed effective curve cones:
\[
 N^1(X_0)_{\mathbb R}\simeq N^1(X_{0,K})_{\mathbb R},
 \qquad
 N_1(X_0)_{\mathbb R}\simeq N_1(X_{0,K})_{\mathbb R},
 \qquad
 \overline{\mathrm{NE}}(X_0)
    =\overline{\mathrm{NE}}(X_{0,K}).
\]
In fact every numerical class of an integral curve on the
extension is represented by an integral curve over $k_0$.
For a projective morphism between projective varieties, these
identifications commute with pullback of numerical divisor
classes and preserve the relative Picard number.
\end{lemma}

\begin{proof}
Injectivity on numerical divisors follows by testing against
curves defined over $k_0$.  For surjectivity, a line bundle
$\mathcal L$ on $X_{0,K}$ spreads to a line bundle on
$X_0\times S$, where $S$ is an integral finite-type
$k_0$-scheme and the given map $\operatorname{Spec}K\to S$
is dominant.  Shrink $S$ if necessary and choose a closed point
$s\in S(k_0)$.  The line bundles $\mathcal L$ and
$(\mathcal L_s)_K$ have the same numerical class on $X_{0,K}$.
Indeed they are fibres of the same line-bundle family on the
fixed variety $X_{0,K}$.  Since $k_0$ is algebraically closed, $S$
is geometrically integral; hence the parameter scheme $S_K$ is
connected.  The family's degree on any fixed integral curve in
$X_{0,K}$ is constant.  This last assertion is the constancy of degree
in a line-bundle family on a proper curve, or follows from
constancy of its Euler characteristic.  Thus every numerical
divisor class comes from $k_0$.

Similarly, an integral curve on $X_{0,K}$ spreads to a flat
projective family of geometrically integral curves in
$X_0\times S$ after shrinking an integral finite-type parameter
space.  Geometric integrality is available since the given
extension field is algebraically closed.  Specialize to a
$k_0$-point of this open parameter space.  Degrees against every
line bundle on $X_0$ are unchanged by flatness, so the resulting
integral curve represents the same numerical class.  The
already established statement for numerical divisors makes
these precisely all necessary degree tests.  Conversely, an
integral curve over an algebraically closed field stays
integral on algebraically closed extension.  The effective
curve classes, their positive spans, and their closures
therefore identify.  The usual nondegenerate numerical
pairings give the asserted identification of curve spaces.

Pullback commutes with base extension.  For a projective morphism
$f_0:X_0\to Z_0$ with projective target, choose an ample line
bundle $H$ on $Z_0$.  An integral curve is contracted precisely
when its degree against $f_0^*H$ is zero.  If a curve on the
extension is contracted, its integral numerical representative
over $k_0$ has the same zero degree and is also contracted.
Conversely, every contracted integral curve over $k_0$ stays
integral and contracted on extension.  The identifications
therefore preserve the span of contracted curve classes in
$N_1(X_0)_{\mathbb R}$.  The relative numerical divisor space
is dual to this span, so its dimension, the relative Picard
number, is preserved.
\end{proof}

\begin{proposition}\label{prop:field-transfer}
Let $k$ be any algebraically closed field of characteristic
zero.  A countable program of the kind in
Definition~\ref{def:program}, including all its prescribed ray
choices, descends to a common countable algebraically closed
subfield of $k$.  After embedding that subfield in $\mathbb C$,
it gives a program with the same step types and relative signs,
the same boundary coefficients, and the same singularity
properties.  In particular an infinite birational program
over $k$ would give an infinite birational program over
$\mathbb C$.
\end{proposition}

\begin{proof}
At each index the varieties, maps, boundaries, chosen rational
canonical divisors, and their compatibility involve only
finitely many coefficients.  Include equations for projective
embeddings, ample line bundles, relative ample multiples of
the two adjoints, the Cartier multiples defining their
$\mathbb Q$-Cartier property, and the relevant bundle
isomorphisms.  Include a log resolution at each index, with
its SNC divisors and crepant pullback coefficients.  There are
only countably many such data.  They are therefore all defined
over one countably generated field over $\mathbb Q$.
Its algebraic closure inside $k$ is a countable algebraically
closed field $k_0$ over which the whole diagram is defined.
It admits an embedding into $\mathbb C$.

These algebraically closed extensions preserve normality,
integrality, dimension, projectivity, birationality, smallness,
and whether a morphism is an isomorphism.  Relative ampleness
is preserved and is detected by faithful field extension.
The chosen canonical divisors and Cartier data preserve the
actual adjoints and the strict-transform or pushforward
boundary identities.  The descended log resolutions are
smooth with the same SNC data.  Their crepant coefficients
preserve lc and klt wherever asserted.  For lc, the calculation
in Lemma~\ref{lem:snc-valuations} uses only the identity
$a(v)=\sum_jv(T_j)a_j+e(v)$ with $a_j\geq0$ and $e(v)\geq0$;
the coefficients $a_j$ may vanish.  No finiteness assertion
requiring their positivity is used.

Lemma~\ref{lem:numerical-extension}, applied at every index,
preserves extremality, negativity, and the relative Picard
number of each chosen contraction.  An ample polarization on
its target identifies the contracted integral curves by degree
zero against its pullback, so these curve classes are preserved
as well.  Connected fibres of the birational maps follow from
properness and normality.  For a prescribed fibre-type endpoint,
the identity $f_*\mathcal O_X=\mathcal O_Z$ is detected over $k_0$
by proper flat base change along the faithful field extension
$k_0\subset k$, and preserved by the same theorem along
$k_0\subset\mathbb C$.  This keeps the prescribed endpoint
itself.  Each nontrivial birational step remains nontrivial.
Consequently all indices of an infinite proposed program
survive under this single embedding.

Only the original countable program and the data testing its
properties are descended here.  The auxiliary terminalizations,
valuation constructions, and Hodge-theoretic objects in the
contradiction may then be constructed over $\mathbb C$.
\end{proof}

\begin{lemma}\label{lem:finite-existence-transfer}
Proposition~\ref{prop:continuation} holds over any algebraically
closed characteristic-zero field, with exactly the contraction
and mixed-step conventions stated there.
\end{lemma}

\begin{proof}
Let $(X,B)$ be a pair over $k$ and let $R$ be a negative extremal
ray.  Choose a countable algebraically closed field of
definition $k_0\subset k$ for $(X,B)$ and embed $k_0$ into
$\mathbb C$.  By Lemma~\ref{lem:numerical-extension}, $R$
identifies with a negative extremal ray on both $X_0$ and
$X_{0,\mathbb C}$.  Proposition~\ref{prop:continuation} produces
the required complex contraction and, in the birational case,
its lc positive model.

These outputs are finite-presentation data.  Spread them over
an integral finite-type $k_0$-scheme $S$ whose function field
embeds in $\mathbb C$, keeping the input equal to the fixed
product $X_0\times S$.  Include projective embeddings and
polarizations of the targets, Cartier multiples and relative
ample bundles for the adjoints, the boundary divisors and
strict-transform identities, and log resolutions with their
crepant coefficients.  After shrinking $S$, the geometric
fibres of the targets are normal and integral with the same
dimensions, and the required morphisms are surjective and
projective.  In the birational case they are birational, and
the positive map is small.  To see the latter assertions
directly, spread the isomorphisms on dense opens together with
their inverses.  The complements on the positive source can
be kept of dimension at most two; this excludes an exceptional
prime in every remaining fibre.  Smoothness and the SNC
conditions on the finitely many resolutions, and the exact
crepant pullback formulas, can likewise be retained after
shrinking.  The resulting boundaries are the prescribed
transforms and the resulting pairs are lc.

The relative signs are retained by spreading ample line-bundle data.
For example, choose a relatively very ample power of each
relevant adjoint multiple and a sufficiently positive base
twist making it generated.  Spread the resulting projective
embedding.  Its restriction preserves relative ampleness.
All these requirements concern a finite diagram and hold
on a nonempty open subset of $S$.

We check that the \emph{particular} ray is preserved, including
its relative Picard number.  Write
$f_{\mathbb C}:X_{0,\mathbb C}\to Z_{\mathbb C}$ for the complex
contraction.  Choose an ample line bundle $H$ on its target
and include it in the spread.  Its pullback is a line bundle
on the fixed product $X_0\times S$, so its numerical class is
constant on the connected parameter space, by the argument
of Lemma~\ref{lem:numerical-extension}.  Thus
\[
 \alpha=[f_{\mathbb C}^*H]\in N^1(X_0)_{\mathbb R}
\]
is the same at every specialization.

Choose an integral curve $C_0$ over $k_0$ with nonzero class in
$R$, using the integral-curve part of
Lemma~\ref{lem:numerical-extension} and a curve spanning the
complex negative ray.  Its degree against a fixed ample line
bundle on $X_0$ is positive.  For any closed point $s\in S(k_0)$
in the chosen open and every integral curve $C\subset X_0$,
\[
 \begin{aligned}
 f_s(C)\text{ is a point}
 &\quad\Longleftrightarrow\quad \alpha\cdot C=0\\
 &\quad\Longleftrightarrow\quad
 f_{\mathbb C}(C_{\mathbb C})\text{ is a point}\\
 &\quad\Longleftrightarrow\quad [C]\in R.
 \end{aligned}
\]
The first two equivalences follow from the projection formula,
ampleness of the target polarizations, and constancy of $\alpha$.
The last is the defining property of the original complex
contraction.  Hence $f_s$ contracts precisely the given ray.
Since it contracts $C_0$, the span of its contracted curve
classes is the nonzero one-dimensional span of $R$.
Its relative Picard number is therefore one.  The fixed class
$\alpha$ thus controls the contracted curves at every specialization.

For a birational output, connected fibres follow from
proper birationality and normality of the targets.  In the
fibre-type case, one may take the Stein factorization of
$f_s$.  Its intermediate target is normal because $X_0$ is
normal, is finite over $Z_s$, and has the same dimension.
The pullback of $H_s$ to that target remains ample.  Consequently
the contracted integral curves and the span of their classes
are unchanged, so the relative Picard number remains one.
Relative ampleness of $-D$ persists under this
factorization.  We now have connected fibres and the required
fibre-type endpoint.

Choose a $k_0$-point of the nonempty open parameter space;
such a point exists because $k_0$ is algebraically closed.
The preceding construction gives the desired finite diagram
over $k_0$.  Extend it to $k$.  Normality, lc singularities,
the relative signs, the exact contracted ray, the relative
Picard number, and the stipulated smallness are preserved.
This is the required output for the original chosen ray.
\end{proof}

\begin{proof}[Proof of Theorem~\ref{thm:main}]
If an allowed program over $k$ had infinitely many birational
steps, Proposition~\ref{prop:field-transfer} would transfer
that entire prescribed program to $\mathbb C$.  This contradicts
Proposition~\ref{prop:lc-lift}.  Thus every allowed program
has finitely many birational steps.

At any stage with non-nef adjoint, there is a negative
extremal ray.  This follows from the lc cone theorem, or from
its complex form using Lemma~\ref{lem:numerical-extension}.
Every selected such ray has the contraction and output of
Lemma~\ref{lem:finite-existence-transfer}.  A finite
prefix at which neither stopping condition holds therefore extends.  A maximal program
can stop only at a nef pair or at a fibre-type contraction.
The latter has connected fibres, smaller-dimensional normal
projective target, relative Picard number one, and relatively
ample negative adjoint, exactly as required for the Mori
fibre-space endpoint in Definition~\ref{def:program}.
An initially nef pair needs no operation.

These arguments prove continuation, finiteness for every sequence of
permitted choices, and the asserted alternatives for a maximal program.
\end{proof}
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/07-field-transfer.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/08-consequences.tex ====
\section{Consequences for the endpoints}
\label{sec:endpoints}

Theorem~\ref{thm:main} makes every maximal program finite.  The following
consequences use log abundance and bounded complements to describe its
endpoint more precisely.  The semiample-endpoint statement holds over
every algebraically closed field of characteristic zero; the uniform
local statements are over $\mathbb C$.

\begin{corollary}[Semiample endpoints]\label{cor:semiample-endpoints}
Let $k$ be an algebraically closed field of characteristic zero, and let
$(X,B)$ be a projective lc fourfold pair over $k$ with rational boundary.
Suppose that $K_X+B$ is pseudo-effective. Then every maximal program of
Definition~\ref{def:program} ends at a projective lc pair $(Y,B_Y)$ for
which some positive Cartier multiple of $K_Y+B_Y$ is generated by global
sections.
\end{corollary}
\begin{proof}
Fix a maximal program $X_0\dashrightarrow\cdots\dashrightarrow X_r$, finite
by Theorem~\ref{thm:main}, and put $D_i=K_{X_i}+B_i$.
The section-space comparison in
\cite[proof of Corollary~12.1(i)]{OpenAILogAbundance2026}
identifies the sections of the pseudo-effective $D_0$ with those of a
semiample birational adjoint.  Hence $D_0$ has a nonzero section in some
positive Cartier degree.  Choose a common positive multiple $N$ of that
degree and the Cartier indices of $D_0,\ldots,D_r$.  A suitable power of
the section is represented by a rational function $s$ satisfying
$\operatorname{div}_{X_0}(s)+ND_0\geq0$.  At a birational step, push the
effective divisor $\operatorname{div}_{X_i}(s)+ND_i$ through
$f_i$ and take its strict transform through $f_i^+$. The boundary rule and
compatible canonical divisors, together with smallness of $f_i^+$, identify
the result with $\operatorname{div}_{X_{i+1}}(s)+ND_{i+1}\geq0$. Thus the
section passes through every divisorial, flipping or mixed step.

A Mori fibre endpoint has a positive-dimensional fibre meeting the complement
of this effective Cartier zero divisor; choose an integral curve $C$ in that
fibre through such a point. Its intersection with the zero divisor is
nonnegative, but equals $ND_r\cdot C<0$ by relative ampleness of $-D_r$, a
contradiction. The endpoint is therefore nef, and log abundance
\cite[Theorem~1.1]{OpenAILogAbundance2026} makes its rational adjoint semiample.
\end{proof}

For $\epsilon>0$, a pair is \emph{$\epsilon$-lc} if every normalized
divisorial valuation has log discrepancy at least $\epsilon$.
A projective contraction $h:Y\to S$ is \emph{of Fano type} if some
effective rational boundary $\Gamma$ on $Y$ makes $(Y,\Gamma)$ klt and
$-(K_Y+\Gamma)$ ample over $S$.  The next consequence uses this condition at a Mori
endpoint.

\begin{corollary}[Uniform local complements at Mori endpoints]
\label{cor:uniform-mori-complements}
Fix a real number $\epsilon>0$ and a finite set $I\subset[0,1]\cap\mathbb Q$.
There is a positive integer $M=M(4,\epsilon,I)$ with the following
property. Let $(X,B)$ be a projective $\epsilon$-lc fourfold pair over
$\mathbb C$ with coefficients in $I$ and with $K_X+B$ not pseudo-effective.
Every maximal program of Definition~\ref{def:program} ends at a Mori
contraction $h:(Y,B_Y)\to S$. For every closed $s\in S$, there is an
effective $\mathbb Q$-divisor $B_Y^+\geq B_Y$ such that, on the inverse
image of some neighbourhood of $s$, the pair $(Y,B_Y^+)$ is klt and
$M(K_Y+B_Y^+)$ is Cartier and linearly trivial.
\end{corollary}
\begin{proof}
Theorem~\ref{thm:main} makes the program finite.
Lemma~\ref{lem:graph} shows that log discrepancies do not decrease,
including at mixed steps, while the boundary rule and smallness of the
positive maps retain or delete the original coefficients.
On a common smooth projective model $p:W\to X$, $q:W\to Y$, the graph
comparisons give
$p^*(K_X+B)=q^*(K_Y+B_Y)+E$ with $E\geq0$.
If the final adjoint were nef, this identity and birational invariance
of pseudo-effectivity for rational Cartier divisors would make
$K_X+B$ pseudo-effective. The endpoint is therefore Mori.
It remains $\epsilon$-lc, hence klt, and $B_Y$ itself witnesses that
$Y$ is of Fano type over $S$, since $-(K_Y+B_Y)$ is $h$-ample.
The varieties are projective, so
\cite[Corollary~1.2]{OpenAIComplements2026} applies and gives the claimed
index, independent of the program and its endpoint.
\end{proof}

Under the hypotheses of Corollary~\ref{cor:uniform-mori-complements},
when $\dim S>0$, \cite[Theorem~1]{OpenAICartier2026} also gives a uniform
$\tau=\tau(4,\epsilon)>0$ such that, for each closed $s\in S$, some
neighbourhood $U\ni s$ carries a nonzero effective Cartier divisor $T$
through $s$ with
$(h^{-1}(U),B_Y|_{h^{-1}(U)}+\tau h^*T)$ log canonical.

==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//sections/08-consequences.tex ====

==== BEGIN Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//references.bib ====

@article{BCHM,
  author = {Birkar, Caucher and Cascini, Paolo and Hacon, Christopher D. and McKernan, James},
  title = {Existence of minimal models for varieties of log general type},
  journal = {J. Amer. Math. Soc.},
  volume = {23},
  number = {2},
  year = {2010},
  pages = {405--468},
  doi = {10.1090/S0894-0347-09-00649-3},
  url = {https://arxiv.org/abs/math/0610203v2},
  note = {Preprint version: \href{https://arxiv.org/abs/math/0610203v2}{arXiv:math/0610203v2}}
}

@article{AHK,
  author = {Alexeev, Valery and Hacon, Christopher and Kawamata, Yujiro},
  title = {Termination of (many) 4-dimensional log flips},
  journal = {Invent. Math.},
  volume = {168},
  number = {2},
  year = {2007},
  pages = {433--448},
  doi = {10.1007/s00222-007-0038-1},
  url = {https://arxiv.org/abs/math/0605137v2},
  note = {Preprint version: \href{https://arxiv.org/abs/math/0605137v2}{arXiv:math/0605137v2}}
}

@article{Alexeev1993,
  author = {Alexeev, Valery},
  title = {Two two-dimensional terminations},
  journal = {Duke Math. J.},
  volume = {69},
  number = {3},
  year = {1993},
  pages = {527--545},
  url = {https://arxiv.org/abs/alg-geom/9206005v1},
  note = {Theorem numbering as in \href{https://arxiv.org/abs/alg-geom/9206005v1}{arXiv:alg-geom/9206005v1}}
}

@article{Ambro1999,
  author = {Ambro, Florin},
  title = {On minimal log discrepancies},
  journal = {Math. Res. Lett.},
  volume = {6},
  number = {5--6},
  year = {1999},
  pages = {573--580},
  doi = {10.4310/MRL.1999.v6.n5.a10},
  url = {https://arxiv.org/abs/math/9906089v1},
  note = {Theorem numbering as in \href{https://arxiv.org/abs/math/9906089v1}{arXiv:math/9906089v1}}
}

@article{ChenTsakanikas,
  author = {Chen, Guodu and Tsakanikas, Nikolaos},
  title = {On the termination of flips for log canonical generalized pairs},
  journal = {Acta Math. Sin. (Engl. Ser.)},
  volume = {39},
  number = {6},
  year = {2023},
  pages = {967--994},
  doi = {10.1007/s10114-023-0116-3},
  url = {https://arxiv.org/abs/2011.02236v2},
  note = {Preprint version: \href{https://arxiv.org/abs/2011.02236v2}{arXiv:2011.02236v2}}
}

@incollection{FujinoSpecial,
  author = {Fujino, Osamu},
  title = {Special termination and reduction to pl flips},
  editor = {Corti, Alessio},
  booktitle = {Flips for 3-folds and 4-folds},
  series = {Oxford Lecture Series in Mathematics and its Applications},
  volume = {35},
  publisher = {Oxford University Press},
  address = {Oxford},
  year = {2007},
  pages = {63--75},
  doi = {10.1093/acprof:oso/9780198570615.003.0004},
  url = {https://academic.oup.com/book/6326/chapter/150031214},
  note = {\href{https://doi.org/10.1093/acprof:oso/9780198570615.003.0004}{doi:\nolinkurl{10.1093/acprof:oso/9780198570615.003.0004}}}
}

@article{FujinoFourfold,
  author = {Fujino, Osamu},
  title = {On termination of 4-fold semi-stable log flips},
  journal = {Publ. Res. Inst. Math. Sci.},
  volume = {41},
  number = {2},
  year = {2005},
  pages = {281--294},
  doi = {10.2977/PRIMS/1145475354},
  url = {https://www.math.kyoto-u.ac.jp/~fujino/on-termination.pdf},
  note = {\href{https://doi.org/10.2977/PRIMS/1145475354}{doi:\nolinkurl{10.2977/PRIMS/1145475354}}}
}

@article{FujinoFoundations,
  author = {Fujino, Osamu},
  title = {Fundamental theorems for the log minimal model program},
  journal = {Publ. Res. Inst. Math. Sci.},
  volume = {47},
  number = {3},
  year = {2011},
  pages = {727--789},
  doi = {10.2977/PRIMS/50},
  url = {https://ems.press/journals/prims/articles/4668},
  note = {\href{https://doi.org/10.2977/PRIMS/50}{doi:\nolinkurl{10.2977/PRIMS/50}}}
}

@article{BirkarLC,
  author = {Birkar, Caucher},
  title = {Existence of log canonical flips and a special {LMMP}},
  journal = {Publ. Math. Inst. Hautes \'{E}tudes Sci.},
  volume = {115},
  year = {2012},
  pages = {325--368},
  doi = {10.1007/s10240-012-0039-5},
  url = {https://www.numdam.org/articles/10.1007/s10240-012-0039-5/},
  note = {\href{https://doi.org/10.1007/s10240-012-0039-5}{doi:\nolinkurl{10.1007/s10240-012-0039-5}}}
}

@book{KM98,
  author = {Koll{\'a}r, J{\'a}nos and Mori, Shigefumi},
  title = {Birational Geometry of Algebraic Varieties},
  series = {Cambridge Tracts in Mathematics},
  volume = {134},
  publisher = {Cambridge University Press},
  address = {Cambridge},
  year = {1998},
  doi = {10.1017/CBO9780511662560},
  note = {With the collaboration of C. H. Clemens and A. Corti; \href{https://doi.org/10.1017/CBO9780511662560}{doi:\nolinkurl{10.1017/CBO9780511662560}}}
}

@book{KollarEtAl1992,
  editor = {Koll{\'a}r, J{\'a}nos},
  title = {Flips and abundance for algebraic threefolds},
  series = {Ast{\'e}risque},
  number = {211},
  publisher = {Soci{\'e}t{\'e} Math{\'e}matique de France},
  address = {Paris},
  year = {1992},
  doi = {10.24033/ast.198},
  url = {https://numdam.org/item/AST_1992__211__1_0/},
  note = {A summer seminar at the University of Utah, Salt Lake City, 1991; \href{https://doi.org/10.24033/ast.198}{doi:\nolinkurl{10.24033/ast.198}}}
}

@article{Saito1988,
  author = {Saito, Morihiko},
  title = {Modules de {Hodge} polarisables},
  journal = {Publ. Res. Inst. Math. Sci.},
  volume = {24},
  number = {6},
  year = {1988},
  pages = {849--995},
  doi = {10.2977/PRIMS/1195173930},
  note = {\href{https://doi.org/10.2977/PRIMS/1195173930}{doi:\nolinkurl{10.2977/PRIMS/1195173930}}}
}

@incollection{Saito1989,
  author = {Saito, Morihiko},
  title = {Introduction to mixed {Hodge} modules},
  booktitle = {Th{\'e}orie de {Hodge}---Luminy, Juin 1987},
  series = {Ast{\'e}risque},
  number = {179--180},
  publisher = {Soci{\'e}t{\'e} Math{\'e}matique de France},
  year = {1989},
  pages = {145--162},
  url = {https://www.numdam.org/item/AST_1989__179-180__145_0/},
  note = {\href{https://www.numdam.org/item/AST_1989__179-180__145_0/}{Numdam full text}}
}

@article{Saito1990,
  author = {Saito, Morihiko},
  title = {Mixed {Hodge} modules},
  journal = {Publ. Res. Inst. Math. Sci.},
  volume = {26},
  number = {2},
  year = {1990},
  pages = {221--333},
  doi = {10.2977/PRIMS/1195171082},
  note = {\href{https://doi.org/10.2977/PRIMS/1195171082}{doi:\nolinkurl{10.2977/PRIMS/1195171082}}}
}

@article{GM1983,
  author = {Goresky, Mark and MacPherson, Robert},
  title = {Intersection homology {II}},
  journal = {Invent. Math.},
  volume = {72},
  number = {1},
  year = {1983},
  pages = {77--129},
  doi = {10.1007/BF01389130},
  url = {https://www.math.ias.edu/~goresky/pdf/IH2.pdf},
  note = {\href{https://doi.org/10.1007/BF01389130}{doi:\nolinkurl{10.1007/BF01389130}}}
}

@article{Deligne1971,
  author = {Deligne, Pierre},
  title = {Th{\'e}orie de {Hodge}, {II}},
  journal = {Publ. Math. Inst. Hautes \'{E}tudes Sci.},
  volume = {40},
  year = {1971},
  pages = {5--57},
  doi = {10.1007/BF02684692},
  url = {https://www.numdam.org/item/PMIHES_1971__40__5_0/},
  note = {\href{https://doi.org/10.1007/BF02684692}{doi:\nolinkurl{10.1007/BF02684692}}}
}

@article{Deligne1974,
  author = {Deligne, Pierre},
  title = {Th{\'e}orie de {Hodge}, {III}},
  journal = {Publ. Math. Inst. Hautes \'{E}tudes Sci.},
  volume = {44},
  year = {1974},
  pages = {5--77},
  doi = {10.1007/BF02685881},
  url = {https://www.numdam.org/item/PMIHES_1974__44__5_0/},
  note = {\href{https://doi.org/10.1007/BF02685881}{doi:\nolinkurl{10.1007/BF02685881}}}
}

@article{Artin1969,
  author = {Artin, Michael},
  title = {Algebraic approximation of structures over complete local rings},
  journal = {Publ. Math. Inst. Hautes \'{E}tudes Sci.},
  volume = {36},
  year = {1969},
  pages = {23--58},
  doi = {10.1007/BF02684596},
  url = {https://www.numdam.org/item/PMIHES_1969__36__23_0/},
  note = {\href{https://doi.org/10.1007/BF02684596}{doi:\nolinkurl{10.1007/BF02684596}}}
}

@misc{Stacks,
  author = {{Stacks Project Authors}},
  title = {{Stacks Project}},
  howpublished = {\url{https://stacks.math.columbia.edu}},
  note = {Tags as cited; consulted 24 September 2026}
}

@article{FujinoBPF,
  author = {Fujino, Osamu},
  title = {Basepoint-free theorems: saturation, b-divisors, and canonical bundle formula},
  journal = {Algebra Number Theory},
  volume = {6},
  number = {4},
  year = {2012},
  pages = {797--823},
  doi = {10.2140/ant.2012.6.797},
  url = {https://msp.org/ant/2012/6-4/ant-v6-n4-p08-p.pdf},
  note = {\href{https://doi.org/10.2140/ant.2012.6.797}{doi:\nolinkurl{10.2140/ant.2012.6.797}}}
}

@misc{HanLiuZhuang2025,
  author = {Han, Jingjun and Liu, Jihao and Zhuang, Ziquan},
  title = {Effective termination of general type {MMP}s in dimension at most five},
  year = {2025},
  howpublished = {\href{https://arxiv.org/abs/2509.01501v1}{arXiv:2509.01501v1}},
  url = {https://arxiv.org/abs/2509.01501v1}
}

@article{SerreGAGA,
  author = {Serre, Jean-Pierre},
  title = {G{\'e}om{\'e}trie alg{\'e}brique et g{\'e}om{\'e}trie analytique},
  journal = {Annales de l'Institut Fourier},
  volume = {6},
  year = {1956},
  pages = {1--42},
  doi = {10.5802/aif.59},
  url = {https://www.numdam.org/item/AIF_1956__6__1_0/}
}

@incollection{RaynaudSGA1XII,
  author = {Raynaud, Mich{\`e}le},
  title = {G{\'e}om{\'e}trie alg{\'e}brique et g{\'e}om{\'e}trie analytique},
  booktitle = {Rev{\^e}tements {\'e}tales et groupe fondamental ({SGA}~1)},
  editor = {Grothendieck, Alexander},
  series = {Lecture Notes in Mathematics},
  volume = {224},
  publisher = {Springer-Verlag},
  address = {Berlin--Heidelberg},
  year = {1971},
  pages = {311--343},
  note = {Expos{\'e} XII},
  doi = {10.1007/BFb0058667},
  url = {https://arxiv.org/abs/math/0206203}
}


@incollection{GrothendieckHilbert1961,
  author = {Grothendieck, Alexander},
  title = {Techniques de construction et th{\'e}or{\`e}mes d'existence en g{\'e}om{\'e}trie alg{\'e}brique {IV}: les sch{\'e}mas de {Hilbert}},
  booktitle = {S{\'e}minaire Bourbaki: ann{\'e}es 1960/61, expos{\'e}s 205--222},
  series = {S{\'e}minaire Bourbaki},
  number = {6},
  year = {1961},
  pages = {249--276},
  publisher = {Soci{\'e}t{\'e} Math{\'e}matique de France},
  note = {Expos{\'e} 221; erratum, vol. 7 (1962), p. 302},
  url = {https://www.numdam.org/item/SB_1960-1961__6__249_0/}
}

@article{EGAIII1,
  author = {Grothendieck, Alexander},
  title = {{\'E}l{\'e}ments de g{\'e}om{\'e}trie alg{\'e}brique. {III}. {\'E}tude cohomologique des faisceaux coh{\'e}rents, premi{\`e}re partie},
  journal = {Publications Math{\'e}matiques de l'IH{\'E}S},
  volume = {11},
  year = {1961},
  pages = {5--167},
  doi = {10.1007/BF02684273},
  url = {https://www.numdam.org/item/PMIHES_1961__11__5_0/}
}

@article{Hironaka1964I,
  author = {Hironaka, Heisuke},
  title = {Resolution of singularities of an algebraic variety over a field of characteristic zero. {I}},
  journal = {Annals of Mathematics},
  series = {2},
  volume = {79},
  number = {1},
  year = {1964},
  pages = {109--203},
  doi = {10.2307/1970486}
}
@article{Hironaka1964II,
  author = {Hironaka, Heisuke},
  title = {Resolution of singularities of an algebraic variety over a field of characteristic zero. {II}},
  journal = {Annals of Mathematics},
  series = {2},
  volume = {79},
  number = {2},
  year = {1964},
  pages = {205--326},
  doi = {10.2307/1970547}
}


@article{Shokurov1985,
  author = {Shokurov, Vyacheslav V.},
  title = {The nonvanishing theorem},
  journal = {Mathematics of the USSR-Izvestiya},
  volume = {26},
  number = {3},
  year = {1986},
  pages = {591--604},
  doi = {10.1070/IM1986v026n03ABEH001160},
  note = {Russian original: Izv. Akad. Nauk SSSR Ser. Mat. 49 (1985), no. 3, 635--651},
  url = {https://www.mathnet.ru/eng/im1368}
}

@article{Shokurov2004,
  author = {Shokurov, Vyacheslav V.},
  title = {Letters of a Bi-rationalist {V}: Mld's and Termination of Log Flips},
  journal = {Proceedings of the Steklov Institute of Mathematics},
  volume = {246},
  year = {2004},
  pages = {315--336},
  note = {Russian original: Trudy Mat. Inst. Steklova 246 (2004), 328--351},
  url = {https://www.mathnet.ru/eng/tm165}
}

@article{FujinoCanonical,
  author = {Fujino, Osamu},
  title = {Termination of 4-fold Canonical Flips},
  journal = {Publications of the Research Institute for Mathematical Sciences},
  volume = {40},
  number = {1},
  year = {2004},
  pages = {231--237},
  doi = {10.2977/PRIMS/1145475971},
  url = {https://arxiv.org/abs/math/0301154},
  note = {With the 2005 addendum; Lemma 10 is numbered as in \href{https://arxiv.org/abs/math/0301154}{arXiv:math/0301154}}
}

@article{FujinoCanonicalAddendum,
  author = {Fujino, Osamu},
  title = {Addendum to ``Termination of 4-fold Canonical Flips''},
  journal = {Publications of the Research Institute for Mathematical Sciences},
  volume = {41},
  number = {1},
  year = {2005},
  pages = {251--257},
  doi = {10.2977/PRIMS/1145475410},
  url = {https://arxiv.org/abs/math/0408095}
}

@article{Moraga2025,
  author = {Moraga, Joaqu{\'i}n},
  title = {Termination of pseudo-effective 4-fold flips},
  journal = {Mathematische Zeitschrift},
  volume = {310},
  year = {2025},
  pages = {73},
  note = {Article 73; preprint version: \href{https://arxiv.org/abs/1802.10202v4}{arXiv:1802.10202v4}},
  doi = {10.1007/s00209-025-03766-y},
  url = {https://arxiv.org/abs/1802.10202v4}
}

@incollection{BBD1982,
  author = {Beilinson, Alexander A. and Bernstein, Joseph and Deligne, Pierre},
  title = {Faisceaux pervers},
  booktitle = {Analyse et topologie sur les espaces singuliers {I}},
  series = {Ast{\'e}risque},
  volume = {100},
  year = {1982},
  pages = {5--171},
  publisher = {Soci{\'e}t{\'e} Math{\'e}matique de France},
  address = {Paris},
  url = {https://numdam.org/item/AST_1982__100__1_0/}
}

@incollection{KMM87,
  author = {Kawamata, Yujiro and Matsuda, Katsumi and Matsuki, Kenji},
  title = {Introduction to the minimal model problem},
  booktitle = {Algebraic Geometry, Sendai, 1985},
  series = {Advanced Studies in Pure Mathematics},
  volume = {10},
  publisher = {North-Holland},
  address = {Amsterdam},
  year = {1987},
  pages = {283--360},
  doi = {10.2969/aspm/01010283}
}

@article{ShokurovOrdered,
  author = {Shokurov, Vyacheslav V.},
  title = {Letters of a Bi-rationalist. {VII}. Ordered termination},
  journal = {Proceedings of the Steklov Institute of Mathematics},
  volume = {264},
  number = {1},
  year = {2009},
  pages = {178--200},
  doi = {10.1134/S0081543809010192}
}

@article{BirkarShokurov,
  author = {Birkar, Caucher},
  title = {Log minimal models according to {Shokurov}},
  journal = {Algebra Number Theory},
  volume = {3},
  number = {8},
  year = {2009},
  pages = {951--958},
  doi = {10.2140/ant.2009.3.951},
  url = {https://arxiv.org/abs/0804.3577}
}

@article{LazicMoragaTsakanikas,
  author = {Lazi{\'c}, Vladimir and Moraga, Joaqu{\'i}n and Tsakanikas, Nikolaos},
  title = {Special termination for log canonical pairs},
  journal = {Asian J. Math.},
  volume = {27},
  number = {3},
  year = {2023},
  pages = {423--440},
  doi = {10.4310/AJM.2023.v27.n3.a5},
  url = {https://arxiv.org/abs/2007.06458v2},
  note = {Preprint version: \href{https://arxiv.org/abs/2007.06458v2}{arXiv:2007.06458v2}}
}

@misc{OpenAILogAbundance2026,
  author = {{OpenAI}},
  title = {{Log abundance in characteristic zero}},
  howpublished = {OpenAI Math Release preprint
                  \href{https://github.com/openai/math/blob/main/preprints/Log-abundance-in-characteristic-zero-September-24-2026/paper.pdf}{OAI:Log-abundance-in-characteristic-zero-September-24-2026}},
  year = {2026}
}

@misc{OpenAIComplements2026,
  author = {{OpenAI}},
  title = {{Bounded klt complements for Fano contractions}},
  howpublished = {OpenAI Math Release preprint
                  \href{https://github.com/openai/math/blob/main/preprints/Bounded-klt-complements-for-Fano-contractions-September-25-2026/Bounded-klt-complements-for-Fano-contractions-September-25-2026.pdf}{OAI:Bounded-klt-complements-for-Fano-contractions-September-25-2026}},
  year = {2026}
}

@misc{OpenAICartier2026,
  author = {{OpenAI}},
  title = {{Uniform Cartier sections for Fano type contractions}},
  howpublished = {OpenAI Math Release preprint
                  \href{https://github.com/openai/math/blob/main/preprints/Uniform-Cartier-sections-for-Fano-type-contractions-September-25-2026/Uniform-Cartier-sections-for-Fano-type-contractions-September-25-2026.pdf}{OAI:Uniform-Cartier-sections-for-Fano-type-contractions-September-25-2026}},
  year = {2026}
}

@misc{ParkPopaHodge,
  author = {Park, Sung Gi and Popa, Mihnea},
  title = {Hodge symmetry and {Lefschetz} theorems for singular varieties},
  year = {2025},
  howpublished = {\href{https://arxiv.org/abs/2410.15638v3}{arXiv:2410.15638v3}},
  url = {https://arxiv.org/abs/2410.15638v3}
}
==== END Termination-for-projective-log-canonical-fourfolds-with-rational-boundary//references.bib ====