back to table · edit · history · where entries came from · files · download
2078 bytes, as of the version from 2026-11-09 18:56 (current). Recorded here, not run.
"""Exact algebra checks for T694's reciprocal and reflection identity names.
Run: agents/sage.sh repair_identity_check.py roster.json manifest.json
This uses formal completed L-values satisfying Lambda(s)=epsilon*Lambda(k-s),
not decimal roots. No table values or generator sources are changed.
"""
import json,hashlib
from pathlib import Path
import numberdb.sage
from sage.rings.number_field.number_field import CyclotomicField
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.arith.misc import binomial
from sage.env import SAGE_VERSION
base=Path(__file__).resolve().parent
roster=json.loads((base/'roster.json').read_text())
G=CyclotomicField(4);ii=G.gen();checks=0;reflection=0
weights=sorted({int(r['k']) for r in roster})
for k in weights:
d=k-2
R=PolynomialRing(G,['q']+['L'+str(s) for s in range(1,k//2+1)])
K=R.fraction_field();q=K(R.gen(0));L={s:K(R.gen(s)) for s in range(1,k//2+1)}
for eps in [-1,1]:
def completed(s):
if s==k//2 and eps==-1:return K(0)
return L[s] if s<=k//2 else eps*L[k-s]
# q=sqrt(N), c[n] is the coefficient of X^n.
c={d-m:binomial(d,m)*ii**(1-m)*completed(m+1)/q**(m+1) for m in range(d+1)}
for n in range(d+1):
# Coefficient after -eps*i^k*(q*X)^d*r(-1/(q^2*X)).
assert c[n]==-eps*ii**k*q**d*c[d-n]*(-1)**(d-n)/q**(2*(d-n))
checks+=1
# Completed L-values are real: only i^(1-m) is conjugated.
m=d-n
assert (-1)**n*ii**(1-m)==-(-ii)**(1-m)
reflection+=1
manifest=base/'manifest.json'
print(json.dumps({'table':'T694','method':'exact formal coefficient comparison over Q(i)(q,L1,...); imposed completed functional equation; reality of completed critical values for reflection','weights':weights,'signs':[-1,1],'reciprocal_coefficient_checks':checks,'reflection_coefficient_checks':reflection,'passed':True,'new_values':0,'sage':SAGE_VERSION,'skill_manifest':'agents/runs/20261109T172627Z-repair-skills/manifest.json','skill_manifest_sha256':hashlib.sha256(manifest.read_bytes()).hexdigest(),'skill_versions':json.loads(manifest.read_text())['versions']},indent=2))