1 Introduction

The aim of this paper is to propose a strategy to programme the Minimal Model Program (MMP) in modern computer algebra systems such as OSCAR (OSCAR 2023).

The MMP is a programme in higher dimensional birational geometry aiming to classify varieties and pairs with mild singularities up to birational equivalence: the goal is to find in each such birational class at least one representative which is minimal in a very precise sense. When completed, the programme will show that – up to birational equivalence – all varieties with mild singularities are built out of three basic building blocks: varieties whose canonical class is either ample, numerically trivial or anti-ample. In other words, the theory predicts that one should be able to slice any such variety up into pieces whose curvature has almost everywhere the constant sign. Stated this way, the MMP bears resemblance to Thurston’s Geometrisation in geometric topology.

The MMP has seen decisive progress ever since it was introduced by Mori in the 1980 s. In particular, it is now complete for threefolds, and for varieties of log general type in every dimension. A comprehensive survey of the state of the art (as far as relevant for the present paper) can be found in Lazić (2013).

In this paper I address the problem of possible implementations of the Minimal Model Program on a computer. This is an important issue: we have very few concrete examples in higher dimensional geometry, see for instance the introduction to Lazić and Schreyer (2022), and calculating minimal models of concrete projective varieties is obviously a pressing issue, both from the point of view of applications within the MMP itself as well as applications in wider algebraic geometry.

There has been very limited progress on the problem of computer algebra implementations of the MMP. Ideally, at some point in the future one would feed a computer algebra system with a projective variety (given, for instance, by global equations; or by local equations in charts, requiring massive parallelisation (Böhm et al. 2021)), tell it to calculate its minimal models, which then the system would spit out after a certain time. In order to achieve the implementation in this generality in a foreseeable future, a computer algebra system will need human input, simplifications and theoretical improvements at several steps along the way.

My goal in this paper is to propose a possible strategy for such an implementation based on the approach from Cascini and Lazić (2012); Corti and Lazić (2013); Kaloghiros et al. (2016); surveys of these ideas can be found in Cascini and Lazić (2012); Lazić (2013). The expectation is that the algorithm proposed here is realisable in modern or future computer algebra systems such as OSCAR. The input of the algorithm is the set of multidegrees of a set of generators of a certain finitely generated multigraded ring on a klt pair \((X,\Delta )\) of log general type, see Sect. 3; the output is a minimal model of \((X,\Delta )\) or, moreover, a sequence of maps in a \((K_X+\Delta )\)-MMP which terminates with a minimal model of \((X,\Delta )\).

I will concentrate in this paper only on pairs of log general type over \({\mathbb {C}}\), since this is the class of objects where the MMP is not a conjecture, but a theorem.

2 Countable vs. uncountable problems

Many problems in algebraic geometry are what I prefer to call uncountable problems: problems whose decidability seems to depend on uncountably many parameters. A part of important theoretical progress on some of them is to translate them into countable problems, i.e. problems whose decidability depends on at most countably many parameters. Then, at least in theory, a computer has a chance to verify a task in a finite time.

First I give two examples to illustrate the issue.

2.1 Example 1: Uniruledness

A complex variety X is uniruled if it can be covered by (singular) rational curves; a good source on uniruledness is Debarre (2001), whereas a more comprehensive but more technical presentation is in Kollár (1996). Since this is a birational property, we may assume that X is smooth. Deciding whether X is uniruled seems a priori to be extremely difficult: one has to test whether through each point on X there is a rational curve. One can relax this to testing whether through each general point there is a rational curve, but practically this is not an improvement.

One of the main results of Boucksom et al. (2013) is the proof that a smooth variety X is uniruled if and only if the canonical class \(K_X\) is not pseudoeffective, i.e. if the numerical class of \(K_X\) is not a limit of the numerical classes of effective divisors. Assuming the full Minimal Model Program (including the Abundance conjecture) this is then equivalent to \(K_X\) not being effective itself. In other words, we expect:

X uniruled\(\quad \Longleftrightarrow \quad H^0(X,mK_X)=0\) for all \(m>0\).

Note that this equivalence holds unconditionally in dimension 3. Therefore, testing uniruledness is a countable problem and could in principle be implemented on a computer.

In practice this means that it suffices to find one positive integer m such that \(H^0(X,mK_X)\ne 0\) in order to show that X is not uniruled.

2.2 Example 2: Rational connectedness

A complex variety X is rationally connected if through every two points on X there is a (singular) rational curve; again, good sources on rational connectedness are Debarre (2001); Kollár (1996). We may again assume that X is smooth. A priori, testing whether X is rationally connected seems to be an even more difficult problem than testing uniruledness.

However, a conjecture attributed to Mumford suggests that testing rational connectedness is in fact a countable problem and could in principle be implemented on a computer. Indeed, one should have:

X rationally connected\(\quad \Longleftrightarrow \quad H^0\big (X,(\Omega _X^1)^{\otimes m}\big )=0\) for all \(m>0\).

This equivalence holds unconditionally in dimension 3 by Kollár et al. (1992) and in almost all cases in dimension 4 by Lazić and Peternell (2017).

In practice this means that it suffices to find one positive integer m such that \(H^0\big (X,(\Omega _X^1)^{\otimes m}\big )\ne 0\) in order to show that X is not rationally connected.

2.3 The MMP

The Minimal Model Program has for a long time looked like an uncountable problem. The classical strategy for varieties X with mild singularities goes like this:

  1. (i)

    first, by the Cone theorem (Kollár and Mori 1998, Theorem 3.7) there are at most countably many \(K_X\)-negative extremal rays in Mori’s cone of curves \(\overline{\textrm{NE}}(X)\), which one can use to construct a contraction morphism to another variety Y. In the classical case of surfaces, one wants to find a \(({-}1)\)-curve and construct the corresponding morphism by Castelnuovo’s contraction criterion. Finding such a curve seems to me to be an a priori uncountable problem and I do not see how it can be implemented on a computer.

  2. (ii)

    Once one constructs such a morphism as in (i), if it is not birational, one stops. If it is birational, then one must decide whether it is a divisorial contraction (i.e. the good case) or a small contraction (i.e. the bad case). Equivalently, one must be able to test whether the canonical class on the target is \({\mathbb {Q}}\)-Cartier or not, see (Kollár and Mori 1998, 2.6). If one is in the bad case, then one must additionally construct a flip (Kollár and Mori 1998, Definition 2.8). The construction of the flip is potentially implementable on a computer.

  3. (iii)

    One repeats (i) and (ii) until either one stops as in (ii), or the canonical class becomes nef. Testing whether a divisor (or a line bundle) on a variety is nef (i.e. whether it intersects every curve non-positively) seems to me to be an uncountable problem, similarly as in (i). Additionally, at no stage of the algorithm does one have control over how many repetitions one has to execute until the algorithm stops.

2.4 The MMP with scaling

One of the obvious issues in (i) above is that from the Cone theorem one does not know how to generate a suitable extremal ray and hence a contraction morphism. Instead, one can employ Shokurov’s MMP with scaling of some ample divisor (Birkar et al. 2010, Remark 3.10.10): one fixes an ample (or just big) divisor H on X such that \(K_X+H\) is nef, and determines the number

$$\begin{aligned} \lambda :=\inf \{t\in {\mathbb {R}}\mid K_X+tH\text { is nef}\,\}. \end{aligned}$$

Then one can show that \(\lambda \) is in fact a rational number, that there exists a \(K_X\)-negative extremal ray \(R\subseteq \overline{\textrm{NE}}(X)\) such that \((K_X+\lambda H)\cdot R=0\), and that the divisor \(K_X+\lambda H\) is semiample and defines a morphism which contracts precisely the curves whose classes belong to R. Then one continues with the steps (ii) and (iii) as above. This MMP with scaling of H is much less arbitrary than a general MMP and it seems to be a step closer to being a countable problem: the main point is finding such \(\lambda \), and for this one has to be able to calculate finitely many intersection products, and then repeat the procedure. However, the issue of testing whether a divisor is nef remains: to me this looks like an uncountable problem.

2.5 Another point of view

A new outlook on the MMP was proposed in Cascini and Lazić (2012); Corti and Lazić (2013): that once one knows that a certain graded ring is finitely generated, then the MMP becomes a problem closely related to the convex geometry of certain cones of divisors naturally associated to that graded ring. The goal of the remainder of the present paper is to show how this strategy can be adapted to an algorithm that can be implemented in a computer algebra system.

3 Step 1: Graded rings and the Main Problem

In this paper, I consider the Minimal Model Program for projective \({\mathbb {Q}}\)-factorial klt pairs \((X,\Delta )\) defined over \({\mathbb {C}}\) of log general type, i.e. such that \(K_X+\Delta \) is big. The canonical source on the foundational material in the MMP is Kollár and Mori (1998). However, everything works in the category of varieties where analogous birational procedures can be executed as in (Kaloghiros et al. 2016, Section 5).

To start with, let X be a projective \({\mathbb {Q}}\)-factorial variety and let D be a \({\mathbb {Q}}\)-divisor on X. We define the global sections of D by

$$\begin{aligned} H^0(X,D)=\{f\in k(X)\mid {{\,\textrm{div}\,}}f+D \ge 0 \}. \end{aligned}$$

Then for \({\mathbb {Q}}\)-divisors D and \(D'\) on X there is a well-defined multiplication map

$$\begin{aligned} H^0(X,D)\otimes H^0(X,D')\rightarrow H^0(X,D+D'), \end{aligned}$$

so that, if we are given a bunch of \({\mathbb {Q}}\)-divisors \(D_1,\dots ,D_r\) on X, we can define the corresponding divisorial ring as

$$\begin{aligned} {\mathfrak {R}}=R(X;D_1, \dots , D_r)=\bigoplus _{(n_1,\dots , n_r)\in {\mathbb {N}}^r} H^0(X, n_1D_1+\dots + n_rD_r), \end{aligned}$$

and the corresponding cone

$$\begin{aligned} {\mathcal { C}}=\sum _{i=1}^r{\mathbb {R}}_+ D_i\subseteq {{\,\textrm{Div}\,}}_{\mathbb {R}}(X). \end{aligned}$$

If \({\mathfrak {R}}\) is finitely generated, then we can define the support of \({\mathfrak {R}}\), denoted by \({{\,\textrm{Supp}\,}}{\mathfrak {R}}\): this is the convex hull of all integral divisors \(D\in {\mathcal { C}}\) such that \(H^0(X,D)\ne 0\). It is easily seen that \({{\,\textrm{Supp}\,}}{\mathfrak {R}}\) is a rational polyhedral cone: indeed, pick finitely many generators \(f_i\) of \({\mathfrak {R}}\), and let \(E_i\in {\mathcal { C}}\) be the divisors such that \(f_i\in H^0(X,E_i)\). Then \({{\,\textrm{Supp}\,}}{\mathfrak {R}}=\sum {\mathbb {R}}_+E_i\).

The following result gives the most important example of a finitely generated divisorial ring.

Theorem 3.1

Let X be a normal projective variety and let \(\Delta _i\) be \({\mathbb {Q}}\)-divisors on X such that each \(\Delta _i\) is big and each pair \((X,\Delta _i)\) is klt for \(i=1,\dots ,r\). Then the ring

$$\begin{aligned} R(X;K_X+\Delta _1,\dots ,K_X+\Delta _r) \end{aligned}$$

is finitely generated.

This was first proved in (Birkar et al. 2010, Corollary 1.1.9) by the full machinery of the MMP, and then without the MMP in (Lazić 2009, Theorem 1.2) and (Cascini and Lazić 2012, Theorem A); see also (Corti and Lazić 2013, Theorem 2) for the above formulation. In particular, this result implies the finite generation of the canonical ring \(R(X,K_X)\) on a smooth projective variety X, which was implicitly conjectured in Zariski’s famous paper (Zariski 1962).

It is one of the main open problems in higher dimensional birational geometry to prove an analogue of Theorem 3.1 when the divisors \(K_X+\Delta _i\) are not big – note that this is indeed a theorem in dimensions at most 3. The case of threefolds of not necessarily general type is probably the most important case for the implementation of the MMP on a computer, beyond the case of pairs of log general type.

The first step in the potential algorithm of the implementation of the MMP is the following:

Main Problem

Let \((X,\Delta )\) be a projective \({\mathbb {Q}}\)-factorial klt pair of log general type, and let \(A_1,\dots ,A_r\) be ample divisors on X. Find the multidegrees of some set of generators of the ring

$$\begin{aligned} R\big (X;m_0(K_X+\Delta ),m_1(K_X+\Delta +A'_1),\dots ,m_r(K_X+\Delta +A'_r)\big ) \end{aligned}$$

for some positive integers \(m_i\), and some effective divisors \(A_i'\equiv A_i\).

As we will see later, it is important for the MMP algorithm in this paper that the ample divisors \(A_1,\dots ,A_r\) are chosen in such a way that their numerical classes generate the Néron-Severi space \(N^1(X)_{\mathbb {R}}\).

The Main Problem is clearly a countable problem: indeed, one might be able to find a brute-force algorithm to calculate the graded pieces and test the generation relations in the ring – since each graded piece is a finite dimensional vector space, one has at most countably many generators and relations. However, such a brute-force algorithm will not in general end in a finite time without an algebro-geometric input about the specific examples that one wants to calculate on a computer.

However:

3.1 The Main Problem on surfaces

Finding an explicit bound of the degree of generation as in the Main Problem – at least in explicit examples – is one of the technical prerequisites for this algorithm to work.

There is evidence that the degree of generation of the divisorial ring as in the Main Problem is bounded uniformly, depending only on the dimension and the number of prime divisors in the supports of the divisors \(K_X+\Delta \) and \(A_i\). A version of this holds on surfaces by (Cascini and Zhang 2014, Proposition 4.1) and (Cascini and Lazić 2014, Theorem 3.1) and is conjectured to hold in any dimension.

More precisely, we have (Cascini and Lazić 2014, Theorem 3.1):

Theorem 3.2

Let X be a smooth surface and let \(S_1,\dots ,S_p\) be distinct prime divisors such that \(\sum _{i=1}^p S_i\) is a simple normal crossings divisor. Let \(B_0,B_1,\dots ,B_r\) be \({\mathbb {Q}}\)-divisors on X such that:

  1. (i)

    \({{\,\textrm{Supp}\,}}B_j=\sum _{i=1}^p S_i\) for all j, and

  2. (ii)

    \(\lfloor B_j\rfloor =0\) for every j,

and let k be a positive integer such that all \(kB_j\) are Cartier. Then there exists a positive integer m depending only on p and k such that the ring

$$\begin{aligned} R\big (X;m(K_X+B_0),m(K_X+B_1),\dots ,m(K_X+B_r)\big ) \end{aligned}$$

is generated in degree 4.

I want to stress here that the constant m can be calculated explicitly, by tracing back through the results of Cascini and Zhang (2014); Cascini and Lazić (2014) and calculating all the constants there precisely. The constant is large, but after one calculates it precisely, all the remaining steps in the algorithm presented in Sects. 4 and 5 (apart from calculating the images of birational morphisms and finding suitable ample divisors) are then a mixture of convex geometry and linear algebra, which should be doable in modern computer algebra systems.

It is not completely obvious how to pass from Theorem 3.2 to the Main Problem, so I explain this now. Let \((X,\Delta )\) be a projective \({\mathbb {Q}}\)-factorial klt surface pair of log general type; passing to a log resolution, we may assume that X is smooth. Pick some ample divisors \(A_1',\dots ,A_r'\) on X and pick an element \(A_0'\) of some non-empty linear system \(|s (K_X+\Delta )|\) for \(s>0\), which is possible since the divisor \(K_X+\Delta \) is big. Since the cone of big divisors in \(N^1(X)_{\mathbb {R}}\) is open, we can find distinct prime divisors \(S_1,\dots ,S_p\) on X such that the numerical classes of all the divisors \(A_0',\dots ,A_r'\) are contained in the interior of the cone spanned by the numerical classes of \(S_1,\dots ,S_p\) in \({{\,\textrm{Div}\,}}_{\mathbb {R}}(X)\). By replacing \(A_i'\) by a divisor in the numerical class of \(A_i'\) for each i, we may assume that \({{\,\textrm{Supp}\,}}A_i'=\sum _{j=1}^pS_j\) for all i. Then take a large positive integer q such that \(\lfloor \frac{1}{q} A_i'\rfloor =0\) for all i. Set \(A_i:=\frac{1}{q} A_i'\) for each i, and note that we have \(K_X+\Delta +A_0\sim (\frac{s}{q}+1)(K_X+\Delta )\).

If the divisor \(\Delta +\sum _{i=1}^p S_i\) has simple normal crossings support, then we can use Theorem 3.2 to solve the Main Problem: namely, there exists a computable constant m such that the ring

$$\begin{aligned} R\big (X;m(K_X+\Delta +A_0),m(K_X+\Delta +A_1),\dots ,m(K_X+\Delta +A_r)\big ) \end{aligned}$$

is generated in degree 4. Otherwise one has to pass to a log resolution of the pair \((X,\Delta +\sum _{i=1}^p S_i)\) and work there.

Remark 3.3

As pointed out to me by Frank-Olaf Schreyer, when X is a smooth surface of general type, a more efficient way to construct the minimal model of X might be to apply (Bombieri 1973, Main Theorem) to first construct the canonical model of X as the image of the pluricanonical map associated to the linear system \(|5K_X|\), and then construct the minimal model of X as the minimal resolution of the canonical model of X.

3.2 The Main Problem in higher dimensions

Inspired by (Cascini and Zhang 2014, Proposition 2.11) and (Cascini and Lazić 2014, Proposition 2.18), I expect an analogue of Theorem 3.2 to hold also on varieties X in arbitrary dimension, by replacing 4 by \(\dim X+2\); the methods involved in the proof of (Cascini and Zhang 2014, Theorem 1.1) are probably crucial for the solution of the Main Problem on threefolds.

4 Step 2: Cone decompositions

The goal of the remainder of the paper is to demonstrate how once one solves the Main Problem, then one can in principle be able to implement the MMP in a computer algebra system.

In order to present the second step, I will discuss briefly asymptotic geometric valuations. This technical digression is not strictly necessary to understand the remainder of the algorithm, but it helps to understand the underlying philosophy. The details are in Corti and Lazić (2013) and in the survey Lazić (2013).

The finite generation of a divisorial ring \({\mathfrak {R}}\) has important consequences on the convex geometry of the cone \({{\,\textrm{Supp}\,}}{\mathfrak {R}}\). We will relate the ring \({\mathfrak {R}}\) to the behaviour of linear systems |D| for integral divisors \(D\in {{\,\textrm{Supp}\,}}{\mathfrak {R}}\) via asymptotic geometric valuations.

Let X be a smooth projective variety. A geometric valuation \(\Gamma \) on X is any valuation on k(X) which is given by the order of vanishing at the generic point of a prime divisor on some birational model \(Y\rightarrow X\), and we denote the value of this valuation on a \({\mathbb {Q}}\)-divisor D on X by \({{\,\textrm{mult}\,}}_\Gamma D\). If D is moreover effective, then the asymptotic order of vanishing of D along \(\Gamma \) is

$$\begin{aligned} o_\Gamma (D)=\inf \{{{\,\textrm{mult}\,}}_\Gamma D'\mid D\sim _{\mathbb {Q}}D'\ge 0\}. \end{aligned}$$

Equivalently, if \({{\,\textrm{mult}\,}}_\Gamma |kD|\) is the valuation at \(\Gamma \) of a general element of the linear system |kD|, then

$$\begin{aligned} o_\Gamma (D)=\inf \frac{1}{k}{{\,\textrm{mult}\,}}_\Gamma |kD| \end{aligned}$$

over all k sufficiently divisible.

The following result is (Corti and Lazić 2013, Theorem 3): it is essentially contained in the proof of (Ein et al. 2006, Theorem 4.1), and is in fact a mixture of commutative algebra and convex geometry. It provides the relation between the finite generation and the behaviour of linear systems, and yields an important decomposition of the cone \({{\,\textrm{Supp}\,}}{\mathfrak {R}}\) into finitely many special rational polyhedral cones.

Theorem 4.1

Let X be a smooth projective variety and let \(D_0,\dots ,D_r\) be \({\mathbb {Q}}\)-divisors on X. Assume that the ring \({\mathfrak {R}}=R(X;D_0,\dots ,D_r)\) is finitely generated. Then \({{\,\textrm{Supp}\,}}{\mathfrak {R}}\) is a rational polyhedral cone and:

  1. (i)

    there is a finite rational polyhedral subdivision \({{\,\textrm{Supp}\,}}{\mathfrak {R}}=\bigcup \mathcal {C}_i\) into cones of maximal dimension, such that \(o_\Gamma \) is linear on \(\mathcal {C}_i\) for every geometric valuation \(\Gamma \) over X,

  2. (ii)

    there exists a positive integer k such that \(o_\Gamma (kD)={{\,\textrm{mult}\,}}_\Gamma |kD|\) for every integral divisor \(D\in {{\,\textrm{Supp}\,}}{\mathfrak {R}}\).

As we will see in Sect. 5, as soon one has the cone decomposition from Theorem 4.1, one can calculate easily the outputs of the Minimal Model Program for a given projective klt pair of lof general type.

So the main problem at this step of the algorithm is to construct such a decomposition. I sketch briefly the construction from Ein et al. (2006, 2023).

With notation from Theorem 4.1, for each \(m=(m_0,\dots ,m_r)\in {\mathbb {N}}^{r+1}\) we denote by \({\mathfrak {b}}_m\) the ideal defining the base locus of the linear system \(|m_0D_0+\ldots +m_rD_r|\). We obtain the \({\mathbb {N}}^{r+1}\)-graded sequence of ideals \({\mathfrak {b}}_\bullet := \{ {\mathfrak {b}}_m \}_{m \in {\mathbb {N}}^{r+1}}\) of ideal sheaves on X; that is, \({\mathfrak {b}}_0 = {\mathcal {O}}_X\) and

$$\begin{aligned} {\mathfrak {b}}_m \cdot {\mathfrak {b}}_{m'} \subseteq {\mathfrak {b}}_{m + m'} \end{aligned}$$

for all \(m, m' \in {\mathbb {N}}^{r+1}\). Then we have the associated Rees algebra

$$\begin{aligned} R({\mathfrak {b}}_\bullet ):= \bigoplus _{m \in {\mathbb {N}}^{r+1}} {\mathfrak {b}}_m, \end{aligned}$$

which is finitely generated since the ring \({\mathfrak {R}}\) is finitely generated.

Then the arguments from Ein et al. (2006, 2023) show that Theorem 4.1 follows from the following crucial proposition.

Proposition 4.2

With notation as above, let \({\mathcal {C}}\subseteq {\mathbb {R}}^{r+1}\) be the convex cone spanned by \({\mathbb {N}}^{r+1}\subseteq {\mathbb {R}}^{r+1}\). Then there exist a smooth fan \(\Delta \) with support \({\mathcal {C}}\) and a positive integer d such that for every cone \(\sigma \in \Delta \), if we denote by \(e_1,\dots ,e_s\) the generators of \(\sigma \cap {\mathbb {N}}^{r+1}\), then

$$\begin{aligned} \overline{{\mathfrak {b}}_{d{\sum _i}p_ie_i}}=\overline{\prod _i {\mathfrak {b}}_{de_i}^{p_i}}, \end{aligned}$$

for every \((p_1,\dots ,p_s)\in {\mathbb {N}}^s\). Here \(\overline{{\mathfrak {b}}}\) denotes the integral closure of an ideal \({\mathfrak {b}}\).

Thus, the algorithm takes as an input the degrees of the generators of the ring \({\mathfrak {R}}\) and finds a rational polyhedral subdivision of \({{\,\textrm{Supp}\,}}{\mathfrak {R}}\) as an output.

The crucial point is this: the proof from Ein et al. (2023) of Proposition 4.2 is convex geometric, thus finding a rational polyhedral subdivision of \({{\,\textrm{Supp}\,}}{\mathfrak {R}}\) is implementable in suitable convex geometry software such as Polymake (Polymake 2023). For applications to the MMP in Sect. 5 we actually need only Theorem 4.1(i), and for this we do not need the full statement of Proposition 4.2: following the proof in (Ein et al. 2023, Proposition 1.1), one first shows that each function \(o_\Gamma \) can be written as the pointwise infimum of a family of linear functions – these linear functions depend only on the multidegrees of some set of generators of \({\mathfrak {R}}\), and this is precisely the place where the Main Problem is relevant. Once this is shown, one can find a subdivision as in Theorem 4.1(i) by an explicit linear algebra argument, see (Ein et al. 2023, Lemma 2.1 and Remark 2.3).

For the sake of completeness, I mention here that Theorem 4.1(ii) is also algorithmically implementable. Additional to Theorem 4.1(i), there is only one crucial algebraic input, which corresponds to the case when \(r=0\):

Lemma 4.3

If \(R_0\) is a Noetherian ring and if \(R=\bigoplus _{m\in {\mathbb {N}}}R_m\) is a finitely generated \(R_0\)-algebra, then there exists a positive integer d such that \(R_{dm}= R_d^m\) for every \(m\in {\mathbb {N}}\setminus \{0\}\).

The proof of this lemma in (Bourbaki 1998, Chapter III, Sect. 1) is constructive: if one knows the degrees of some generators of R, then one can calculate d explicitly.

Therefore, one should be able to implement Theorem 4.1 in a computer algebra system (in the sense mentioned earlier: take as input the degrees of the generators of the ring \({\mathfrak {R}}\) and get as output a rational polyhedral subdivision of \({{\,\textrm{Supp}\,}}{\mathfrak {R}}\)), although improvements and simplifications to the algorithm from Ein et al. (2023) have to be made, since the calculations can get expensive quickly as the number of generators of \({\mathfrak {R}}\) or their multidegrees grow.

Once Theorem 4.1 is implemented, we apply it for a projective \({\mathbb {Q}}\)-factorial klt pair \((X,\Delta )\) of log general type. We let \(A_1,\dots ,A_r\) be ample divisors on X, and set \(D_0:=K_X+\Delta \) and \(D_i:=K_X+\Delta +A_i\) for \(i=1,\dots ,r\). Then, as explained above, as soon as we have a solution to the Main Problem for the ring \({\mathfrak {R}}=R(X;D_0,\dots ,D_r)\) (for instance, either by finding generators of \({\mathfrak {R}}\) explicitly in explicit examples, or by knowing a general upper bound for their multidegrees by general theoretical arguments as in Cascini and Zhang (2014); Cascini and Lazić (2014)), we can calculate the cone subdivision as in Theorem 4.1(i) in a computer algebra system. As mentioned in Sect. 3, the biggest progress on this problem is currently on surfaces, where one can calculate a bound explicitly by Theorem 3.2.

5 Step 3: Minimal models

In the final step, we will see that the cone decomposition from the previous section applied to a particular choice of a divisorial ring on a klt pair \((X,\Delta )\) of log general type immediately provides the steps in a Minimal Model Program of \((X,\Delta )\), as well as a minimal model of \((X,\Delta )\).

So let \((X,\Delta )\) be a projective \({\mathbb {Q}}\)-factorial klt pair of log general type and let \(A_1,\dots ,A_r\) be ample divisors on X whose classes generate \(N^1(X)_{\mathbb {R}}\). Thus, we may assume that r is the Picard rank of X. Moreover, by the Cone theorem, possibly by replacing \(A_i\) by \((2\dim X+1)A_i\), we may assume from the start that each divisor \(D_i:=K_X+\Delta +A_i\) is ample for \(i=1,\dots ,r\): this will make finding a divisor H below easier, but is not essential.

Then by Theorem 3.1 the ring \({\mathfrak {R}}=R(X;K_X+\Delta ,D_1,\dots ,D_r)\) is finitely generated. Therefore, by Theorem 4.1 the cone \({\mathcal {C}}:={{\,\textrm{Supp}\,}}{\mathfrak {R}}\) has a finite rational polyhedral subdivision

$$\begin{aligned} {\mathcal {C}}=\bigcup _{i=1}^p \mathcal {C}_i \end{aligned}$$

into cones of maximal dimension, such that the asymptotic valuation function \(o_\Gamma \) is linear on each \({\mathcal { C}}_i\) for every geometric valuation \(\Gamma \) over X. By subdividing \({\mathcal { C}}\) further, we may assume that each cone \({\mathcal {C}}_i\) is contained in one of the two half-spaces of the vector space \({\mathbb {R}}(K_X+\Delta )+\sum {\mathbb {R}}D_i\) bounded by each hyperplane which contains a face of some \({\mathcal {C}}_j\), where \(1\le i,j\le p\). Note that the cone \({\mathcal { C}}\) is equal to the cone \({\mathbb {R}}_+(K_X+\Delta )+\sum {\mathbb {R}}_+D_i\), since \(K_X+\Delta \) is big.

Pick an ample divisor H on X such that, denoting

$$\begin{aligned} I:=\big \{t(K_X+\Delta )+(1-t)H\mid 0\le t\le 1\big \}, \end{aligned}$$

then we have the following property: if I intersects some cone \({\mathcal {C}}_i\), then it intersects its interior – it is clear that one can easily achieve this. By relabelling, we may assume that I intersects precisely the cones \({\mathcal {C}}_1,\dots ,{\mathcal {C}}_k\) for some \(k\le p\), so that

$$\begin{aligned} K_X+\Delta \in {\mathcal {C}}_k, \quad H\in {\mathcal {C}}_1\quad \text {and}\quad {\mathcal {C}}_i\cap {\mathcal {C}}_{i+1}\cap I\ne \emptyset \text { for all }i=1,\dots ,k-1. \end{aligned}$$

Then we have:

Theorem 5.1

With notation as above, let D be any divisor in the interior of \({\mathcal {C}}_k\). Then the variety \({{\,\textrm{Proj}\,}}R(X,D)\) is a minimal model of X.

This follows from the proof of (Corti and Lazić 2013, Theorem 6) and from the proof of a more general statement (Kaloghiros et al. 2016, Theorem 5.4). I briefly sketch the main steps of the proof, which will in particular explain how to run the MMP with scaling of H in this context. This is important when one is interested in all the steps of the MMP instead of just in its main result.

The proof is by induction on k. Denote by \(\pi :{{\,\textrm{Div}\,}}_{\mathbb {R}}(X)\rightarrow N^1(X)_{\mathbb {R}}\) the natural projection. Then one can show that the cone \({\mathcal { C}}\cap \pi ^{-1}\bigl ({{\,\textrm{Nef}\,}}(X)\bigr )\) is the union of some of the cones \({\mathcal {C}}_i\), where \(1\le i\le p\). In particular, we may assume that there exists \(1\le k_0\le k\) such that

$$\begin{aligned} {\mathcal {C}}_i\subseteq \pi ^{-1}\bigl ({{\,\textrm{Nef}\,}}(X)\bigr )\quad \text {for }i=1,\dots ,k_0 \end{aligned}$$

and

$$\begin{aligned} {\mathcal {C}}_i\not \subseteq \pi ^{-1}\bigl ({{\,\textrm{Nef}\,}}(X)\bigr )\quad \text {for }i=k_0+1,\dots ,k. \end{aligned}$$

Pick any divisor G in the interior of \({\mathcal {C}}_{k_0+1}\) and set \(X':={{\,\textrm{Proj}\,}}R(X,G)\). Then the proof of (Kaloghiros et al. 2016, Theorem 5.2) shows that the induced birational map \(f:X\dashrightarrow X'\) is precisely the first step in the \((K_X+\Delta )\)-MMP with scaling of H.

Define rational polyhedral cones \({\mathcal {C}}_i':=f_*{\mathcal {C}}_i\subseteq {{\,\textrm{Div}\,}}_{\mathbb {R}}(X')\) and denote by \(\pi ':{{\,\textrm{Div}\,}}_{\mathbb {R}}(X')\rightarrow N^1(X')_{\mathbb {R}}\) the natural projection. Then one can again show that there exists \(k_0+1\le k_1\le k\) such that

$$\begin{aligned} {\mathcal {C}}_i'\subseteq (\pi ')^{-1}\bigl ({{\,\textrm{Nef}\,}}(X')\bigr )\quad \text {for }i=k_0+1,\dots ,k_1 \end{aligned}$$

and

$$\begin{aligned} {\mathcal {C}}_i'\not \subseteq (\pi ')^{-1}\bigl ({{\,\textrm{Nef}\,}}(X')\bigr )\quad \text {for }i=k_1+1,\dots ,k. \end{aligned}$$

Pick any divisor \(G'\) in the interior of \({\mathcal {C}}_{k_1+1}\) and set \(X'':={{\,\textrm{Proj}\,}}R(X,G')\). Then the induced birational map \(f':X'\dashrightarrow X''\) is precisely the second step in the \((K_X+\Delta )\)-MMP with scaling of H. By continuing this procedure we realise the whole MMP with scaling.

The procedure just described calculates the maps \(f,f',\dots \) in the MMP above, but there is some work involved in finding the indices \(k_j\). Moreover, one calculates each subsequent map on a different variety: for instance, \(f'\) was determined by data on \(X'\) and not on X itself. One can, however, proceed also as follows: For each \(i=1,\dots ,k\) one can pick a divisor \(G_i\) in the interior of \({\mathcal {C}}_i\) and set \(X_i:={{\,\textrm{Proj}\,}}R(X,G_i)\). Then one obtains birational maps

$$\begin{aligned} X=X_1\dashrightarrow X_2\dashrightarrow \ldots \dashrightarrow X_k, \end{aligned}$$

where \(X_k\) is a minimal model of X. Some of these birational maps will actually be isomorphisms, hence there will be some redundancy in the process. However, the clear advantage is that one has to calculate the varieties \(X_i\) on the variety X itself, which saves computer power.

6 Conclusion

An algorithm for an implementation of the Minimal Model Program in a computer algebra system was proposed in Sects. 3, 4 and 5, for pairs \((X,\Delta )\) of log general type.

The algorithm proceeds in three steps. In Step 1 one considers a carefully chosen multigraded ring \({\mathfrak {R}}\) on X. The Main Problem in the algorithm is to bound the multidegrees of its generators. This problem has a solution on surfaces, therefore the MMP on surfaces should be implementable on a computer in the near future. Bounding the multidegrees of generators of such graded rings \({\mathfrak {R}}\) in higher dimensions is a topic of future theoretical research.

Once the Main Problem is implemented, the remainder of the algorithm becomes a mixture of linear algebra and convex geometry. In Step 2 one uses as an input the information on the multidegrees of generators of \({\mathfrak {R}}\) as in the Main Problem to find a suitable decomposition of the support of \({\mathfrak {R}}\) into finitely many rational polyhedral cones with special properties. In Step 3, from this decomposition one can immediately obtain a minimal model of \((X,\Delta )\) and the steps in a \((K_X+\Delta )\)-MMP with scaling of a certain ample divisor. All three steps can be implemented independently of each other.