back to table · edit · history · where entries came from · files · download
1693 bytes, as of the version from 2026-11-02 20:37 (current). Recorded here, not run.
"""Nonrational prime-level independent checks for numberdb.org/T684.
Fricke takes a normalized newform to a unit scalar times its conjugate.
The symmetric fundamental-domain integral uses real parts of coefficient
products, so conjugating all coefficients leaves it unchanged. This extends
the prime-coset integration in quadrature.py to every embedded prime-level
newform. Fourier coefficients come from exact catalogue Hecke data via Euler
recurrences, independently of PARI's modular-form routines.
"""
import json,time
import numberdb.sage as numberdb
from sage.rings.complex_mpfr import ComplexField
from sage.rings.real_mpfr import RealField
from forms import ROSTER,algebra
from catalogue_coefficients import independent_coefficients
from quadrature import integrate
def main():
for label in ['11.4.a.a','19.3.b.b']:
row=next(r for r in ROSTER if r['label']==label);p=row['level'];k=row['weight']
coeffs=independent_coefficients(label,600)
for name,(root,is_real) in algebra(label)[2].items():
vals=[]
for mult,order,working in [(23,80,85),(30,110,115)]:
C=ComplexField(numberdb.bits(working,losing=32));z=C(root)
a=[C(c(z)) for c in coeffs];T=mult*p
t=time.time();v=integrate(p,k,T,order,working,a);vals.append(v)
print('PRIME_CHECK',json.dumps({'form':name,'cutoff':T,'order':order,'working':working,'integral':str(v),'seconds':time.time()-t}),flush=True)
error=abs(vals[0]-vals[1])/vals[1]
assert error<RealField(500)('1e-42'),(name,str(error))
print('PRIME_TRUNCATION',name,str(error),flush=True)
if __name__=='__main__':main()