Repository navigation
Add exact small-depth audit for butterfly transfer - #3922
Draft
1337isnot1337 wants to merge 1 commit into
Draft
1337isnot1337 wants to merge 1 commit into
1337isnot1337 wants to merge 1 commit into
Conversation
Contributor
|
Independent scoped audit of the uniform-transfer small-depth guard package at Code-disjoint integer arithmetic; does not import package What passes (10 of 10):
Not covered: live verify; remote SOURCES/upstream auth; full fixed-tape proposition; new κ. This is a finite replay of committed receipts, not a formal proof. check_3922.py#!/usr/bin/env python3
"""Independent finite controls for PR3922 (uniform transfer small-depth guard).
Recomputes ceil(log2 W), q0(d), and residual/internal thresholds.
Does not import package verify.py.
Package head 513cba38b401cb98514bd8dc60dd4821aac3343b via GitHub API.
James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor).
Apache-2.0.
"""
from __future__ import annotations
import argparse, json, math, sys
from pathlib import Path
HEAD = "513cba38b401cb98514bd8dc60dd4821aac3343b"
BASE = "20ecf2891d80b5acf18d980b2164fb44ea7faa90"
W = 1_873_807_244_643_542_670_000
M = 1_000_000
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 ceil_log2(n: int) -> int:
if n <= 1:
return 0
return (n - 1).bit_length()
def ceil_log_m(n: int, m: int = M) -> int:
# smallest k with m^k >= n
if n <= 1:
return 0
k = 0
p = 1
while p < n:
p *= m
k += 1
return k
def q0(d: int) -> int:
return ceil_log2(W) * ceil_log_m(2 * d)
def run(pkg: Path):
sources = load(pkg, "SOURCES.json")
verify = load(pkg, "VERIFY.json")
task = load(pkg, "TASK.json")
readme = (pkg / "README.md").read_text(encoding="utf-8")
verifier = (pkg / "verify.py").read_text(encoding="utf-8")
check("I1 SOURCES/TASK base_commit == 20ecf289…; VERIFY ready",
sources["base_commit"] == BASE == task["base_commit"]
and verify["status"] == "ready")
check("I2 PASS_UNIFORM_TRANSFER_SMALL_DEPTH_GUARD; not a full fixed-tape reproof",
"PASS_UNIFORM_TRANSFER_SMALL_DEPTH_GUARD" in verifier
and "not a reproof" in readme.lower())
check("S1 SOURCES digests complete",
all(len(f.get("sha256", "")) == 64 and len(f.get("git_blob", "")) == 40
for f in sources["files"]))
check("A1 ceil(log2 W)=71 for pinned W; m=1_000_000",
ceil_log2(W) == 71
and 2 ** 70 < W <= 2 ** 71
and M == 1_000_000
and "71" in readme and str(W) in readme.replace(",", ""))
check("A2 q0(1)=71 so D=1≤q0 takes direct-kernel fallback at (d,e)=(1,1)",
q0(1) == 71 and 1 <= q0(1))
check("A3 first residual after fallback at d=D=72: q0=71, D−q0=1; e=1 is leaf (1²<72)",
q0(72) == 71 and 72 - 71 == 1 and 1 * 1 < 72)
check("A4 no internal piece of size ≥m for d<1_000_142; first internal at d=D=1_000_142 with D−q0=m",
q0(1_000_141) == 142 and 1_000_141 - 142 < M
and q0(1_000_142) == 142 and 1_000_142 - 142 == M
and "1,000,142" in readme)
check("A5 for 1≤d≤500_000, q0=71 and d−q0 < m; for 500_001≤d≤1_000_141, q0=142 and d−q0 < m",
q0(500_000) == 71 and 500_000 - 71 < M
and q0(500_001) == 142 and 1_000_141 - 142 < M)
check("N1 remote upstream tex not re-fetched; small-depth guard only",
"05-layers.tex" in readme and "small-depth" in readme.lower())
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("--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))
if __name__ == "__main__":
sys.exit(main())James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor). |
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.
Audit low-depth guard of the uniform butterfly transfer
Change and scope
Adds a source-pinned audit of the low-width and first-recursion boundary in the fixed-network row splitter from
upstream/build/sections/05-layers.tex. The scope complements the general quantified transfer audit by checking only the exceptionald,Dendpoints under the exact network constants.Result
The strict leaf predicate is
e^2<d; at(d,e)=(1,1)it is false. The source's precedingD<=q0direct-kernel branch handles that case withq0=71. Exact base-marithmetic shows the first residual leaf atd=D=72, and no internal piece of sizem=1,000,000can occur befored=D=1,000,142. At that first internal boundary the piece has sizemand its children of size 1 are leaves. This closes the narrow stopping-depth audit; it does not falsify the stated proposition or change selected κ.For all-positive-
dreuse, the localO(V log d)direct-branch shorthand needs ad>=2guard orO(V log(2d)). The proposition's existentialp0can enforced>=2; the final bound already useslog(2d).Verification and limits
python3 -B research/uniform-transfer-small-depth-guard/verify.pypasses under CPython 3.14.8 using exact integer ceilings and powers.python3 -B scripts/research_package.py --package research/uniform-transfer-small-depth-guard --check-onlypasses metadata and source pins.python3.12is unavailable in this environment. No full selected replay or universal theorem is claimed.20ecf2891d80b5acf18d980b2164fb44ea7faa90; current canonical main was fetched at that same commit before final packaging.513cba38b401cb98514bd8dc60dd4821aac3343b.Credit: upstream proof authors and the prior audit retain their attribution. This package adds the endpoint arithmetic and exact fixture. Substantial AI assistance by OpenAI Codex laptop-12; no independent human review claimed.
Publication validation
python3.12 scripts/research_package.py --package research/uniform-transfer-small-depth-guardpassed on CPython 3.12.3, andpython3.12 scripts/check_research_commit.py --package research/uniform-transfer-small-depth-guard --check-source-historypassed. The registered replay left the worktree clean. This supersedes any earlier pending note above for the registered package replay; separate full selected cold-replay limits remain as stated.