back to table · edit · history · where entries came from · files · download
3928 bytes, as of the version from 2026-11-17 13:46 (current). Recorded here, not run.
"""T739: local L-factors of Guillera hypergeometric motives.
Install: sage -pip install numberdb
Run: sage -python generate.py # preview, writes nothing
sage -python generate.py --publish # fill the existing authorized draft
sage -python generate.py --prepare # save resumable exact coefficients
SageMath 10.9; numberdb 0.1.10. Classical coordinate z, lower residues 0^5.
The source roster is DPVZ Table 2.10 (June 2020 PDF), rational rows 1--15.
No Asai factorization is assumed. Gross--Koblitz traces are reconstructed
modulo p^N with p^N > 2*5*p^(2*r), using the weight-four Weil bound.
Newton's identities give the first two coefficients. The even-weight local
functional equation, with Sage's determinant-character recipe, supplies
coefficients 3--5. The check attachment independently implements BCM Theorem
1.3 in finite complex balls and the determinant formula from Watkins 11.1.
Exact integer polynomials need no decimal precision claim.
"""
import numberdb.sage as numberdb
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.symbolic.ring import SR # HGM generalized functions require initialization
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.modular.hypergeometric_motive import HypergeometricData
import argparse, json, os
from pathlib import Path
from functools import lru_cache
ROSTER = [
('2.2.2.2.2','-1/4'),('2.2.2.2.2','-4'),
('2.2.2.2.2','-1/1024'),('2.2.2.2.2','-1024'),
('2.2.2.3','27/64'),('2.2.2.3','-27'),('2.5','-3125/256'),
('2.2.2.4','1/16'),('2.3.4','-1/48'),('2.3.4','-27/16'),
('2.3.6','-729/4096'),('2.3.6','729/15625'),('2.3.6','-1/512000'),
('2.4.6','-1/1024'),('2.8','1/2401')]
PRIMES = (2,3,5,7,11,13,17,19,23,29,31)
R = PolynomialRing(ZZ,'T')
@lru_cache(None)
def motive(template):
h=HypergeometricData(cyclotomic=([int(d) for d in template.split('.')],[1]*5))
assert h.degree()==5 and h.weight()==4
return h
def enumeration():
for template,ztext in ROSTER:
z=QQ(ztext); d=ZZ(1)
for a in motive(template).alpha_beta()[0]: d=d.lcm(a.denominator())
excluded=d*z.numerator()*z.denominator()*(z.numerator()-z.denominator())
for p in PRIMES:
if excluded%p: yield {'template':template,'z':ztext,'p':p}
def precision(p,r):
n=1
while ZZ(p)**n <= 10*ZZ(p)**(2*r): n+=1
return n
def compute(params):
h=motive(params['template']);z=QQ(params['z']);p=ZZ(params['p'])
traces=[ZZ(h.padic_H_value(p,r,z,prec=precision(p,r),cache_p=False)) for r in (1,2)]
assert all(abs(s)<=5*p**(2*r) for r,s in enumerate(traces,1))
assert (traces[0]**2-traces[1])%2==0
c1=-traces[0];c2=(traces[0]**2-traces[1])//2
sign=ZZ(h.sign(z,p));assert abs(sign)==1
poly=R([1,c1,c2,sign*p**2*c2,sign*p**6*c1,sign*p**10])
return poly,{'traces':list(map(int,traces)),'precisions':[precision(p,r) for r in (1,2)],'sign':int(sign)}
class GuilleraLocalFactors(numberdb.Generator):
table='T739'
parameters=('template','z','p')
type='Z[]'
digits=100
rigour='exact'
def enumerate(self):yield from enumeration()
def value(self,params,digits):return compute(params)[0]
if __name__=='__main__':
ap=argparse.ArgumentParser();ap.add_argument('--publish',action='store_true');ap.add_argument('--prepare',action='store_true');args=ap.parse_args()
if args.prepare:
out=Path(os.environ.get('TMPDIR',Path(__file__).parent))/'prepared-values.json'
records=json.loads(out.read_text()) if out.exists() else []
seen={tuple(str(x['params'][k]) for k in ('template','z','p')) for x in records}
for params in enumeration():
if tuple(str(params[k]) for k in ('template','z','p')) in seen:continue
poly,evidence=compute(params)
records.append({'params':params,'coefficients':list(map(int,poly.list())),**evidence})
out.write_text(json.dumps(records,indent=2)+'\n');print(len(records),params,flush=True)
else:
g=GuilleraLocalFactors()
if args.publish:g.publish()
else:g.preview()