Repository navigation
Conversation
|
Independent finite Windows/capacity-boundary audit of exact head All three registered commands passed natively on Windows / CPython3.12.15, using their unchanged60-second timeouts, in a Git-free13-file export. Before export I compared every one of the six SOURCES entries to both its declared Git blob/SHA256 and the exact bytes at declared base Additional scope beyond the package's small-minor fixtures:23 constructed exact-rank cases through96x96 (zero, deficient and full ranks, nonsquare matrices, row/column permutations, invertible row additions, rational/sign scalings), including three accepted128-bit rational diagonal cases. Expected ranks come from an explicit L*R factorization with an identity minor, not a second Gaussian-elimination implementation. A40-entry pairwise-coprime101-bit-denominator row is accepted at rank1;42entries reject at the declared LCM capacity. Oversized numerator, denominator, row count and column count also reject. No input changes observed in the constructed rank cases. The package's original209-Q-call comparisons, seven scientific controls, wrong-adapter rejection, both optimized/nonoptimized verification and three before-import corruption controls pass unchanged. All six complete replay outputs in three alternating fresh-process timing pairs were byte-identical. Original seconds: No correctness defect found in this bounded audit; no production change or separate PR warranted. This adds Windows and declared-capacity boundary evidence, not general correctness on every admitted rational input, independent human/kernel review, a new floor theorem, supplier admission or a new kappa. No selected-frontier/cold replay. Live targeted all-state Eisenstein/rational-rank metadata and this PR's empty conversation were checked; this is limited overlap coverage, not a global novelty claim. Credit Nick Petalas for this adapter and package; ywz65 #2627 for the retained K adapter and Q-rank handoff; Jose Manuel / jmbarrancoml #2017 and retained geometry contributors for the scientific consumer. Audit/constructed fixtures by Dennis / antunishdPursuit with substantial OpenAI Codex assistance, no subagents, Apache-2.0. Row-rank invariance and the rank-factorization argument are standard. Reproduce the additional audit by saving the script below outside a checkout of the exact head, then running Standalone reproduction script"""Independent finite boundary audit by Dennis / antunishdPursuit, with OpenAI Codex assistance. Apache-2.0.
Consumer: Nick Petalas PR5954 exact464b8c36e1de79422b2ad82b8a60a6732e4d50f6.
No theorem, universal performance or supplier-admission claim.
"""
import hashlib, importlib.util, json, math, pathlib, subprocess, sys, time
from fractions import Fraction
root=pathlib.Path(sys.argv[1]).resolve()
package=root/'research/eisenstein-rational-rank'
raw=(package/'rational_rank.py').read_bytes()
EXPECTED_SHA='e323bb0d9e6ff62df11754b12eba6204eb9edfe67b0fcffbc23d68c7e93358e8'
assert hashlib.sha256(raw).hexdigest()==EXPECTED_SHA
spec=importlib.util.spec_from_file_location('audited_rank',package/'rational_rank.py')
engine=importlib.util.module_from_spec(spec);spec.loader.exec_module(engine)
# First r columns of L have an identity minor. R's first r columns are identity.
# Hence L*R has rank r: upper bound by factorization, lower bound by that minor.
# Invertible row/column operations, scalings and permutations preserve this rank.
cases=[]
for h,w in [(0,0),(1,96),(96,1),(7,96),(96,7),(32,48),(48,32),(96,96)]:
for rank in sorted(set([0,min(h,w)//2,min(h,w)])):
L=[[int(i==j) if i<rank else ((i+3*j)%7-3) for j in range(rank)] for i in range(h)]
R=[[int(j==i) if j<rank else ((2*i+j)%5-2) for j in range(w)] for i in range(rank)]
A=[[sum(L[i][k]*R[k][j] for k in range(rank)) for j in range(w)] for i in range(h)]
if h>1:
for i in range(h-1):A[i]=[x-2*y for x,y in zip(A[i],A[i+1])]
A=[[Fraction(x*(-1 if j%2 else 1),i+1) for j,x in enumerate(row)] for i,row in enumerate(A)]
A=[list(reversed(row)) for row in reversed(A)]
before=[row[:] for row in A]
observed=engine.rank(A)
assert observed==rank,(h,w,rank,observed)
assert A==before
cases.append([h,w,rank])
# Exact accepted 128-bit boundaries; each nonzero diagonal gives an explicit minor.
for n in [1,8,96]:
a=Fraction((1<<127)-1,(1<<128)-1)
A=[[a if i==j else 0 for j in range(n)] for i in range(n)]
assert engine.rank(A)==n
cases.append([n,n,n,'128-bit diagonal'])
# Independent pairwise-coprime denominators stress the LCM guard through rank().
denominators=[];candidate=(1<<100)+1
while len(denominators)<42:
if all(math.gcd(candidate,d)==1 for d in denominators):denominators.append(candidate)
candidate+=2
safe=[[Fraction(1,d) for d in denominators[:40]]]
assert engine.rank(safe)==1
bad=[[[Fraction(1,d) for d in denominators]],[[1<<128]],[[Fraction(1,1<<128)]],[[0]*97],[[0]]*97]
reasons=[]
for A in bad:
try:engine.rank(A)
except ValueError as e:reasons.append(str(e))
else:raise AssertionError('capacity exhaustion accepted')
assert reasons[0]=='row denominator too large'
# Generic rank controls would detect either a constant-zero or full-rank adapter.
assert any(r[2]>0 for r in cases)
assert any(r[0]>0 and r[1]>0 and r[2]<min(r[:2]) for r in cases)
manifest=json.loads((package/'VERIFY.json').read_text(encoding='utf-8'))
commands=[]
for command in manifest['commands']:
argv=[x.replace('{python}',sys.executable).replace('{package}',str(package)) for x in command['argv']]
start=time.perf_counter();r=subprocess.run(argv,cwd=root,capture_output=True,timeout=command['timeout_seconds'])
assert r.returncode==0,(argv,r.stdout.decode(errors='replace'),r.stderr.decode(errors='replace'))
commands.append({'command':command['argv'],'elapsed_seconds':round(time.perf_counter()-start,6),'stdout_sha256':hashlib.sha256(r.stdout).hexdigest(),'markers':[x for x in r.stdout.decode().splitlines() if x.startswith('PASS_')]})
# Matched fresh-process complete replay timings, serial and alternating, three pairs.
timings={'original':[],'adapted':[]};out=None
for pair in range(3):
for original in ([True,False] if pair%2==0 else [False,True]):
argv=[sys.executable,'-W','error','-I','-O','-B',str(package/'replay.py')]+(['--original'] if original else [])
start=time.perf_counter();r=subprocess.run(argv,cwd=root,capture_output=True,timeout=60);elapsed=time.perf_counter()-start
assert r.returncode==0,r.stderr
if out is None:out=r.stdout
assert r.stdout==out
timings['original' if original else 'adapted'].append(round(elapsed,6))
print(json.dumps({'rank_cases':cases,'lcm_positive_cases':1,'capacity_rejections':reasons,'registered_commands':commands,'timings':timings,'complete_stdout_sha256':hashlib.sha256(out).hexdigest(),'python':sys.version},indent=2))
print('PASS_INDEPENDENT_EISENSTEIN_BOUNDARIES') |
Summary
Reduce complete Eisenstein replay wall time by 35.27% on the measured fixture, answering Open next question 2 of ywz65's #2627. This is a finite exact equivalence certificate and local performance measurement. The new contribution is an optional rational-rank adapter; the cost-40 theorem remains Jose Manuel's cited #2017 result.
The adapter, verifier and benchmark were produced by Nick Petalas. Credit ywz65 #2627 for the K adapter and Q-rank handoff, Jose Manuel / jmbarrancoml #2017 for the original verifier and theorem, and Jonathan Lam / Joel Pulikkan / GamingPuzzled for geometry. Integer-row elimination is classical.
Evidence
Six alternating fresh-process timing pairs after warmup, CPython 3.12.15 / macOS arm64:
research/eisenstein-rational-rank/BENCHMARK.jsoncontains generated observations, order, environment, code hashes and the ordered matrix/rank digest. Shared-host load was uncontrolled; the nonoverlapping ranges support this local improvement, not a universal speed guarantee.Local checks passed:
From the repository root, standard-library Python 3.12 suffices:
Any CPython 3.12 path can replace the displayed local interpreter. Timing output must be new and outside the checkout. Expected correctness markers are
PASS_EISENSTEIN_RATIONAL_RANK,PASS_EISENSTEIN_RATIONAL_INTEGRITYandPASS_REGISTERED_RESEARCH_PACKAGE.Limitations and unrun obligations
The rational adapter rejects inputs exceeding 96 rows/columns, 128-bit rational components or 4096-bit integer rows. Coefficient growth can change performance elsewhere. The fixture reaches 80 by 80 with four-bit input heights.
This adds no pairing theorem, native supplier, complete multiplication theorem, kappa improvement or selected-frontier change. No Lean, Docker, selected scientific cold replay, physical caller, compiler, stock or precision admission was run. Independent human and formal proof-kernel review are unclaimed. Frozen sources and production verifiers are untouched.
Open next questions
Does this Q-rank adapter improve another named complete replay with larger ranks or coefficient heights? First capture that consumer's exact ordered matrix census and compare complete matched runs. Its coefficient bounds and actual workload are prerequisites; no further field optimization is included here.
Related open work
The completion refresh examined the twelve other open account PRs created since the advance CLAIM: #5944, #5945, #5946, #5947, #5948, #5949, #5950, #5951, #5952, #5953, #5956 and #5957. None studies this Eisenstein Q-rank fixture or reports a competing timing for it. No additional computations were run to check those contributions. The rank-135 fitting matrix in #5950 and rational-frame cut certificate in #5944 concern different matrices and quantities.
#2627 and #2017 are merged predecessors. This contribution does not recount their mathematical results as new coverage. Unpublished work and arbitrary code diffs remain outside the overlap search.
CI notes
Both hosted checks passed for
464b8c36e1de79422b2ad82b8a60a6732e4d50f6in run 40531800664: plan in 4m40s and replay (research/eisenstein-rational-rank) in 2m0s. The completed checks were read once, and the run head matches the PR head.All three registered commands passed locally under CPython 3.12.15. Hosted replay certifies the bounded automated package checks, not independent human or formal proof-kernel acceptance or a general performance guarantee. No CI failure remains.
Merge danger
Door: reversible. Blast radius: one optional research package. No shared code, frozen input, production verifier or selected record changes.
Advance claim.