diff --git a/research/p104-smooth-swap-split/DISCOVERY.json b/research/p104-smooth-swap-split/DISCOVERY.json new file mode 100644 index 0000000000..fe67a5dbb7 --- /dev/null +++ b/research/p104-smooth-swap-split/DISCOVERY.json @@ -0,0 +1,20 @@ +{ + "scope": "Finite nomination, not optimality", + "original_source_word": "0432d98403bc40352d897e193c7005bed2d10618620a1fcf22be3cf1c93389f7", + "original_source_local_commit": "d8c7935cbbf98cf88caa484c8beefc4332cf803b", + "original_cut": 37729, + "public_source": "fdb1eb55c4c6604e714c6950e656c67ae0e52370", + "public_cut": 37738, + "transfer": "Exact whole prefix/suffix rechecked after index change; boundary and cut vectors omit1285,1286,1482.", + "paired_directions": 44146, + "rational_nominations": 108, + "smooth_basis_nominations": 91, + "chosen_index": 73, + "gauge_scale": 1, + "prior_negatives": { + "rank8_246_paired": 166, + "rank8_245_paired": 22, + "public_fusion_two_hops": 4756 + }, + "note": "Rational relaxation was exploratory; accepted emitted scalar alphabet remains2,3,5. Full kernel census is not required by or trusted by the verifier." +} diff --git a/research/p104-smooth-swap-split/ENVIRONMENT.json b/research/p104-smooth-swap-split/ENVIRONMENT.json new file mode 100644 index 0000000000..0d7dff9cd4 --- /dev/null +++ b/research/p104-smooth-swap-split/ENVIRONMENT.json @@ -0,0 +1,11 @@ +{ + "completed_utc": "2026-11-10T15:29:35.190715+00:00", + "dependencies": "Python standard library", + "hosted_python312": "Pending publication; not claimed locally", + "platform": "macOS-27.0.1-arm64-arm-64bit-Mach-O", + "python": "3.14.7", + "runs": [ + "Initial complete physical and scientific replay", + "Final exact frozen receipt replay including added lower-grid and legacy-swap controls" + ] +} diff --git a/research/p104-smooth-swap-split/INPUTS.json b/research/p104-smooth-swap-split/INPUTS.json new file mode 100644 index 0000000000..22243b7749 --- /dev/null +++ b/research/p104-smooth-swap-split/INPUTS.json @@ -0,0 +1,56 @@ +{ + "archive_sha256": "b116bd277bcb1560fc1f15e33ce300b487c769564cece55d7821b072085097a8", + "files": [ + { + "git_blob": "597e221d977813da89ff7cb98e96b489c872038d", + "mode": "100644", + "path": "research/cocharted-rank9-helper-split/README.md", + "sha256": "79af2d07897a4e895aedab1d258cdf327b66da6bca8d3e636b29f4bd8932d0e4", + "size": 3490 + }, + { + "git_blob": "88f20e78c814e4b4b30d2df7c171fe8aa5cfcdee", + "mode": "100644", + "path": "research/cocharted-rank9-helper-split/REPLAY.tar.gz", + "sha256": "7a254b76dc6050451f01331205136d1be1ddae14f085cbd54adc44518793de94", + "size": 1055596 + }, + { + "git_blob": "22769d9c487524697291471c9899a36bbe399d27", + "mode": "100644", + "path": "research/cocharted-rank9-helper-split/RESULT.json", + "sha256": "af33764f9495af01da6a02afa7ff3b8fac1fbb622c964c967c685622fbf9ad3d", + "size": 26589 + }, + { + "git_blob": "b06c2f774eb6010ed89a251aa4313c970e87b3a7", + "mode": "100644", + "path": "research/cocharted-rank9-helper-split/SOURCES.json", + "sha256": "007167ec14efa96e51840bb49f75c61e05fbfebb9e8c9a33f68d94e3dc5cacbf", + "size": 584 + }, + { + "git_blob": "56213b3cfa1c7f48e1cf3fb80c61da20d2ade361", + "mode": "100644", + "path": "research/cocharted-rank9-helper-split/TASK.json", + "sha256": "830c361ab0f96c2c71f4d52f1cd93d043e5667e01a389aaba7f32ed06c7be719", + "size": 7377 + }, + { + "git_blob": "f13d57a73cb9121ebf726ad1c5fc282dd20af8ee", + "mode": "100644", + "path": "research/cocharted-rank9-helper-split/VERIFY.json", + "sha256": "6d82f7dfb0da6d0b6462cf71b952dde77c951cd093044e90a64142473756dda3", + "size": 423 + }, + { + "git_blob": "f67a3445f3775cd77eec25e939d9912297afb153", + "mode": "100644", + "path": "research/cocharted-rank9-helper-split/verify.py", + "sha256": "f20104f1cef30dc33d01cb7e7b0b6c24f17c97b8033737d211a4d689062c3c50", + "size": 947 + } + ], + "source_canonical_sha256": "3d500210240a340b865e2df8ce93cd53ad797537c1f6297508d2bd6a9b863d78", + "source_head": "fdb1eb55c4c6604e714c6950e656c67ae0e52370" +} diff --git a/research/p104-smooth-swap-split/README.md b/research/p104-smooth-swap-split/README.md new file mode 100644 index 0000000000..a4b45d077c --- /dev/null +++ b/research/p104-smooth-swap-split/README.md @@ -0,0 +1,65 @@ +# Smooth-swap helper split: conditional κ .003637417119941 + +This exact successor of ToikY's [#7110](https://github.com/CrocSwap/integer-mult-bounds/pull/7110), head `fdb1eb55c4c6604e714c6950e656c67ae0e52370`, improves its conditional claim by **.000000969262210**, from **.003636447857731** to **.003637417119941**. One additional rank-nine helper becomes rank-five and rank-four helpers. The paid profile and signed caller remain unchanged; all 878 added scalar instructions are charged. This is a source-bound conditional construction, not a selected-frontier update or complete multiplication theorem. + +## Exact construction and basis choice + +Use source cut **37738** (before that zero-based event), pivot **631**, and chart **118**, of dimension five. The helper boundary group has initial chart 3 (dimension zero) and final chart 127 (dimension nine). The cut row and column are + +``` +a = -14 e1293 + 2 e1294 + e1384 + e631/2 + 3 e632/2 + + e634/2 + 3 e635 - 2 e636, +b = -e1293/16 - e1294/16 + 3 e1295/40 - e631/20 + e632/20 + - e634/5 + e635/10 - 11 e637/40 + 11 e638/40. +``` + +The complete rational boundary vectors c (113 coordinates) and d (307 coordinates) are in `WITNESS.json`. For the complete prefix P and suffix S, the verifier proves **aP=c**, **Sb=d**, and **ab=cd=1**, including every otherwise-zero public and owned coefficient. Every cut operand is at chart 118; c and d use only the stated helper group. No MOVE is retimed or inserted. + +Ali Romman's independent-helper construction uses a boundary basis G with row 631=c and Gd=e631, and a cut basis J with row 631=a and Jb=e631. Emit G⁻¹, the entire prefix, J, the renamed J⁻¹ and suffix, and the renamed G. The old pivot returns at118; fresh independent helper 1483 starts at118 and returns at127. Owned labels shift by one without changing their logical lifetimes. After the entrance basis, the retained pivot contains its own arbitrary independent input at the cut. Replacing that coordinate by the fresh input changes the suffix along b, hence the final boundary along d; G confines the difference to the renamed output. All other helpers and main outputs are preserved. + +The new choice is inside the existing basis routine. Since d631=0, the legacy routine swaps with the first nonzero coordinate, d3=677/163840. Its normalization requires SCALE(163840/677), outside the retained 2,3,5 alphabet. The new deterministic rule prefers a nonzero entry whose numerator and denominator use only 2,3,5, then minimizes their combined bit lengths. It chooses **d641=−1/4**, requiring only SCALE(−4). This changes no linear-algebra premise. The entire emitted word is checked against the retained scalar alphabet, including inverse SCALEs. No rational alphabet extension is used. + +G has 423 instructions and J has 16. With inverses, the edit adds **872 ADDs and 6 SCALEs**. The program has 72,143 events, 1,484 public fields and 1,084 independent helpers. Owned labels 51, lifetimes 54, peak 43, rises 23 and rise mass 56 are unchanged. Canonical word SHA256 is `3454c4900245ed1814ceeff79a741a45160eb3a93cf8d15f891fe2a67ba036fc`. + +## Full price, scalar cost and precision + +Per LOCAL, target delta is `{4:+1,5:+1,9:−1}` and paid delta is empty. Across eighteen LOCALs the margin improves by `18(4^p+5^p−9^p)`, strictly positive for every 0peak:peak=mass;witness=[i,kind] + for i,e in enumerate(word['program']): + op,r=e[:2] + if op in('INIT','CLEAR'):rows[r]={} + elif op=='SCALE': + rows[r]={k:Q(e[2])*v for k,v in rows[r].items()};observe(rows[r],i,'scale') + elif op in('ADD','COPY'): + if op=='COPY':assert not rows[r] + product={k:Q(e[3])*v for k,v in rows[e[2]].items()};observe(product,i,'product') + row=rows[r].copy() + for k,v in product.items(): + value=row.get(k,Q(0))+v + if value:row[k]=value + else:row.pop(k,None) + rows[r]=row;observe(row,i,'stored') + odd=denom;frac=0 + while odd%2==0:odd//=2;frac+=1 + return dict(odd_scale=odd,fractional_bits=frac,unscaled_maximum_mass=str(peak),scaled_maximum_mass=str(peak*odd),mass_witness=witness,coefficient_visits=visits),rows +if __name__=='__main__': + w=json.load(gzip.open(sys.argv[1],'rt'));result,rows=derive(w) + Path(sys.argv[2]).write_text(json.dumps(result,indent=2)+'\n');print(result) diff --git a/research/p104-smooth-swap-split/inputs/pr7110.tar b/research/p104-smooth-swap-split/inputs/pr7110.tar new file mode 100644 index 0000000000..f615a25ada Binary files /dev/null and b/research/p104-smooth-swap-split/inputs/pr7110.tar differ diff --git a/research/p104-smooth-swap-split/source.py b/research/p104-smooth-swap-split/source.py new file mode 100644 index 0000000000..1b2bdc3417 --- /dev/null +++ b/research/p104-smooth-swap-split/source.py @@ -0,0 +1,93 @@ +"""Authenticate the exact #7110 closure and rebuild its three predecessor edits. +Prepared for dillona with substantial OpenAI Codex assistance. Apache-2.0. +""" +from contextlib import contextmanager +from hashlib import sha256, sha1 +from pathlib import Path +import contextlib, gzip, importlib.util, io, json, sys, tarfile, tempfile +HERE = Path(__file__).resolve().parent + +def need(ok, why): + if not ok: raise ValueError(why) + +def read(path): + raw = Path(path).read_bytes() + return json.loads(gzip.decompress(raw) if raw[:2] == b'\x1f\x8b' else raw) + +def canonical(obj): return json.dumps(obj, sort_keys=True, separators=(',', ':')).encode() + +def load(name, path): + spec = importlib.util.spec_from_file_location(name, path) + out = importlib.util.module_from_spec(spec); sys.modules[name] = out + spec.loader.exec_module(out) + return out + +def extract(archive, root, pins=None): + root.mkdir(parents=True, exist_ok=True); seen = set() + with tarfile.open(archive) as tar: + for member in tar: + if member.isdir(): continue + path = root/member.name + need(member.isfile() and path.resolve().is_relative_to(root.resolve()) and path not in seen, + 'Unique safe regular archive member') + raw = tar.extractfile(member).read() + if pins is not None: + need(member.name in pins, 'Listed source member') + pin = pins[member.name] + need(len(raw) == pin['size'] and sha256(raw).hexdigest() == pin['sha256'] and + sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest() == pin['git_blob'], + 'Exact source Git blob and SHA256') + path.parent.mkdir(parents=True, exist_ok=True); path.write_bytes(raw); seen.add(path) + if pins is not None: need(seen == {root/p for p in pins}, 'Complete listed source closure') + sums = root/'SHA256SUMS' + if sums.exists(): + for line in sums.read_text().splitlines(): + digest, name = line.split(None, 1); path = root/name.lstrip('*') + need(path.resolve().is_relative_to(root.resolve()) and sha256(path.read_bytes()).hexdigest() == digest, + 'Nested source checksum') + +@contextmanager +def sources(): + pins = read(HERE/'INPUTS.json'); archive = HERE/'inputs/pr7110.tar' + need(sha256(archive.read_bytes()).hexdigest() == pins['archive_sha256'], 'Frozen outer archive') + old_path = list(sys.path) + with tempfile.TemporaryDirectory(prefix='p104-7110-') as tmp: + root = Path(tmp); extract(archive, root, {x['path']: x for x in pins['files']}) + outer = root/'research/cocharted-rank9-helper-split' + top = root/'top'; extract(outer/'REPLAY.tar.gz',top) + bundle, parent, base = (root/x for x in ('bundle', 'parent', 'base')) + extract(top/'predecessor.tar.gz', bundle) + extract(bundle/'parent-replay.tar.gz', parent) + extract(parent/'rank9-replay.tar.gz', base) + coupled = base/'sources/kappa-coupled-boundaries-20261110T0908Z' + extract(base/'payload/incumbent.tar.gz', coupled) + vendor = coupled/'replay/research/shared-wire-split-composition' + previous = coupled/'replay/research/shared-wire-stop-fusion' + rank9 = base/'sources/kappa-rank9-lower-20261110T1247Z/evidence' + first = load('source7108_build', parent/'build.py') + word = first.build(read(coupled/'evidence/candidate.json.gz'))[0] + need(sha256(canonical(word)).hexdigest() == '34085a6c502ac07530001bdcbc85ad0ec9637f5dda28c9593a0b0d6dd6613d24', + 'Exact reconstructed #7108') + second = load('build', bundle/'build.py'); second.cut_proof(word) + word = second.build(word)[0] + need(sha256(canonical(word)).hexdigest() == 'db9b86eba69ca556be5abc1eb85292566fc065ddebad9a26b2da0475f22aec6b', 'Exact reconstructed #7109') + sys.path.insert(0,str(top)) + emitter = load('source7110_emit',top/'emit.py') + old_file,new_file,receipt = (root/x for x in ('old.json.gz','source.json.gz','emit.json')) + old_file.write_bytes(gzip.compress(canonical(word),mtime=0)) + with contextlib.redirect_stdout(io.StringIO()):emitter.main(old_file,top/'WITNESS.json',new_file,receipt) + need(read(receipt)==read(top/'EMIT.json'),'Frozen #7110 construction receipt') + word=read(new_file) + need(sha256(canonical(word)).hexdigest()==pins['source_canonical_sha256'],'Exact rebuilt #7110') + need((outer/'RESULT.json').read_bytes() == (top/'RESULT.json').read_bytes(), 'Outer and bundled receipt') + sys.path.insert(0, str(rank9)) + try: yield vendor, previous, rank9, top, word + finally: sys.path[:] = old_path + +if __name__ == '__main__': + import argparse + parser = argparse.ArgumentParser(); parser.add_argument('--output', type=Path, required=True) + args = parser.parse_args() + with sources() as source: + raw = canonical(source[-1]) + with args.output.open('xb') as out: out.write(gzip.compress(raw, mtime=0)) diff --git a/research/p104-smooth-swap-split/split.py b/research/p104-smooth-swap-split/split.py new file mode 100644 index 0000000000..5407e8959b --- /dev/null +++ b/research/p104-smooth-swap-split/split.py @@ -0,0 +1,154 @@ +"""Split independent helper jobs with three scalar basis changes. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +Adapted for arbitrary counted owned-field inventory by @CubeJerry with OpenAI assistance. +Successor: OpenAI Codex for dillona excludes both hosted main planes from helper groups. +The source word and caller retain the credits in README.md. +Successor: dillona/OpenAI Codex choose a small smooth swap entry when pivot is zero. +""" +from copy import deepcopy +from fractions import Fraction as Q +from support import L + + +def inverse(program): + return [[e[0], *e[1:-2], + str(1/Q(e[-2]) if e[0] == 'SCALE' else -Q(e[-2])), e[-1]] + for e in reversed(program)] + + +def basis(a, b, pivot, frame): + """Return B with row pivot equal to a and B b equal to e_pivot.""" + L.need(sum(v*b.get(k, 0) for k, v in a.items()) == 1, 'Unit basis pairing') + roles = sorted(set(a) | set(b) | {pivot}) + values, program = dict(b), [] + + def emit(event): + program.append(event) + r, q = event[1], Q(event[-2]) + if event[0] == 'SCALE': + values[r] = values.get(r, 0)*q + else: + values[r] = values.get(r, 0)+q*values.get(event[2], 0) + + def swap_score(r): + q=b[r] + def smooth(x): + for prime in (2,3,5): + while x%prime==0:x//=prime + return x==1 + return (not(smooth(abs(q.numerator)) and smooth(q.denominator)), + abs(q.numerator).bit_length()+q.denominator.bit_length(),r) + j = pivot if b.get(pivot) else min((r for r in roles if b.get(r)),key=swap_score) + if j != pivot: + for event in [['ADD', pivot, j, '1', frame], + ['ADD', j, pivot, '-1', frame], + ['ADD', pivot, j, '1', frame], + ['SCALE', j, '-1', frame]]: + emit(event) + if values[pivot] != 1: + emit(['SCALE', pivot, str(1/values[pivot]), frame]) + for r in roles: + if r != pivot and values.get(r): + emit(['ADD', r, pivot, str(-values[r]), frame]) + L.need(all(values.get(r, 0) == int(r == pivot) for r in roles), 'Basis column') + inverse_rows = {r: {r: Q(1)} for r in roles} + for e in inverse(program): + if e[0] == 'SCALE': + inverse_rows[e[1]] = {k: Q(e[-2])*v for k, v in inverse_rows[e[1]].items()} + else: + L.add(inverse_rows[e[1]], inverse_rows[e[2]], Q(e[-2])) + row = {} + for r, q in a.items(): + L.add(row, inverse_rows[r], q) + L.need(row[pivot] == 1, 'Basis row coefficient') + for r in roles: + if r != pivot and row.get(r): + program.append(['ADD', pivot, r, str(row[r]), frame]) + return program + + +def check_cut(word, h): + """Check the whole prefix row and suffix column over the rationals.""" + n, cut, f, p = word['public'], h['cut_after'], h['frame'], h['pivot'] + a, b, c, d = ({int(k): Q(v) for k, v in h[s].items()} for s in ('a', 'b', 'c', 'd')) + main = set(word['live']) | {r+112 for r in word['live']} | set(word['hosted']['X2']) | set(word['hosted']['Y2']) + L.need(p < n and p not in main, 'A helper supplies the retained output role') + u, v = word['initial'][p], word['final'][p] + group = {r for r in range(n) if r not in main and + (word['initial'][r], word['final'][r]) == (u, v)} + L.need(set(c) | set(d) <= group, 'Both boundary vectors use one helper group') + L.need(L.span(word['frames'][u]) < L.span(word['frames'][f]) < L.span(word['frames'][v]), + 'Two strictly productive nested targets') + L.need(h['ranks'] == [len(word['frames'][f])-len(word['frames'][u]), + len(word['frames'][v])-len(word['frames'][f])], 'Declared split ranks') + rows = [{r: Q(1)} if r < n else {} for r in range(n+word['owned_fields'])] + current = word['initial']+[None]*word['owned_fields'] + for e in word['program'][:cut+1]: + op, r = e[:2] + if op == 'MOVE': + current[r] = e[3] + elif op in ('INIT', 'CLEAR'): + rows[r] = {} + current[r] = e[2] if op == 'INIT' else None + elif op == 'SCALE': + rows[r] = {k: Q(e[-2])*x for k, x in rows[r].items()} + elif op == 'COPY': + rows[r] = {k: Q(e[-2])*x for k, x in rows[e[2]].items()} + else: + L.add(rows[r], rows[e[2]], Q(e[-2])) + L.need(all(current[r] == f for r in set(a) | set(b) | {p}), 'One intermediate chart') + total = {} + for r, q in a.items(): + L.add(total, rows[r], q) + L.need(total == c, 'Exact prefix functional; no other input') + column = [b.get(r, Q(0)) for r in range(n+word['owned_fields'])] + for e in word['program'][cut+1:]: + op, r = e[:2] + if op in ('INIT', 'CLEAR'): + column[r] = Q(0) + elif op == 'SCALE': + column[r] *= Q(e[-2]) + elif op == 'COPY': + column[r] = Q(e[-2])*column[e[2]] + elif op == 'ADD': + column[r] += Q(e[-2])*column[e[2]] + L.need(column == [d.get(r, Q(0)) for r in range(n+word['owned_fields'])], 'Exact suffix direction; no other output') + L.need(sum(x*b.get(r, 0) for r, x in a.items()) == + sum(x*d.get(r, 0) for r, x in c.items()) == 1, 'Both independent pairings') + return a, b, c, d + + +def split(word, h): + a, b, c, d = check_cut(word, h) + n, p, f, cut = word['public'], h['pivot'], h['frame'], h['cut_after'] + u, v = word['initial'][p], word['final'][p] + + def shift_owned(event): + e = event.copy() + e[1] += int(e[1] >= n) + if e[0] in ('ADD', 'COPY'): + e[2] += int(e[2] >= n) + return e + + def use_successor(event): + e = event.copy() + if e[1] == p: + e[1] = n + if e[0] in ('ADD', 'COPY') and e[2] == p: + e[2] = n + return e + + boundary, middle = basis(c, d, p, u), basis(a, b, p, f) + out = deepcopy(word) + out['public'] = n+1 + out['initial'].append(f) + out['final'].append(v) + out['final'][p] = f + out['program'] = inverse(boundary) + out['program'] += [shift_owned(e) for e in word['program'][:cut+1]] + out['program'] += [shift_owned(e) for e in middle] + out['program'] += [use_successor(shift_owned(e)) for e in inverse(middle)] + out['program'] += [use_successor(shift_owned(e)) for e in word['program'][cut+1:]] + out['program'] += [use_successor([*e[:-1], v]) for e in boundary] + return out diff --git a/research/p104-smooth-swap-split/support.py b/research/p104-smooth-swap-split/support.py new file mode 100644 index 0000000000..192cd38d27 --- /dev/null +++ b/research/p104-smooth-swap-split/support.py @@ -0,0 +1,18 @@ +"""Small exact sparse operations, retained from Ali Romman/CubeJerry. Apache-2.0.""" +class L: + @staticmethod + def need(ok, why): + if not ok: raise ValueError(why) + @staticmethod + def add(dst, src, q): + for k,v in tuple(src.items()): + value=dst.get(k,0)+q*v + if value: dst[k]=value + else: dst.pop(k,None) + @staticmethod + def span(basis): + out={0} + for v in basis: + L.need(type(v) is int and 00,'Complete conservative ordinary bill') + gate,price=G.exact_price(vendor,archive,before,invoice,previous) + manifest=read(vendor/'INDEPENDENT-SOURCES.json') + P=load('static_bit_binding',archive/'verify.py');P.bit_binding(I,manifest) + precision=base.precision(vendor,word,caller,gate,manifest) + need(precision['word']['odd_scale_lcm']==1125 and precision['word']['dyadic_height']==24 and precision['context_c']==1342,'Recomputed signed caller precision') + print('PASS full signed caller, ordinary bill, two exact price engines, precision and compiler gates',flush=True) + charts=chart_check(vendor,source,word) + controls={} + old_swap=1/Q(hit['d'][str(min(map(int,hit['d'])))]) + def smooth(n): + for prime in (2,3,5): + while n%prime==0:n//=prime + return n==1 + controls['legacy_swap_outside_alphabet']=not smooth(old_swap.denominator) + need(old_swap==Q(163840,677) and Q(hit['d']['641'])==Q(-1,4),'Exact old and selected swap entries') + grid_engine=G.module('static_grid_controls',vendor/'retained/odd-native-common-grid/independent_bounds.py') + controls['insufficient_odd_grid']=rejected(lambda:grid_engine.word_run(word,375,24)) + controls['insufficient_fractional_grid']=rejected(lambda:grid_engine.word_run(word,1125,23)) + bad=deepcopy(hit);bad['a']['631']='1' + controls['wrong_prefix']=rejected(lambda:construct(source,bad)) + bad=deepcopy(hit);bad['b']['631']='2' + controls['wrong_suffix']=rejected(lambda:construct(source,bad)) + bad=deepcopy(hit);bad['frame']=246 + controls['wrong_cut_frame']=rejected(lambda:construct(source,bad)) + from split import basis + Gbasis=basis(*[{int(k):Q(v)for k,v in hit[s].items()}for s in('c','d')],hit['pivot'],3) + Jbasis=basis(*[{int(k):Q(v)for k,v in hit[s].items()}for s in('a','b')],hit['pivot'],118) + need((len(Gbasis),len(Jbasis))==(423,16),'Boundary and cut basis lengths') + for name,index in [('missing_cut_correction',len(Gbasis)+hit['cut']),('missing_successor_correction',len(Gbasis)+len(Jbasis)+hit['cut'])]: + bad=deepcopy(word);bad['program'].pop(index) + controls[name]=bool(I.native(bad)['bad_inputs']) + bad=deepcopy(word);bad['initial'][-1]=3 + controls['wrong_successor_frame']=rejected(lambda:I.native(bad)) + need(all(controls.values()),'All split rejection controls') + physical_checks=[]; signed_routes=None + if physical: + with tempfile.TemporaryDirectory(prefix='static-physical-') as tmp: + path=Path(tmp)/'word.json.gz';path.write_bytes(gzip.compress(canonical(word),mtime=0)) + for command,args in [(vendor/'frozen/verify_host3_odd.py',[path,'1125']), + (vendor/'frozen/physical.py',[path,vendor/'frozen/clifford_exact.py','1000000009','11'])]: + subprocess.run([sys.executable,'-I','-B',str(command),*map(str,args)],check=True) + physical_checks.append(command.name) + physical_engine=G.module('static_signed_routes',rank9/'physical_child.py',( + ('cca66a7ec924bab47ccd1410968d16e071a01dc6110b5c08040bd207f753d066',sha256(canonical(word)).hexdigest()),)) + capture=io.StringIO() + with contextlib.redirect_stdout(capture):physical_engine.main(path,vendor/'data/caller.json',caller_path) + signed_routes=json.loads(capture.getvalue()) + need(signed_routes['status']=='PASS_PHYSICAL_RANK9_ALGEBRA' and signed_routes['paid_calls']==32,'Signed physical route replay') + need(1000*sum(len(row['caller_fields'])*row['ordinary_elementary_units'] for row in signed_routes['bindings'])==routes==1168000,'Actual signed route ordinary charge') + physical_checks.append('physical_child.py') + print('PASS chart columns and phase, rejection controls and finite physical replay',flush=True) + return encode(dict(status='PASS_P104_SMOOTH_SWAP_SPLIT',source_head='fdb1eb55c4c6604e714c6950e656c67ae0e52370', + word_canonical_sha256=sha256(canonical(word)).hexdigest(),native=native,forward=forward_receipt,grid=grid,derived_grid=derived, + caller=symbolic,invoice=invoice,ordinary=ordinary,gate=gate,price=price,precision=precision, + charts=charts,controls=controls,physical_checks=physical_checks,signed_routes=signed_routes, + limitations=['Source-aware reuse of attributed engines, not independent human or kernel review.', + 'The five framework assumptions and complete source-specific provider/caller/tariff application remain open.', + 'Finite physical checks and source-unit bills do not constitute a complete multiplication theorem.'])) + +def main(): + p=argparse.ArgumentParser();p.add_argument('--out',type=Path);p.add_argument('--skip-physical',action='store_true');a=p.parse_args() + result=run(not a.skip_physical) + if a.out: + with a.out.open('x') as f:json.dump(result,f,sort_keys=True,indent=2);f.write('\n') + else:need(result==read(HERE/'RESULT.json'),'Every frozen receipt field') + print(result['status'],result['gate']['claim'],flush=True) +if __name__=='__main__':main()