CoCalc Public Filesthreefolds.sagews
Authors: Jacob Cable, Hendrik Suess
Views : 503
Description: On the classification of Kähler-Ricci solitons on Gorenstein del Pezzo surfaces: Calculations for threefolds
Compute Environment: Ubuntu 18.04 (Deprecated)

# On the classificiation of Kähler-Ricci solitons on Gorenstein del Pezzo surfaces

Calculation for the preprint arXiv:1705.02920.

### List of smooth Fano threefolds with 2-torus action

1. Q
2. 2.24
3. 2.29
4. 2.30
5. 2.31
6. 2.32
7. 3.8
8. 3.10
9. 3.18
10. 3.19
11. 3.20
12. 3.21
13. 3.22
14. 3.23
15. 3.24
16. 4.4
17. 4.5
18. 4.7
19. 4.8

Here some helper functions are defined. These are degenerations() for calculating the toric special fibres of the test configurations and intxexp() to solve the integrals $\int_\Delta \langle u, v \rangle e^{\langle u, \xi \rangle} du$ analytically.
Click ▸ on the left to unhide.

#### No. 2.30

The combinatorial data is is given by $\Box= \text{conv} (\, (-3,0),(-2,1),(2,1),(3,0),(0,-3) \, )$ and $\Phi_0(x,y) = \min \{0,-x\},\; \Phi_1(x,y)= \min \{0,y\},\; \Phi_\infty(x,y) = \frac{x-y-1}{2}$.

# We are working with interval arithmetic with precision of 16 bit
# this fixes the precision e.g. for evaluations of exponential functions
RIF=RealIntervalField(16)

Polyhedron()

# The base polytope
B=Polyhedron(vertices = [[-3,0],[-2,1],[2,1],[3,0],[0,-3]])

# 3 PL functions on B. If phi is the minimum of affine functions of the form F(x,y) = a + b*x + c*y we represent phi as
# the transpose of the matrix with rows [a,b,c].

Phi1 = matrix(QQ,[[0,0,0],[0,-1,0]]).transpose()
Phi2 = matrix(QQ,[[0,0,0],[0,0,1]]).transpose()
Phi3 = matrix(QQ,[[-1/2,1/2,-1/2]]).transpose()

PLfunctions = [Phi1,Phi2,Phi3]

# Form list of degeneration polyhedra
Polyhedra = degenerations(PLfunctions,B)

print "The combinatorial data"

graphic = B.plot().show(figsize=[3,3],title='Base Polytope B')

x,y = var('x,y')
r = vector([1,x,y])

for Phi in PLfunctions:
if Phi.transpose().nrows() > 1:
f(x,y) = min_symbolic(*list(r*Phi))
else:
f(x,y) = list(r*Phi)[0]
print ' '
show(f)

The empty polyhedron in ZZ^0 The combinatorial data
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -x\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, y\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \frac{1}{2} \, x - \frac{1}{2} \, y - \frac{1}{2}$

#### Step (i) -- obtain a closed form for $F_{X,\xi}$

For this note, that $\left(\begin{smallmatrix}-1 & 0\\ 0 & 1\end{smallmatrix}\right)$ is a symmetry of the combinatorial data. Hence, we have $\xi=(0,\xi_2)$. We have to analytically solve the integral $\int_\Box \langle u,v \rangle \deg \bar \Phi (u) e^{\langle u, (0,\xi_2) \rangle } du = \int_{\Delta_0} \langle u', (v,0) \rangle \cdot e^{\langle u', (0,\xi_2,0) \rangle} du'$ for $v$ varying over a basis of $N_\mathbb{R}$.

#Choose a sufficiently general value for lambda
Lambda = vector([1,3,13])

# Analytic solution of the integral
F1(xi_2) = intxexp(Polyhedra[0],Lambda,vector([0,xi_2,0]),vector([1,0,0])).simplify_full()
F2(xi_2) = intxexp(Polyhedra[0],Lambda,vector([0,xi_2,0]),vector([0,1,0])).simplify_full()

show(vector([F1,F2]))

$\displaystyle \xi_{2} \ {\mapsto}\ \left(-\frac{{\left({\left(\xi_{2}^{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} - 2 \, \xi_{2} + 4 \, e^{\left(2 \, \xi_{2}\right)} - 2\right)} e^{\left(-2 \, \xi_{2}\right)}}{\xi_{2}^{3}},\,\frac{2 \, {\left({\left(\xi_{2}^{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} - 2 \, \xi_{2} + 4 \, e^{\left(2 \, \xi_{2}\right)} - 2\right)} e^{\left(-2 \, \xi_{2}\right)}}{\xi_{2}^{3}}\right)$

#### Step (ii) -- find an estimate for the soliton candidate vector field $\xi$.

# Choose upper and lower bound and
# hope that the exact solution lies in between
lower = 0.514
upper = 0.515

#define a real value xi_RIF between xi_1 and xi_2
# representing the exact solution.
xi_RIF = RIF(lower,upper)

# Check whether Intermediate value theorem guarantees a zero beween
# lower and upper, i.e evaluate F2 at lower and upper using interval arithmetic.
if RIF(F2(lower)) < 0 and RIF(F2(upper)) > 0:
print "Interval containing solution:", xi_RIF.str(style='brackets')

Error in lines 4-5 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1234, in execute flags=compile_flags), namespace, locals) File "", line 1, in <module> NameError: name 'F2' is not defined

#### Step (iii) & (iv) -- obtain closed forms for $\operatorname{DF}_\xi(X_{y,0,1})$ and plug in the estimate for $\xi$

For this we first have to symbolically solve the integrals
$h_y(\xi) := \text{vol}(\Delta_y) \cdot \operatorname{DF}_\xi(\mathcal{X}_{y,0,1})=\int_{\Delta_y} \langle u, (0,0,1) \, \rangle e^{\langle u, (\xi,0) \rangle } \; du$
for every (admissible) choice of $y \in \mathbb P^1$ and then plug in the estimate for $\xi$ into the resulting expression.

#storage for the functions h_y
H=[]
#storage for values h_y(xi) (as intervals)
Ih=[]

#Symbollically solving integrals using Barvinok method
for P in Polyhedra:
h(xi_2) = intxexp(P,Lambda,vector([0,xi_2,0]),vector([0,0,1])).simplify_full()
DF=RIF(h(xi_RIF))
H.append(h); Ih.append(DF)
show(h(xi_2) >= DF.lower())

if all([h > 0 for h in Ih]):
print("Threefold is stable!")
else:
if any([h <= 0 for h in Ih]):
print("Threefold is not stable!")

# print upper bound for destablising DF value
if Ih[0] <= 0: show(H[0](xi_2) <= Ih[0].upper())
if Ih[1] <= 0: show(H[1](xi_2) <= Ih[1].upper())
if Ih[2] <= 0: show(H[2](xi_2) <= Ih[2].upper())
if Ih[3] <= 0: show(H[3](xi_2) <= Ih[3].upper())
else:
print("Cannot determine stability")
# Note, that "not a > 0" does not imply "a <= 0" for intervals
for i in range(3):
latex(H[i])

$\displaystyle \frac{{\left({\left(2 \, \xi_{2}^{3} - 3 \, \xi_{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} + 3 \, {\left(3 \, \xi_{2}^{2} + 2\right)} e^{\left(3 \, \xi_{2}\right)} - 3 \, \xi_{2} - 3\right)} e^{\left(-3 \, \xi_{2}\right)}}{3 \, \xi_{2}^{4}} \geq 1.088$
$\displaystyle \frac{{\left({\left(8 \, \xi_{2}^{3} + 6 \, \xi_{2}^{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} - 12 \, {\left(3 \, \xi_{2}^{2} - 3 \, \xi_{2} + 1\right)} e^{\left(3 \, \xi_{2}\right)} + 12 \, \xi_{2} + 15\right)} e^{\left(-3 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}} \geq 2.178$
$\displaystyle -\frac{{\left(2 \, {\left(2 \, \xi_{2}^{3} - 3 \, \xi_{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} - 3 \, {\left(3 \, \xi_{2}^{2} - 12 \, \xi_{2} + 2\right)} e^{\left(3 \, \xi_{2}\right)} + 12 \, \xi_{2} + 12\right)} e^{\left(-3 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}} \geq 0.4465$
$\displaystyle \frac{{\left({\left(8 \, \xi_{2}^{3} + 6 \, \xi_{2}^{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} - 3 \, {\left(3 \, \xi_{2}^{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} - 6 \, \xi_{2} - 3\right)} e^{\left(-3 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}} \geq 4.151$
Threefold is stable! \xi_{2} \ {\mapsto}\ \frac{{\left({\left(2 \, \xi_{2}^{3} - 3 \, \xi_{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} + 3 \, {\left(3 \, \xi_{2}^{2} + 2\right)} e^{\left(3 \, \xi_{2}\right)} - 3 \, \xi_{2} - 3\right)} e^{\left(-3 \, \xi_{2}\right)}}{3 \, \xi_{2}^{4}} \xi_{2} \ {\mapsto}\ \frac{{\left({\left(8 \, \xi_{2}^{3} + 6 \, \xi_{2}^{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} - 12 \, {\left(3 \, \xi_{2}^{2} - 3 \, \xi_{2} + 1\right)} e^{\left(3 \, \xi_{2}\right)} + 12 \, \xi_{2} + 15\right)} e^{\left(-3 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}} \xi_{2} \ {\mapsto}\ -\frac{{\left(2 \, {\left(2 \, \xi_{2}^{3} - 3 \, \xi_{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} - 3 \, {\left(3 \, \xi_{2}^{2} - 12 \, \xi_{2} + 2\right)} e^{\left(3 \, \xi_{2}\right)} + 12 \, \xi_{2} + 12\right)} e^{\left(-3 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}}

#### No. 2.31

The combinatorial data is is given by $\Box= \text{conv} (\,(-3,0),(-1,2),(0,2),(2,0),(2,-1),(0,-3) \, )$ and $\Phi_0(x,y) = \min \{0,-x\},\; \Phi_1(x,y)= \min \{0,y\} ,\; \Phi_\infty(x,y) = \min \{-y, \frac{x-y-1}{2} \}$.

# We are working with interval arithmetic with precision of 60 bit
# this fixes the precision e.g. for evaluations of exponential functions
RIF=RealIntervalField(60)

# The base polytope
B=Polyhedron(vertices = [[-3,0],[-1,2],[0,2],[2,0],[2,-1],[0,-3]])

# 3 PL functions on B. If phi is the minimum of affine functions of the form F(x,y) = a + b*x + c*y we represent phi as
# the transpose of the matrix with rows [a,b,c].

Phi1 = matrix(QQ,[[0,0,0],[0,-1,0]]).transpose()
Phi2 = matrix(QQ,[[0,0,0],[0,0,1]]).transpose()
Phi3 = matrix(QQ,[[-1/2,1/2,-1/2],[0,0,-1]]).transpose()

PLfunctions = [Phi1,Phi2,Phi3]

# Form list of degeneration polyhedra
Polyhedra = degenerations(PLfunctions,B)

print "The combinatorial data"

graphic = B.plot().show(figsize=[3,3],title='Base Polytope B')

x,y = var('x,y')
r = vector([1,x,y])

for Phi in PLfunctions:
if Phi.transpose().nrows() > 1:
f(x,y) = min_symbolic(*list(r*Phi))
else:
f(x,y) = list(r*Phi)[0]
print ' '
show(f)

The combinatorial data
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -x\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, y\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(\frac{1}{2} \, x - \frac{1}{2} \, y - \frac{1}{2}, -y\right)$

#### Step (i) -- obtain a closed form for $F_{X,\xi}$

For this note, that $\left(\begin{smallmatrix} 0 & 1\\ 1 & 0\end{smallmatrix}\right)$ is a symmetry of the combinatorial data. Hence, we have $\xi=(\xi_1,\xi_1)$. We have to analytically solve the integral $\int_\Box \langle u,v \rangle \deg \bar \Phi (u) e^{\langle u, \xi \rangle } du = \int_{\Delta_0} \langle u', (v,0) \rangle \cdot e^{\langle u', (\xi,0) \rangle} du'$ for $v$ varying over a basis of $N_\mathbb{R}$.

#Choose a sufficiently general value for lambda
Lambda = vector([1,3,13])

# Analytic solution of the integral
F1(xi_1) = intxexp(Polyhedra[0],Lambda,vector([xi_1,xi_1,0]),vector([1,-1,0])).simplify_full()
F2(xi_1) = intxexp(Polyhedra[0],Lambda,vector([xi_1,xi_1,0]),vector([1,1,0])).simplify_full()

show(vector([F1,F2]))
latex(F2)

$\displaystyle \xi_{1} \ {\mapsto}\ \left(0,\,-\frac{{\left(9 \, \xi_{1}^{2} - 8 \, {\left(\xi_{1}^{2} - \xi_{1}\right)} e^{\left(5 \, \xi_{1}\right)} + {\left(3 \, \xi_{1}^{2} - 5 \, \xi_{1} - 3\right)} e^{\left(4 \, \xi_{1}\right)} + 9 \, \xi_{1} + 3\right)} e^{\left(-3 \, \xi_{1}\right)}}{2 \, \xi_{1}^{4}}\right)$
\xi_{1} \ {\mapsto}\ -\frac{{\left(9 \, \xi_{1}^{2} - 8 \, {\left(\xi_{1}^{2} - \xi_{1}\right)} e^{\left(5 \, \xi_{1}\right)} + {\left(3 \, \xi_{1}^{2} - 5 \, \xi_{1} - 3\right)} e^{\left(4 \, \xi_{1}\right)} + 9 \, \xi_{1} + 3\right)} e^{\left(-3 \, \xi_{1}\right)}}{2 \, \xi_{1}^{4}}

#### Step (ii) -- find an estimate for the soliton candidate vector field $\xi$.

# Choose upper and lower bound and
# hope that the exact solution lies in between
lower = 0.285497
upper = 0.285507

#define a real value xi_RIF between xi_1 and xi_2
# representing the exact solution.
xi_RIF = RIF(lower,upper)

# Check whether Intermediate value theorem guarantees a zero beween
# lower and upper, i.e evaluate F2 at lower and upper using interval arithmetic.
if RIF(F2(lower)) < 0 and RIF(F2(upper)) > 0:
print "Interval containing solution:", xi_RIF.str(style='brackets')

Error in lines 4-5 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1234, in execute flags=compile_flags), namespace, locals) File "", line 1, in <module> NameError: name 'F2' is not defined

#### Step (iii) & (iv) -- obtain closed forms for $\operatorname{DF}_\xi(X_{y,0,1})$ and plug in the estimate for $\xi$

For this we first have to symbolically solve the integrals
$h_y(\xi) := \text{vol}(\Delta_y) \cdot \operatorname{DF}_\xi(\mathcal{X}_{y,0,1})=\int_{\Delta_y} \langle u, (0,0,1) \, \rangle e^{\langle u, (\xi,0) \rangle } \; du$
for every (admissible) choice of $y \in \mathbb P^1$ and then plug in the estimate for $\xi$ into the resulting expression.

#storage for the functions h_y
H=[]
#storage for values h_y(xi) (as intervals)
Ih=[]

#Symbollically solving integrals using Barvinok method
for P in Polyhedra:
h(xi_2) = intxexp(P,Lambda,vector([xi_2,xi_2,0]),vector([0,0,1])).simplify_full()
DF=RIF(h(xi_RIF))
H.append(h); Ih.append(DF)
show(h(xi_2) >= DF.lower())

if all([h > 0 for h in Ih]):
print("Threefold is stable!")
else:
if any([h <= 0 for h in Ih]):
print("Threefold is not stable!")

# print upper bound for destablising DF value
if Ih[0] <= 0: show(H[0](xi_2) <= Ih[0].upper())
if Ih[1] <= 0: show(H[1](xi_2) <= Ih[1].upper())
if Ih[2] <= 0: show(H[2](xi_2) <= Ih[2].upper())
if Ih[3] <= 0: show(H[3](xi_2) <= Ih[3].upper())
else:
print("Cannot determine stability")
# Note, that "not a > 0" does not imply "a <= 0" for intervals

for i in range(4):
print("next")
latex(H[i](xi_2))

$\displaystyle \frac{{\left(12 \, \xi_{2}^{2} + {\left(4 \, \xi_{2}^{2} + 2 \, \xi_{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} + 10 \, \xi_{2} + 3\right)} e^{\left(-3 \, \xi_{2}\right)}}{8 \, \xi_{2}^{4}} \geq 1.9509140285745875$
$\displaystyle -\frac{{\left(6 \, \xi_{2}^{2} - 16 \, {\left(\xi_{2}^{2} - \xi_{2}\right)} e^{\left(5 \, \xi_{2}\right)} + {\left(2 \, \xi_{2}^{2} - 12 \, \xi_{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} + 8 \, \xi_{2} + 3\right)} e^{\left(-3 \, \xi_{2}\right)}}{8 \, \xi_{2}^{4}} \geq 1.9410571489743145$
$\displaystyle \frac{{\left(3 \, \xi_{2}^{2} - {\left(3 \, \xi_{2}^{2} + 4 \, \xi_{2} + 2\right)} e^{\left(4 \, \xi_{2}\right)} + 4 \, \xi_{2} + 4 \, e^{\left(5 \, \xi_{2}\right)} - 4 \, e^{\left(3 \, \xi_{2}\right)} + 2\right)} e^{\left(-3 \, \xi_{2}\right)}}{4 \, \xi_{2}^{4}} \geq 0.46321007208105124$
$\displaystyle \frac{{\left(6 \, \xi_{2}^{2} + 4 \, {\left(2 \, \xi_{2}^{2} - 2 \, \xi_{2} + 1\right)} e^{\left(5 \, \xi_{2}\right)} - {\left(2 \, \xi_{2}^{2} - 3 \, \xi_{2} + 2\right)} e^{\left(4 \, \xi_{2}\right)} + 5 \, \xi_{2} - 4 \, e^{\left(3 \, \xi_{2}\right)} + 2\right)} e^{\left(-3 \, \xi_{2}\right)}}{4 \, \xi_{2}^{4}} \geq 4.3703738710119923$
Threefold is stable! next \frac{{\left(12 \, \xi_{2}^{2} + {\left(4 \, \xi_{2}^{2} + 2 \, \xi_{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} + 10 \, \xi_{2} + 3\right)} e^{\left(-3 \, \xi_{2}\right)}}{8 \, \xi_{2}^{4}} next -\frac{{\left(6 \, \xi_{2}^{2} - 16 \, {\left(\xi_{2}^{2} - \xi_{2}\right)} e^{\left(5 \, \xi_{2}\right)} + {\left(2 \, \xi_{2}^{2} - 12 \, \xi_{2} - 3\right)} e^{\left(4 \, \xi_{2}\right)} + 8 \, \xi_{2} + 3\right)} e^{\left(-3 \, \xi_{2}\right)}}{8 \, \xi_{2}^{4}} next \frac{{\left(3 \, \xi_{2}^{2} - {\left(3 \, \xi_{2}^{2} + 4 \, \xi_{2} + 2\right)} e^{\left(4 \, \xi_{2}\right)} + 4 \, \xi_{2} + 4 \, e^{\left(5 \, \xi_{2}\right)} - 4 \, e^{\left(3 \, \xi_{2}\right)} + 2\right)} e^{\left(-3 \, \xi_{2}\right)}}{4 \, \xi_{2}^{4}} next \frac{{\left(6 \, \xi_{2}^{2} + 4 \, {\left(2 \, \xi_{2}^{2} - 2 \, \xi_{2} + 1\right)} e^{\left(5 \, \xi_{2}\right)} - {\left(2 \, \xi_{2}^{2} - 3 \, \xi_{2} + 2\right)} e^{\left(4 \, \xi_{2}\right)} + 5 \, \xi_{2} - 4 \, e^{\left(3 \, \xi_{2}\right)} + 2\right)} e^{\left(-3 \, \xi_{2}\right)}}{4 \, \xi_{2}^{4}}

#### No. 3.8*

The combinatorial data is is given by $\Box= \text{conv} (\,(-2,-1),(-2,1),(1,1),(3,-1),(3,-2),(-1,-2) \, )$ and $\Phi_0(x,y) = \min \{0,\frac{-x-1}{2}\},\; \Phi_1(x,y)= \min \{0,\frac{-y-1}{2}\} ,\; \Phi_\infty(x,y) = \min \{0, \frac{x+y-1}{2}\}$.

# We are working with interval arithmetic with precision of 60 bit
# this fixes the precision e.g. for evaluations of exponential functions
RIF=RealIntervalField(60)

# The base polytope
B=Polyhedron(vertices = [[-2,-1],[-2,1],[1,1],[3,-1],[3,-2],[-1,-2]])

# 3 PL functions on B. If phi is the minimum of affine functions of the form F(x,y) = a + b*x + c*y we represent phi as
# the transpose of the matrix with rows [a,b,c].

Phi1 = matrix(QQ,[[0,0,0],[-1/2,-1/2,0]]).transpose()
Phi2 = matrix(QQ,[[0,0,0],[-1/2,0,-1/2]]).transpose()
Phi3 = matrix(QQ,[[0,0,0],[-1/2,1/2,1/2]]).transpose();

PLfunctions = [Phi1,Phi2,Phi3]

# Form list of degeneration polyhedra
Polyhedra = degenerations(PLfunctions,B)

print "The combinatorial data"

graphic = B.plot().show(figsize=[3,3],title='Base Polytope B')

x,y = var('x,y')
r = vector([1,x,y])

for Phi in PLfunctions:
if Phi.transpose().nrows() > 1:
f(x,y) = min_symbolic(*list(r*Phi))
else:
f(x,y) = list(r*Phi)[0]
print ' '
show(f)

The combinatorial data
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -\frac{1}{2} \, x - \frac{1}{2}\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -\frac{1}{2} \, y - \frac{1}{2}\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, \frac{1}{2} \, x + \frac{1}{2} \, y - \frac{1}{2}\right)$

#### Step (i) -- obtain a closed form for $F_{X,\xi}$

For this note, that $\left(\begin{smallmatrix}-1 & -1\\ 0 & 1\end{smallmatrix}\right)$ is a symmetry of the combinatorial data. Hence, we have $\xi=(0,\xi_2)$. We have to analytically solve the integral $\int_\Box \langle u,v \rangle \deg \bar \Phi (u) e^{\langle u, \xi \rangle } du = \int_{\Delta_0} \langle u', (v,0) \rangle \cdot e^{\langle u', (\xi,0) \rangle} du'$ for $v$ varying over a basis of $N_\mathbb{R}$.

#Choose a sufficiently general value for lambda
Lambda = vector([1,5,13])

# Analytic solution of the integral
F1(xi_2) = intxexp(Polyhedra[0],Lambda,vector([0,xi_2,0]),vector([1,0,0])).simplify_full()
F2(xi_2) = intxexp(Polyhedra[0],Lambda,vector([0,xi_2,0]),vector([0,1,0])).simplify_full()

show(vector([F1,F2]))
latex(F1)
latex(F2)

$\displaystyle \xi_{2} \ {\mapsto}\ \left(-\frac{{\left({\left(2 \, \xi_{2}^{2} - \xi_{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} + 5 \, {\left(\xi_{2} + 2\right)} e^{\xi_{2}} - 8 \, \xi_{2} - 8\right)} e^{\left(-2 \, \xi_{2}\right)}}{4 \, \xi_{2}^{3}},\,\frac{{\left({\left(2 \, \xi_{2}^{2} - \xi_{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} + 5 \, {\left(\xi_{2} + 2\right)} e^{\xi_{2}} - 8 \, \xi_{2} - 8\right)} e^{\left(-2 \, \xi_{2}\right)}}{2 \, \xi_{2}^{3}}\right)$
\xi_{2} \ {\mapsto}\ -\frac{{\left({\left(2 \, \xi_{2}^{2} - \xi_{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} + 5 \, {\left(\xi_{2} + 2\right)} e^{\xi_{2}} - 8 \, \xi_{2} - 8\right)} e^{\left(-2 \, \xi_{2}\right)}}{4 \, \xi_{2}^{3}} \xi_{2} \ {\mapsto}\ \frac{{\left({\left(2 \, \xi_{2}^{2} - \xi_{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} + 5 \, {\left(\xi_{2} + 2\right)} e^{\xi_{2}} - 8 \, \xi_{2} - 8\right)} e^{\left(-2 \, \xi_{2}\right)}}{2 \, \xi_{2}^{3}}

#### Step (ii) -- find an estimate for the soliton candidate vector field $\xi$.

# Choose upper and lower bound and
# hope that the exact solution lies in between
find_root(F2,-10,10)

lower = 0.799716
upper = 0.799717

#define a real value xi_RIF between xi_1 and xi_2
# representing the exact solution.
xi_RIF = RIF(lower,upper)

# Check whether Intermediate value theorem guarantees a zero beween
# lower and upper, i.e evaluate F2 at lower and upper using interval arithmetic.
if RIF(F2(lower)) < 0 and RIF(F2(upper)) > 0:
print "Interval containing solution:", xi_RIF.str(style='brackets')

0.7997160277154249 Interval containing solution: [0.79971599999999998242 .. 0.79971700000000001119]

#### Step (iii) & (iv) -- obtain closed forms for $\operatorname{DF}_\xi(X_{y,0,1})$ and plug in the estimate for $\xi$

For this we first have to symbolically solve the integrals
$h_y(\xi) := \text{vol}(\Delta_y) \cdot \operatorname{DF}_\xi(\mathcal{X}_{y,0,1})=\int_{\Delta_y} \langle u, (0,0,1) \, \rangle e^{\langle u, (\xi,0) \rangle } \; du$
for every choice of $y \in \mathbb P^1$ and then plug in the estimate for $\xi$ into the resulting expression.

#storage for the functions h_y
H=[]
#storage for values h_y(xi) (as intervals)
Ih=[]

#Symbollically solving integrals using Barvinok method
for P in Polyhedra:
h(xi_2) = intxexp(P,Lambda,vector([0,xi_2,0]),vector([0,0,1])).simplify_full()
DF=RIF(h(xi_RIF))
H.append(h); Ih.append(DF)
show(h(xi_2) >= DF.lower())

if all([h > 0 for h in Ih]):
print("Threefold is stable!")
else:
if any([h <= 0 for h in Ih]):
print("Threefold is not stable!")

# print upper bound for destablising DF value
if Ih[0] <= 0: show(H[0](xi_2) <= Ih[0].upper())
if Ih[1] <= 0: show(H[1](xi_2) <= Ih[1].upper())
if Ih[2] <= 0: show(H[2](xi_2) <= Ih[2].upper())
if Ih[3] <= 0: show(H[3](xi_2) <= Ih[3].upper())
else:
print("Cannot determine stability")
# Note, that "not a > 0" does not imply "a <= 0" for intervals

$\displaystyle \frac{{\left({\left(2 \, \xi_{2}^{2} - 1\right)} e^{\left(2 \, \xi_{2}\right)} + 2 \, \xi_{2} + 1\right)} e^{\left(-\xi_{2}\right)}}{4 \, \xi_{2}^{3}} \geq 0.87460114755231644$
$\displaystyle \frac{{\left(48 \, \xi_{2}^{2} - {\left(5 \, \xi_{2}^{3} - 9 \, \xi_{2}^{2} - 12 \, \xi_{2}\right)} e^{\left(3 \, \xi_{2}\right)} - 6 \, {\left(10 \, \xi_{2}^{2} + 5 \, \xi_{2} + 1\right)} e^{\xi_{2}} + 24 \, \xi_{2} + 6\right)} e^{\left(-2 \, \xi_{2}\right)}}{24 \, \xi_{2}^{4}} \geq 0.92008662275004536$
$\displaystyle \frac{{\left({\left(2 \, \xi_{2}^{2} - 1\right)} e^{\left(2 \, \xi_{2}\right)} + 2 \, \xi_{2} + 1\right)} e^{\left(-\xi_{2}\right)}}{4 \, \xi_{2}^{3}} \geq 0.87460114755231644$
$\displaystyle \frac{{\left(48 \, \xi_{2}^{2} + {\left(19 \, \xi_{2}^{3} + 9 \, \xi_{2}^{2}\right)} e^{\left(3 \, \xi_{2}\right)} - 6 \, {\left(6 \, \xi_{2}^{2} + 3 \, \xi_{2} + 1\right)} e^{\xi_{2}} + 24 \, \xi_{2} + 6\right)} e^{\left(-2 \, \xi_{2}\right)}}{24 \, \xi_{2}^{4}} \geq 2.6692906048111306$
Threefold is stable!

#### No. 3.18

The combinatorial data is is given by $\Box= \text{conv} (\,(-3,0),(-2,1),(2,1),(3,0),(1,-2),(-1,-2) \, )$ and $\Phi_0(x,y) = \min \{0,\frac{-x-1}{2},-x\},\; \Phi_1(x,y)= \min \{ 0,y\} ,\; \Phi_\infty(x,y) = \frac{x-y-1}{2}$.

# We are working with interval arithmetic with precision of 60 bit
# this fixes the precision e.g. for evaluations of exponential functions
RIF=RealIntervalField(16)

# The base polytope
B=Polyhedron(vertices = [[-3,0],[-2,1],[2,1],[3,0],[1,-2],[-1,-2]])

# 3 PL functions on B. If phi is the minimum of affine functions of the form F(x,y) = a + b*x + c*y we represent phi as
# the transpose of the matrix with rows [a,b,c].

Phi1 = matrix(QQ,[[0,0,0],[-1/2,-1/2,0],[0,-1,0]]).transpose()
Phi2 = matrix(QQ,[[0,0,0],[0,0,1]]).transpose()
Phi3 = matrix(QQ,[[-1/2,1/2,-1/2]]).transpose();

PLfunctions = [Phi1,Phi2,Phi3]

# Form list of degeneration polyhedra
Polyhedra = degenerations(PLfunctions,B)

print "The combinatorial data"

graphic = B.plot().show(figsize=[3,3],title='Base Polytope B')

x,y = var('x,y')
r = vector([1,x,y])

for Phi in PLfunctions:
if Phi.transpose().nrows() > 1:
f(x,y) = min_symbolic(*list(r*Phi))
else:
f(x,y) = list(r*Phi)[0]
print ' '
show(f)

The combinatorial data
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -\frac{1}{2} \, x - \frac{1}{2}, -x\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, y\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \frac{1}{2} \, x - \frac{1}{2} \, y - \frac{1}{2}$

#### Step (i) -- obtain a closed form for $F_{X,\xi}$

For this note, that $\left(\begin{smallmatrix}-1 & 0\\ 0 & 1\end{smallmatrix}\right)$ is a symmetry of the combinatorial data. Hence, we have $\xi=(0,\xi_2)$. We have to analytically solve the integral $\int_\Box \langle u,v \rangle \deg \bar \Phi (u) e^{\langle u, \xi \rangle } du = \int_{\Delta_0} \langle u', (v,0) \rangle \cdot e^{\langle u', (\xi,0) \rangle} du'$ for $v$ varying over a basis of $N_\mathbb{R}$.

#Choose a sufficiently general value for lambda
Lambda = vector([1,3,13])

# Analytic solution of the integral
F1(xi_2) = intxexp(Polyhedra[0],Lambda,vector([0,xi_2,0]),vector([1,0,0])).simplify_full()
F2(xi_2) = intxexp(Polyhedra[0],Lambda,vector([0,xi_2,0]),vector([0,1,0])).simplify_full()

show(vector([F1,F2]))
latex(F2)

$\displaystyle \xi_{2} \ {\mapsto}\ \left(-\frac{{\left({\left(\xi_{2}^{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} - 2 \, \xi_{2} + 4 \, e^{\left(2 \, \xi_{2}\right)} - 2\right)} e^{\left(-2 \, \xi_{2}\right)}}{\xi_{2}^{3}},\,\frac{2 \, {\left({\left(\xi_{2}^{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} - 2 \, \xi_{2} + 4 \, e^{\left(2 \, \xi_{2}\right)} - 2\right)} e^{\left(-2 \, \xi_{2}\right)}}{\xi_{2}^{3}}\right)$
\xi_{2} \ {\mapsto}\ \frac{2 \, {\left({\left(\xi_{2}^{2} - 2\right)} e^{\left(3 \, \xi_{2}\right)} - 2 \, \xi_{2} + 4 \, e^{\left(2 \, \xi_{2}\right)} - 2\right)} e^{\left(-2 \, \xi_{2}\right)}}{\xi_{2}^{3}}

#### Step (ii) -- find an estimate for the soliton candidate vector field $\xi$.

# Choose upper and lower bound and
# hope that the exact solution lies in between
lower = 0.3796905
upper = 0.3797005

#define a real value xi_RIF between xi_1 and xi_2
# representing the exact solution.
xi_RIF = RIF(lower,upper)

# Check whether Intermediate value theorem guarantees a zero beween
# lower and upper, i.e evaluate F2 at lower and upper using interval arithmetic.
if RIF(F2(lower)) < 0 and RIF(F2(upper)) > 0:
print "Interval containing solution:", xi_RIF.str(style='brackets')

Interval containing solution: [0.379684 .. 0.379708]

#### Step (iii) & (iv) -- obtain closed forms for $\operatorname{DF}_\xi(X_{y,0,1})$ and plug in the estimate for $\xi$

For this we first have to symbolically solve the integrals
$h_y(\xi) := \text{vol}(\Delta_y) \cdot \operatorname{DF}_\xi(\mathcal{X}_{y,0,1})=\int_{\Delta_y} \langle u, (0,0,1) \, \rangle e^{\langle u, (\xi,0) \rangle } \; du$
for every (admissible) choice of $y \in \mathbb P^1$ and then plug in the estimate for $\xi$ into the resulting expression.

#storage for the functions h_y
H=[]
#storage for values h_y(xi) (as intervals)
Ih=[]

#Symbollically solving integrals using Barvinok method
for P in Polyhedra:
h(xi_2) = intxexp(P,Lambda,vector([0,xi_2,0]),vector([0,0,1])).simplify_full()
DF=RIF(h(xi_RIF))
H.append(h); Ih.append(DF)
show(h(xi_2) >= DF.lower())

if all([h > 0 for h in Ih]):
print("Threefold is stable!")
else:
if any([h <= 0 for h in Ih]):
print("Threefold is not stable!")

# print upper bound for destablising DF value
if Ih[0] <= 0: show(H[0](xi_2) <= Ih[0].upper())
if Ih[1] <= 0: show(H[1](xi_2) <= Ih[1].upper())
if Ih[2] <= 0: show(H[2](xi_2) <= Ih[2].upper())
if Ih[3] <= 0: show(H[3](xi_2) <= Ih[3].upper())
else:
print("Cannot determine stability")
# Note, that "not a > 0" does not imply "a <= 0" for intervals
for i in range(4):
latex(H[i])
print "next"

$\displaystyle \frac{{\left(3 \, \xi_{2}^{2} + 2 \, {\left(\xi_{2}^{3} - 3 \, \xi_{2} - 3\right)} e^{\left(3 \, \xi_{2}\right)} + 6 \, {\left(3 \, \xi_{2}^{2} + 2\right)} e^{\left(2 \, \xi_{2}\right)} - 6\right)} e^{\left(-2 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}} \geq 0.3681$
$\displaystyle -\frac{{\left(12 \, \xi_{2}^{2} - {\left(14 \, \xi_{2}^{3} + 15 \, \xi_{2}^{2} - 6\right)} e^{\left(3 \, \xi_{2}\right)} + 24 \, {\left(3 \, \xi_{2}^{2} - 3 \, \xi_{2} + 1\right)} e^{\left(2 \, \xi_{2}\right)} + 6 \, \xi_{2} - 30\right)} e^{\left(-2 \, \xi_{2}\right)}}{12 \, \xi_{2}^{4}} \geq 2.516$
$\displaystyle \frac{{\left(9 \, \xi_{2}^{2} - 2 \, {\left(\xi_{2}^{3} - 3 \, \xi_{2} - 3\right)} e^{\left(3 \, \xi_{2}\right)} + 6 \, {\left(\xi_{2}^{2} - 6 \, \xi_{2} + 1\right)} e^{\left(2 \, \xi_{2}\right)} - 12\right)} e^{\left(-2 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}} \geq 1.013$
$\displaystyle \frac{{\left(12 \, \xi_{2}^{2} + {\left(14 \, \xi_{2}^{3} + 15 \, \xi_{2}^{2} - 6\right)} e^{\left(3 \, \xi_{2}\right)} - 12 \, {\left(2 \, \xi_{2}^{2} - 1\right)} e^{\left(2 \, \xi_{2}\right)} - 6 \, \xi_{2} - 6\right)} e^{\left(-2 \, \xi_{2}\right)}}{12 \, \xi_{2}^{4}} \geq 3.946$
Threefold is stable! \xi_{2} \ {\mapsto}\ \frac{{\left(3 \, \xi_{2}^{2} + 2 \, {\left(\xi_{2}^{3} - 3 \, \xi_{2} - 3\right)} e^{\left(3 \, \xi_{2}\right)} + 6 \, {\left(3 \, \xi_{2}^{2} + 2\right)} e^{\left(2 \, \xi_{2}\right)} - 6\right)} e^{\left(-2 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ -\frac{{\left(12 \, \xi_{2}^{2} - {\left(14 \, \xi_{2}^{3} + 15 \, \xi_{2}^{2} - 6\right)} e^{\left(3 \, \xi_{2}\right)} + 24 \, {\left(3 \, \xi_{2}^{2} - 3 \, \xi_{2} + 1\right)} e^{\left(2 \, \xi_{2}\right)} + 6 \, \xi_{2} - 30\right)} e^{\left(-2 \, \xi_{2}\right)}}{12 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ \frac{{\left(9 \, \xi_{2}^{2} - 2 \, {\left(\xi_{2}^{3} - 3 \, \xi_{2} - 3\right)} e^{\left(3 \, \xi_{2}\right)} + 6 \, {\left(\xi_{2}^{2} - 6 \, \xi_{2} + 1\right)} e^{\left(2 \, \xi_{2}\right)} - 12\right)} e^{\left(-2 \, \xi_{2}\right)}}{6 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ \frac{{\left(12 \, \xi_{2}^{2} + {\left(14 \, \xi_{2}^{3} + 15 \, \xi_{2}^{2} - 6\right)} e^{\left(3 \, \xi_{2}\right)} - 12 \, {\left(2 \, \xi_{2}^{2} - 1\right)} e^{\left(2 \, \xi_{2}\right)} - 6 \, \xi_{2} - 6\right)} e^{\left(-2 \, \xi_{2}\right)}}{12 \, \xi_{2}^{4}} next

#### No. 3.21

The combinatorial data is is given by $\Box= \text{conv} (\,(-2,1),(-3,3),(-1,3),(1,-2),(3,-3),(3,-1) \, )$ and $\Phi_0(x,y) = \min \{0,\frac{-x-1}{2}\},\; \Phi_1(x,y)= \min \{0,\frac{-y-1}{2}\} ,\; \Phi_\infty(x,y) = \min \{0,x+y\}$.

# We are working with interval arithmetic with precision of 60 bit
# this fixes the precision e.g. for evaluations of exponential functions
RIF=RealIntervalField(16)

# The base polytope
B=Polyhedron(vertices = [[-2,1],[-3,3],[-1,3],[1,-2],[3,-3],[3,-1]])

# 3 PL functions on B. If phi is the minimum of affine functions of the form F(x,y) = a + b*x + c*y we represent phi as
# the transpose of the matrix with rows [a,b,c].

Phi1 = matrix(QQ,[[0,0,0],[-1/2,-1/2,0]]).transpose()
Phi2 = matrix(QQ,[[0,0,0],[-1/2,0,-1/2]]).transpose()
Phi3 = matrix(QQ,[[0,0,0],[0,1,1]]).transpose()

PLfunctions = [Phi1,Phi2,Phi3]

# Form list of degeneration polyhedra
Polyhedra = degenerations(PLfunctions,B)

print "The combinatorial data"

graphic = B.plot().show(figsize=[3,3],title='Base Polytope B')

x,y = var('x,y')
r = vector([1,x,y])

for Phi in PLfunctions:
if Phi.transpose().nrows() > 1:
f(x,y) = min_symbolic(*list(r*Phi))
else:
f(x,y) = list(r*Phi)[0]
print ' '
show(f)

The combinatorial data
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -\frac{1}{2} \, x - \frac{1}{2}\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -\frac{1}{2} \, y - \frac{1}{2}\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, x + y\right)$

#### Step (i) -- obtain a closed form for $F_{X,\xi}$

For this note, that $\left(\begin{smallmatrix} 0 & 1\\ 1 & 0\end{smallmatrix}\right)$ is a symmetry of the combinatorial data. Hence we have $\xi=(\xi_1,\xi_1)$. We have to analytically solve the integral $\int_\Box \langle u,v \rangle \deg \bar \Phi (u) e^{\langle u, \xi \rangle } du = \int_{\Delta_0} \langle u', (v,0) \rangle \cdot e^{\langle u', (\xi,0) \rangle} du'$ for $v$ varying over a basis of $N_\mathbb{R}$.

#Choose a sufficiently general value for Lambda
Lambda = vector([1,3,13])

# Analytic solution of the integral
F1(xi_1) = intxexp(Polyhedra[0],Lambda,vector([xi_1,xi_1,0]),vector([1,-1,0])).simplify_full()
F2(xi_1) = intxexp(Polyhedra[0],Lambda,vector([xi_1,xi_1,0]),vector([1,1,0])).simplify_full()

show(vector([F1,F2]))
latex(F2)

$\displaystyle \xi_{1} \ {\mapsto}\ \left(0,\,\frac{{\left(\xi_{1}^{3} - \xi_{1}^{2} + 4 \, {\left(\xi_{1}^{2} - \xi_{1}\right)} e^{\left(3 \, \xi_{1}\right)} + 6 \, {\left(2 \, \xi_{1} - 1\right)} e^{\xi_{1}} - 2 \, \xi_{1} + 6\right)} e^{\left(-\xi_{1}\right)}}{\xi_{1}^{4}}\right)$
\xi_{1} \ {\mapsto}\ \frac{{\left(\xi_{1}^{3} - \xi_{1}^{2} + 4 \, {\left(\xi_{1}^{2} - \xi_{1}\right)} e^{\left(3 \, \xi_{1}\right)} + 6 \, {\left(2 \, \xi_{1} - 1\right)} e^{\xi_{1}} - 2 \, \xi_{1} + 6\right)} e^{\left(-\xi_{1}\right)}}{\xi_{1}^{4}}

#### Step (ii) -- find an estimate for the soliton candidate vector field $\xi$.

# Choose upper and lower bound and
# hope that the exact solution lies in between
find_root(F2,-10,10)
lower = -0.69631193
upper = -0.69621193

#define a real value xi_RIF between xi_1 and xi_2
# representing the exact solution.
xi_RIF = RIF(lower,upper)

# Check whether Intermediate value theorem guarantees a zero beween
# lower and upper, i.e evaluate F2 at lower and upper using interval arithmetic.
if RIF(F2(lower)) < 0 and RIF(F2(upper)) > 0:
print "Interval containing solution:", xi_RIF.str(style='brackets')

-0.6962119314891655 Interval containing solution: [-0.696320 .. -0.696197]

#### Step (iii) & (iv) -- obtain closed forms for $\operatorname{DF}_\xi(X_{y,0,1})$ and plug in the estimate for $\xi$

For this we first have to symbolically solve the integrals
$h_y(\xi) := \text{vol}(\Delta_y) \cdot \operatorname{DF}_\xi(\mathcal{X}_{y,0,1})=\int_{\Delta_y} \langle u, (0,0,1) \, \rangle e^{\langle u, (\xi,0) \rangle } \; du$
for every choice of $y \in \mathbb P^1$ and then plug in the estimate for $\xi$ into the resulting expression.

#storage for the functions h_y
H=[]
#storage for values h_y(xi) (as intervals)
Ih=[]

#Symbollically solving integrals using Barvinok method
for P in Polyhedra:
h(xi_2) = intxexp(P,Lambda,vector([xi_2,xi_2,0]),vector([0,0,1])).simplify_full()
DF=RIF(h(xi_RIF))
H.append(h); Ih.append(DF)
show(h(xi_2) >= DF.lower())

if all([h > 0 for h in Ih]):
print("Threefold is stable!")
else:
if any([h <= 0 for h in Ih]):
print("Threefold is not stable!")

# print upper bound for destablising DF value
if Ih[0] <= 0: show(H[0](xi_2) <= Ih[0].upper())
if Ih[1] <= 0: show(H[1](xi_2) <= Ih[1].upper())
if Ih[2] <= 0: show(H[2](xi_2) <= Ih[2].upper())
if Ih[3] <= 0: show(H[3](xi_2) <= Ih[3].upper())
else:
print("Cannot determine stability")
# Note, that "not a > 0" does not imply "a <= 0" for intervals
for i in range(4):
latex(H[i])
print "next"

$\displaystyle -\frac{{\left(\xi_{2}^{3} - \xi_{2}^{2} - 2 \, {\left(2 \, \xi_{2}^{2} - 4 \, \xi_{2} + 3\right)} e^{\xi_{2}} - 2 \, \xi_{2} + 6\right)} e^{\left(-\xi_{2}\right)}}{2 \, \xi_{2}^{4}} \geq 0.6917$
$\displaystyle -\frac{{\left(\xi_{2}^{3} - \xi_{2}^{2} - 2 \, {\left(2 \, \xi_{2}^{2} - 4 \, \xi_{2} + 3\right)} e^{\xi_{2}} - 2 \, \xi_{2} + 6\right)} e^{\left(-\xi_{2}\right)}}{2 \, \xi_{2}^{4}} \geq 0.6917$
$\displaystyle \frac{{\left(5 \, \xi_{2}^{3} + 9 \, \xi_{2}^{2} + 6 \, {\left(8 \, \xi_{2}^{2} - 4 \, \xi_{2} + 1\right)} e^{\left(3 \, \xi_{2}\right)} - 24 \, {\left(6 \, \xi_{2}^{2} - 8 \, \xi_{2} + 5\right)} e^{\xi_{2}} - 66 \, \xi_{2} + 114\right)} e^{\left(-\xi_{2}\right)}}{24 \, \xi_{2}^{4}} \geq 2.504$
$\displaystyle -\frac{{\left(19 \, \xi_{2}^{3} - 33 \, \xi_{2}^{2} - 6 \, {\left(8 \, \xi_{2}^{2} - 4 \, \xi_{2} + 1\right)} e^{\left(3 \, \xi_{2}\right)} + 24 \, {\left(2 \, \xi_{2}^{2} - 1\right)} e^{\xi_{2}} + 18 \, \xi_{2} + 30\right)} e^{\left(-\xi_{2}\right)}}{24 \, \xi_{2}^{4}} \geq 3.907$
Threefold is stable! \xi_{2} \ {\mapsto}\ -\frac{{\left(\xi_{2}^{3} - \xi_{2}^{2} - 2 \, {\left(2 \, \xi_{2}^{2} - 4 \, \xi_{2} + 3\right)} e^{\xi_{2}} - 2 \, \xi_{2} + 6\right)} e^{\left(-\xi_{2}\right)}}{2 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ -\frac{{\left(\xi_{2}^{3} - \xi_{2}^{2} - 2 \, {\left(2 \, \xi_{2}^{2} - 4 \, \xi_{2} + 3\right)} e^{\xi_{2}} - 2 \, \xi_{2} + 6\right)} e^{\left(-\xi_{2}\right)}}{2 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ \frac{{\left(5 \, \xi_{2}^{3} + 9 \, \xi_{2}^{2} + 6 \, {\left(8 \, \xi_{2}^{2} - 4 \, \xi_{2} + 1\right)} e^{\left(3 \, \xi_{2}\right)} - 24 \, {\left(6 \, \xi_{2}^{2} - 8 \, \xi_{2} + 5\right)} e^{\xi_{2}} - 66 \, \xi_{2} + 114\right)} e^{\left(-\xi_{2}\right)}}{24 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ -\frac{{\left(19 \, \xi_{2}^{3} - 33 \, \xi_{2}^{2} - 6 \, {\left(8 \, \xi_{2}^{2} - 4 \, \xi_{2} + 1\right)} e^{\left(3 \, \xi_{2}\right)} + 24 \, {\left(2 \, \xi_{2}^{2} - 1\right)} e^{\xi_{2}} + 18 \, \xi_{2} + 30\right)} e^{\left(-\xi_{2}\right)}}{24 \, \xi_{2}^{4}} next

#### No. 3.22

The combinatorial data is is given by $\Box= \text{conv} (\,(-3,-1),(-3,0),(-1,1),(1,1),(3,0),(3,-1) \, )$ and $\Phi_0(x,y) = \min \{0,-x\},\; \Phi_1(x,y)= \min \{0,-y\} ,\; \Phi_\infty(x,y) = \frac{x-1}{2}$.

# We are working with interval arithmetic with precision of 60 bit
# this fixes the precision e.g. for evaluations of exponential functions
RIF=RealIntervalField(16)

# The base polytope
B=Polyhedron(vertices = [[-3,-1],[-3,0],[-1,1],[1,1],[3,0],[3,-1]])

# 3 PL functions on B. If phi is the minimum of affine functions of the form F(x,y) = a + b*x + c*y we represent phi as
# the transpose of the matrix with rows [a,b,c].

Phi1 = matrix(QQ,[[0,0,0],[0,-1,0]]).transpose()
Phi2 = matrix(QQ,[[0,0,0],[0,0,-1]]).transpose()
Phi3 = matrix(QQ,[[-1/2,1/2,0]]).transpose()

PLfunctions = [Phi1,Phi2,Phi3]

# Form list of degeneration polyhedra
Polyhedra = degenerations(PLfunctions,B)

print "The combinatorial data"

graphic = B.plot().show(figsize=[3,3],title='Base Polytope B')

x,y = var('x,y')
r = vector([1,x,y])

for Phi in PLfunctions:
if Phi.transpose().nrows() > 1:
f(x,y) = min_symbolic(*list(r*Phi))
else:
f(x,y) = list(r*Phi)[0]
print ' '
show(f)

The combinatorial data
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -x\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -y\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \frac{1}{2} \, x - \frac{1}{2}$

#### Step (i) -- obtain a closed form for $F_{X,\xi}$

For this note, that $\left(\begin{smallmatrix}-1 & 0\\ 0 & 1\end{smallmatrix}\right)$ is a symmetry of the combinatorial data. Hence, we have $\xi=(0,\xi_2)$. We have to analytically solve the integral $\int_\Box \langle u,v \rangle \deg \bar \Phi (u) e^{\langle u, \xi \rangle } du = \int_{\Delta_0} \langle u', (v,0) \rangle \cdot e^{\langle u', (\xi,0) \rangle} du'$ for $v$ varying over a basis of $N_\mathbb{R}$.

#Choose a sufficiently general value for lambda
Lambda = vector([1,5,13])

# Analytic solution of the integral
F1(xi_2) = intxexp(Polyhedra[0],Lambda,vector([0,xi_2,0]),vector([1,0,0])).simplify_full()
F2(xi_2) = intxexp(Polyhedra[0],Lambda,vector([0,xi_2,0]),vector([0,1,0])).simplify_full()

show(vector([F1,F2]))
latex(F2)

$\displaystyle \xi_{2} \ {\mapsto}\ \left(0,\,\frac{{\left(9 \, \xi_{2}^{3} + 9 \, \xi_{2}^{2} + {\left(\xi_{2}^{3} + 3 \, \xi_{2}^{2} - 24\right)} e^{\left(2 \, \xi_{2}\right)} + 24 \, {\left(\xi_{2} + 1\right)} e^{\xi_{2}}\right)} e^{\left(-\xi_{2}\right)}}{2 \, \xi_{2}^{4}}\right)$
\xi_{2} \ {\mapsto}\ \frac{{\left(9 \, \xi_{2}^{3} + 9 \, \xi_{2}^{2} + {\left(\xi_{2}^{3} + 3 \, \xi_{2}^{2} - 24\right)} e^{\left(2 \, \xi_{2}\right)} + 24 \, {\left(\xi_{2} + 1\right)} e^{\xi_{2}}\right)} e^{\left(-\xi_{2}\right)}}{2 \, \xi_{2}^{4}}

#### Step (ii) -- find an estimate for the soliton candidate vector field $\xi$.

# Choose upper and lower bound and
# hope that the exact solution lies in between
find_root(F2,-10,10)
lower = 0.9147877
upper = 0.9147977

#define a real value xi_RIF between xi_1 and xi_2
# representing the exact solution.
xi_RIF = RIF(lower,upper)

# Check whether Intermediate value theorem guarantees a zero beween
# lower and upper, i.e evaluate F2 at lower and upper using interval arithmetic.
if RIF(F2(lower)) < 0 and RIF(F2(upper)) > 0:
print "Interval containing solution:", xi_RIF.str(style='brackets')

0.9147877132620504 Interval containing solution: [0.914779 .. 0.914811]

#### Step (iii) & (iv) -- obtain closed forms for $\operatorname{DF}_\xi(X_{y,0,1})$ and plug in the estimate for $\xi$

For this we first have to symbolically solve the integrals
$h_y(\xi) := \text{vol}(\Delta_y) \cdot \operatorname{DF}_\xi(\mathcal{X}_{y,0,1})=\int_{\Delta_y} \langle u, (0,0,1) \, \rangle e^{\langle u, (\xi,0) \rangle } \; du$
for every choice of $y \in \mathbb P^1$ and then plug in the estimate for $\xi$ into the resulting expression.

#storage for the functions h_y
H=[]
#storage for values h_y(xi) (as intervals)
Ih=[]

#Symbollically solving integrals using Barvinok method
for P in Polyhedra:
h(xi_2) = intxexp(P,Lambda,vector([0,xi_2,0]),vector([0,0,1])).simplify_full()
DF=RIF(h(xi_RIF))
H.append(h); Ih.append(DF)
show(h(xi_2) >= DF.lower())

if all([h > 0 for h in Ih]):
print("Threefold is stable!")
else:
if any([h <= 0 for h in Ih]):
print("Threefold is not stable!")

# print upper bound for destablising DF value
if Ih[0] <= 0: show(H[0](xi_2) <= Ih[0].upper())
if Ih[1] <= 0: show(H[1](xi_2) <= Ih[1].upper())
if Ih[2] <= 0: show(H[2](xi_2) <= Ih[2].upper())
if Ih[3] <= 0: show(H[3](xi_2) <= Ih[3].upper())
else:
print("Cannot determine stability")
# Note, that "not a > 0" does not imply "a <= 0" for intervals
for i in range(4):
latex(H[i])
print "next"

$\displaystyle \frac{9 \, \xi_{2}^{2} + {\left(\xi_{2}^{3} + 3 \, \xi_{2}^{2} - 24\right)} e^{\xi_{2}} + 24 \, \xi_{2} + 24}{3 \, \xi_{2}^{4}} \geq 0.8323$
$\displaystyle -\frac{{\left(27 \, \xi_{2}^{3} + {\left(\xi_{2}^{3} - 24 \, \xi_{2} - 96\right)} e^{\left(2 \, \xi_{2}\right)} + 24 \, {\left(3 \, \xi_{2}^{2} + 5 \, \xi_{2} + 4\right)} e^{\xi_{2}}\right)} e^{\left(-\xi_{2}\right)}}{12 \, \xi_{2}^{4}} \geq 2.164$
$\displaystyle \frac{9 \, \xi_{2}^{2} + {\left(\xi_{2}^{3} + 3 \, \xi_{2}^{2} - 24\right)} e^{\xi_{2}} + 24 \, \xi_{2} + 24}{6 \, \xi_{2}^{4}} \geq 0.4161$
$\displaystyle -\frac{{\left(27 \, \xi_{2}^{3} - {\left(5 \, \xi_{2}^{3} + 18 \, \xi_{2}^{2} + 24 \, \xi_{2} - 48\right)} e^{\left(2 \, \xi_{2}\right)} + 6 \, {\left(3 \, \xi_{2}^{2} - 4 \, \xi_{2} - 8\right)} e^{\xi_{2}}\right)} e^{\left(-\xi_{2}\right)}}{12 \, \xi_{2}^{4}} \geq 3.419$
Threefold is stable! \xi_{2} \ {\mapsto}\ \frac{9 \, \xi_{2}^{2} + {\left(\xi_{2}^{3} + 3 \, \xi_{2}^{2} - 24\right)} e^{\xi_{2}} + 24 \, \xi_{2} + 24}{3 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ -\frac{{\left(27 \, \xi_{2}^{3} + {\left(\xi_{2}^{3} - 24 \, \xi_{2} - 96\right)} e^{\left(2 \, \xi_{2}\right)} + 24 \, {\left(3 \, \xi_{2}^{2} + 5 \, \xi_{2} + 4\right)} e^{\xi_{2}}\right)} e^{\left(-\xi_{2}\right)}}{12 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ \frac{9 \, \xi_{2}^{2} + {\left(\xi_{2}^{3} + 3 \, \xi_{2}^{2} - 24\right)} e^{\xi_{2}} + 24 \, \xi_{2} + 24}{6 \, \xi_{2}^{4}} next \xi_{2} \ {\mapsto}\ -\frac{{\left(27 \, \xi_{2}^{3} - {\left(5 \, \xi_{2}^{3} + 18 \, \xi_{2}^{2} + 24 \, \xi_{2} - 48\right)} e^{\left(2 \, \xi_{2}\right)} + 6 \, {\left(3 \, \xi_{2}^{2} - 4 \, \xi_{2} - 8\right)} e^{\xi_{2}}\right)} e^{\left(-\xi_{2}\right)}}{12 \, \xi_{2}^{4}} next

#### No. 3.23

The combinatorial data is is given by $\Box= \text{conv} (\, (-3,0),(-2,1),(1,1),(2,0),(2,-1), (0,-3)\, )$ and $\Phi_0(x,y) = \min \{0,-x\},\; \Phi_1(x,y)= \min \{0,y\},\; \Phi_\infty(x,y) = \min \{-y, \frac{x-y-1}{2} \}$.

# We are working with interval arithmetic with precision of 40 bit
# this fixes the precision e.g. for evaluations of exponential functions
RIF=RealIntervalField(40)

# The base polytope
B=Polyhedron(vertices = [[-3,0],[-2,1],[1,1],[2,0],[2,-1],[0,-3]])

# 3 PL functions on B. If phi is the minimum of affine functions of the form F(x,y) = a + b*x + c*y we represent phi as
# the transpose of the matrix with rows [a,b,c].

Phi1 = matrix(QQ,[[0,0,0],[0,-1,0]]).transpose()
Phi2 = matrix(QQ,[[0,0,0],[0,0,1]]).transpose()
Phi3 = matrix(QQ,[[-1/2,1/2,-1/2],[0,0,-1]]).transpose()

PLfunctions = [Phi1,Phi2,Phi3]

# Form list of degeneration polyhedra
Polyhedra = degenerations(PLfunctions,B)

print "The combinatorial data"

graphic = B.plot().show(figsize=[3,3],title='Base Polytope B')

x,y = var('x,y')
r = vector([1,x,y])

for Phi in PLfunctions:
if Phi.transpose().nrows() > 1:
f(x,y) = min_symbolic(*list(r*Phi))
else:
f(x,y) = list(r*Phi)[0]
print ' '
show(f)

The combinatorial data
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, -x\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(0, y\right)$
$\displaystyle \left( x, y \right) \ {\mapsto} \ \min\left(\frac{1}{2} \, x - \frac{1}{2} \, y - \frac{1}{2}, -y\right)$

#### Step (i) -- obtain a closed form for $F_{X,\xi}$

For this we have to analytically solve the integral $\int_\Box \langle u,v \rangle \deg \bar \Phi (u) e^{\langle u, \xi \rangle } du = \int_{\Delta_0} \langle u', (v,0) \rangle \cdot e^{\langle u', (\xi,0) \rangle} du'$ for $v$ varying over a basis of $N_\mathbb{R}$.

#Choose a sufficiently general value for Lambda
Lambda = vector([3,13,19])

# The integral can be solved symbolically:
F1(xi_1,xi_2) = intxexp(Polyhedra[1],Lambda,vector([xi_1,xi_2,0]),vector([1,0,0])).simplify_full()
F2(xi_1,xi_2) = intxexp(Polyhedra[1],Lambda,vector([xi_1,xi_2,0]),vector([0,1,0])).simplify_full()

show(F1)
show(F2)
latex(F1)
latex(F2)

$\displaystyle \left( \xi_{1}, \xi_{2} \right) \ {\mapsto} \ -\frac{{\left(4 \, \xi_{1}^{4} e^{\left(3 \, \xi_{1}\right)} - {\left(2 \, {\left({\left(\xi_{1} - 2\right)} e^{\left(4 \, \xi_{1}\right)} - {\left(\xi_{1} + 1\right)} e^{\xi_{1}} + 3 \, e^{\left(3 \, \xi_{1}\right)}\right)} \xi_{2}^{4} + 4 \, \xi_{1}^{4} e^{\left(3 \, \xi_{1}\right)} + {\left(2 \, {\left(\xi_{1}^{2} - \xi_{1}\right)} e^{\left(4 \, \xi_{1}\right)} + \xi_{1} e^{\left(3 \, \xi_{1}\right)} + {\left(2 \, \xi_{1}^{2} + \xi_{1}\right)} e^{\xi_{1}}\right)} \xi_{2}^{3} - 2 \, {\left(6 \, \xi_{1}^{2} e^{\left(3 \, \xi_{1}\right)} + {\left(\xi_{1}^{3} - 4 \, \xi_{1}^{2}\right)} e^{\left(4 \, \xi_{1}\right)} - {\left(\xi_{1}^{3} + 2 \, \xi_{1}^{2}\right)} e^{\xi_{1}}\right)} \xi_{2}^{2} - {\left(3 \, \xi_{1}^{3} e^{\left(3 \, \xi_{1}\right)} + 2 \, {\left(\xi_{1}^{4} - 3 \, \xi_{1}^{3}\right)} e^{\left(4 \, \xi_{1}\right)} + {\left(2 \, \xi_{1}^{4} + 3 \, \xi_{1}^{3}\right)} e^{\xi_{1}}\right)} \xi_{2}\right)} e^{\left(4 \, \xi_{2}\right)} + 2 \, {\left(2 \, \xi_{1}^{3} \xi_{2}^{2} e^{\left(5 \, \xi_{1}\right)} + {\left(3 \, \xi_{1}^{2} + {\left(2 \, \xi_{1}^{2} - \xi_{1}\right)} e^{\left(5 \, \xi_{1}\right)} + \xi_{1}\right)} \xi_{2}^{3} - {\left(3 \, \xi_{1}^{4} + 3 \, \xi_{1}^{3} + {\left(2 \, \xi_{1}^{4} - 3 \, \xi_{1}^{3}\right)} e^{\left(5 \, \xi_{1}\right)}\right)} \xi_{2} - 2 \, {\left(\xi_{1}^{5} - \xi_{1}^{4}\right)} e^{\left(5 \, \xi_{1}\right)}\right)} e^{\left(3 \, \xi_{2}\right)} - 4 \, {\left(\xi_{1}^{3} \xi_{2}^{2} e^{\left(5 \, \xi_{1}\right)} - {\left(\xi_{1}^{5} - \xi_{1}^{4}\right)} e^{\left(5 \, \xi_{1}\right)}\right)} e^{\left(2 \, \xi_{2}\right)}\right)} e^{\left(-3 \, \xi_{2}\right)}}{2 \, {\left(\xi_{1}^{7} \xi_{2} e^{\left(3 \, \xi_{1}\right)} - 2 \, \xi_{1}^{5} \xi_{2}^{3} e^{\left(3 \, \xi_{1}\right)} + \xi_{1}^{3} \xi_{2}^{5} e^{\left(3 \, \xi_{1}\right)}\right)}}$