back to table · edit · history · where entries came from · files · download
3040 bytes, as of the version from 2026-10-25 07:54 (current). Recorded here, not run.
"""Check the T478 editorial repair without writing to NumberDB.
Run with a downloaded API document:
python3 repair-checks.py T478-after.json
Or read the private draft using a key supplied on stdin:
cat "$NUMBERDB_KEY_FILE" | python3 repair-checks.py
These are document-integrity checks, not new global-optimality proofs.
The numerical generator remains attached as generate.py with sources.json.
"""
import hashlib
import json
import sys
from urllib.request import Request, urlopen
def digest(value):
return hashlib.sha256(json.dumps(value, ensure_ascii=False, separators=(',', ':')).encode()).hexdigest()
if len(sys.argv) > 1:
with open(sys.argv[1]) as stream:
document = json.load(stream)
else:
key = sys.stdin.read().strip()
assert key, 'Supply the private draft key on stdin.'
request = Request('https://numberdb.org/api/table?id=T478', headers={'Authorization': 'Bearer ' + key})
with urlopen(request, timeout=60) as response:
document = json.load(response)
assert digest(document['Numbers']) == 'a9ca1f863d67de64cbac7819f2a252a5458ffcb30b217bd0d9c3b3e722afbb50'
assert digest(document['Parameters']) == '533012ddf43d7b2bbc425682120fd895e62acc6d74e01690667865d8dd8c2152'
assert digest(document) == '51550e2b883b69bbf0168f77e5b8d4627d72913136d18c67adc5385163f110d8'
assert list(document['Numbers']) == [str(n) for n in range(2, 101)]
assert 'comment-source' not in document['Comments']
assert next(iter(document['Comments'])) == 'comment-proof-status'
assert document['Data properties']['rigour details'].endswith("The numerical rows use Wayne Deeter's table and Cartesian coordinates CITE{Deeter}, retrieved on 25-Oct-2026. Its index had HTTP Last-Modified date 10-Oct-2026. The Cambridge Cluster Database CITE{CCD}, which cites Deeter's updates, was retrieved on the same day and had Last-Modified date 13-Aug-2026. The attached source snapshot preserves the energies and coordinates used here.")
assert 'CITE{Deeter}' in "The numerical rows use Wayne Deeter's table and Cartesian coordinates CITE{Deeter}, retrieved on 25-Oct-2026. Its index had HTTP Last-Modified date 10-Oct-2026. The Cambridge Cluster Database CITE{CCD}, which cites Deeter's updates, was retrieved on the same day and had Last-Modified date 13-Aug-2026. The attached source snapshot preserves the energies and coordinates used here." and 'CITE{CCD}' in "The numerical rows use Wayne Deeter's table and Cartesian coordinates CITE{Deeter}, retrieved on 25-Oct-2026. Its index had HTTP Last-Modified date 10-Oct-2026. The Cambridge Cluster Database CITE{CCD}, which cites Deeter's updates, was retrieved on the same day and had Last-Modified date 13-Aug-2026. The attached source snapshot preserves the energies and coordinates used here."
print(json.dumps({'tid': 'T478', 'entries': 99, 'all_numbers_and_parameters_unchanged': True,
'source_paragraph_preserved_in_rigour_details': True,
'proof_status_leads_comments': True, 'full_document_matches_repair': True}, indent=2))