#!/usr/bin/env python3 """ Aby Refutation Engine — Reproducible Verdict Bundle VyroNyx Private Limited · hal.vyronyxgroup.com/graveyard This script reproduces a curated selection of verdicts from Aby's graveyard using only the measurement engine (aby_refutation_v1.py) and Python. No internet connection. No API keys. No database access. It proves a specific claim: Aby's verdicts are not opinions. They are the output of a deterministic measurement procedure that anyone can run. The graveyard is a permanent hash-chained record of every belief the engine refused — and every refusal in it can be independently reproduced here. USAGE ----- pip install numpy scipy # one-time setup python reproduce.py # verify all 10 bundled verdicts python reproduce.py --verdict 8 # one specific graveyard ID python reproduce.py --pair FourierSeries HartleyTransform # any pair REQUIREMENTS ------------ Python 3.9+ numpy >= 1.26 scipy >= 1.11 (needed for GROUP/MECH/PDE probe families) If scipy is unavailable the bundle still runs — those families are marked NOT_TESTABLE, which is honest. The FN1D/SEQ families (which cover the 10 bundled verdicts) require numpy only. HOW THE VERDICT IS COMPUTED ---------------------------- For each transform pair (A, B): 1. Type check: both must be in the same family (FN1D, SEQ, PROB, etc.). Cross-family pairs return CATEGORY_ERROR — their properties are not comparable, and claiming otherwise would be dishonest. 2. Probe battery: for each measurable property in the family (linearity, involutivity, energy preservation, etc.), the engine runs numerical experiments on standardised inputs and records whether A and B agree. 3. Surprisal scoring: each agreement on a rare property contributes more bits than agreement on a common one (information-theoretic weighting). Disagreements on any property contribute 0 bits. 4. Verdict thresholds: CONFIRMED ≥ 4.0 bits (strong, independent agreement) WEAK ≥ 2.0 bits (some agreement, not enough) REFUTED < 2.0 bits (no meaningful shared structure) 5. The bits measure is deterministic: same code + same inputs = same bits, on any machine. GRAVEYARD CONTEXT ----------------- The graveyard lives at: https://hal.vyronyxgroup.com/graveyard Each entry is hash-chained to the entry before it — the chain is tamper-evident. The verdicts in this bundle correspond to real graveyard entries filed by Aby's nightly science loop. The IDs are Supabase row IDs in aby_refutation_verdicts. VN-DISC-001 (Refutation Engine) Bitcoin-stamped 15 August 2026. VN-DISC-003 (God Equation) Bitcoin-stamped 16 August 2026. """ import sys import math import hashlib import json import time import argparse # ── Version manifest ────────────────────────────────────────────────────────── BUNDLE_VERSION = "1.0.0" BUNDLE_DATE = "2026-08-17" ENGINE_FILE = "aby_refutation_v1.py" REQUIRED_NUMPY = "1.26" REQUIRED_SCIPY = "1.11" # optional but recommended # ── Bundled verdicts (from Supabase aby_refutation_verdicts) ────────────────── # Format: (graveyard_id, transform_a, transform_b, expected_verdict, expected_bits) # These 10 pairs were selected to include all verdict types (CONFIRMED/WEAK/REFUTED) # and were verified to reproduce exactly on 17 August 2026. BUNDLED_VERDICTS = [ # CONFIRMED: strong structural equivalence (a real theorem) (8, "FourierSeries", "HartleyTransform", "CONFIRMED", 5.54), # WEAK: some shared structure, not enough to confirm (150, "ContinuousWavelet", "CosineTransform", "WEAK", 2.26), # REFUTED: no meaningful shared structure (majority of the graveyard) (151, "ContinuousWavelet", "FourierSeries", "REFUTED", 0.18), (152, "ContinuousWavelet", "FourierTransform", "REFUTED", 0.18), (153, "ContinuousWavelet", "FractionalFourier", "REFUTED", 1.63), (1, "CosineTransform", "FourierSeries", "REFUTED", 1.95), (4, "CosineTransform", "ShortTimeFourier", "REFUTED", 1.76), (11, "FourierSeries", "WaveletTransform", "REFUTED", 1.68), (14, "FourierTransform", "WaveletTransform", "REFUTED", 1.68), (20, "HartleyTransform", "ShortTimeFourier", "REFUTED", 0.74), ] BITS_TOLERANCE = 0.15 # floating-point tolerance (±0.15 bits is determinism, not noise) # ── Colours (graceful fallback if terminal doesn't support ANSI) ─────────────── def _colour(code, text): try: return f"\033[{code}m{text}\033[0m" except Exception: return text GREEN = lambda t: _colour("32", t) RED = lambda t: _colour("31", t) YELLOW = lambda t: _colour("33", t) BOLD = lambda t: _colour("1", t) DIM = lambda t: _colour("2", t) def check_environment(): """Verify Python and dependency versions; warn but don't abort if scipy missing.""" issues = [] if sys.version_info < (3, 9): issues.append(f"Python 3.9+ required (you have {sys.version})") try: import numpy as np major, minor = map(int, np.__version__.split(".")[:2]) if (major, minor) < (1, 26): issues.append(f"numpy >= 1.26 recommended (you have {np.__version__})") except ImportError: issues.append("numpy not found — run: pip install numpy scipy") scipy_ok = True try: import scipy except ImportError: scipy_ok = False print(YELLOW(" ⚠ scipy not installed — GROUP/MECH/PDE families will be NOT_TESTABLE.")) print(YELLOW(" Run: pip install scipy to enable all probe families.")) return issues, scipy_ok def load_engine(): """Import aby_refutation_v1 from the same directory as this script.""" import importlib.util, os here = os.path.dirname(os.path.abspath(__file__)) path = os.path.join(here, ENGINE_FILE) if not os.path.exists(path): print(RED(f" ERROR: {ENGINE_FILE} not found next to reproduce.py")) print(f" Expected at: {path}") print(f" Both files must be in the same directory.") sys.exit(1) spec = importlib.util.spec_from_file_location("aby_refutation_v1", path) mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) return mod def fingerprint_engine(engine_module): """SHA-256 of the engine source, for audit purposes.""" import inspect, hashlib src = inspect.getsource(engine_module) return hashlib.sha256(src.encode()).hexdigest() def run_verdict(engine, a, b): """Run the engine and return the full result dict.""" return engine.judge(a, b) def check_verdict(result, expected_verdict, expected_bits): """Return (verdict_ok, bits_ok, got_verdict, got_bits).""" got_v = result.get("verdict", "NO_RESULT") got_bits = float(result.get("bits", 0.0)) v_ok = got_v == expected_verdict b_ok = abs(got_bits - expected_bits) <= BITS_TOLERANCE return v_ok, b_ok, got_v, got_bits def format_row(id_, pair_str, got_v, got_bits, exp_v, exp_bits, ok): verdict_str = got_v.ljust(30) if ok: verdict_str = GREEN(verdict_str) else: verdict_str = RED(verdict_str) return (f" #{id_:<5} {pair_str:<55} {verdict_str} " f"{got_bits:>5.2f}b (expected {exp_v} {exp_bits:.2f}b) " f"{'✓' if ok else RED('✗')}") def run_all(engine): """Reproduce all 10 bundled verdicts and report.""" print() print(BOLD("─── Aby Refutation Engine · Reproducible Verdict Bundle ───")) print(f" Engine file : {ENGINE_FILE}") print(f" Bundle ver. : {BUNDLE_VERSION} ({BUNDLE_DATE})") print(f" Engine hash : {fingerprint_engine(engine)[:32]}…") print(f" Tolerance : ±{BITS_TOLERANCE} bits") print() passed = 0 failed = 0 t0 = time.time() for id_, a, b, exp_v, exp_bits in BUNDLED_VERDICTS: pair_str = f"{a} ~ {b}" result = run_verdict(engine, a, b) v_ok, b_ok, got_v, got_bits = check_verdict(result, exp_v, exp_bits) ok = v_ok and b_ok print(format_row(id_, pair_str, got_v, got_bits, exp_v, exp_bits, ok)) if not ok: failed += 1 if not v_ok: print(RED(f" ^ VERDICT MISMATCH: got {got_v}, expected {exp_v}")) if not b_ok: print(RED(f" ^ BITS MISMATCH: got {got_bits:.4f}, expected {exp_bits:.2f} " f"(diff {abs(got_bits-exp_bits):.4f} > tol {BITS_TOLERANCE})")) if "shared" in result: print(DIM(f" shared: {result['shared']}")) if "differ_on" in result: print(DIM(f" differ: {result['differ_on']}")) else: passed += 1 elapsed = time.time() - t0 print() if failed == 0: print(GREEN(BOLD(f" ALL {passed} VERDICTS REPRODUCED EXACTLY ({elapsed:.2f}s)"))) print() print(" What this means:") print(" · Each verdict above was produced by running numerical experiments") print(" on standardised mathematical inputs, not by asking an LLM.") print(" · The bits figure is deterministic: same code, same inputs, same bits,") print(" on any machine with numpy installed.") print(" · These verdicts live in Aby's graveyard at:") print(" https://hal.vyronyxgroup.com/graveyard") print(" · Every entry in the graveyard can be reproduced this way.") else: print(RED(BOLD(f" {failed} VERDICT(S) DID NOT REPRODUCE."))) print() print(" Possible causes:") print(" 1. The engine file (aby_refutation_v1.py) has been modified.") print(" Check its SHA-256 above against the published hash.") print(" 2. numpy version differs significantly — check your version with:") print(" python -c \"import numpy; print(numpy.__version__)\"") print(" 3. A genuine non-determinism in floating-point on your platform.") print(" Report this with your OS/CPU/numpy version — it is a real finding.") print() print(" If the verdict itself (CONFIRMED/WEAK/REFUTED) matches but the bits") print(" differ slightly, increase BITS_TOLERANCE at the top of this file.") print() return failed == 0 def run_one_by_id(engine, target_id): """Reproduce a single verdict by its graveyard ID.""" for id_, a, b, exp_v, exp_bits in BUNDLED_VERDICTS: if id_ == target_id: print(f"\n Reproducing graveyard entry #{id_}: {a} ~ {b}") result = run_verdict(engine, a, b) v_ok, b_ok, got_v, got_bits = check_verdict(result, exp_v, exp_bits) ok = v_ok and b_ok print(format_row(id_, f"{a} ~ {b}", got_v, got_bits, exp_v, exp_bits, ok)) if "shared" in result and result["shared"]: print(f"\n Shared properties (each a numerical measurement):") for prop, val, bits in result["shared"]: print(f" {prop:<35} = {val} ({bits:.2f} bits)") if "differ_on" in result and result["differ_on"]: print(f"\n Properties that differ (evidence for REFUTED):") for prop in result["differ_on"]: print(f" {prop}") print() return ok print(RED(f"\n Graveyard ID #{target_id} is not in this bundle.")) print(f" Bundled IDs: {[v[0] for v in BUNDLED_VERDICTS]}") return False def run_arbitrary_pair(engine, a, b): """Judge any transform pair the user specifies.""" all_names = list(engine.TYPE.keys()) if a not in engine.TYPE: print(RED(f"\n '{a}' is not a known transform.")) print(f" Known transforms: {', '.join(sorted(all_names))}") return False if b not in engine.TYPE: print(RED(f"\n '{b}' is not a known transform.")) print(f" Known transforms: {', '.join(sorted(all_names))}") return False print(f"\n Judging: {a} ~ {b}") result = run_verdict(engine, a, b) v = result.get("verdict", "?") bits = result.get("bits", 0.0) if v == "CONFIRMED": colour = GREEN elif v in ("WEAK", "INDISTINGUISHABLE_NEEDS_FINER_PROBES", "BRIDGED_UNTESTED"): colour = YELLOW else: colour = RED print(f" Verdict : {colour(v)}") print(f" Bits : {bits:.2f}") if "confidence" in result: print(f" Confidence: {result['confidence']:.1%} of max possible for this family") if "why" in result: print(f" Why : {result['why']}") if "shared" in result and result["shared"]: print(f"\n Shared properties:") for prop, val, bits_k in result["shared"]: print(f" {prop:<35} = {val} ({bits_k:.2f} bits)") if "differ_on" in result and result["differ_on"]: print(f"\n Differs on:") for prop in result["differ_on"]: print(f" {prop}") print() return True def main(): parser = argparse.ArgumentParser( description="Reproduce Aby graveyard verdicts from the measurement engine.") parser.add_argument("--verdict", type=int, metavar="ID", help="Reproduce a single verdict by its graveyard ID.") parser.add_argument("--pair", nargs=2, metavar=("A", "B"), help="Judge any transform pair.") parser.add_argument("--list", action="store_true", help="List all bundled verdicts without reproducing.") args = parser.parse_args() print() print(BOLD("Aby Refutation Engine · Reproducible Verdict Bundle")) print(DIM(f"VyroNyx Private Limited · {BUNDLE_DATE} · v{BUNDLE_VERSION}")) print() print("Checking environment…") issues, scipy_ok = check_environment() if issues: for i in issues: print(RED(f" ERROR: {i}")) sys.exit(1) print(" Environment OK") print() print(f"Loading {ENGINE_FILE}…") engine = load_engine() print(f" Engine loaded ({len(engine.TYPE)} transforms, " f"scipy={'yes' if scipy_ok else 'no (FN1D/SEQ only)'})") print() if args.list: print(BOLD("Bundled verdicts:")) for id_, a, b, exp_v, exp_bits in BUNDLED_VERDICTS: print(f" #{id_:<5} {exp_v:<12} {exp_bits:.2f}b {a} ~ {b}") print() return if args.verdict is not None: ok = run_one_by_id(engine, args.verdict) sys.exit(0 if ok else 1) if args.pair: ok = run_arbitrary_pair(engine, args.pair[0], args.pair[1]) sys.exit(0 if ok else 1) # Default: run all 10 ok = run_all(engine) sys.exit(0 if ok else 1) if __name__ == "__main__": main()