Example: an expression whose sign cannot be seen#

Richardson’s theorem says that there is no algorithm deciding whether an expression is negative somewhere. What does this look like in a concrete example? We take the machine from the proof (The complete proof, step by step, §2–§5) and feed it the equation

\[ x_1^3+x_2^3+x_3^3=a \qquad (x_1,x_2,x_3\in\mathbb Z). \]

For each number \(a\) the machine produces an explicit expression \(A_a(t)\) in one variable, built solely from integers, \(\pi\), \(t\), the operations \(+,-,\cdot\) and the sine. We ask: is \(A_a(t)\ge0\) for all \(t\)? — for four values: \(a=3,\ 4,\ 42,\ 114\).

Numerics gives the same answer in all four cases. The truth, however, varies:

  • \(a=4\): yes, \(A_4>0\) everywhere — the proof takes three lines of number theory;

  • \(a=3\): no — but the place where \(A_3<0\) lies around \(t\approx10^{13}\), and \(t\) has to be given to about a hundred digits;

  • \(a=42\): no — this has been known only since 2019, and a suitable \(t\) has about 2770 significant digits;

  • \(a=114\): nobody knows.

import random
import signal
import time
from itertools import product
import numpy as np
import sympy as sp
import mpmath as mp
import matplotlib.pyplot as plt

1. The expression \(A_a(t)\)#

We follow the proof exactly, with one change: the unknowns are integers (of either sign), not natural numbers.

  • Equation: \(P_a(\mathbf x)=x_1^3+x_2^3+x_3^3-a\), \(n=3\) unknowns.

  • Weights (Definition 2.4): \(k_i=M_{\partial Q/\partial x_i}\) for \(Q=P_a^2\). Since \(\partial Q/\partial x_i=6x_i^2P_a\), Lemma 2.1 gives

    \[ k_i(\mathbf x)=38\,(x_i^2+2)^2\,M_a(\mathbf x),\qquad M_a(\mathbf x)=\sum_{j=1}^3(x_j^2+2)^3+a^2+2 . \]
  • Penalty (Definition 3.2): \(f_a(\mathbf x)=4^4\bigl[P_a(\mathbf x)^2+\sum_{i=1}^3\sin^2(\pi x_i)\,k_i(\mathbf x)^4\bigr]\).

  • Curve (Definition 4.3): \(\Gamma_3(t)=\bigl(h(t),\,h(g(t)),\,g(g(t))\bigr)\), where \(h(t)=t\sin t\), \(g(t)=t\sin t^3\).

  • Result (Definition 5.2): \(G_a(t)=f_a\bigl(\Gamma_3(t)\bigr)\) and \(A_a(t)=G_a(t)-1\).

Written out: for \(s=t\sin t^3\) and \(u_1=t\sin t\), \(u_2=s\sin s\), \(u_3=s\sin s^3\),

\[ A_a(t)=256\Bigl[\bigl(u_1^3+u_2^3+u_3^3-a\bigr)^2 +\sum_{i=1}^3\sin^2(\pi u_i)\,\bigl(38\,(u_i^2+2)^2M\bigr)^4\Bigr]-1, \]

where \(M=\sum_{j=1}^3(u_j^2+2)^3+a^2+2\).

Proposition P.1 (Theorem 5.3 for integer unknowns)

Let \(a\in\mathbb Z\).

  1. If \(a=m_1^3+m_2^3+m_3^3\) for some \(m_i\in\mathbb Z\), then for every \(\varepsilon>0\) and \(M\ge0\) there is \(t>M\) with \(A_a(t)<-1+\varepsilon\); in particular, \(A_a(t)<0\) for some \(t\).

  2. If there are no such \(m_i\), then \(A_a(t)>0\) for every \(t\in\mathbb R\).

Proof. The proof of Theorem 3.4 carries over word for word: in Step 2 we round \(x_i\) to the nearest integer (of either sign), and in Step 4 the number \(P_a(\mathbf m)\) is an integer because \(P_a\) has integer coefficients. We get \(f_a(\mathbf x)>1\) for all \(\mathbf x\in\mathbb R^3\) when there are no solutions — so the squares from Corollary 3.7 are not needed. When \(P_a(\mathbf m)=0\), we have \(f_a(\mathbf m)=0\), and the density of the curve (Theorem 4.4) and the continuity of \(f_a\) give points \(t>M\) with \(G_a(t)<\varepsilon\) — as in the proof of Theorem 5.3. \(\blacksquare\)

Let us check that the weights really are the majorants from Lemma 2.1 (the same function majoranta as in §2 of the proof):

def majoranta(e):
    """Majoranta lokalna M_e (Lemat 2.1), rekurencyjnie po drzewie wyrażenia."""
    if e.is_number or e.is_Symbol:
        return e**2 + 2
    if e.is_Add:
        return sp.Add(*[majoranta(c) for c in e.args])
    if e.is_Mul:
        return sp.Mul(*[majoranta(c) for c in e.args])
    if e.is_Pow and e.exp.is_Integer and e.exp > 0:
        return majoranta(e.base) ** e.exp
    if isinstance(e, sp.exp):
        return sp.exp(majoranta(e.args[0]))
    if isinstance(e, (sp.sin, sp.cos)):
        return sp.Integer(2)
    raise ValueError(f"węzeł spoza języka: {e.func}")

x = sp.symbols('x1:4')
for a in (3, 4, 42, 114):
    P = sum(xi**3 for xi in x) - a
    M = sum((xi**2 + 2)**3 for xi in x) + a**2 + 2
    for xi in x:
        assert sp.expand(majoranta(sp.diff(P**2, xi)) - 38 * (xi**2 + 2)**2 * M) == 0
print("wagi k_i = 38 (x_i² + 2)² M_a zgadzają się z Lematem 2.1 (a = 3, 4, 42, 114)")
wagi k_i = 38 (x_i² + 2)² M_a zgadzają się z Lematem 2.1 (a = 3, 4, 42, 114)

The weights agree with Lemma 2.1 identically (the comparison after expansion is symbolic, not numerical). Now let us build the whole expression \(A_a(t)\) in SymPy and check that it indeed contains only integers, \(\pi\), \(t\), arithmetic operations and the sine:

t = sp.Symbol('t', real=True)

def A_symb(a):
    """A_a(t) = f_a(Γ_3(t)) - 1 jako wyrażenie SymPy."""
    s = t * sp.sin(t**3)                                    # s = g(t)
    u = (t * sp.sin(t), s * sp.sin(s), s * sp.sin(s**3))    # Γ_3(t)
    P = sum(ui**3 for ui in u) - a
    M = sum((ui**2 + 2)**3 for ui in u) + a**2 + 2
    k = [38 * (ui**2 + 2)**2 * M for ui in u]
    kara = sum(sp.sin(sp.pi * ui)**2 * ki**4 for ui, ki in zip(u, k))
    return 256 * (P**2 + kara) - 1

A42 = A_symb(42)
print("funkcje w A_42:", {f.func for f in A42.atoms(sp.Function)})
print("liczba operacji w drzewie A_42:", sp.count_ops(A42))
funkcje w A_42: {sin}
liczba operacji w drzewie A_42: 223

The only function in the tree is the sine, and the function count_ops counted \(223\) operations in it — the expression is large, but completely explicit. For the computations we use the same formula written out directly — once for ordinary numbers (ctx=mp), once for intervals (ctx=mp.iv):

def G(t, a, ctx=mp):
    """G_a(t) = f_a(Γ_3(t)); ctx = mp (liczby) albo mp.iv (przedziały)."""
    sin, pi = ctx.sin, ctx.pi
    s = t * sin(t**3)
    u = (t * sin(t), s * sin(s), s * sin(s**3))
    P = u[0]**3 + u[1]**3 + u[2]**3 - a
    M = sum((ui**2 + 2)**3 for ui in u) + a**2 + 2
    k = [38 * (ui**2 + 2)**2 * M for ui in u]
    return 256 * (P**2 + sum(sin(pi * ui)**2 * ki**4 for ui, ki in zip(u, k)))

def A(t, a):
    return G(t, a) - 1

# zgodność z wyrażeniem SymPy w kilku punktach
mp.mp.dps = 50
F42 = sp.lambdify(t, A42, 'mpmath')
for v in ('0.7', '2.5', '13.1'):
    blad = abs(F42(mp.mpf(v)) / A(mp.mpf(v), 42) - 1)
    print(f"t = {v}: błąd względny {mp.nstr(blad, 3)}")
t = 0.7: błąd względny 8.02e-51
t = 2.5: błąd względny 9.35e-51
t = 13.1: błąd względny 4.94e-50

The two versions agree at the three test points with a relative error of order \(10^{-50}\), i.e., at the limit of the precision we set (\(50\) digits).

2. Four equations#

\(a\)

solution in integers

known since

\(3\)

\(1^3+1^3+1^3\) (also \(4^3+4^3+(-5)^3\))

always

\(4\)

none (residues modulo 9)

elementary

\(42\)

\((-80538738812075974)^3+80435758145817515^3+12602123297335631^3\)

A. Booker and A. Sutherland, 2019

\(114\)

unknown

the smallest open case

The solution for \(42\) was found after 1.3 million hours of computation on the Charity Engine distributed network; all numbers below \(114\) (except those ruled out by their residue modulo 9) already have known representations, and \(114\) is the smallest open case (as of September 2026; see the references at the end). Let us check what can be checked:

rozwiazania = {3: (1, 1, 1),
               42: (-80538738812075974, 80435758145817515, 12602123297335631)}
for a, m in rozwiazania.items():
    print(f"a = {a}: suma sześcianów {m} = {sum(v**3 for v in m)}")
reszty = {(p**3 + q**3 + r**3) % 9 for p, q, r in product(range(9), repeat=3)}
print("reszty modulo 9 sum trzech sześcianów:", sorted(reszty))
print("a mod 9:", {a: a % 9 for a in (3, 4, 42, 114)})
a = 3: suma sześcianów (1, 1, 1) = 3
a = 42: suma sześcianów (-80538738812075974, 80435758145817515, 12602123297335631) = 42
reszty modulo 9 sum trzech sześcianów: [0, 1, 2, 3, 6, 7, 8]
a mod 9: {3: 3, 4: 4, 42: 6, 114: 6}

Cubes leave only the residues \(0,\pm1\) modulo 9, so a sum of three cubes cannot leave the residue \(4\) or \(5\). For \(a=4\) there are no solutions; for \(42\) and \(114\) the residue modulo 9 rules nothing out.

3. What numerics sees#

Let us plot \(\log_{10}G_a(t)\) on the interval \([0,6]\); the dashed line is the level \(G_a=1\), i.e., \(A_a=0\):

mp.mp.dps = 40
ts = [mp.mpf(i) / 400 for i in range(2401)]
kolory = {3: '#059669', 4: '#64748b', 42: '#d97706', 114: '#4f46e5'}
fig, ax = plt.subplots(figsize=(8, 3.4))
for a in (3, 4, 42, 114):
    ys = [float(mp.log10(G(v, a))) for v in ts]
    ax.plot([float(v) for v in ts], ys, lw=0.7, color=kolory[a], label=f"a = {a}")
ax.axhline(0, color='crimson', lw=1, ls='--')
ax.set_xlabel('t')
ax.set_ylabel(r'$\log_{10} G_a(t)$')
ax.set_title('Krajobraz: wszędzie wysoko nad poziomem G = 1', fontsize=10)
ax.legend(fontsize=8, ncol=4)
fig.tight_layout()
plt.show()
../_images/41148e98d5c881fc3da6585b6cbf989c09803eb0ce9c5f0bb945cc7d20e00576.png

On the whole interval \([0,6]\) all four graphs lie high above the level \(G_a=1\); the lowest value, at \(t=0\), is \(G_3(0)=2304\), i.e., \(\log_{10}G_3\approx3.4\). Let us also check a dense grid on \([0,20]\) and \(3000\) random points from \([0,10^6]\), working with a precision of 90 digits so that \(\sin t^3\) and \(\sin s^3\) are computed correctly:

random.seed(2026)
mp.mp.dps = 90
siatka = [mp.mpf(i) / 500 for i in range(10001)]                # [0, 20], krok 0,002
losowe = [mp.mpf(random.uniform(0, 1e6)) for _ in range(3000)]  # z [0, 10^6]
print("   a | najmniejsze G_a na siatce | w punktach losowych")
for a in (3, 4, 42, 114):
    m1, m2 = min(G(v, a) for v in siatka), min(G(v, a) for v in losowe)
    print(f"{a:>4} | {mp.nstr(m1, 4):>25} | {mp.nstr(m2, 4):>19}")
tmin = min(losowe, key=lambda v: G(v, 3))
r4 = G(tmin, 4) / G(tmin, 3) - 1
r114 = G(tmin, 114) / G(tmin, 3) - 1
print("w tym punkcie losowym:  G_4/G_3 − 1 =", mp.nstr(r4, 3),
      "  G_114/G_3 − 1 =", mp.nstr(r114, 3))
   a | najmniejsze G_a na siatce | w punktach losowych
   3 |                    2304.0 |           1.401e+92
   4 |                    4096.0 |           1.401e+92
  42 |                  4.516e+5 |           1.401e+92
 114 |                  3.327e+6 |           1.401e+92
w tym punkcie losowym:  G_4/G_3 − 1 = 7.64e-12   G_114/G_3 − 1 = 1.42e-8

The smallest value on the grid is \(G_a(0)=256a^2\): the curve passes through the lattice point \((0,0,0)\), but there \(P_a=-a\neq0\). At the random points the smallest values agree for all \(a\) to many digits — for large \(t\) the constant \(a\) is negligible compared with \(u_i^3\).

Numerics says the same thing for all four equations: \(A_a\) is positive, and hugely so. If we guessed on this basis, we would conclude that none of the four equations has solutions — and we would be wrong at least twice (for \(a=3\) and \(a=42\)).

4. The floating-point trap#

The same formula in ordinary float64 arithmetic:

def G64(t, a):
    """Ta sama formuła w arytmetyce float64 (NumPy)."""
    with np.errstate(over='ignore', invalid='ignore'):
        s = t * np.sin(t**3)
        u = (t * np.sin(t), s * np.sin(s), s * np.sin(s**3))
        P = sum(ui**3 for ui in u) - a
        M = sum((ui**2 + 2)**3 for ui in u) + a**2 + 2
        k = [38 * (ui**2 + 2)**2 * M for ui in u]
        kara = sum(np.sin(np.pi * ui)**2 * ki**4 for ui, ki in zip(u, k))
        return 256 * (P**2 + kara)

mp.mp.dps = 120
print("       t |     float64 | mpmath, 120 cyfr")
for v in (2.5, 50.0, 1e3, 1e5, 1e7):
    print(f"{v:>8g} | {G64(np.float64(v), 3):.4e} | {mp.nstr(G(mp.mpf(v), 3), 5)}")
       t |     float64 | mpmath, 120 cyfr
     2.5 | 6.2990e+21 | 6.299e+21
      50 | 1.1048e+70 | 1.1048e+70
    1000 | 5.0285e+124 | 5.0285e+124
  100000 | 2.5697e+202 | 6.1013e+202
   1e+07 | 8.0636e+282 | 5.0512e+280

For small \(t\) the results agree. For \(t=10^5\) the number \(t^3=10^{15}\) is still exact in float64 (\(10^{15}<2^{53}\approx9\cdot10^{15}\)), and \(\sin t^3\) comes out correct. However, \(s=t\sin t^3\) is no longer exact: its error, of order \(10^{-12}\), produces an error of about \(0.05\) in \(s^3\approx6\cdot10^{14}\), and \(\sin s^3\) depends on \(s^3\) modulo \(2\pi\). Beyond that, float64 computes the sines of “different” numbers than it should.

5. A certificate for \(a=3\)#

Since \(1^3+1^3+1^3=3\), Proposition P.1 guarantees negative values of \(A_3\). Where? The proof is constructive: Theorem 4.4 for \(n=3\) amounts to applying Lemma 4.2 twice — first \(s\) with \(\Gamma_2(s)\approx(1,1)\), then \(w\) with \(h(w)\approx1\) and \(g(w)=s\); then \(\Gamma_3(w)=\bigl(h(w),\Gamma_2(g(w))\bigr)\approx(1,1,1)\).

How close do we have to get? At the point \((1,1,1)\) the weights are \(k_i=31464\), so \(G_3\approx256\sum_i\pi^2\varepsilon_i^2k_i^4\) for deviations \(\varepsilon_i\) — we need \(|\varepsilon_i|\lesssim10^{-11}\). We take \(\delta=10^{-12}\); we will check the result rigorously at the end.

h = lambda t: t * mp.sin(t)
g = lambda t: t * mp.sin(t**3)
dh = lambda t: mp.sin(t) + t * mp.cos(t)
dg = lambda t: mp.sin(t**3) + 3 * t**3 * mp.cos(t**3)

def zero(F, dF, lo, hi, tol):
    """Miejsce zerowe F na [lo, hi], gdy F zmienia znak: Newton z bisekcją."""
    flo, t = F(lo), (lo + hi) / 2
    while hi - lo > tol:
        ft = F(t)
        if (ft > 0) == (flo > 0):
            lo, flo = t, ft
        else:
            hi = t
        krok = ft / dF(t)
        nowy = t - krok
        if not (lo < nowy < hi) or abs(krok) > (hi - lo) / 2:
            nowy = (lo + hi) / 2               # krok Newtona niepewny — bisekcja
        elif abs(krok) < tol:
            return nowy
        t = nowy
    return (lo + hi) / 2

def podnies(a, b, delta, tol, M=0):
    """Lemat 4.2: w > M, |h(w) - a| < δ, |g(w) - b| ≤ tol (w dowodzie g(w) = b).
    Przedziały poszukiwań są dokładnie takie jak w dowodzie lematu."""
    a, b, delta, pi = mp.mpf(a), mp.mpf(b), mp.mpf(delta), mp.pi
    R = max(mp.mpf(M), abs(b), mp.mpf(1), 4 * pi / delta) * (1 + mp.mpf('1e-9'))
    dolna = mp.sqrt(R**2 + delta / 2)
    k = int(mp.ceil((max(dolna, abs(a)) - pi / 2) / (2 * pi))) + 1
    tol_v = mp.mpf(10)**(-mp.mp.dps // 2)
    v = zero(lambda t: h(t) - a, dh, 2*pi*k + pi/2, 2*pi*k + 3*pi/2, tol_v)
    u = mp.sqrt(v**2 - delta / 2)
    assert (v - u) * (v + 1) < delta / 2 and v**3 - u**3 > 2 * pi   # (4.1), (4.2)
    nast = lambda c: c + 2 * pi * mp.ceil((u**3 - c) / (2 * pi))
    tp, tm = mp.cbrt(nast(pi / 2)), mp.cbrt(nast(3 * pi / 2))
    lo, hi = min(tp, tm), max(tp, tm)
    w = zero(lambda t: g(t) - b, dg, lo, hi, tol / (3 * hi**3) / 10)
    assert abs(h(w) - a) < delta and abs(g(w) - b) <= tol
    return w

def podnies3(cel, delta, tol):
    """Twierdzenie 4.4 dla n = 3; błąd |g(w) - s| mnoży się w g(s) przez ≈ 3s³."""
    c1, c2, c3 = map(mp.mpf, cel)
    s = podnies(c2, c3, delta, tol)
    return podnies(c1, s, delta, tol / (3 * abs(s)**3) / 10)

M = sum((v**2 + 2)**3 for v in (1, 1, 1)) + 3**2 + 2
print("wagi w punkcie (1, 1, 1):", [38 * (v**2 + 2)**2 * M for v in (1, 1, 1)])
mp.mp.dps = 260
t0 = podnies3((1, 1, 1), mp.mpf('1e-12'), mp.mpf('1e-14'))
print("t₀ ≈", mp.nstr(t0, 30))
odchylenia = [v - 1 for v in (h(t0), h(g(t0)), g(g(t0)))]
print("Γ_3(t₀) − (1, 1, 1) =", [mp.nstr(d, 3) for d in odchylenia])
print("A_3(t₀) =", mp.nstr(A(t0, 3), 12))
wagi w punkcie (1, 1, 1): [31464, 31464, 31464]
t₀ ≈ 12566370639513.9053311440479139
Γ_3(t₀) − (1, 1, 1) = ['1.09e-13', '1.41e-13', '-3.53e-81']
A_3(t₀) = -0.999921346614

The deviations of the first two coordinates from \(1\) are of order \(10^{-13}\), the third is practically exact, and \(A_3(t_0)\approx-0.99992\). The number \(A_3(t_0)\) computed in 260-digit arithmetic is not yet a proof. The proof is provided by interval arithmetic: every operation rounds outward, so the result is an interval that is guaranteed to contain the true value. We write \(t_0\) as a string with 110 significant digits — this is our certificate:

t0_napis = mp.nstr(t0, 110)
print("t₀ =", t0_napis)
for dps in (220, 400):
    mp.iv.dps = dps
    I = G(mp.iv.mpf(t0_napis), 3, ctx=mp.iv)
    print(f"{dps} cyfr: G_3(t₀) ∈ {mp.iv.nstr(I, 10)};  A_3(t₀) < 0: {I.b < 1}")
t₀ = 12566370639513.905331144047913910925720045482774679595359373785582821932003820804877799336531427110076210919221
220 cyfr: G_3(t₀) ∈ [7.865338619e-5, 7.865338619e-5];  A_3(t₀) < 0: True
400 cyfr: G_3(t₀) ∈ [7.865338619e-5, 7.865338619e-5];  A_3(t₀) < 0: True

At both precisions the interval is narrow and lies below \(1\) (\(G_3(t_0)\approx7.87\cdot10^{-5}\)), so \(A_3(t_0)<0\) is proved. A hundred digits is no exaggeration — here is what happens when we round \(t_0\) more coarsely:

mp.iv.dps = 400
for cyfry in (60, 80, 100, 110):
    I = G(mp.iv.mpf(mp.nstr(t0, cyfry)), 3, ctx=mp.iv)
    gora = mp.nstr(mp.mpf(I.b.b), 4)
    print(f"t₀ z {cyfry:>3} cyframi: G_3 ≤ {gora:>11};  A_3 < 0: {I.b < 1}")
t₀ z  60 cyframi: G_3 ≤  7.852e+497;  A_3 < 0: False
t₀ z  80 cyframi: G_3 ≤  1.841e+339;  A_3 < 0: False
t₀ z 100 cyframi: G_3 ≤     0.08948;  A_3 < 0: True
t₀ z 110 cyframi: G_3 ≤    7.865e-5;  A_3 < 0: True

With \(60\) and \(80\) digits the rounded point already lies outside the interval on which \(A_3<0\): there \(G_3\) is of order \(10^{497}\) and \(10^{339}\), respectively (the resulting intervals are narrow, so \(A_3>0\) at these points); from \(100\) digits on, the upper endpoint drops below \(1\), i.e., \(A_3<0\) is proved. How wide is the interval around \(t_0\) on which \(A_3<0\)? And what will float64 see?

def brzeg(kierunek):
    """Odległość od t₀ do miejsca, w którym A_3 wraca do zera."""
    krok = mp.mpf('1e-100')
    while A(t0 + kierunek * krok, 3) < 0:          # oddalamy się, aż A_3 ≥ 0
        krok *= 2
    lo, hi = mp.mpf(0), krok
    for _ in range(200):                           # potem bisekcja
        mid = (lo + hi) / 2
        lo, hi = (mid, hi) if A(t0 + kierunek * mid, 3) < 0 else (lo, mid)
    return lo

szer = brzeg(-1) + brzeg(+1)
print("długość przedziału wokół t₀, na którym A_3 < 0:", mp.nstr(szer, 3))
print("liczba punktów siatki o takim kroku w [0, t₀]:", mp.nstr(t0 / szer, 2))
t64 = float(t0)
print("float64 w t₀:", G64(np.float64(t64), 3), "  (t₀ jako float64:", t64, ")")
print("prawdziwe G_3 w tym punkcie float64:", mp.nstr(G(mp.mpf(t64), 3), 4))
długość przedziału wokół t₀, na którym A_3 < 0: 2.53e-86
liczba punktów siatki o takim kroku w [0, t₀]: 5.0e+98
float64 w t₀: inf   (t₀ jako float64: 12566370639513.906 )
prawdziwe G_3 w tym punkcie float64: 8.894e+532

The interval has length of order \(10^{-86}\); a grid with such a step would have about \(5\cdot10^{98}\) points on \([0,t_0]\). float64 misses this interval and returns infinity: the true value of \(G_3\) at the float64 point is about \(8.9\cdot10^{532}\), which exceeds the range of this format. Let us plot \(\log_{10}G_3\) in a neighborhood of \(t_0\) on the scale \(10^{-86}\):

xs = [mp.mpf(i) / 100 for i in range(-400, 401)]
ys = [float(mp.log10(G(t0 + v * mp.mpf('1e-86'), 3))) for v in xs]
fig, ax = plt.subplots(figsize=(8, 3.2))
ax.plot([float(v) for v in xs], ys, color=kolory[3], lw=1.2)
ax.axhline(0, color='crimson', lw=1, ls='--')
ax.set_xlabel(r'$(t - t_0)\cdot 10^{86}$')
ax.set_ylabel(r'$\log_{10} G_3(t)$')
ax.set_title(r'Studnia wokół $t_0\approx1{,}2566\cdot10^{13}$; poniżej linii $A_3<0$',
             fontsize=10)
fig.tight_layout()
plt.show()
../_images/08a089513df9e9185f829a5d619f463876220dce064b7891fbf88e4fa2a2bf88.png

Negative values exist, but on an interval of length of order \(10^{-86}\) around \(10^{13}\) — no grid or random sampling will find them, and float64 cannot even represent \(t_0\) with the required accuracy. We do not claim that \(t_0\) is the smallest such point; it is the point indicated by the construction in the proof.

6. A certificate for \(a=42\)#

The same construction, only around the 2019 solution. The weights at this point have about 171 digits, so the coordinates of \(\Gamma_3(t)\) must hit the target to within about \(10^{-344}\):

m42 = rozwiazania[42]
mp.mp.dps = 60
M = sum((mp.mpf(v)**2 + 2)**3 for v in m42) + 42**2 + 2
wagi42 = [38 * (mp.mpf(v)**2 + 2)**2 * M for v in m42]
eps = 1 / (16 * mp.pi * max(wagi42)**2 * mp.sqrt(6))
print("wagi:", [mp.nstr(k, 4) for k in wagi42])
print("szacowana potrzebna dokładność:", mp.nstr(eps, 3))

mp.mp.dps = 3300
start = time.time()
t42 = podnies3(m42, mp.mpf('1e-345'), mp.mpf('1e-345'))
print(f"czas konstrukcji: {time.time() - start:.0f} s;   t₀ ≈ {mp.nstr(t42, 15)}")
t42_napis = mp.nstr(t42, 2800)
for dps in (3300, 4200):
    mp.iv.dps = dps
    I = G(mp.iv.mpf(t42_napis), 42, ctx=mp.iv)
    gora = mp.nstr(mp.mpf(I.b.b), 6)
    print(f"{dps} cyfr: G_42(t₀) ≤ {gora};  A_42(t₀) < 0: {I.b < 1}")
for cyfry in (2750, 2770):
    I = G(mp.iv.mpf(mp.nstr(t42, cyfry)), 42, ctx=mp.iv)
    print(f"t₀ z {cyfry} cyframi: A_42 < 0: {I.b < 1}")
przed = len(t42_napis.split('.')[0])
print(f"certyfikat: {przed} cyfr przed przecinkiem; początek: {t42_napis[:30]}…")
wagi: ['8.694e+170', '8.649e+170', '5.211e+167']
szacowana potrzebna dokładność: 1.07e-344
czas konstrukcji: 52 s;   t₀ ≈ 1.25663706394919e+346
3300 cyfr: G_42(t₀) ≤ 5.2935e-5;  A_42(t₀) < 0: True
4200 cyfr: G_42(t₀) ≤ 5.2935e-5;  A_42(t₀) < 0: True
t₀ z 2750 cyframi: A_42 < 0: False
t₀ z 2770 cyframi: A_42 < 0: True
certyfikat: 347 cyfr przed przecinkiem; początek: 125663706394919141951352900551…

The certificate for \(a=42\) is a number of order \(10^{346}\) that has to be given to about 2770 digits. The computer finds it in a minute — but only because we know a solution of the equation. Before September 2019 nobody could point to such a \(t\), nor did anyone know whether it existed.

7. \(a=4\): a proof instead of numerics#

A sum of three cubes never leaves the residue \(4\) modulo 9 (the cell in §2), so the equation for \(a=4\) has no solutions, and by Proposition P.1: \(A_4(t)>0\) for every \(t\in\mathbb R\). No sampling will prove this — after all, \(A_3\) looked exactly the same. The question is settled by a three-line number-theoretic argument that numerics knows nothing about.

8. \(a=114\): we know the formula, not the answer#

We have \(114\equiv6\pmod 9\), so the residue modulo 9 rules nothing out, and nobody has found a solution. So today nobody knows whether \(A_{114}(t)\ge0\) for all \(t\). Heath-Brown’s conjecture (1992) predicts that every integer not congruent to \(4\) or \(5\) modulo 9 is a sum of three cubes (and in infinitely many ways). If it is right, \(A_{114}\) is negative somewhere — at a place that today we cannot even estimate.

Do we know the function \(A_{114}\)?

Yes, completely. It is the formula from §1 for \(a=114\):

\[\begin{split} \begin{aligned} A_{114}(t)&=256\Bigl[\bigl(u_1^3+u_2^3+u_3^3-114\bigr)^2+\sum_{i=1}^3\sin^2(\pi u_i)\,k_i^4\Bigr]-1,\\ k_i&=38\,(u_i^2+2)^2M,\qquad M=\sum_{j=1}^3(u_j^2+2)^3+12998, \end{aligned} \end{split}\]

where \(s=t\sin t^3\), \(u_1=t\sin t\), \(u_2=s\sin s\), \(u_3=s\sin s^3\). No solution of the equation appears in it — the machine from the proof uses only the polynomial \(P_{114}\). We can compute the value \(A_{114}(t)\) at any point with guaranteed accuracy (interval arithmetic, as in §5). The only thing we do not know is the answer to the question whether \(A_{114}(t)<0\) for some \(t\).

A solution of the equation is not a component of the expression but a certificate of its negativity. If \(A_{114}(t)<0\), then \(f_{114}(\Gamma_3(t))<1\), and then — as in the proof of Proposition P.1 — rounding the coordinates of \(\Gamma_3(t)\) to the nearest integers gives a solution of the equation \(x_1^3+x_2^3+x_3^3=114\): the point on the curve is itself a witness (Remark 5.4 of the proof). Searching for \(t\) with \(A_{114}(t)<0\) is therefore searching for a solution. In §5–§6 we went the other way: from a known solution to \(t_0\).

Does this prove Richardson’s theorem?

No — and no single example will. Undecidability is a property of a family of questions: there is no algorithm that answers correctly for every expression. A single expression has a definite answer, so an algorithm that outputs it does exist: “print yes” or “print no” — although we may not know which. The family \(A_a\) may not be enough either: if Heath-Brown’s conjecture were true, the answer would depend only on \(a\bmod 9\), and would therefore be decidable. Undecidability requires the polynomial from the DPRM theorem (§1 and §11 of the proof).

A single case can exhibit practical difficulty (\(a=3\), \(a=42\)), the limit of present-day knowledge (\(a=114\)), or unprovability. The last is produced by the same machine (§3–§6 and §11 of the proof) applied to another, enormous polynomial \(Q\); denote the resulting expression by \(A_Q\).

  • By the DPRM theorem there is a \(Q\) for which the equation \(Q=0\) has a solution in natural numbers if and only if ZFC set theory is inconsistent. If ZFC is consistent, then the statement “\(A_Q(t)\ge0\) for all \(t\)” is true but cannot be proved in ZFC: the chain of equivalences from the proof can be carried out in ZFC, so such a proof would yield a proof of the consistency of ZFC within ZFC itself, contrary to Gödel’s second incompleteness theorem.

  • Davis, Matiyasevich and Robinson (1976) gave a \(Q\) for which the equation \(Q=0\) has no solutions if and only if the Riemann hypothesis holds. Then “\(A_Q\ge0\) everywhere” is equivalent to the Riemann hypothesis.

The family \(A_a\) shows something else: even when the general answer may be simple, individual cases can be extremely hard — and numerics cannot tell the easy ones from the hard ones.

9. The same question as a zero problem#

With the absolute value (§7 of the proof): \(B_a=|A_a|-A_a\) is identically zero if and only if \(A_a\ge0\) everywhere. Hence \(B_4\equiv0\), \(B_3\not\equiv0\), \(B_{42}\not\equiv0\), and about \(B_{114}\) nobody knows. What will a computer algebra system say?

class Limit(Exception):
    pass

def z_limitem(f, sekundy):
    """Wywołuje f(), ale przerywa po zadanej liczbie sekund."""
    def stop(*_):
        raise Limit
    stary = signal.signal(signal.SIGALRM, stop)
    signal.alarm(sekundy)
    try:
        return f()
    except Limit:
        return f"(brak odpowiedzi po {sekundy} s)"
    finally:
        signal.alarm(0)
        signal.signal(signal.SIGALRM, stary)

for a in (3, 4):
    Aa = A_symb(a)
    Ba = sp.Abs(Aa) - Aa
    nieujemne, zero_B = Aa.is_nonnegative, Ba.is_zero
    print(f"a = {a}:  A.is_nonnegative = {nieujemne},  B.is_zero = {zero_B}")
    print(f"        B.equals(0) = {z_limitem(lambda: Ba.equals(0), 5)}")
a = 3:  A.is_nonnegative = None,  B.is_zero = None
        B.equals(0) = (brak odpowiedzi po 5 s)
a = 4:  A.is_nonnegative = None,  B.is_zero = None
        B.equals(0) = (brak odpowiedzi po 5 s)

SymPy honestly answers “I don’t know” (None) or does not answer within 5 seconds — in the same way for both values of \(a\), even though the answers are opposite.

10. The moral#

  • Numerics sees only the points at which it computes. The sign of \(A_a\) depends on the arithmetic of integers, which no finite sampling can see: the negative values live on intervals of length \(10^{-86}\) (for \(a=3\)) around \(10^{13}\) — or farther out.

  • Negativity can be certified by a finite computation; nonnegativity, in general, cannot. A certificate (\(t_0\) + interval arithmetic) proves that \(A_3<0\) and \(A_{42}<0\) somewhere; this is exactly the semi-decidability of Proposition 10.1. The positivity of \(A_4\) requires a proof (modulo 9), and for \(A_{114}\) there is no proof.

  • Even an “easy yes” can be hard in practice: the trivial \(1^3+1^3+1^3=3\) yields a witness with about 100 digits, the solution for \(42\) one with about 2770. Larger solutions — even worse.

  • Richardson’s theorem says that no algorithm can cope with all such questions. This example shows that the difficulty is not merely theoretical.

11. Questions and exercises#

  1. Why do both certificates begin with the digits \(12566\ldots\)? (Hint: what does the construction in Lemma 4.2 start from?)

  2. Which coordinate of \(\Gamma_3(t)\) changes fastest near \(t_0\)? Estimate its derivative and explain where the interval length of order \(10^{-86}\) comes from.

  3. Why does \(t_0\) have to be known to about 100 digits, although \(t_0\approx10^{13}\)? Compare with the result in §5.

  4. \(30=2220422932^3+(-2218888517)^3+(-283059965)^3\). Estimate (without computing the certificate) the order of magnitude of \(t_0\) and the number of digits needed. (Hint: the weights grow like \(|\mathbf m|^{10}\).)

  5. 💻 Compute the certificate for \(a=29=3^3+1^3+1^3\) and compare it with \(a=3\).

  6. 💻 Build the analogous expressions for the Pell equations \(x^2-61y^2=-1\) (smallest positive solution: \(x=29718\), \(y=3805\)) and \(x^2-61y^2=2\) (no solutions: \(2\) is not a quadratic residue modulo \(61\)). Compare the numerics and estimate \(t_0\) for the first one.

  7. What would happen if the weights \(k_i\) were replaced by ones? (Cf. Example 3.1.)

References. A. R. Booker, Cracking the problem with 33, Research in Number Theory (2019), arXiv:1903.04284 · A. R. Booker, A. V. Sutherland, On a question of Mordell, Proc. Natl. Acad. Sci. USA 118 (2021), no. 11, doi:10.1073/pnas.2022377118, arXiv:2007.01209 (the solutions for \(42\) and new ones for \(3\)) · Sums of three cubes (Wikipedia; as of September 12, 2026, the open cases below 1000 are 114, 390, 627, 633, 732, 921, and 975) · Epoch AI: Sum of Three Cubes.