back to table · edit · history · where entries came from · files · download
2102 bytes, as of the version from 2026-11-16 22:11 (current). Recorded here, not run.
"""Read-only corpus consistency checks for T728; not independent scalar evidence.
Run in Sage after downloading generate.py, hardy_arb.pyx, checks.py, check.py.
NUMBERDB_API_KEY is needed to read the private draft and an owned companion.
"""
import sys,os,json
import numberdb.sage as numberdb
from sage.rings.real_arb import RealBallField
from generate import compute_zero,endpoint_q,PAIR_INDICES,ZERO_INDICES
from checks import inside,interval
from numberdb._generate import _stored_entries
if os.environ.get('NUMBERDB_KEY_FROM_STDIN')=='1':os.environ['NUMBERDB_API_KEY']=sys.stdin.read().strip()
docs={tid:numberdb.table(tid) for tid in ['T3','T584','T727','T728']}
entries={tid:_stored_entries(d) for tid,d in docs.items()};R=RealBallField(600)
def ball(text):
lo,hi=interval(text);return R((lo+hi)/2,(hi-lo)/2)
root_count=derivative_count=0; endpoints={}
for n in ZERO_INDICES:
t,ds=compute_zero(n,100);endpoints[n]=(t,ds)
if n<=101:assert inside(t,entries['T3'][str(n)]);root_count+=1
if n<=100 or n in [6709,6710]:
for k in (1,2,3):assert inside(ds[k-1],entries['T584'][f'{n},{k}']);derivative_count+=1
relations=[]
for n in PAIR_INDICES:
a,da=endpoints[n];b,db=endpoints[n+1]
# Separately extract the envelope correction from the generated -Q_Xi terms.
corrections=[endpoint_q(t,ds)-(-ds[2]/ds[0]+(ds[1]/ds[0])**2) for t,ds in [(a,da),(b,db)]]
predicted=3*(ball(entries['T727'][str(n)])+2)+(b-a)**2*sum(corrections)
stored=ball(entries['T728'][str(n)])
assert predicted.is_finite() and stored.is_finite() and predicted.accuracy()>310 and stored.accuracy()>310
assert stored.overlaps(predicted)
relations.append({'n':n,'stored_interval':entries['T728'][str(n)],'predicted_from_B_and_envelope':str(predicted)})
print('FAMILY_CHECK_JSON '+json.dumps({'table':'T728','root_comparisons':root_count,'signed_derivative_comparisons':derivative_count,'stored_C_B_envelope_relations':len(relations),'relations':relations,'limitations':'Corpus consistency and the algebraic envelope identity share generated ingredients; this is not independent mathematical validation of either table.'}))