back to table · edit · history · where entries came from · files · download
1719 bytes, as of the version from 2026-10-27 21:27 (current). Recorded here, not run.
"""Read-only verification for the normalization wording repair of numberdb.org/T561.
With generate.py and skill-evidence.json in the same directory, run:
sage -python repair-check.py
For a private draft, pipe the API token to standard input. No writes occur.
The theorem being cited is EKZ, arXiv:1112.5872v6, Section 1.6,
equations (1.3)-(1.4), pages 8-9. It states that the area-weighted
mean divided by pi*L**2 is constant for every positive L. This script
checks generator agreement; it does not numerically prove that theorem.
"""
import hashlib
import json
from pathlib import Path
import re
import sys
import importlib.metadata
import numberdb.sage as numberdb
from sage.env import SAGE_VERSION
from generate import AreaSiegelVeech
key = sys.stdin.read().strip()
if re.match(r'^[A-Z_][A-Z0-9_]*\s*=', key):
key = key.split('=', 1)[1].strip().strip('"').strip("'")
client = numberdb.Client(api_key=key) if key else None
work = Path(__file__).resolve().parent
report = AreaSiegelVeech().verify(sample=None, client=client)
result = {
'table': 'T561',
'check': 'all stored entries against unchanged generator',
'ok': bool(report.ok),
'report': str(report),
'sage_version': SAGE_VERSION,
'numberdb_version': importlib.metadata.version('numberdb'),
'generator_sha256': hashlib.sha256((work/'generate.py').read_bytes()).hexdigest(),
'skill': json.loads((work/'skill-evidence.json').read_text()),
'scope': 'No values or arguments changed. This verifies existing generator agreement; the normalization correction is established by EKZ (1.3)-(1.4), not by numerical sampling.',
}
print(json.dumps(result, ensure_ascii=False, indent=2))
raise SystemExit(0 if report.ok else 1)