Skip to content

Execute rounded Gaussian words against shared finite-core references - #4205

Merged
Mister-Meeseeks merged 9 commits into
CrocSwap:mainfrom
jmbarrancoml:research/rational-unitary-fft
Oct 21, 2026
Merged

Mister-Meeseeks merged 9 commits into
CrocSwap:mainfrom
jmbarrancoml:research/rational-unitary-fft

Conversation

@jmbarrancoml

@jmbarrancoml jmbarrancoml commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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 bound K and target 2^-t, I take Y*=6K^5Y0 and local error e=2^-t/(10K^4). I prove complete error at most 2^(-t-1), supply a reference allocation before window selection and bound arithmetic temporaries. CORE-PROOF.md states 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:

python3.12 -B scripts/research_package.py --package research/rational-unitary-fft

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 tree d069aea846216a42c32d1761c2e356719b2c7e16.

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.

@jmbarrancoml
jmbarrancoml marked this pull request as ready for review October 20, 2026 14:57
@jmbarrancoml
jmbarrancoml marked this pull request as draft October 20, 2026 15:13
@jmbarrancoml jmbarrancoml changed the title Certify rational unitary FFT and rounded Toeplitz shear Certify rational FFT and rounded parity-triangular programs Oct 20, 2026
@jmbarrancoml
jmbarrancoml marked this pull request as ready for review October 20, 2026 15:34
@jmbarrancoml
jmbarrancoml marked this pull request as draft October 20, 2026 15:43
@jmbarrancoml jmbarrancoml changed the title Certify rational FFT and rounded parity-triangular programs Execute certified rational bounded-generator circuits Oct 20, 2026
@jmbarrancoml
jmbarrancoml marked this pull request as ready for review October 20, 2026 16:14
@rcfc-jreed

Copy link
Copy Markdown
Contributor

Independent scoped audit of the rational bounded-generator circuit package at fdcdc269: no defect found in the finite budget / seal / honesty layer

Code-disjoint reimplementation; does not import package verify.py / engine.py / generator.py / triangular.py. Package bytes from head fdcdc2690910392f7b42dbae4155b7d7b5790abd via GitHub contents API. CLAIM.

What passes (17 of 17):

  1. Pins / honesty. Base 12fa8c5c…. VERIFY ready. Eleven SOURCES inputs authenticate (incl. vendor Stein). physical_tape_execution / complete_gaussian_execution / full_generator_execution all False.
  2. FFT RESULT. 12 cases; every budget satisfies total_error = coefficient_error·R + rounding_error; layer_bound = 4d+8; dyadic n=2^d; 10 increasing phase oracles; 12 controls.
  3. GENERATOR / TRIANGLE. 57 + 10 cases with the same budget identity; 12 controls each; collector AST seal present.

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
jmbarrancoml marked this pull request as draft October 20, 2026 16:31
@jmbarrancoml jmbarrancoml changed the title Execute certified rational bounded-generator circuits Certify full Toeplitz circuits with polynomial conditioning bounds Oct 20, 2026
@jmbarrancoml
jmbarrancoml marked this pull request as ready for review October 20, 2026 17:19
@jmbarrancoml
jmbarrancoml marked this pull request as draft October 20, 2026 17:39
@jmbarrancoml jmbarrancoml changed the title Certify full Toeplitz circuits with polynomial conditioning bounds Certify normalized Gaussian calls through full Toeplitz circuits Oct 20, 2026
@jmbarrancoml
jmbarrancoml marked this pull request as ready for review October 20, 2026 18:03
@jmbarrancoml
jmbarrancoml marked this pull request as draft October 20, 2026 18:13
@jmbarrancoml jmbarrancoml changed the title Certify normalized Gaussian calls through full Toeplitz circuits Certify raw Gaussian interiors against shared rounded references Oct 20, 2026
@jmbarrancoml
jmbarrancoml marked this pull request as ready for review October 20, 2026 18:59
@jmbarrancoml
jmbarrancoml marked this pull request as draft October 20, 2026 19:14
@jmbarrancoml jmbarrancoml changed the title Certify raw Gaussian interiors against shared rounded references Execute rounded Gaussian words against shared finite-core references Oct 20, 2026
@jmbarrancoml
jmbarrancoml marked this pull request as ready for review October 20, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants