Repository navigation
Execute rounded Gaussian words against shared finite-core references - #4205
Merged
Mister-Meeseeks merged 9 commits intoOct 21, 2026
Merged
Conversation
jmbarrancoml
marked this pull request as ready for review
October 20, 2026 14:57
jmbarrancoml
marked this pull request as draft
October 20, 2026 15:13
jmbarrancoml
marked this pull request as ready for review
October 20, 2026 15:34
jmbarrancoml
marked this pull request as draft
October 20, 2026 15:43
jmbarrancoml
marked this pull request as ready for review
October 20, 2026 16:14
Contributor
|
Independent scoped audit of the rational bounded-generator circuit package at Code-disjoint reimplementation; does not import package What passes (17 of 17):
Not covered: live circuit re-execution; Frobenius endpoint regeneration; physical tape / complete Gaussian; new κ. This is a finite replay of committed receipts, not a formal proof. check_4205.py#!/usr/bin/env python3
"""Independent finite controls for PR4205 (rational bounded-generator circuits).
Recomputes budget identities total_error = coefficient_error·R + rounding_error,
layer_bound = 4d+8, source seals, and honesty flags. Does not import package
verify.py / engine.py / generator.py / triangular.py.
Package head fdcdc2690910392f7b42dbae4155b7d7b5790abd via GitHub API.
James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor).
Apache-2.0.
"""
from __future__ import annotations
import argparse, hashlib, json, sys
from fractions import Fraction
from pathlib import Path
HEAD = "fdcdc2690910392f7b42dbae4155b7d7b5790abd"
BASE = "12fa8c5c844be21bfefb38a19503fbd867a11244"
results = []
def check(name, ok, detail=""):
results.append((name, bool(ok), detail))
print(("PASS " if ok else "FAIL ") + name + ((": " + str(detail)) if detail else ""), flush=True)
return bool(ok)
def load(pkg, name):
return json.loads((pkg / name).read_text(encoding="utf-8"))
def sha(path: Path):
return hashlib.sha256(path.read_bytes()).hexdigest()
def auth_sources(sources, deps: Path, local_vendor: Path):
bad, count = [], 0
for row in sources["files"]:
if row["usage"] != "input":
continue
path = row["path"]
if path.startswith("research/rational-unitary-fft/vendor/"):
data = (local_vendor / Path(path).name).read_bytes()
else:
data = (deps / path).read_bytes()
if hashlib.sha256(data).hexdigest() != row["sha256"]:
bad.append(path); continue
blob = b"blob " + str(len(data)).encode() + b"\0" + data
if hashlib.sha1(blob).hexdigest() != row["git_blob"]:
bad.append(path + ":blob"); continue
count += 1
return count, bad
def budget_ok(budget):
ce = Fraction(budget["coefficient_error"])
re = Fraction(budget["rounding_error"])
rad = Fraction(budget["radius"])
te = Fraction(budget["total_error"])
return te == ce * rad + re
def run(pkg: Path, deps: Path):
sources = load(pkg, "SOURCES.json")
verify = load(pkg, "VERIFY.json")
result = load(pkg, "RESULT.json")
gen = load(pkg, "GENERATOR-RESULT.json")
tri = load(pkg, "TRIANGLE-RESULT.json")
stein = load(pkg, "vendor/STEIN-PROVENANCE.json")
check("I1 SOURCES base_commit == 12fa8c5c…; VERIFY ready",
sources["base_commit"] == BASE and verify["status"] == "ready")
check("I2 honesty: physical_tape_execution False on RESULT/GENERATOR/TRIANGLE",
result["physical_tape_execution"] is False
and gen["physical_tape_execution"] is False
and tri["physical_tape_execution"] is False)
check("I3 GENERATOR complete_gaussian_execution False; TRIANGLE full_generator_execution False",
gen.get("complete_gaussian_execution") is False
and tri.get("full_generator_execution") is False)
n_in, bad = auth_sources(sources, deps, pkg / "vendor")
check("S1 SOURCES input files authenticate (sha256 + git blob), incl. vendor stein",
not bad and n_in == 11, bad)
check("S2 STEIN-PROVENANCE.sha256 == vendor/stein_rational.py",
stein["sha256"] == sha(pkg / "vendor/stein_rational.py")
and stein["retained_path"].endswith("stein_rational.py"))
# RESULT.sources digests ⊆ SOURCES
spath = {f["path"]: f["sha256"] for f in sources["files"]}
rs_bad = [row["path"] for row in result["sources"]
if spath.get(row["path"]) != row["sha256"]]
check("S3 RESULT.sources (8) digests match SOURCES table",
not rs_bad and len(result["sources"]) == 8, rs_bad)
# FFT RESULT
check("F1 RESULT: 12 cases, 10 phases, 12 named controls; scope rational FFT/Toeplitz",
len(result["cases"]) == 12 and len(result["phases"]) == 10
and len(result["controls"]) == 12
and "rational FFT" in result["scope"])
bad_b, bad_l = [], []
for i, c in enumerate(result["cases"]):
if not budget_ok(c["budget"]):
bad_b.append(i)
d = c["budget"]["depth"]
if c["budget"]["layer_bound"] != 4 * d + 8:
bad_l.append(i)
if c["n"] != 1 << d and not (c["n"] == 1 and d == 0):
# n should be 2^d
if c["n"] != (1 << d):
bad_l.append(("n", i))
check("F2 every RESULT budget: total_error = coefficient_error·radius + rounding_error",
not bad_b, bad_b)
check("F3 every RESULT budget.layer_bound = 4·depth+8; n=2^depth",
not bad_l, bad_l)
# paired dyadic sizes
ns = [c["n"] for c in result["cases"]]
check("F4 case n multiset covers {1,1,2,2,4,4,4,4,8,8,16,16}",
sorted(ns) == [1, 1, 2, 2, 4, 4, 4, 4, 8, 8, 16, 16])
# phases monotonic phase_bits
pb = [p["phase_bits"] for p in result["phases"]]
check("F5 phase_bits strictly increasing across 10 oracle phases",
pb == sorted(pb) and len(set(pb)) == 10)
# GENERATOR
bad_g = [i for i, c in enumerate(gen["cases"]) if not budget_ok(c["budget"])]
check("G1 GENERATOR: 57 cases; all budgets total_error = ce·R + rounding",
len(gen["cases"]) == 57 and not bad_g, bad_g)
check("G2 GENERATOR: 12 named controls; collector_ast_sha256 present",
len(gen["controls"]) == 12 and len(gen["collector_ast_sha256"]) == 64)
# TRIANGLE
bad_t = [i for i, c in enumerate(tri["cases"]) if not budget_ok(c["budget"])]
check("T1 TRIANGLE: 10 cases; all budgets total_error = ce·R + rounding",
len(tri["cases"]) == 10 and not bad_t, bad_t)
check("T2 TRIANGLE: 12 named controls",
len(tri["controls"]) == 12)
# VERIFY commands cover three verifiers
cmds = " ".join(" ".join(c["argv"]) for c in verify["commands"])
check("V1 VERIFY commands include verify.py / verify_generator.py / verify_triangle.py",
"verify.py" in cmds and "verify_generator.py" in cmds and "verify_triangle.py" in cmds)
failed = [name for name, ok, _ in results if not ok]
print(f"\n{len(results) - len(failed)}/{len(results)} PASS", flush=True)
if failed:
print("FAILED:", ", ".join(failed), flush=True)
return 1
return 0
def main():
ap = argparse.ArgumentParser()
ap.add_argument("--pkg", required=True)
ap.add_argument("--deps", required=True)
ap.add_argument("--expect-head", default=HEAD)
args = ap.parse_args()
check("HEAD pin recorded (API fetch)", args.expect_head == HEAD, args.expect_head)
return run(Path(args.pkg), Path(args.deps))
if __name__ == "__main__":
sys.exit(main())James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor). |
jmbarrancoml
marked this pull request as draft
October 20, 2026 16:31
jmbarrancoml
marked this pull request as ready for review
October 20, 2026 17:19
jmbarrancoml
marked this pull request as draft
October 20, 2026 17:39
jmbarrancoml
marked this pull request as ready for review
October 20, 2026 18:03
jmbarrancoml
marked this pull request as draft
October 20, 2026 18:13
jmbarrancoml
marked this pull request as ready for review
October 20, 2026 18:59
jmbarrancoml
marked this pull request as draft
October 20, 2026 19:14
jmbarrancoml
marked this pull request as ready for review
October 20, 2026 20:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I connect the retained Gaussian carve, raw interior circuits and rounded boundary solver into complete ordinary finite-core narrow inverse and broad forward programs. I derive each Schur page from the same exact rational reference, retain the original couplings and six-call order, and execute with one grid and an explicit intermediate-input budget. The broad program applies its Schur factor; the narrow program consumes prepared rounded inverse pages through the retained block/Strassen arithmetic.
For maximum complex-l1 input bound
Y0, five-factor norm boundKand target2^-t, I takeY*=6K^5Y0and local errore=2^-t/(10K^4). I prove complete error at most2^(-t-1), supply a reference allocation before window selection and bound arithmetic temporaries.CORE-PROOF.mdstates the hypotheses and residual argument. I preserve the six earlier FFT, triangular, generator, full Toeplitz, normalized Gaussian and raw-reference receipts.I check four finite-core cases: two 143-row programs with two 16-row interiors each, and two 11-row windows crossing a hole. They execute 88,704 dense gate applications and 19,992 boundary scalar products. I check each stage against its actual input, complete narrow residuals and broad products, a 768-bit incoming grid, prepared-page equivalence and 13 controls. The core scientific digest is
65f0cefaed8d7b8b21125cde5155401b3880e896b49068e8e8c86895b5004e4d.Reproduce with CPython 3.12 and the standard library:
I declare eight normal/optimized commands with a total timeout budget of 1,200 seconds. I run the full, normalized, raw and core checks sequentially in the final two commands.
I passed all eight registered checks and all eight Git-free checks at head
78c72e563173f3822fcb4efed9ceeccf05630258. I checked 63 committed payload files and their source-history pins; all 64 exported files stayed unchanged. The combined export commands took 147.066 and 146.018 seconds. Archive SHA256:dca7449c8bbd870be87655373969d940dc42af69ed40da632873ae1105ad907e; receipt SHA256:2b0882f33e7480cef5c713f96ba83a663137fc04504190db402d1aa3f6b3319e.I matched all fourteen scientific records and seven receipt digests from the successful hosted run39492372797 to the export. GitHub also passed the unchanged-input check. I verified test merge
7acbb956f35751735f0948e6c751787b8635ad4c, its exact base/head parents and publication treed069aea846216a42c32d1761c2e356719b2c7e16.The finite fixtures use cap 16 with physical half-band 18; I make no large-cap scaling claim from them. I keep exact Schur/LU/inverse preparation outside online counts. Core/halo comparison, cyclic corners, tensor composition, physical coefficient delivery and complete tape/setup costs remain open. Reviewers still need to assess the quantified proofs. I claim no new selected exponent or complete multiplication theorem.
I credit Vlado Vojdanovski for the retained circuits, carve, factor order and block/Strassen program; Jeremy Kothe/IdeaOuter for shifted Gaussian identities; Mason Hale for interval arithmetic; Chafik Boukhalfa for certified phases; and Cinna Davis for the later caller. I retain our PR4186 boundary adapter with its original provenance. ToikY's PR4209 Schur theorem and PR4220 independent scalar audit, Nick Petalas's PR4217 HALO audit and James Reed's limited budget/source checks retain their separate scopes. Internal analysis agents belong to our author process.
Jose Manuel (
jmbarrancoml), with substantial OpenAI Codex assistance in mathematics, implementation and writing. Apache-2.0.Canonical claim and handoff.