back to table · edit · history · where entries came from · files · download
5631 bytes, as of the version from 2026-11-16 19:06 (current). Recorded here, not run.
"""Generate T720, equal-mass banana Feynman integrals.
sage -pip install numberdb
sage -python generate.py # recompute and verify, reads own draft with key
sage -python generate.py --publish # opt in to additive entry submission
SageMath 10.9, complex Arb quadrature. No scipy or sage.all is needed.
(n,t,normalization) means n unit-mass edges in D=2, t=p^2/m^2,
and either the raw Bessel integral or 2^(n-1) times it. Default coverage
is every vacuum and positive proper signed-mass square for 2<=n<=8.
Proof of endpoint bounds: DLMF 10.32.1 gives I0(qr)<=exp(qr).
DLMF 10.32.9 and cosh(u)>=1+u^2/2 give
K0(r)<=sqrt(pi/(2r))*exp(-r). For n>=2 the upper tail after T is
(pi/2)^(n/2)*T^(1-n/2)*exp(-(n-q)T)/(n-q).
The same representation and cosh(u)>=exp(u)/2 give K0(r)<=E1(r/2).
For 0<r<=1, splitting E1 at 1 bounds it by log(2/r)+exp(-1),
which is <=2-log(r). With r=exp(x), the omitted origin x<-A
is therefore at most exp(q exp(-A))*integral_A^infinity
exp(-2u)*(u+2)^n du. Integration by parts gives the finite positive
sum used below. All bound calculations use Arb balls with upper
bounds added as radii. No unbounded endpoint enters quadrature.
The middle interval is integrated after r=exp(x). The callback returns
NaN unless exp(x) has positive real part, where the principal K0 is
holomorphic, including when Arb asks for an analyticity test. Arb's
rigorous integration encloses every middle segment. Real projection
is justified by the positive-real path, not by small imaginary parts.
A failed tolerance or precision check aborts rather than padding digits.
These are actual enclosures, unlike midpoint quadrature. Standard output
from build_compute.py preserves exact binary-rational endpoints per raw
integral and endpoint bounds for resumption without rerunning finished work.
Credentials and agent/model provenance belong in the execution environment.
"""
import os
import sys
from functools import lru_cache
import numberdb.sage as numberdb
from numberdb._write import to_text
from sage.rings.real_arb import RealBallField
from sage.rings.complex_arb import ComplexBallField
from sage.rings.rational_field import QQ
def selection():
for n in range(2, 9):
for t in sorted({0} | {(n - 2*j)**2 for j in range(1, (n-1)//2 + 1)}):
yield n, t
@lru_cache(maxsize=None)
def raw(n, t, digits=100):
n = int(n)
t = QQ(t)
if n < 2 or t < 0 or t >= n*n:
raise ValueError('require n>=2 and 0<=t<n^2')
if n == 2 and t == 0:
return QQ(1)/2, {'exact': 'one-loop simplex F_2(0)=1'}
bits = numberdb.bits(digits, losing=128)
R = RealBallField(bits)
C = ComplexBallField(bits)
q = R(t).sqrt()
gap = R(n)-q
A = digits + 80
# Ensure exponential upper-tail decay even for another subthreshold t.
T = 2*R(digits+60)/gap
if not T > R(2).exp():
T = R(10)
tol = R(2)**(-numberdb.bits(digits, losing=64))
calls = [0]
def integrand(z, analytic):
calls[0] += 1
r = z.exp()
if not r.real() > 0:
return C('nan')
return r*r * ((C(t).sqrt()*r).bessel_I(0) if t else 1) * r.bessel_K(0)**n
total = C(0)
bounds = [-A, -10, 0, 2, T.log()]
for a, b in zip(bounds, bounds[1:]):
piece = C.integral(integrand, a, b, abs_tol=tol, rel_tol=tol,
eval_limit=200000, depth_limit=50, use_heap=True)
if not (piece.real().is_finite() and piece.imag().is_finite()):
raise ArithmeticError('nonfinite certified quadrature segment')
total += piece
# n!/(n-k)! is accumulated by an integer recurrence, never float division.
factor = 1
series = R(0)
for k in range(n+1):
series += factor * R(A+2)**(n-k) / R(2)**k
factor *= n-k
origin = (q*R(-A).exp()).exp() * R(-2*A).exp() * series/2
tail = (R.pi()/2)**(QQ(n)/2) * T**(1-QQ(n)/2) * (-gap*T).exp()/gap
result = total.real().add_error(origin+tail)
if not total.imag().contains_zero() or not result.is_finite() or not result > 0:
raise ArithmeticError('invalid integral enclosure')
if result.accuracy() < numberdb.bits(digits, losing=12):
raise ArithmeticError('enclosure does not support requested digits')
evidence = {'working_bits': int(bits), 'accuracy_bits': int(result.accuracy()),
'origin_bound': str(origin.upper()), 'tail_bound': str(tail.upper()),
'A': A, 'T': str(T), 'evaluations': calls[0]}
return result, evidence
class Banana(numberdb.Generator):
table = 'T720'
parameters = ('n', 't', 'normalization')
type = 'R'
digits = 100
rigour = 'proven'
files = ('generate.py', 'argument-selection.md', 'checks.py',
'numerical-evidence.json', 'check-results.json', 'skill-manifest.json',
'entries.json')
def enumerate(self):
for n, t in selection():
for normalization in ('bessel', 'feynman'):
yield {'n': n, 't': t, 'normalization': normalization}
def value(self, params, digits):
n = int(params['n'])
if params['normalization'] not in ('bessel', 'feynman'):
raise ValueError('unknown normalization')
value, _ = raw(n, str(params['t']), digits)
return value if params['normalization'] == 'bessel' else 2**(n-1)*value
if __name__ == '__main__':
if os.environ.get('NUMBERDB_KEY_FROM_STDIN') == '1':
numberdb.configure(api_key=sys.stdin.read().strip())
generator = Banana()
if '--publish' in sys.argv:
print(generator.publish())
else:
print(generator.verify(sample=None))