back to table · edit · history · where entries came from · files · download
6238 bytes, as of the version from 2026-11-02 15:29 (current). Recorded here, not run.
"""Canonical coordinates (mirror maps) of hypergeometric Calabi–Yau families -- numberdb.org/T680.
Run with SageMath:
sage -pip install numberdb mpmath
sage -python generate.py # verify all stored values
sage -python generate.py --fill # fill an authorized draft
sage -python checks.py # independent numerical checks
Download numerics.py and argument-selection.md beside this file.
Taylor continuation transports F and its normalized first logarithmic solution.
At z=1 a local Frobenius basis has exponents 0,1,1,2; matching includes its
logarithmic term, which vanishes in the finite limit. See numerics.py.
Computations at digits+40 and digits+90 decimal places are compared; their
agreement is not a certified error bound. Independent parameter differentiation at smooth fibers and a gamma-ratio
asymptotic tail at conifold fibers check all 56 underlying fibers.
Both scalar normalizations are returned. Real fibers have exact zero imaginary
part by real continuation. No value is inferred exact from its digits.
"""
import os
import sys
import math
from functools import lru_cache
import numberdb.sage as numberdb
from sage.rings.rational_field import QQ
from sage.rings.complex_interval_field import ComplexIntervalField
from mpmath import mp
from numerics import fg
TEMPLATES=('2.2.2.2','2.2.3','2.2.4','2.2.6','3.3','3.4','3.6',
'4.4','4.6','6.6','5','8','10','12')
FIBERS=('1','1/2','-1','2')
NORMALIZATIONS=('unit','integral')
LOCAL_LINKS={'2.2.2.2': {'1/2': ('3', '5'), '-1': ('3', '5'), '2': ('3', '5')}, '2.2.3': {'1/2': ('5', '5'), '-1': ('5', '5'), '2': ('5', '7')}, '2.2.4': {'1/2': ('3', '3'), '-1': ('3', '3'), '2': ('3', '3')}, '2.2.6': {'1/2': ('5', '5'), '-1': ('5', '5'), '2': ('5', '5')}, '3.3': {'1/2': ('5', '5'), '-1': ('5', '5'), '2': ('5', '5')}, '3.4': {'1/2': ('5', '5'), '-1': ('5', '5'), '2': ('5', '5')}, '3.6': {'1/2': ('5', '5'), '-1': ('5', '5'), '2': ('5', '5')}, '4.4': {'1/2': ('3', '3'), '-1': ('3', '3'), '2': ('3', '3')}, '4.6': {'1/2': ('5', '5'), '-1': ('5', '5'), '2': ('5', '5')}, '6.6': {'1/2': ('5', '5'), '-1': ('5', '5'), '2': ('5', '5')}, '5': {'1/2': ('3', '3'), '-1': ('3', '3'), '2': ('3', '3')}, '8': {'1/2': ('3', '3'), '-1': ('3', '3'), '2': ('3', '3')}, '10': {'1/2': ('3', '3'), '-1': ('3', '3'), '2': ('3', '3')}, '12': {'1/2': ('5', '5'), '-1': ('5', '5'), '2': ('5', '5')}}
PERIOD_SLUG='Normalized_holomorphic_periods_of_hypergeometric_Calabi_Yau_families'
def upper_parameters(template):
if template not in TEMPLATES: raise ValueError('Unclassified template')
return [QQ(a)/QQ(d) for d in map(int,template.split('.'))
for a in range(1,d) if math.gcd(a,d)==1]
def scale(template):
result=1
for d in map(int,template.split('.')):
phi=sum(math.gcd(a,d)==1 for a in range(1,d))
factor=d**phi
for p in range(2,d+1):
if d%p==0 and all(p%k for k in range(2,math.isqrt(p)+1)):
assert phi%(p-1)==0
factor*=p**(phi//(p-1))
result*=factor
return result
@lru_cache(maxsize=256)
def components(template,z,working):
if z not in FIBERS: raise ValueError('This generator covers only the declared fiber selection')
with mp.workdps(working):
alpha=[mp.mpf(int(a.numerator()))/int(a.denominator()) for a in upper_parameters(template)]
x=mp.mpf(z)
F,G=fg(alpha,x,working)
Q=x*mp.exp(G/F)
return tuple(mp.nstr(v,working) for v in (mp.re(Q),mp.im(Q),mp.re(F),mp.im(F),mp.re(G),mp.im(G)))
@lru_cache(maxsize=512)
def normalized(template,z,normalization,working):
with mp.workdps(working):
re,im,*_=components(template,z,working)
q=mp.mpc(re,im)
if normalization=='integral':q/=scale(template)
elif normalization!='unit':raise ValueError('Unknown normalization')
return tuple(mp.nstr(v,working) for v in (q.real,q.imag))
class CanonicalCoordinates(numberdb.Generator):
table='T680'
parameters=('template','z','normalization')
type='C'
digits=100
rigour='heuristic (agreement-checked)'
files=('generate.py','numerics.py','checks.py','tail_check.py','exact_checks.py','argument-selection.md',
'numerical-evidence.md','source-evidence.md','skill-evidence.json',
'checks.jsonl','dry-run.log')
def enumerate(self):
for template in TEMPLATES:
for z in FIBERS:
for normalization in NORMALIZATIONS:
yield {'template':template,'z':z,'normalization':normalization}
def value(self,params,digits):
at=(digits+40,digits+90)
args=tuple(params[k] for k in self.parameters)
real=numberdb.agreeing(lambda w:normalized(*args,w)[0],at=at)
imag=numberdb.agreeing(lambda w:normalized(*args,w)[1],at=at)
value=ComplexIntervalField(numberdb.bits(max(at)))(real,imag)
if params['normalization']=='unit':
key=params['template']+','+params['z']
comment=f'The holomorphic denominator is HREF{{{PERIOD_SLUG}#{key}}}[$F_A(z)$].'
if params['z']!='1':
t,z=params['template'],params['z'];p,q=LOCAL_LINKS[t][z]
comment += (' Local arithmetic of this fibre includes '
f'HREF{{Frobenius_polynomials_of_hypergeometric_Calabi_Yau_motives#{t},{z},{p}}}[the Frobenius polynomial at $p={p}$] and '
f'HREF{{Unit_roots_of_hypergeometric_Calabi_Yau_motives#{t},{z},{q}}}[the unit eigenvalue at $p={q}$].')
return {'number':value,'comment':comment}
return value
if __name__=='__main__':
if os.environ.get('NUMBERDB_KEY_FROM_STDIN')=='1':
key=sys.stdin.read().strip()
if '=' in key and key.split('=',1)[0].replace('_','').isalnum():
key=key.split('=',1)[1].strip().strip('\"\'')
os.environ['NUMBERDB_API_KEY']=key
g=CanonicalCoordinates()
if '--fill' in sys.argv or os.environ.get('NUMBERDB_PUBLISH')=='1':
print(g.publish(message='Compute canonical coordinates in two normalizations; independently check every fiber.'))
else:
report=g.verify(sample=None);print(report);sys.exit(0 if report.ok else 1)