EVE-AEQIRION / research /verify.py
PureOne's picture
Release AËQIRION v3.0: manuscript, proofs, code and verification data
8e19377 verified
Raw History Blame Contribute Delete
2.56 kB
#!/usr/bin/env python3
"""Reproduce AËQIRION final release, with exact checks and optional spectra.
Python 3.10+; core checks use only the standard library. NumPy, when installed,
adds labeled floating-point spectral illustrations. Figure regeneration is
separate and additionally uses Matplotlib and SciPy.
"""
from pathlib import Path
import argparse
import hashlib
import importlib.util
import json
import sys
ROOT = Path(__file__).resolve().parent
def execute(name, entry):
path = ROOT / 'code' / (name + '.py')
spec = importlib.util.spec_from_file_location(name, path)
module = importlib.util.module_from_spec(spec)
sys.modules[name] = module
spec.loader.exec_module(module)
result = getattr(module, entry)()
assert result['status'] == 'PASS', (name, result)
return result
def main():
if sys.version_info < (3, 10):
raise SystemExit('Python 3.10 or newer is required.')
if not __debug__:
raise SystemExit('Do not use -O: these verification checks require assertions.')
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--report', type=Path, default=ROOT / 'results' / 'verification.json')
args = parser.parse_args()
modules = [('test_trades', 'run'), ('test_coded_channels', 'main'),
('test_separable_completion', 'run'), ('test_positive_design', 'main')]
results = {}
for name, entry in modules:
print('Checking ' + name + ' ...', flush=True)
results[name] = execute(name, entry)
report = {
'project': 'EVE-AEQIRION', 'version': '3.0', 'audit_date': '2026-10-20',
'status': 'PASS', 'python': sys.version.split()[0],
'source_sha256': {name: hashlib.sha256((ROOT / 'code' / (name + '.py')).read_bytes()).hexdigest()
for name, _ in modules},
'modules': results,
'scope': {'general_proofs': 'manuscript, not established by finite tests',
'core_arithmetic': 'exact integers and Fractions',
'optional_numeric_spectra': 'separately labeled float64 checks',
'physical_benchmark': False, 'AI_superiority_tested': False,
'external_peer_review': False, 'worldwide_novelty_certified': False}
}
args.report.parent.mkdir(parents=True, exist_ok=True)
args.report.write_text(json.dumps(report, indent=2, sort_keys=True) + '\n')
print('All AËQIRION final-release checks: PASS', flush=True)
print('Report: ' + str(args.report))
if __name__ == '__main__':
main()