diff --git a/research/round6-pr71/.gitignore b/research/round6-pr71/.gitignore new file mode 100644 index 0000000000..1efebcb3ce --- /dev/null +++ b/research/round6-pr71/.gitignore @@ -0,0 +1 @@ +baseline/ diff --git a/research/round9-balanced-columns/README.md b/research/round9-balanced-columns/README.md new file mode 100644 index 0000000000..6bcba0f6b4 --- /dev/null +++ b/research/round9-balanced-columns/README.md @@ -0,0 +1,58 @@ +# Balanced columns with envelope ordering and carried-signal exchanges + +The selected conditional witness has κ = **51915547765237/10^18** +(**5.1915547765237e-5**) and bit saving **3244890195589/62500000000000000**. +It combines balanced coarse columns with anchored split frames, envelope +ordering and carried-signal exchanges. Physical width is **133,585,058**, +with auxiliary role counts **27,128 / 35,598**. + +Compared with PR #74 at `5830ccfca8466aff613767222558e29b57fa8225`, the +conditional κ improves by approximately **0.163125609609%**. Compared with +PR #76 it improves by **0.3418559067%**. These are comparisons of pinned +conditional claims; no global optimality or unconditional theorem is claimed. + +[Proof and attribution](selected-both/PROOF.md) · +[Exact certificate](selected-both/arithmetic.json) · +[Source and word manifest](selected-both/MANIFEST.json) · +[Completed finite validation](package-validation-receipt.json) · +[Exact comparison](selected-both/comparison.json) + +Passed checks include dense scalar/data-output identities, full compiler +input/dirty bases, independent serialized-word replay in both orientations, +exact frame/event reconstruction, regenerated fixed-basis profiles with zero +CRT disagreements, independent rational moments, all 47 strict assembly +constraints and seven margins, and adjacent-grid rejection. Fresh portable +deterministic compilation and broad repository checks remain pending. + +The package validation receipt independently reproduces all saved-word, profile +and arithmetic checks against the current manifest. Its mathematical results +match the original receipt exactly. The original validation receipt binds +the original freeze manifest archived +in `provenance/frozen-manifest.json`. Runtime sources, words, profiles and +arithmetic are byte-identical to that freeze; only proof/comparison metadata +has been updated for this publication. The current manifest records those +two documentation changes. No CI configuration or dependencies are changed. + +From the repository root, restore the exact inherited source archive: + +```sh +git fetch https://github.com/CrocSwap/integer-mult-bounds.git 1bef94fd40a746452548c84a4a8f8834670a3113 +mkdir -p research/round6-pr71/baseline +git archive 1bef94fd40a746452548c84a4a8f8834670a3113 | tar -x -C research/round6-pr71/baseline +python3 research/round9-balanced-columns/dense_audit.py +python3 research/round9-balanced-columns/validate_selected.py --bundle research/round9-balanced-columns/selected-both --output /tmp/balanced-columns-validation.json +``` + +The proof gives sequential compiler regeneration commands. Use assert-enabled +Python and C++17; `CXX` can select a compiler and SDK. All inherited all-size +compiler, fixed-tape, analytic, routing, prime-selection, precision and recovery +hypotheses remain conditional. Finite checks do not establish practical speedup. + +Credit eumemic's PR #69 balanced coarse columns; huxint's PR #77 anchored +adapter; Thomas DiFiore's PR #74 envelope ordering; Chafik Boukhalfa's PR #71 +anchored splits and next-use scoring; Alejandro Zarzuelo Urdiales's PR #70 +exchanges; Rohan Arun's PR #65/#67 schedules, costs and arithmetic; Dominik +Scholz's PR #68/#76 controls and composition; Avi Eisenberg's PR #62, +eumemic's PR #57 and the complete inherited contributor chain. This composition +was prepared by Dominik Scholz with substantial OpenAI GPT-6 Astra assistance. +All original notices and Apache-2.0 terms remain preserved. diff --git a/research/round9-balanced-columns/SOURCE.json b/research/round9-balanced-columns/SOURCE.json new file mode 100644 index 0000000000..5e26581927 --- /dev/null +++ b/research/round9-balanced-columns/SOURCE.json @@ -0,0 +1,14 @@ +{ + "pr77_commit": "83298467291d3bd4b53f76faaef60dbf585be171", + "pr76_base_manifest_sha256": "52c1a59a4372376f64df937a2f19268e2ebd553574386fcdda08b01db9a5c345", + "base_pair_graph_sha256": "3d47e89d2649c90800a276bdd0480131def50e0bdf92c122a19494b55bf17420", + "base_pair_graph_matches_pr77_bytes": true, + "inherited_files": { + "inherited/SOURCE.json": "813564d76569fd54a5aa1645da15f1a33b12de8a0bcc53056e69087394b0cfcd", + "inherited/graph.py": "349c74a3684cc26c14f4b7001efb086825a4398461709ba13ade2cd10e336d23", + "inherited/NOTICE": "3bfe7a693e10fbe710e7fadedb7caeb21e272ce5899f48d043f636e2b06562b0", + "inherited/README.md": "e9d7ae955d27fb1832744583f1d251263e9fc499bae2d664b31f28fc83dc2592", + "inherited/vendor/pr69-compiler.py": "bd8169bf9f5df185a8aa4aec22234b4fd483000a1cecc78b71bf32e479af1499" + }, + "scope": "Only PR69/77 balanced coarse-column graph mechanism composed with PR76 node ordering + carry exchanges; no PR77 cost-basis compiler changes." +} diff --git a/research/round9-balanced-columns/cache-stale-failure.log b/research/round9-balanced-columns/cache-stale-failure.log new file mode 100644 index 0000000000..6667276f30 --- /dev/null +++ b/research/round9-balanced-columns/cache-stale-failure.log @@ -0,0 +1,25 @@ +Traceback (most recent call last): + File "/Users/dominik/integer-mult-bounds-incremental/research/round9-balanced-columns/run.py", line 102, in + if __name__=='__main__':main() + ~~~~^^ + File "/Users/dominik/integer-mult-bounds-incremental/research/round9-balanced-columns/run.py", line 93, in main + try:result,word=compiler.compile_(a.h,matching=True,reclaim=True,dirty=True) + ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/Users/dominik/integer-mult-bounds-incremental/research/round6-pr71/baseline/scripts/experiments/split_pair_engine.py", line 120, in compile_ + t0=time.time();c,blocks,uses,value_uses,owner,signal,order,contains=build(h);v=len(c.inputs) + ~~~~~^^^ + File "/Users/dominik/integer-mult-bounds-incremental/research/round6-pr71/baseline/references/frame-compiler/pr65/research/reordered-rank-pair/verify.py", line 34, in build + parts=list(original(h)) + ~~~~~~~~^^^ + File "/Users/dominik/integer-mult-bounds-incremental/research/round6-pr71/baseline/scripts/experiments/split_pair_engine.py", line 39, in build + c=graph(h);groups={};owner={};signal={};blocks=[] + File "/Users/dominik/integer-mult-bounds-incremental/research/round9-balanced-columns/run.py", line 33, in + compiler.graph=lambda h: schedule_variant.reorder(coarse_graph.graph(h,coarse='columns'));compiler.build=producer.ordered_build(compiler.build,a.h) + ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/Users/dominik/integer-mult-bounds-incremental/research/round9-balanced-columns/schedule_variant.py", line 34, in reorder + c.verify() + ~~~~~~~~^^ + File "/Users/dominik/integer-mult-bounds-incremental/research/round6-pr71/baseline/references/frame-compiler/pr48/scripts/partial_swap/shared.py", line 111, in verify + assert not A&B + ^^^^^^^ +AssertionError diff --git a/research/round9-balanced-columns/coarse_graph.py b/research/round9-balanced-columns/coarse_graph.py new file mode 100644 index 0000000000..03ac7d8723 --- /dev/null +++ b/research/round9-balanced-columns/coarse_graph.py @@ -0,0 +1,68 @@ +"""Controlled combinations of the PR62, PR69 and PR71 scalar graphs. + +PR62 graph: Avi Eisenberg with Claude assistance. PR59 split operation: +Rohan Garg. PR69 balanced coarse columns: eumemic with Codex assistance. +PR71 anchored split vector: Chafik Boukhalfa with Codex assistance. +This configurable composition/search adapter: huxint with Codex assistance. +Apache-2.0 and all inherited notices apply. No global search claim. +""" +import sys +if sys.flags.optimize: + raise ValueError('Assertions must remain enabled') +from hashlib import sha256 +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent/'round6-pr71/baseline/references/frame-compiler/pr65' +BASE = ROOT/'research/pair-assembly/pair_graph.py' +BEFORE = ''' coarse = {(i, j): self.total([e(a, b) for a in groups[i] for b in groups[j]]) + for i, j in combinations(range(ng), 2)}''' +AFTER_COLUMNS = ''' def coarse_sum(i, j): + columns = [self.total([e(a,b) for a in groups[i]]) for b in groups[j]] + return self.total(columns) + coarse = {(i,j):coarse_sum(i,j) for i,j in combinations(range(ng),2)}''' +AFTER_ROWS = ''' def coarse_sum(i, j): + rows = [self.total([e(a,b) for b in groups[j]]) for a in groups[i]] + return self.total(rows) + coarse = {(i,j):coarse_sum(i,j) for i,j in combinations(range(ng),2)}''' + + +def graph(h, groups=(1, 1, 2), anchor='first', coarse='none'): + if h not in (23, 25) or any(type(x) is not int or not 0 <= x <= 3 for x in groups): + raise ValueError('Unsupported finite graph configuration') + source = BASE.read_text() + if coarse != 'none': + assert source.count(BEFORE) == 1 + source = source.replace(BEFORE, {'columns': AFTER_COLUMNS, 'rows': AFTER_ROWS}[coarse]) + namespace = {'__file__': str(BASE), '__name__': 'next_use_graph_composition'} + exec(compile(source, str(BASE)+':next_use_composition', 'exec'), namespace) + original_class = namespace['circuit_class'] + + def circuit_class(dimension): + class SplitPair(original_class(dimension)): + def grouping(self, points): + partition = super().grouping(points) + choice = groups[self._level] if self._level < len(groups) else 0 + if len(points) > 3 and choice: + index = {1: 0, 2: (len(partition)-1)//2, 3: len(partition)-1}[choice] + if len(partition[index]) == 2: + partition[index:index+1] = [[x] for x in partition[index]] + assert all(len(g) in (1, 2) for g in partition) + assert len(partition) < len(points) + assert sorted(x for g in partition for x in g) == sorted(points) + return partition + return SplitPair + + namespace['circuit_class'] = circuit_class + original_points = namespace['alternating_points'] + if anchor != 'none': + def points(dimension, common): + old = original_points(dimension, common) + pairs = [(a, a+1) for a in range(0, dimension-1, 2) if common not in (a, a+1)] + chosen = {'first': pairs[0], 'second': pairs[min(1, len(pairs)-1)], 'last': pairs[-1]}[anchor] + result = list(chosen)+[x for x in old if x not in chosen] + assert sorted(result) == [x for x in range(dimension) if x != common] + return result + namespace['alternating_points'] = points + result = namespace['graph'](h) + result.verify() + return result diff --git a/research/round9-balanced-columns/dense-audit.json b/research/round9-balanced-columns/dense-audit.json new file mode 100644 index 0000000000..c40a04a61d --- /dev/null +++ b/research/round9-balanced-columns/dense-audit.json @@ -0,0 +1,28 @@ +{ + "scope": "Finite dense scalar/data-output identity audit", + "axes": { + "23": { + "h": 23, + "inputs": 1771, + "additions": 67460, + "outputs": 5336, + "all_dense_additions_disjoint": true, + "all_dense_partial_outputs_exact": true, + "original_common_point_envelopes_exact": true + }, + "25": { + "h": 25, + "inputs": 2300, + "additions": 94993, + "outputs": 6925, + "all_dense_additions_disjoint": true, + "all_dense_partial_outputs_exact": true, + "original_common_point_envelopes_exact": true + } + }, + "sources": { + "dense_audit.py": "b282e743d9d8c48cbc97eb2c2597a6c52894d33ea1967dd1ff4c269b0e0a72e3", + "coarse_graph.py": "b5bbabb8e5bf69769af4b6cd67163954d990dc489e3c9488ed84bd09f0a767c8", + "schedule_variant.py": "3ce3b4c0886868e3fcd2b75c54b61180d103447cfdb9d3ece1de47dd6d46eecc" + } +} diff --git a/research/round9-balanced-columns/dense_audit.py b/research/round9-balanced-columns/dense_audit.py new file mode 100644 index 0000000000..979cfe41cc --- /dev/null +++ b/research/round9-balanced-columns/dense_audit.py @@ -0,0 +1,53 @@ +"""Independent dense supports for both balanced-column scalar graphs. + +Dominik Scholz with substantial OpenAI GPT-6 Astra assistance. Apache-2.0. +Does not use the graph's memoized/provenance-based support routine. +""" +from hashlib import sha256 +from pathlib import Path +import json +import run + + +def audit(h): + c = run.schedule_variant.reorder(run.coarse_graph.graph(h, coarse='columns')) + support = [0] * len(c.args) + point_rows = [0] * h + for i, triple in enumerate(c.inputs): + support[i + 1] = 1 << i + for point in triple: + point_rows[point] |= 1 << i + additions = 0 + for node in sorted(c.active): + if not c.args[node]: + assert node <= len(c.inputs) + continue + a, b = c.args[node] + assert a < node and b < node + assert support[a] and support[b] + assert not support[a] & support[b] + support[node] = support[a] | support[b] + assert c.core[node] == c.core[a] & c.core[b] + assert c.union[node] == c.union[a] | c.union[b] + additions += 1 + for (common, target), node in c.outputs.items(): + expected = point_rows[common] + for point in target: + if point != common: + expected &= ~point_rows[point] + assert support[node] == expected + return dict(h=h, inputs=len(c.inputs), additions=additions, + outputs=len(c.outputs), all_dense_additions_disjoint=True, + all_dense_partial_outputs_exact=True, + original_common_point_envelopes_exact=True) + + +if __name__ == '__main__': + root = Path(__file__).resolve().parent + result = {'scope': 'Finite dense scalar/data-output identity audit', + 'axes': {str(h): audit(h) for h in (23, 25)}, + 'sources': {name: sha256((root/name).read_bytes()).hexdigest() + for name in ('dense_audit.py', 'coarse_graph.py', + 'schedule_variant.py')}} + (root/'dense-audit.json').write_text(json.dumps(result, indent=2) + '\n') + print(json.dumps(result, indent=2)) diff --git a/research/round9-balanced-columns/inherited/NOTICE b/research/round9-balanced-columns/inherited/NOTICE new file mode 100644 index 0000000000..be4f46cf39 --- /dev/null +++ b/research/round9-balanced-columns/inherited/NOTICE @@ -0,0 +1,28 @@ +Balanced coarse sums on anchored split frames +Prepared for huxint with substantial OpenAI Codex assistance, October 9, 2026. +Distributed under the repository's Apache License 2.0. + +The selected finite network composes previously attributed constructions. +Preserve all repository notices and these source-specific attributions: + +eumemic: PR57 joint reversible frame compiler and independent physical replay; +PR69 balanced coarse column sums, with OpenAI Codex assistance. +Avi Eisenberg / ikeboy: PR62 interval strips and core-aware pair assembly, +with Anthropic Claude assistance. +Rohan Garg / rohangar1: PR59 split-pair operation, with OpenAI Codex assistance. +Rohan Arun: PR65 schedule/refined arithmetic and PR67 profile-cost compiler, +with OpenAI Codex assistance. +Dominik Scholz: PR63 ranked composition and PR68 compatible pending controls, +with OpenAI GPT-6 Astra / Codex assistance. +Chafik Boukhalfa: PR60 ranked reclamation and PR71 anchored split graph and +next-use scoring, with OpenAI Codex assistance. + +The original code comments and preserved vendor snapshots retain their own +attributions. The inherited framework also credits icekylinx, RaD / hipotures, +James Chang, Zhihao Chen / jacklightChen, Aurel Prosz / Paureel, Swapnil Jain, +Douglas Colkitt, OpenAI, David Harvey, Joris van der Hoeven, and other +contributors identified in the root NOTICE and inherited source files. + +The new package's finite checks are conditional evidence. They are not a +complete theorem formalization, an independent human referee report, or a +practical multiplication benchmark. diff --git a/research/round9-balanced-columns/inherited/README.md b/research/round9-balanced-columns/inherited/README.md new file mode 100644 index 0000000000..bd922144c1 --- /dev/null +++ b/research/round9-balanced-columns/inherited/README.md @@ -0,0 +1,90 @@ +# Balanced coarse sums on anchored split frames + +The selected finite construction gives the conditional integer-multiplication +bound + +\[ +T(n)=O\bigl(n(\log n)^{1-\kappa}\bigr),\qquad +\kappa=\frac{12886963972497}{250000000000000000} +=5.1547855889988\times10^{-5}. +\] + +This is **0.2590891819% above PR71** at commit +`1bef94fd40a746452548c84a4a8f8834670a3113`. It is a comparison of conditional +asymptotic exponent bounds, with no global-optimality or measured-runtime claim. + +The construction combines eumemic's PR69 balanced coarse columns with Chafik +Boukhalfa's PR71 anchored `[1,1,2]` split graph. It uses the inherited joint +reversible frame compiler and compatible pending controls, and orders both +eligible live controls and retired dependency candidates by their actual +profile cost. The latter changes the temporary dependency basis, not just the +choice among the first basis's dependent rows. Pending controls are priced +against their known next use. Every selected clearing expression is emitted +as literal XORs, and all frame moves and final cleanup remain charged. + +| Quantity | Pinned PR71 | This construction | +|---|---:|---:| +| Roles at h=23 | 27,455 | 27,338 | +| Roles at h=25 | 36,015 | 35,939 | +| Physical width W | 135,075,665 | 134,671,969 | +| Complete rank mass | 77,666,660,475 | 77,434,535,275 | +| Rank deficit | 1,846,900 | 1,846,900 | + +The strict bit-saving witness is `51550513208569/10^18`. The full paid child +list of PR71 has a rigorous moment lower bound above one at this value. The +new list has a rigorous upper bound below one. Its next `10^-18` bit grid +point is rejected, as is the next kappa grid point in the unchanged balanced +assembly. All 47 strict inequalities and seven margins are checked exactly. + +## Reproduction + +From the repository root, with Python 3.11+ and a C++17 compiler: + +```sh +make -C research/balanced-split-reclamation verify +make -j1 verify +``` + +The first command regenerates both selected words byte-for-byte, independently +replays every input/target/dirty basis vector in both orientations, derives +all physical transitions from literal XOR incidences, recomputes every +fixed-basis profile with the inherited bounded-minor/CRT checks, rebuilds +the complete global profile and exact arithmetic, and runs twelve failure-mode +tests. A second logarithm/exponential evaluation uses a different range +reduction and Taylor degree. This is a second arithmetic implementation, +not independent expert review of the theorem. + +`selected/` contains the words, actual profiles, receipts and exact certificate. +`SOURCE.json` freezes consumed sources and deliverables; verification never +rewrites this manifest. `pin.py` is an explicit maintenance operation. +`generate.py --output ` produces fresh artifacts without modifying +the selected witness. The proof is in [paper.tex](paper.tex) and [paper.pdf](paper.pdf). + +The selected graph uses columns rather than a three-addition coarse chain, +split vector `[1,1,2]`, and the lowest intact pair first in each common-point +ordering. The h23 region order is `cover-core`; h25 uses `reverse-node`. +The oracle's integer entropy score is only a deterministic search heuristic. +The final complete physical profile, not the score, determines acceptance. + +## Proof boundary and attribution + +The original-envelope interpretation, all-size residual/frame compiler, +fixed finite-alphabet tape layout, semantic and analytic multiplication +reduction, routing, prime setup and exact recovery remain inherited +assumptions. The complex branch is unchanged. Exact finite checks do not +constitute a complete formal proof of the multiplication theorem. + +This composition, cost-ordered dependency basis experiment, independent +reproduction and package were prepared for **huxint with OpenAI Codex +assistance**. Credit eumemic for PR57's reversible region compiler and PR69's +coarse-column identity; Avi Eisenberg for PR62's interval/core-aware graph; +Rohan Garg for PR59's split operation; Rohan Arun for PR65's schedules and +PR67's cost oracle and numerical refinement; Dominik Scholz for PR63's +composition and PR68's compatible pending controls; and Chafik Boukhalfa for +PR60's ranked reclamation and PR71's anchored split/next-use composition. +All prior contributors retain their original notices. See [NOTICE](NOTICE). + +The preserved contributor files in `vendor/` are unmodified snapshots, used +for provenance and the complete PR71 comparison. The inherited repository +files are retained unchanged. No endorsement or completed expert review by +those contributors is implied. diff --git a/research/round9-balanced-columns/inherited/SOURCE.json b/research/round9-balanced-columns/inherited/SOURCE.json new file mode 100644 index 0000000000..cc93786f91 --- /dev/null +++ b/research/round9-balanced-columns/inherited/SOURCE.json @@ -0,0 +1,64 @@ +{ + "files": { + ".github/workflows/balanced-split.yml": "9f45519e842d7412c2c68d349252b57872a1a73e25447ca2ac63c625eb3849d3", + "references/frame-compiler/pr48/SOURCE.json": "6ccc673f88d3650d75ed600b082fe2fc2866dd88a172d182a38c1d0cd27d24b3", + "references/frame-compiler/pr48/research/copied-fixed/balanced_assembly.py": "4d27575dcad2b45a281a34054d311409ecd954f373c0c3a62c29bcc843f06a86", + "references/frame-compiler/pr48/research/copied-fixed/certificate.json": "33b3373c04e18a7f4cee33ba68da6ed71934acc3e0179cca6197696be4befa22", + "references/frame-compiler/pr48/research/copied-fixed/changed_graph.py": "375a7ca6cac6d153c1880fd5ea5b4525e5dca9d4ee3018d24d679c219b59c5b3", + "references/frame-compiler/pr48/research/copied-fixed/profiles.cpp": "b9fbd71c746609948b60c441ba4601e88436956fe636d1810f270ce4ce6a63a6", + "references/frame-compiler/pr48/research/copied-fixed/verify.py": "44932182ce6c4d39776650311262ef0ac1ea9b5da7220bc0f728e2789881f84a", + "references/frame-compiler/pr48/scripts/exclusion_circuit.py": "b253f9d7318becda1c1f3b24e2287ed44a9c27fcea00cf9d531afb950d0457a0", + "references/frame-compiler/pr48/scripts/partial_swap/binary_io.hpp": "7e143eb75bb342ac8f0c82a60005e7c35c9ec827de479bf6fb773151f3af5fa1", + "references/frame-compiler/pr48/scripts/partial_swap/paired.py": "ddcecace3a8e04d690914cbd64873ab8dde8c0c3477a255767b0ed6f639bb0c7", + "references/frame-compiler/pr48/scripts/partial_swap/shared.py": "81e9af92cdf38243a540cdcff2062778e449467848d444da37a9553c12ca4c34", + "research/balanced-split-reclamation/Makefile": "2417f68960e98c9fc5cba82511236c555a3dc8c93650da2b61a7011573d0e015", + "research/balanced-split-reclamation/NOTICE": "3bfe7a693e10fbe710e7fadedb7caeb21e272ce5899f48d043f636e2b06562b0", + "research/balanced-split-reclamation/README.md": "e9d7ae955d27fb1832744583f1d251263e9fc499bae2d664b31f28fc83dc2592", + "research/balanced-split-reclamation/arithmetic.py": "574873dd24ed83592abe198340af94918d484095c0c077c8886628200439eae6", + "research/balanced-split-reclamation/compiler.py": "8cf9687d676c7df5c2b54cb8ecc041d5dab6e5512538699d11f4f9ac5ee44409", + "research/balanced-split-reclamation/generate.py": "468ad9e2e21ffbab5ef26760c89cc429330a683d258491486e3e14a35388a805", + "research/balanced-split-reclamation/graph.py": "349c74a3684cc26c14f4b7001efb086825a4398461709ba13ade2cd10e336d23", + "research/balanced-split-reclamation/paper.pdf": "960361b250fd3033cb1b5a7c5f8ce738432a525bc4795f9bf503c28d8fcd4c42", + "research/balanced-split-reclamation/paper.tex": "875411ec7f0578c521645fb07ede2071a1b0e1b0d98c90e27c1d41abbc434538", + "research/balanced-split-reclamation/pin.py": "16734634d7856d6001a4fe8f5247bb1da47bd6852210d51c881b14afde6babc7", + "research/balanced-split-reclamation/profile_oracle.cpp": "d1f6b650de9fb5842b412595369271d9eeb6f54045c76c0fb5cad29854955c35", + "research/balanced-split-reclamation/selected/audit.json": "10040d0a140cf6185881801687985134d3b950400db73192be5e995cde4e81c7", + "research/balanced-split-reclamation/selected/certificate.json": "683bc658daf2fd4da8083c2853932ebe641607df84dcf5bb8701713a318df72f", + "research/balanced-split-reclamation/selected/compiled-23.json": "7ca13046c2a84f86d97eb056d609c8d635bff2670d2f4e622f9444e4e3f1593c", + "research/balanced-split-reclamation/selected/compiled-25.json": "05cb986a003482f7fb6c4dbc0a1a2c3984a9c06aabddb9b2ddccb53c8efd48da", + "research/balanced-split-reclamation/selected/config-23.json": "cb095dbd7005d61a6b373be96142cbc2441729458abbb0bd27c3d2d7a0ca5a1f", + "research/balanced-split-reclamation/selected/config-25.json": "64f220245ed27d529ac10dbba3cbd8a31c89544e6e730281209eabfdd09afcec", + "research/balanced-split-reclamation/selected/profile-23.json": "5df89d1595ecf78df7ce61a1e86421a46c9ccab4bf9e2d6bb774822f220ebe7d", + "research/balanced-split-reclamation/selected/profile-25.json": "6ffa4803bf1e71533bf0eabf7ea49d41466efc2d47354ad9f6f73fd6d02f8152", + "research/balanced-split-reclamation/selected/replay-23.json": "aca1abc38286c9f38667d2a7f09ca7b4db699ac813d1132fb2628d11ffe6ab29", + "research/balanced-split-reclamation/selected/replay-25.json": "9c242fbc919d2b57ac47a82f7aff85597b04e53d343aa0bcfe04dc8ad5801522", + "research/balanced-split-reclamation/selected/transitions-23.json": "2d76625e37927034195dfb2fc69b7c57b0f8b01fa72ba1de0050c10feba2c8c8", + "research/balanced-split-reclamation/selected/transitions-25.json": "007ab21779d85f7ea15abebdcaf5572767c947044cd8a90ddbb3bdb1ea9adf6d", + "research/balanced-split-reclamation/selected/word-23.json.gz": "318e7e5c767f376e587a5fe44baa05e7b7e357f01ccef178b3117cce47ab8980", + "research/balanced-split-reclamation/selected/word-25.json.gz": "8c89971f329121e77895d14171e5f156a4d7e3840c02aff80b1cbcd7aab95f23", + "research/balanced-split-reclamation/support.py": "4ad040edc00df208b4d756ef8776e9c630e3b2f6a76b07ff59c68e180d00a093", + "research/balanced-split-reclamation/test_witness.py": "f2101ba2e43ee0170bd93c119d6e5883d5e1613ff4e07923b9a90194e1a44920", + "research/balanced-split-reclamation/vendor/pr68-compiler.py": "58caca9b5336a2d50fcc45b56abfac60bbb795856b5c806ba4bfa5f649412642", + "research/balanced-split-reclamation/vendor/pr69-compiler.py": "bd8169bf9f5df185a8aa4aec22234b4fd483000a1cecc78b71bf32e479af1499", + "research/balanced-split-reclamation/vendor/pr71-certificate.json": "0fcb53fa374273efab6370953c966e8fa065dbfdba43691843a4788cb2cda42e", + "research/balanced-split-reclamation/vendor/pr71-graph.py": "9d4ee7179f880f9576e81c7ad3a5290fe61380a7531d559ef3cf0939bb30089c", + "research/balanced-split-reclamation/verify.py": "a205f2f73cd07cd6af94a4cf11f2c669cdd18b44fcd810df0ac6193eaff5a613", + "research/pair-assembly/frame/frame-compiler.json": "86eeb10989a61e571938178b91dfe1b81ba39ec97cc93124c00cecd91dc6ef13", + "research/pair-assembly/frame/frame_verify.py": "fafe25d57166a747eeb847444a2e02dd7eed19038b93a2c495014d147d04a8fb", + "research/pair-assembly/pair_graph.py": "3d47e89d2649c90800a276bdd0480131def50e0bdf92c122a19494b55bf17420", + "scripts/exclusion_circuit.py": "b253f9d7318becda1c1f3b24e2287ed44a9c27fcea00cf9d531afb950d0457a0", + "scripts/experiments/binary_frame_math.py": "1f96e8aafc8ae89f8eeec5d03800131d93d58e01bf8a7fca8feb03702d1740d0", + "scripts/experiments/binary_frame_profile_prepare.py": "8a50381cab00b33e62b3a057d199ba5e19647929135c95b0fd63fc8a8ef7c9b3", + "scripts/experiments/binary_frame_profiles.cpp": "8e2e391d3ee57cbb1372c68e4aa031e1b861321536eabd642ada54e12e678669", + "scripts/experiments/binary_frame_replay.py": "392e78e62d7685c99a5888a7da743ea6c3dcad631af4a743c91e0c09348442bc", + "scripts/partial_swap/paired.py": "ddcecace3a8e04d690914cbd64873ab8dde8c0c3477a255767b0ed6f639bb0c7", + "scripts/partial_swap/shared.py": "81e9af92cdf38243a540cdcff2062778e449467848d444da37a9553c12ca4c34" + }, + "scope": "Explicit source and artifact freeze; no automatic refresh in verification", + "upstream": { + "pr67": "b3745601e947a94316bf25c2c6263d93c06e3364", + "pr68": "8778fdb52e834a2a14371590d80ea6e0c734a866", + "pr69": "91aa1f17e6e3fc063241686a41a34ddd0dc24c50", + "pr71": "1bef94fd40a746452548c84a4a8f8834670a3113" + } +} diff --git a/research/round9-balanced-columns/inherited/graph.py b/research/round9-balanced-columns/inherited/graph.py new file mode 100644 index 0000000000..ba0382efaa --- /dev/null +++ b/research/round9-balanced-columns/inherited/graph.py @@ -0,0 +1,68 @@ +"""Controlled combinations of the PR62, PR69 and PR71 scalar graphs. + +PR62 graph: Avi Eisenberg with Claude assistance. PR59 split operation: +Rohan Garg. PR69 balanced coarse columns: eumemic with Codex assistance. +PR71 anchored split vector: Chafik Boukhalfa with Codex assistance. +This configurable composition/search adapter: huxint with Codex assistance. +Apache-2.0 and all inherited notices apply. No global search claim. +""" +import sys +if sys.flags.optimize: + raise ValueError('Assertions must remain enabled') +from hashlib import sha256 +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +BASE = ROOT/'research/pair-assembly/pair_graph.py' +BEFORE = ''' coarse = {(i, j): self.total([e(a, b) for a in groups[i] for b in groups[j]]) + for i, j in combinations(range(ng), 2)}''' +AFTER_COLUMNS = ''' def coarse_sum(i, j): + columns = [self.total([e(a,b) for a in groups[i]]) for b in groups[j]] + return self.total(columns) + coarse = {(i,j):coarse_sum(i,j) for i,j in combinations(range(ng),2)}''' +AFTER_ROWS = ''' def coarse_sum(i, j): + rows = [self.total([e(a,b) for b in groups[j]]) for a in groups[i]] + return self.total(rows) + coarse = {(i,j):coarse_sum(i,j) for i,j in combinations(range(ng),2)}''' + + +def graph(h, groups=(1, 1, 2), anchor='first', coarse='none'): + if h not in (23, 25) or any(type(x) is not int or not 0 <= x <= 3 for x in groups): + raise ValueError('Unsupported finite graph configuration') + source = BASE.read_text() + if coarse != 'none': + assert source.count(BEFORE) == 1 + source = source.replace(BEFORE, {'columns': AFTER_COLUMNS, 'rows': AFTER_ROWS}[coarse]) + namespace = {'__file__': str(BASE), '__name__': 'next_use_graph_composition'} + exec(compile(source, str(BASE)+':next_use_composition', 'exec'), namespace) + original_class = namespace['circuit_class'] + + def circuit_class(dimension): + class SplitPair(original_class(dimension)): + def grouping(self, points): + partition = super().grouping(points) + choice = groups[self._level] if self._level < len(groups) else 0 + if len(points) > 3 and choice: + index = {1: 0, 2: (len(partition)-1)//2, 3: len(partition)-1}[choice] + if len(partition[index]) == 2: + partition[index:index+1] = [[x] for x in partition[index]] + assert all(len(g) in (1, 2) for g in partition) + assert len(partition) < len(points) + assert sorted(x for g in partition for x in g) == sorted(points) + return partition + return SplitPair + + namespace['circuit_class'] = circuit_class + original_points = namespace['alternating_points'] + if anchor != 'none': + def points(dimension, common): + old = original_points(dimension, common) + pairs = [(a, a+1) for a in range(0, dimension-1, 2) if common not in (a, a+1)] + chosen = {'first': pairs[0], 'second': pairs[min(1, len(pairs)-1)], 'last': pairs[-1]}[anchor] + result = list(chosen)+[x for x in old if x not in chosen] + assert sorted(result) == [x for x in range(dimension) if x != common] + return result + namespace['alternating_points'] = points + result = namespace['graph'](h) + result.verify() + return result diff --git a/research/round9-balanced-columns/inherited/vendor/pr69-compiler.py b/research/round9-balanced-columns/inherited/vendor/pr69-compiler.py new file mode 100644 index 0000000000..271b44d795 --- /dev/null +++ b/research/round9-balanced-columns/inherited/vendor/pr69-compiler.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +"""Balance each four-edge coarse sum in PR62 into two column pair-star sums. + +Instead of a three-addition chain, use (e(a,b)+e(a2,b))+(e(a,b2)+e(a2,b2)). +The existing interning shares pair-star sums with the strip computations. +Only the coarse-edge construction changes. The full graph is checked and +compiled, so all remaining copies and clearing operations remain charged. + +Base graph: Avi Eisenberg / ikeboy, with Anthropic Claude assistance (#62). +Compiler: eumemic with OpenAI Codex assistance (#57). Rank priority: Chafik +Boukhalfa with OpenAI Codex assistance (#60). Their unchanged composition +is also published by Dominik Scholz with OpenAI Codex assistance (#63). +This coarse-sum experiment was prepared with OpenAI Codex assistance. +All inherited licenses and notices remain. +""" +import sys +sys.dont_write_bytecode = True +if sys.flags.optimize: + raise ValueError('Assertions must remain enabled') +import argparse +import gzip +from hashlib import sha256 +import inspect +import json +from pathlib import Path + +import binary_frame_compiler as compiler +import ranked_interval_compiler as predecessor + +ROOT = Path(__file__).resolve().parents[2] +PIN = ROOT / 'references/frame-compiler/balanced-coarse' +BEFORE = ''' coarse = {(i, j): self.total([e(a, b) for a in groups[i] for b in groups[j]]) + for i, j in combinations(range(ng), 2)}''' +AFTER = ''' def coarse_sum(i, j): + columns = [self.total([e(a,b) for a in groups[i]]) for b in groups[j]] + return self.total(columns) + coarse = {(i,j):coarse_sum(i,j) for i,j in combinations(range(ng),2)}''' + + +def check_sources(): + predecessor.check_sources() + manifest = json.loads((PIN / 'SOURCE.json').read_text()) + for name, digest in manifest['files'].items(): + assert sha256((PIN / name).read_bytes()).hexdigest() == digest, name + dependency = PIN / manifest['shared_dependency_manifest'] + assert sha256(dependency.read_bytes()).hexdigest() == manifest['shared_dependency_manifest_sha256'] + return manifest + + +def graph(h): + assert h in (23, 25) + check_sources() + path = predecessor.PIN / 'research/pair-assembly/pair_graph.py' + source = path.read_text() + assert source.count(BEFORE) == 1 + namespace = {'__file__': str(path), '__name__': 'balanced_coarse_pr62'} + exec(compile(source.replace(BEFORE, AFTER), str(path) + ':balanced_coarse', 'exec'), namespace) + result = namespace['graph'](h) + result.verify() + return result + + +def compile_axis(h): + circuit = graph(h) + source = inspect.getsource(compiler.compile_) + before = 'for s in sorted(retired):' + after = "for s in sorted(retired, key=lambda s: (-blocks[frames[s]]['rank'], s)):" + assert source.count(before) == 1 + namespace = dict(vars(compiler)) + exec(compile(source.replace(before, after), __file__ + ':ranked_compile', 'exec'), namespace) + # build() is the original function and resolves graph in compiler's globals. + previous = compiler.graph + compiler.graph = lambda _: circuit + try: + result, word = namespace['compile_'](h, matching=True, reclaim=True, dirty=True) + finally: + compiler.graph = previous + result['scalar'] = circuit.verify() + result['baseline_pr62_stacked_roles'] = {23: 27918, 25: 36586}[h] + return result, word + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--h', type=int, choices=(23, 25), required=True) + parser.add_argument('--output', type=Path, required=True) + parser.add_argument('--word', type=Path, required=True) + args = parser.parse_args() + result, word = compile_axis(args.h) + raw = (json.dumps(word, separators=(',', ':')) + '\n').encode() + args.word.write_bytes(gzip.compress(raw, mtime=0)) + args.output.write_text(json.dumps(result, indent=2) + '\n') + print(json.dumps(result), flush=True) diff --git a/research/round9-balanced-columns/package-validation-receipt.json b/research/round9-balanced-columns/package-validation-receipt.json new file mode 100644 index 0000000000..0b83d4a9fb --- /dev/null +++ b/research/round9-balanced-columns/package-validation-receipt.json @@ -0,0 +1,160 @@ +{ + "status": "PASS finite source binding, both serialized words, all CRT profiles, rational moment and assembly", + "manifest_sha256": "861f48772c29ce35eace43fe277ce4b06a598bf4338b9f545d349a2577889485", + "axes": { + "23": { + "replay": { + "status": "independent serialized word, exact frames, full input and dirty basis both orientations PASS", + "h": 23, + "roles": 27128, + "output_roles": 5336, + "elementary_xors": 167539, + "word_length": 694950, + "full_basis_vectors": 30670, + "rank_mass": 624450, + "histogram": { + "1": 58230, + "0": 185200, + "2": 81090, + "4": 14624, + "3": 10015, + "5": 6757, + "6": 2127, + "8": 1105, + "10": 599, + "9": 364, + "12": 691, + "14": 1893, + "13": 208, + "11": 97, + "16": 430, + "17": 543, + "18": 3197, + "19": 6482, + "15": 267, + "22": 23, + "7": 278, + "21": 429 + } + }, + "transitions": { + "h": 23, + "v": 1771, + "R": 27128, + "frames": 59803, + "distinct_transitions": 151935, + "singles": 15939, + "rank_mass": 624450, + "rank_histogram_with_side_growth_split_into_singletons": { + "1": 68856, + "2": 75777, + "3": 10015, + "4": 14624, + "5": 6757, + "6": 2127, + "7": 278, + "8": 1105, + "9": 364, + "10": 599, + "11": 97, + "12": 691, + "13": 208, + "14": 1893, + "15": 267, + "16": 430, + "17": 543, + "18": 3197, + "19": 6482, + "21": 429, + "22": 23 + }, + "word_sha256": "7e452d6cec73d2433c9ec996fac2bfaf97317294ee515f86cef95c3ad9f154d7", + "copied_centers": 23, + "transition_events_equal_independent_xor_word_reconstruction": true + }, + "actual_profiles_equal": true + }, + "25": { + "replay": { + "status": "independent serialized word, exact frames, full input and dirty basis both orientations PASS", + "h": 25, + "roles": 35598, + "output_roles": 6925, + "elementary_xors": 235195, + "word_length": 972980, + "full_basis_vectors": 40198, + "rank_mass": 890550, + "histogram": { + "1": 76952, + "0": 260118, + "2": 118303, + "3": 13346, + "4": 18638, + "5": 8916, + "6": 3400, + "8": 1196, + "7": 576, + "9": 553, + "10": 854, + "12": 776, + "14": 756, + "13": 162, + "16": 2229, + "18": 572, + "19": 879, + "11": 21, + "15": 125, + "17": 583, + "20": 4217, + "21": 8479, + "24": 25, + "23": 462 + } + }, + "transitions": { + "h": 25, + "v": 2300, + "R": 35598, + "frames": 84845, + "distinct_transitions": 212411, + "singles": 20700, + "rank_mass": 890550, + "rank_histogram_with_side_growth_split_into_singletons": { + "1": 90752, + "2": 111403, + "3": 13346, + "4": 18638, + "5": 8916, + "6": 3400, + "7": 576, + "8": 1196, + "9": 553, + "10": 854, + "11": 21, + "12": 776, + "13": 162, + "14": 756, + "15": 125, + "16": 2229, + "17": 583, + "18": 572, + "19": 879, + "20": 4217, + "21": 8479, + "23": 462, + "24": 25 + }, + "word_sha256": "fc6f429363b3c8208fd9bff10ec20386de280a3e1ea4f109ca5e0834d2c60fc4", + "copied_centers": 25, + "transition_events_equal_independent_xor_word_reconstruction": true + }, + "actual_profiles_equal": true + } + }, + "kappa": "51915547765237/1000000000000000000", + "bit_saving": "3244890195589/62500000000000000", + "strict_constraints": 47, + "margins": 7, + "independent_moment_and_adjacent_grid": true, + "scope": "Finite conditional witness; inherited all-size and transfer assumptions remain." +} diff --git a/research/round9-balanced-columns/provenance/frozen-manifest.json b/research/round9-balanced-columns/provenance/frozen-manifest.json new file mode 100644 index 0000000000..c269419787 --- /dev/null +++ b/research/round9-balanced-columns/provenance/frozen-manifest.json @@ -0,0 +1,193 @@ +{ + "baseline_files": { + "certificates/split-pair-compiler.json": "6561fab8609e8aa3a291a8197cd8b834b0881ee0b9a5b991926c2c93c4d5f884", + "certificates/split-pair-kappa.json": "0fcb53fa374273efab6370953c966e8fa065dbfdba43691843a4788cb2cda42e", + "certificates/split-pair-profiles-23.json": "867302152b62abf28a6e1b119580b99eaffa237082b1d295000a3ee2637d5db4", + "certificates/split-pair-profiles-25.json": "1ecc63972ae4df2ed7af7278d5f65790dd4aca3032cc17304f39ac063cd2c067", + "certificates/split-pair-repository-validation.json": "a4700ef48968e0bc6afadf8048d82bb4f4cfc9f21db9a8bf355bd9c2745da53e", + "certificates/split-pair-transitions-23.json": "6ca709c1e101f7c9a828d9ceb8a7f2991a2d954b84c9ae8c616deabfc1e321c8", + "certificates/split-pair-transitions-25.json": "4364441b6a7c444bb2c84ab5b973c81e4069d753be7f1cf5a3c836096a739f1e", + "certificates/split-pair-validation.json": "9b64dd6382fc592e2cda6bb54be27ba8f705ede24c50fd2f9b4336ce2e402c7e", + "certificates/split-pair-word-23.json.gz": "ca504cb3912358a9560d4916eaeea2e415c24991db0bc7d397e50ea53d9cb24b", + "certificates/split-pair-word-25.json.gz": "54f612f688d6ba3b1fffdd83aa6053035006fee90cb4b3899fc7880f35c38b4f", + "references/frame-compiler/pr48/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "references/frame-compiler/pr48/NOTICE": "dfc4c460aad4eb08d7b980792bd78d6258b24fa166272d50e2e7cdf58507de4e", + "references/frame-compiler/pr48/SOURCE.json": "6ccc673f88d3650d75ed600b082fe2fc2866dd88a172d182a38c1d0cd27d24b3", + "references/frame-compiler/pr48/research/copied-fixed/balanced_assembly.py": "4d27575dcad2b45a281a34054d311409ecd954f373c0c3a62c29bcc843f06a86", + "references/frame-compiler/pr48/research/copied-fixed/certificate.json": "33b3373c04e18a7f4cee33ba68da6ed71934acc3e0179cca6197696be4befa22", + "references/frame-compiler/pr48/research/copied-fixed/changed_graph.py": "375a7ca6cac6d153c1880fd5ea5b4525e5dca9d4ee3018d24d679c219b59c5b3", + "references/frame-compiler/pr48/research/copied-fixed/profiles.cpp": "b9fbd71c746609948b60c441ba4601e88436956fe636d1810f270ce4ce6a63a6", + "references/frame-compiler/pr48/research/copied-fixed/verify.py": "44932182ce6c4d39776650311262ef0ac1ea9b5da7220bc0f728e2789881f84a", + "references/frame-compiler/pr48/scripts/exclusion_circuit.py": "b253f9d7318becda1c1f3b24e2287ed44a9c27fcea00cf9d531afb950d0457a0", + "references/frame-compiler/pr48/scripts/partial_swap/binary_io.hpp": "7e143eb75bb342ac8f0c82a60005e7c35c9ec827de479bf6fb773151f3af5fa1", + "references/frame-compiler/pr48/scripts/partial_swap/paired.py": "ddcecace3a8e04d690914cbd64873ab8dde8c0c3477a255767b0ed6f639bb0c7", + "references/frame-compiler/pr48/scripts/partial_swap/shared.py": "81e9af92cdf38243a540cdcff2062778e449467848d444da37a9553c12ca4c34", + "references/frame-compiler/pr59-split-operation/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "references/frame-compiler/pr59-split-operation/NOTICE": "f85437ee441f2a028660dd5e8dbdc0ec7b52bb55c04ea34fa4829c154bfd0ac1", + "references/frame-compiler/pr59-split-operation/SOURCE.json": "bd0c5dd41b7fc797c8c28b7c738f6c4d709103908e1394c3dee18ecaf39ba38d", + "references/frame-compiler/pr59-split-operation/research/split-skip/SOURCE.json": "7c2b4646a3ecfef6f881da5c43e4bd0fa9a4d1b00548b8ab458d897e16735134", + "references/frame-compiler/pr59-split-operation/research/split-skip/split_graph.py": "9b16ba907cbd58611fb64bfb9211be7809d54822d44c78fc6167cf4ba79eb905", + "references/frame-compiler/pr65/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "references/frame-compiler/pr65/NOTICE": "5931cb7d43e09380594b113018cac70258fb66e0673b91f706b01ea482c1be1a", + "references/frame-compiler/pr65/SOURCE.json": "6ad67c1dbbc9f10fd4cf3d396405e3d02364ead5fb56961f01da7f8200d55c8a", + "references/frame-compiler/pr65/references/frame-compiler/pr48/SOURCE.json": "6ccc673f88d3650d75ed600b082fe2fc2866dd88a172d182a38c1d0cd27d24b3", + "references/frame-compiler/pr65/references/frame-compiler/pr48/research/copied-fixed/balanced_assembly.py": "4d27575dcad2b45a281a34054d311409ecd954f373c0c3a62c29bcc843f06a86", + "references/frame-compiler/pr65/references/frame-compiler/pr48/research/copied-fixed/certificate.json": "33b3373c04e18a7f4cee33ba68da6ed71934acc3e0179cca6197696be4befa22", + "references/frame-compiler/pr65/references/frame-compiler/pr48/research/copied-fixed/changed_graph.py": "375a7ca6cac6d153c1880fd5ea5b4525e5dca9d4ee3018d24d679c219b59c5b3", + "references/frame-compiler/pr65/references/frame-compiler/pr48/research/copied-fixed/profiles.cpp": "b9fbd71c746609948b60c441ba4601e88436956fe636d1810f270ce4ce6a63a6", + "references/frame-compiler/pr65/references/frame-compiler/pr48/research/copied-fixed/verify.py": "44932182ce6c4d39776650311262ef0ac1ea9b5da7220bc0f728e2789881f84a", + "references/frame-compiler/pr65/references/frame-compiler/pr48/scripts/exclusion_circuit.py": "b253f9d7318becda1c1f3b24e2287ed44a9c27fcea00cf9d531afb950d0457a0", + "references/frame-compiler/pr65/references/frame-compiler/pr48/scripts/partial_swap/binary_io.hpp": "7e143eb75bb342ac8f0c82a60005e7c35c9ec827de479bf6fb773151f3af5fa1", + "references/frame-compiler/pr65/references/frame-compiler/pr48/scripts/partial_swap/paired.py": "ddcecace3a8e04d690914cbd64873ab8dde8c0c3477a255767b0ed6f639bb0c7", + "references/frame-compiler/pr65/references/frame-compiler/pr48/scripts/partial_swap/shared.py": "81e9af92cdf38243a540cdcff2062778e449467848d444da37a9553c12ca4c34", + "references/frame-compiler/pr65/research/pair-assembly/PROOF.md": "30685624bf922bb9d9f7ed4b0d367a660fe373cc9ee28fec33585bd8c7023e75", + "references/frame-compiler/pr65/research/pair-assembly/SOURCE.json": "8f8c0fb7ca012ec5092136744eb52a0222697a8275d14aa8f667339c86baf9d0", + "references/frame-compiler/pr65/research/pair-assembly/frame/frame-compiler.json": "86eeb10989a61e571938178b91dfe1b81ba39ec97cc93124c00cecd91dc6ef13", + "references/frame-compiler/pr65/research/pair-assembly/frame/frame_verify.py": "fafe25d57166a747eeb847444a2e02dd7eed19038b93a2c495014d147d04a8fb", + "references/frame-compiler/pr65/research/pair-assembly/pair_graph.py": "3d47e89d2649c90800a276bdd0480131def50e0bdf92c122a19494b55bf17420", + "references/frame-compiler/pr65/research/reordered-rank-pair/README.md": "13fbcfe41a4cb22ea6f1d59c98305add85a86a4db4677ab3450fd34b139cf39c", + "references/frame-compiler/pr65/research/reordered-rank-pair/arithmetic/README.md": "93a1e4eb52ff3b3f3b24464ce1e7b5498fac2da2789cab5deb76e7342fe36775", + "references/frame-compiler/pr65/research/reordered-rank-pair/arithmetic/audit-receipt.json": "f481198b192790b65dde2f93a837fb5e2e7508322f25bbf26f73530febd1f659", + "references/frame-compiler/pr65/research/reordered-rank-pair/arithmetic/audit.py": "aa297fffcdaa133f5dee17d97fac72aa5ba2cf943da5a8a5e3f4d62f6f0a7f79", + "references/frame-compiler/pr65/research/reordered-rank-pair/arithmetic/certificate.json": "6474f4c638b5a16de5a7ed6054f3ad28404eac17eaa4570aab2ef378d6e7e1a3", + "references/frame-compiler/pr65/research/reordered-rank-pair/arithmetic/refine.py": "e0488c919e76850313ff93d7da704a7fcc14a316eee2cac81e2b8dff9c145b5d", + "references/frame-compiler/pr65/research/reordered-rank-pair/arithmetic/test_arithmetic.py": "d4824c8c1cc6c726daf9104c820aefe1e57ce6a8625871954a54a538b5af0524", + "references/frame-compiler/pr65/research/reordered-rank-pair/current-comparison.json": "be8713b049b34b41d82ef3e03380f6b45d7b33bf8611af9942dea7597406dc07", + "references/frame-compiler/pr65/research/reordered-rank-pair/frame-compiler.json": "48f86ffe2c2a16d3817ed3ab814cd1442442ec15f827d43a7383a0a953ff4337", + "references/frame-compiler/pr65/research/reordered-rank-pair/frame-profiles-23.json": "fec377bcf1512a427674983256b900229d4133026445b6e680c6e1e6dde5af7d", + "references/frame-compiler/pr65/research/reordered-rank-pair/frame-profiles-25.json": "28b4b911e26fbc02dde0d2e1458ed16227f756126ab8144d6d45e164d1165262", + "references/frame-compiler/pr65/research/reordered-rank-pair/frame-transitions-23.json": "86646f1110595294cccc15603c552f0a153574a690b69c3b144d84a449891103", + "references/frame-compiler/pr65/research/reordered-rank-pair/frame-transitions-25.json": "c333c348665d12b95e168ca4fac48bfdca335104edd0f29c81fe94bec292e774", + "references/frame-compiler/pr65/research/reordered-rank-pair/frame-word-23.json.gz": "a44e038e1c548ea8ac31dd04acc2bba7951b22e17df7b7ad3464ea2b504a8da4", + "references/frame-compiler/pr65/research/reordered-rank-pair/frame-word-25.json.gz": "ad8b299697f90b185b6b791313b505586be97965519052100d097df6199e00c5", + "references/frame-compiler/pr65/research/reordered-rank-pair/paired-candidate.json": "34a500d739537235dfc5d24325c22856ca4567b9eac998a3bce9b13db5501940", + "references/frame-compiler/pr65/research/reordered-rank-pair/test_negative.py": "88832242e6f74e3fe08d109d4f21ff188a9ca0ae50c3e8f31da0243fe9501510", + "references/frame-compiler/pr65/research/reordered-rank-pair/verify.py": "e84ed21dad24f9b8c429441caae49c13ccae883be2f04e696993cfe665b57352", + "references/frame-compiler/pr65/scripts/exclusion_circuit.py": "b253f9d7318becda1c1f3b24e2287ed44a9c27fcea00cf9d531afb950d0457a0", + "references/frame-compiler/pr65/scripts/experiments/binary_frame_math.py": "1f96e8aafc8ae89f8eeec5d03800131d93d58e01bf8a7fca8feb03702d1740d0", + "references/frame-compiler/pr65/scripts/experiments/binary_frame_profile_prepare.py": "8a50381cab00b33e62b3a057d199ba5e19647929135c95b0fd63fc8a8ef7c9b3", + "references/frame-compiler/pr65/scripts/experiments/binary_frame_profiles.cpp": "8e2e391d3ee57cbb1372c68e4aa031e1b861321536eabd642ada54e12e678669", + "references/frame-compiler/pr65/scripts/experiments/binary_frame_replay.py": "392e78e62d7685c99a5888a7da743ea6c3dcad631af4a743c91e0c09348442bc", + "references/frame-compiler/pr65/scripts/experiments/rank_pair_compiler.py": "9984aaccf880e4840402322d76678bfddb33ce7e494af78430a43429f51b85fd", + "references/frame-compiler/pr65/scripts/partial_swap/paired.py": "ddcecace3a8e04d690914cbd64873ab8dde8c0c3477a255767b0ed6f639bb0c7", + "references/frame-compiler/pr65/scripts/partial_swap/shared.py": "81e9af92cdf38243a540cdcff2062778e449467848d444da37a9553c12ca4c34", + "references/frame-compiler/pr67/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "references/frame-compiler/pr67/NOTICE": "5931cb7d43e09380594b113018cac70258fb66e0673b91f706b01ea482c1be1a", + "references/frame-compiler/pr67/SOURCE.json": "6c103bd7e29cb737003d0bfa42c541a4eea2f3618bfff980992eeab1b8c16e70", + "references/frame-compiler/pr67/research/slot-cost-rank-pair/README.md": "e0fcd8e732c8b8becb3d860eb83dc979ed5e6b33ba16caf9dca1e44f7929c340", + "references/frame-compiler/pr67/research/slot-cost-rank-pair/arithmetic/certificate.json": "e66f955f1b76ce3db7ecb84294993a072f42f972b8f3040015c12e6dc953d698", + "references/frame-compiler/pr67/research/slot-cost-rank-pair/compiler.py": "29296211e0532aaf19101a6b2f2ceaebe374af95ae3acd63e63656db0afef7ae", + "references/frame-compiler/pr67/research/slot-cost-rank-pair/frame-compiler.json": "eb5c0b401e677d3958ecfcd6d8de3bc825c4fb66d1cf79c3fcbcf23938ca6e69", + "references/frame-compiler/pr67/research/slot-cost-rank-pair/paired-candidate.json": "be0322ad60f73923953f242eaffaf114ff12438e8617dae38888b77fa03184cc", + "references/frame-compiler/pr67/research/slot-cost-rank-pair/profile_oracle.cpp": "d1f6b650de9fb5842b412595369271d9eeb6f54045c76c0fb5cad29854955c35", + "references/frame-compiler/pr67/research/slot-cost-rank-pair/verify.py": "3c1d2eac9d3d2f13b60503deaa84e11ab2975aa84af71c8ad74584c5902b2d77", + "references/frame-compiler/pr68/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "references/frame-compiler/pr68/NOTICE": "d9db68e85db965bf7037d535ddc354b096b7c3b8f4cb0eb4887dc61eba5eae23", + "references/frame-compiler/pr68/SOURCE.json": "6473ccc29182212770ae4fd747b50a607c2a9b302e21c5c4355ec1b25bafe2e2", + "references/frame-compiler/pr68/research/global-anchor-screen/PROOF.md": "3023c8c039acb3afc2a1e0c2ee55dcffaa4a1a2961076222ae20b03d0f3c6a38", + "references/frame-compiler/pr68/research/global-anchor-screen/SOURCE.json": "f6249b8f91c7721a59ecc6d43a3f2ec65162578203bd430ef76732a3937399f3", + "references/frame-compiler/pr68/research/global-anchor-screen/compiler-frozen.py": "12d646fa9ad69e4f3c532fe69080d8fe1509cde0968a6ab52a9d60273803adc0", + "references/frame-compiler/pr68/research/global-anchor-screen/selected-manifest.json": "97bd86fc20fb3aee2d1adacd6a485b12e918b7340d2d3ca70e1318889e13e3a0", + "references/frame-compiler/pr68/research/global-anchor-screen/selected_compile.py": "86bdfcf599c6b131e376773fe177bca57a9f63c9b60bad5de8aa00982d779b22", + "research/split-pair/PROOF.md": "467d4819e9f2db61f8ea7f270b8b6696d99f7980d762aad0d19beced5e24a82a", + "research/split-pair/README.md": "6efd6ed7d3ee72167bea586f3186bcc5973493d6560152c4bb66d15fbaeb5c2d", + "research/split-pair/SOURCE.json": "9d5a4a7c4cf459f4c5731809de93cfb4b873cb8c9ea95a1be9239733a9a93c72", + "research/split-pair/config-23.json": "9a2cbaf8de500722844bc8dff09fb994a00d47b0319b3aad4e612435c32308b6", + "research/split-pair/config-25.json": "706c5998f8414d495e4da8cdcf4fe7c718762649967f16b36513826df6df5b13", + "research/split-pair/engine-changes.patch": "47c612dad40164b04fa7ade38012c904d81785688dad2640daa0c9ccaaeeb48f", + "research/split-pair/engine-provenance.json": "a56ea22dafee35523fcff9d0e046cc437b91ee4410f00300a887319d58a1ffaf", + "research/split-pair/parameters.json": "d1385be76dd427d621d73760161c9e87b9d4a0a927a94df0b3fe450f3cd67e24", + "scripts/experiments/affine_vector_screens.py": "756778eeca27f490adc7354a122dc50c40375156259991469c47a90949118ea1", + "scripts/experiments/affine_vector_witnesses.json": "672a4318c48f5286ce088d34736c38957b7f662a5f753d440dbc638e7da5f62a", + "scripts/experiments/balanced_fano.py": "1586fb1db4f40e79e97bae59f47192675663403bbcacbf5f4e0b702edfd22b0a", + "scripts/experiments/binary_frame_compiler.py": "bc6910c8bbe8224285164323d3c06e9035ad3eaa55416abc2867ae0066454a0c", + "scripts/experiments/binary_frame_math.py": "1f96e8aafc8ae89f8eeec5d03800131d93d58e01bf8a7fca8feb03702d1740d0", + "scripts/experiments/binary_frame_profile_prepare.py": "8a50381cab00b33e62b3a057d199ba5e19647929135c95b0fd63fc8a8ef7c9b3", + "scripts/experiments/binary_frame_profiles.cpp": "8e2e391d3ee57cbb1372c68e4aa031e1b861321536eabd642ada54e12e678669", + "scripts/experiments/binary_frame_replay.py": "392e78e62d7685c99a5888a7da743ea6c3dcad631af4a743c91e0c09348442bc", + "scripts/experiments/bit_compression.py": "d1e6726341b3619262cc07246c3420584f46bdf57d44f1946d8dab18334cbca8", + "scripts/experiments/block_completion.py": "58d928accb928fff0230eef4901a876e6d7a2ec24a3694e4784614f340a03b8d", + "scripts/experiments/block_core.py": "af94018e8f4b80219a8e9e104eae21e34b66fc670217d03ef54862b59c051fc9", + "scripts/experiments/complex_centers.py": "3744396587d729253d80980f6310b56e7bf0ea21b165bd178d0d6d4c49faf2e2", + "scripts/experiments/core_limits.py": "a31a27cc24cf0349a507d1141a2b965ea25f1c60f355d7e13c581305a12d3a43", + "scripts/experiments/cube_core_family.py": "e58f1f4067bda2d4838343f42ec2505316f006561f0702e869847d88b85413a8", + "scripts/experiments/disjoint_tensor.py": "102dd59bf96033f96ba0dab4c2aba77b3a7a73b67b0f96929ff8b20a98b91cd8", + "scripts/experiments/early_sharing.py": "1dd42768536bac13727528e51a999152cf9516a53c4001f2c390323e7f453378", + "scripts/experiments/exclusion_greedy.py": "d8fa918119a6d944174522a5f7a2f55dc9f905aeca98e1864dc9bbf672876902", + "scripts/experiments/fano_completion.py": "6cade2a36b910bf7e68a872dc4fd3560837935cffe80f9526cd012a28b247738", + "scripts/experiments/fano_permuted_completion.py": "0b48e0ba6399ac9864b733998ff32222e7c25c99de052ab8ea5196872f8010d4", + "scripts/experiments/fano_permuted_routing_witnesses.json": "b7093d006713f0b026c49b62ac4c502731630d17d15f56a2b63284ad8f4f8102", + "scripts/experiments/fano_routing_witnesses.json": "2017a4401c16ac58ccd7911b1d2128f1a93a98b108672db709e0c21cda4bb693", + "scripts/experiments/inplace_side.py": "4e7cb3df2e263f6c7f5907c55e3ee04c08926e6dbc984bbda1722a27b0a48ff6", + "scripts/experiments/inplace_side_witnesses.json": "90fe710f5daa35cc9e4892b29d712d66110b7b2b4c404da95a960ea7041618b9", + "scripts/experiments/intersection_circuit.py": "a877cb59aca1f003fc5db4bff5cd873af57be6d8d2465835d6fbe2c396ee5c09", + "scripts/experiments/intersection_greedy.py": "e7faceecad5d1efdc849c52ebe7258453e1579308fc8e31d9a4b3256f6ca9d0e", + "scripts/experiments/joint_dual_compiler.py": "853d3fc4a740c5b74c23b3a6af5d4dc9b41fb38e9b55678539a7e0ee71947c13", + "scripts/experiments/joint_dual_compose.py": "741900aa6f69c0e3458700f3b534334269004ad80c50405ecfeda18e6d3f2800", + "scripts/experiments/joint_dual_reclaim_compiler.py": "9984aaccf880e4840402322d76678bfddb33ce7e494af78430a43429f51b85fd", + "scripts/experiments/mixed_point_circuit.py": "f509362b5031976a22af351fd158ae0b4520fa4f286a5176ec37023d672a7ddc", + "scripts/experiments/parity_phase_repair.py": "1f76f3b96ed556ed901835bd101d0e2588c997d2ed39bdfca097f0187aa86d40", + "scripts/experiments/parity_side.py": "1363ebf82d4c39e458e7bede8253688271008374db70ed4284df84253c8d092b", + "scripts/experiments/partial_routing.py": "dd67bf46aa70f1372d49c30c4fbbaff5664e27331a79ca3319251ceeec11ec00", + "scripts/experiments/pin_joint_dual_sources.py": "4d31cc0e38b7902709ca5f8f714cba109760d2592346dd7f8dc0b900a2d9fe00", + "scripts/experiments/pin_split_pair_sources.py": "511618d0095435ced888c2d2dd78fb92e59f10866160c787acb354da6cfe4b44", + "scripts/experiments/positive_side_core.py": "0d453ab7e869d2cf6a43d6865de82583edb390d3c75038271f0fc09e0f3828ba", + "scripts/experiments/prime_core.py": "080a89a2c91505b509068698542843c9d7af3cdec01b5c88972107dc9c688c62", + "scripts/experiments/prime_subset_limits.py": "3768743ebfd982b7704fdda9c8ee8dd8cfbb4fd126a78396349d075560c047fb", + "scripts/experiments/probe_pair_ranked.py": "aed43df0d61701b5819cd50fd4e028b26f32e65fd7b9074d93e1423a3453fe7d", + "scripts/experiments/quadratic_affine.py": "8f9252bd092eb14779997c6767e090377e91f4d57e6526e9840ae0dd7dcc8f9c", + "scripts/experiments/quadratic_affine_witnesses.json": "3efcebf41650681a8a21a901cd2f81dc07a0c4d28064b883af16b10c3e0036c3", + "scripts/experiments/rank_product_core.py": "7a91c1188c5d42e864a5d2e42397b09c435b526ae4f4210c44bf615de488708e", + "scripts/experiments/shared_core.py": "d3c59b61229956cb54ae1ef9145ed213abdf1ae743929de145a77c43656f01a8", + "scripts/experiments/signed_sparse_core.py": "21da8e1de5ab6ac8479183326c2000313d24b47cc5be2f46b4fe6ac3cd59779f", + "scripts/experiments/single_intersection.py": "08ddae46e5621a5b4c525b504e67ae655abe9b49461d894feaa7abc89a51847d", + "scripts/experiments/single_intersection_witnesses.json": "c2308a3d21991f5828b0519b191b470f48b2fbbcaa5af0f7aed3986cc7534185", + "scripts/experiments/skip_frame_README.txt": "c92a53e608edb95a266ad27f4543c27668451a009c72fd5860619e6f0a355852", + "scripts/experiments/skip_frame_compiler.py": "8ffd079fd2e4f055b5befefecc5f33e686de9898219e9252f5d3913df8b195d8", + "scripts/experiments/skip_frame_compose.py": "d48e688ebb9a490f4eaf50d9ab0a4d4e3e76b6588b55d213df14c703c27a7f66", + "scripts/experiments/split_pair_arithmetic.py": "fb982a0ac8758b2e308dc8bd145f21548c28f4f2ee97d28e77fa849b9560de4a", + "scripts/experiments/split_pair_compiler.py": "3de0ececd6ab108d8780834c3f1a1a84ce7cae49dca4019882bea7f63b588661", + "scripts/experiments/split_pair_compose.py": "9c6337096d5517344cc5029bd80a1379fa407047662ab54c469db7b11e9daa34", + "scripts/experiments/split_pair_engine.py": "58f13f82ce1bb7f2b5549e17628bc6034e5e05cb24db2acb9a91c24820872f70", + "scripts/experiments/split_pair_graph.py": "9d4ee7179f880f9576e81c7ad3a5290fe61380a7531d559ef3cf0939bb30089c", + "scripts/experiments/subset_core_family.py": "373a45a8fb4294cdf72d510d54e16d21535227b085aefb008aa092b3ad26e4de", + "scripts/experiments/ternary_side.py": "93379b6e70cf58bb55432d9f2d1c0e0305c20a075bfe3cc219deabd927afd375", + "scripts/experiments/verify_joint_dual.py": "7a31bba1e9c0ded32ae285df2ca9bc91ef20c330f6789fdba361876f3c7a1985", + "scripts/experiments/verify_skip_frame.py": "fc42dc3d59239ee3908d0e3e95402eb53fd6815a100521911fde1b541070c292", + "scripts/experiments/verify_split_pair.py": "5cc7031569b17b560f68d4238191a32e5d7f66e7fdcbaabd0ca87020c89f89c8" + }, + "bit_saving": "3244890195589/62500000000000000", + "files": { + "SOURCE.json": "20273d507b6074ce91fd7467e2d23101bf35f8d60a2d81684c58f611d91f9108", + "cache-stale-failure.log": "edb8b32a81ab277326e3deb19d34119982c10e998ca0f1ae9cf22b1fa4afea21", + "coarse_graph.py": "b5bbabb8e5bf69769af4b6cd67163954d990dc489e3c9488ed84bd09f0a767c8", + "dense-audit.json": "055a31465e8c42c27b8c80115cb9a2edef5b32b52b61ce3c4dac9f718c86f954", + "dense_audit.py": "b282e743d9d8c48cbc97eb2c2597a6c52894d33ea1967dd1ff4c269b0e0a72e3", + "inherited/NOTICE": "3bfe7a693e10fbe710e7fadedb7caeb21e272ce5899f48d043f636e2b06562b0", + "inherited/README.md": "e9d7ae955d27fb1832744583f1d251263e9fc499bae2d664b31f28fc83dc2592", + "inherited/SOURCE.json": "813564d76569fd54a5aa1645da15f1a33b12de8a0bcc53056e69087394b0cfcd", + "inherited/graph.py": "349c74a3684cc26c14f4b7001efb086825a4398461709ba13ade2cd10e336d23", + "inherited/vendor/pr69-compiler.py": "bd8169bf9f5df185a8aa4aec22234b4fd483000a1cecc78b71bf32e479af1499", + "run.py": "3b8f3a355799882fd1431e3ced934e34149c77e36dce09f62e214fc6156e4c0a", + "schedule_variant.py": "3ce3b4c0886868e3fcd2b75c54b61180d103447cfdb9d3ece1de47dd6d46eecc", + "screen_width.py": "9087cac4d745d3525814323462efa7927db820e86bcc9e93b81a9fd7dcf6d372", + "selected-both/PROOF.md": "5343fcb8dca9ab48c86a8c0a6735b2afbb07fca75f6d0e62b3d3d640f7f190d0", + "selected-both/arithmetic.json": "7ed59a2d4b546f3375b4f95e9005831ca9741bb56092bc49a61bc7b2e770eebb", + "selected-both/comparison.json": "c69207a10663d760232439ae82f18785bb14172c5422ab7092aee93d69f3e41b", + "selected-both/profile-23.json": "af5194d09494e76a9c02cfb4b102dab07f20ad7758acaf2867158af0cf6a4731", + "selected-both/profile-25.json": "4c915181d485f4d4fcb64b6f9d0a73ccd87c28cea3dd45fc5297e41d15c41ae7", + "selected-both/result-23.json": "7ef1ed08ffcd9782419dabb2cb1f40a6541ffc479a0cfaaedb07314704a7864c", + "selected-both/result-25.json": "561326c6f0f188736c73f05a999b773a65b78b568c2df15fa0c7092cd14b7225", + "selected-both/transitions-23.bin.json": "8905306796e045dd91d711f3696e05785c0db07cd0f90cfd93690ab438ff239b", + "selected-both/transitions-25.bin.json": "28a702c6d487e1e878c307f40191c1386acbb58139ed9573bb139a27aee4ad83", + "selected-both/word-23.json.gz": "7c33d64688332fce70c5e451fd00e86e58d2d44bdc648ff7139756f6a6c774fe", + "selected-both/word-25.json.gz": "eec0b667f3c2ba199fe291c11f19d6d0112576dc34a113372a9867ca5509f4ba", + "validate_selected.py": "45f8d580df7c6897b8c8f96d552ca0dfa3c78bbeed837c8c4f2ead4e21e4036b", + "width_bridge.py": "6486e6b9508357e33a3e8ee6740bf4ae46e306dfdd8f270eb2dd235270e77dfd" + }, + "kappa": "51915547765237/1000000000000000000", + "public_PR76": "51738676045141/1000000000000000000", + "publication_eligible": false, + "status": "Internal subthreshold composition; compiler dirty bases/dense scalar audit/actual profiles/exact47/7 PASS. Separate independent receipt follows.", + "threshold_difference": "-16364332025941/200000000000000000000" +} diff --git a/research/round9-balanced-columns/run.py b/research/round9-balanced-columns/run.py new file mode 100644 index 0000000000..9d292dfb1b --- /dev/null +++ b/research/round9-balanced-columns/run.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +"""PR70 bounded carried-signal exchanges composed with pinned PR71. + +PR70 exchanges: Alejandro; PR71 split/next-use compiler: Chafik Boukhalfa. +PR67 profile oracle/cost: Rohan Arun; PR68 live controls: Dominik Scholz. +Composition and integer-entropy pricing prepared with substantial OpenAI +Codex assistance. Discovery heuristic only; exact profiles accept candidates. +""" +from pathlib import Path +from collections import Counter +from hashlib import sha256 +import argparse,gzip,json,os,shlex,struct,subprocess,sys,time +if sys.flags.optimize:raise ValueError('Assertions must remain enabled') +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent +BASE=HERE.parent/'round6-pr71/baseline' +sys.path.insert(0,str(BASE/'scripts/experiments')) +import split_pair_engine as compiler +import split_pair_graph as producer +import schedule_variant +import coarse_graph +from binary_frame_math import logs + + +def main(): + p=argparse.ArgumentParser();p.add_argument('--h',type=int,choices=(23,25),required=True);p.add_argument('--work-dir',type=Path,required=True);p.add_argument('--passes',type=int,default=3);a=p.parse_args() + a.work_dir.mkdir(parents=True,exist_ok=True) + source=Path(compiler.__file__) + expected=json.loads((BASE/'research/split-pair/engine-provenance.json').read_text())['portable_engine_sha256'] + assert sha256(source.read_bytes()).hexdigest()==expected + executable=a.work_dir/'oracle' + subprocess.run([*shlex.split(os.environ.get('CXX','c++')),'-O3','-std=c++17','-I',str(BASE/'references/frame-compiler/pr48/scripts/partial_swap'),str(BASE/'references/frame-compiler/pr67/research/slot-cost-rank-pair/profile_oracle.cpp'),'-o',str(executable)],check=True) + compiler.graph=lambda h: schedule_variant.reorder(coarse_graph.graph(h,coarse='columns'));compiler.build=producer.ordered_build(compiler.build,a.h) + original_match=compiler.match + def exchange_match(blocks,uses,enabled): + result=original_match(blocks,uses,enabled) + edges,chosen,right,stats=result + initial_cardinality=len(chosen) + if not a.passes:return result + owner={x:g for g,b in enumerate(blocks) for x in b['nodes']} + path=a.work_dir/'matching-oracle.bin' + with path.open('wb')as stream: + h=a.h;v=h*(h-1)*(h-2)//6 + stream.write(struct.pack('<6I2Q',h,v,0,len(blocks)+2,0,0,h*(h-1),h*(h-1))) + stream.write(struct.pack('<2QI',0,0,0));stream.write(struct.pack('<2QI',0,0,h)) + for b in blocks:stream.write(struct.pack('<2QI',*b['frame'],b['rank'])) + oracle=subprocess.Popen([str(executable),str(path)],stdin=subprocess.PIPE,stdout=subprocess.PIPE,text=True,bufsize=1) + weights=[0]+[int(t*sum(logs(t))*10**30//2)for t in range(1,h+1)];cache={} + def entropy(x,y): + if (x,y)not in cache: + oracle.stdin.write(f'{x} {y}\n');oracle.stdin.flush();line=oracle.stdout.readline();assert line + values=list(map(int,line.split()));assert len(values)==h+1 + cache[x,y]=sum(n*w for n,w in zip(values,weights)) + return cache[x,y] + def cost(edge): + g,u,i=edge;p=owner[blocks[g]['inputs'][i]];t=uses[u][1] + return -entropy(g+2,t+2)+entropy(g+2,1)+entropy(0,p+2)+entropy(p+2,t+2) + try: + prices=[] + for j,e in enumerate(edges): + prices.append(cost(e)) + if j%20000==0:print('edge prices',j,len(edges),'pairs',len(cache),flush=True) + finally: + oracle.stdin.close();assert oracle.wait(timeout=10)==0 + priority=sorted(range(len(edges)),key=lambda e:(prices[e],edges[e]));initial=sum(prices[e]for e in chosen) + def can(e,drop=None): + g,u,i=edges[e] + rows=blocks[g]['outbasis']+[1<=prices[f]:continue + if not can(e,f if edges[f][0]==g else None):continue + else: + f=next((z for z in sorted(blocks[g]['selected'],key=lambda z:(-prices[z],z)) if prices[e]=1:k-=1 + while refine.exact_moment(m,W,rows,Q(k+1,den))['upper']<1:k+=1 + bit=Q(k,den);accepted=refine.exact_moment(m,W,rows,bit);excluded=refine.exact_moment(m,W,rows,bit+Q(1,den));assert accepted['upper']<1= j+1 proves persistence.", + "additional_eventual_conditions": [ + "BHP prime threshold and distinct-prime packing", + "Fixed rational basis, eligible common prime and native table setup", + "Catalogue/descriptor domination, logarithm absorption, exact recovery" + ], + "practical_runtime_claim": false + } + }, + "independent_serialized_replay": false, + "profile_reconstruction": { + "h": 25, + "v": 2300, + "R": 35598, + "frames": 84845, + "distinct_transitions": 212411, + "singles": 20700, + "rank_mass": 890550, + "rank_histogram_with_side_growth_split_into_singletons": { + "1": 90752, + "2": 111403, + "3": 13346, + "4": 18638, + "5": 8916, + "6": 3400, + "7": 576, + "8": 1196, + "9": 553, + "10": 854, + "11": 21, + "12": 776, + "13": 162, + "14": 756, + "15": 125, + "16": 2229, + "17": 583, + "18": 572, + "19": 879, + "20": 4217, + "21": 8479, + "23": 462, + "24": 25 + }, + "word_sha256": "fc6f429363b3c8208fd9bff10ec20386de280a3e1ea4f109ca5e0834d2c60fc4", + "copied_centers": 25, + "transition_events_equal_independent_xor_word_reconstruction": true + }, + "comparison_pr71": "250450830599/500000000000000000" +} diff --git a/research/round9-balanced-columns/selected-both/comparison.json b/research/round9-balanced-columns/selected-both/comparison.json new file mode 100644 index 0000000000..748f9f9a80 --- /dev/null +++ b/research/round9-balanced-columns/selected-both/comparison.json @@ -0,0 +1,10 @@ +{ + "kappa": "51915547765237/1000000000000000000", + "pr74_commit": "5830ccfca8466aff613767222558e29b57fa8225", + "pr74_kappa": "10366199626713/200000000000000000", + "difference_pr74": "10568703959/125000000000000000", + "relative_gain_pr74": "84549631672/51830998133565", + "pr76_kappa": "51738676045141/1000000000000000000", + "difference_pr76": "5527241253/31250000000000000", + "relative_gain_pr76": "176871720096/51738676045141" +} diff --git a/research/round9-balanced-columns/selected-both/profile-23.json b/research/round9-balanced-columns/selected-both/profile-23.json new file mode 100644 index 0000000000..869fbc9e8b --- /dev/null +++ b/research/round9-balanced-columns/selected-both/profile-23.json @@ -0,0 +1,38 @@ +{ + "h": 23, + "v": 1771, + "R": 27128, + "loss": 506, + "rank_sum": 624450, + "field_prime": 2305843009213693951, + "frames": 59803, + "distinct_matrices": 38046, + "crt_matrices": 5533, + "crt_disagreements": 0, + "blocks": [ + 0, + 356829, + 20591, + 7982, + 5322, + 3971, + 3684, + 3110, + 2577, + 1993, + 1718, + 1471, + 972, + 832, + 537, + 482, + 225, + 172, + 22, + 49, + 0, + 23, + 0, + 0 + ] +} diff --git a/research/round9-balanced-columns/selected-both/profile-25.json b/research/round9-balanced-columns/selected-both/profile-25.json new file mode 100644 index 0000000000..b98279deab --- /dev/null +++ b/research/round9-balanced-columns/selected-both/profile-25.json @@ -0,0 +1,40 @@ +{ + "h": 25, + "v": 2300, + "R": 35598, + "loss": 600, + "rank_sum": 890550, + "field_prime": 2305843009213693951, + "frames": 84845, + "distinct_matrices": 51195, + "crt_matrices": 7344, + "crt_disagreements": 0, + "blocks": [ + 0, + 492973, + 27296, + 10319, + 7656, + 5373, + 4880, + 3987, + 3753, + 2926, + 2452, + 2021, + 1735, + 1408, + 1101, + 871, + 514, + 458, + 241, + 176, + 65, + 51, + 0, + 25, + 0, + 0 + ] +} diff --git a/research/round9-balanced-columns/selected-both/result-23.json b/research/round9-balanced-columns/selected-both/result-23.json new file mode 100644 index 0000000000..0de212965f --- /dev/null +++ b/research/round9-balanced-columns/selected-both/result-23.json @@ -0,0 +1,79 @@ +{ + "h": 23, + "mode": { + "matching": true, + "reclaim": true + }, + "roles": 27128, + "baseline_pr48_roles": 36432, + "histogram": { + "1": 58230, + "0": 336047, + "2": 81090, + "4": 14624, + "3": 10015, + "5": 6757, + "6": 2127, + "8": 1105, + "10": 599, + "9": 364, + "12": 691, + "14": 1893, + "13": 208, + "11": 97, + "16": 430, + "17": 543, + "18": 3197, + "19": 6482, + "15": 267, + "22": 23, + "7": 278, + "21": 429 + }, + "rank_mass": 624450, + "elementary_xors": 167539, + "stats": { + "augmentations": 58, + "carried_signal_exchanges": 870, + "exchange_entropy_gain_1e30": 2790077775929094410673602180165521, + "exchange_profile_pairs": 262461, + "regions": 59801, + "matched": 41730, + "multi_node_regions": 8694, + "live_anchor_candidates": 73112, + "reclaimed": 2282, + "clearing_xors": 4862, + "live_anchor_xors": 533 + }, + "dirty_basis_vectors": 30670, + "complete_dirty_basis_both_orientations": true, + "all_physical_frame_inclusions": true, + "scalar": { + "h": 23, + "inputs": 1771, + "partial_outputs": 5336, + "additions": 67460, + "roles": 72796, + "merged_additions": 11937, + "all_additions_disjoint": true, + "all_partial_outputs_exact": true, + "every_node_has_common_point": true, + "circuit_sha256": "c576293d88ef09bb28747488a7799141f6e4761729e5fc897fca838bf413206c" + }, + "graph_configuration": { + "groups": [ + 1, + 1, + 2 + ], + "schedule": "cover-core", + "anchor": true, + "scalar_node_order": "core-reverse", + "coarse": "columns" + }, + "source_sha256": { + "run.py": "3b8f3a355799882fd1431e3ced934e34149c77e36dce09f62e214fc6156e4c0a", + "schedule_variant.py": "3ce3b4c0886868e3fcd2b75c54b61180d103447cfdb9d3ece1de47dd6d46eecc", + "coarse_graph.py": "b5bbabb8e5bf69769af4b6cd67163954d990dc489e3c9488ed84bd09f0a767c8" + } +} diff --git a/research/round9-balanced-columns/selected-both/result-25.json b/research/round9-balanced-columns/selected-both/result-25.json new file mode 100644 index 0000000000..540287acb9 --- /dev/null +++ b/research/round9-balanced-columns/selected-both/result-25.json @@ -0,0 +1,81 @@ +{ + "h": 25, + "mode": { + "matching": true, + "reclaim": true + }, + "roles": 35598, + "baseline_pr48_roles": 48329, + "histogram": { + "1": 76952, + "0": 470952, + "2": 118303, + "3": 13346, + "4": 18638, + "5": 8916, + "6": 3400, + "8": 1196, + "7": 576, + "9": 553, + "10": 854, + "12": 776, + "14": 756, + "13": 162, + "16": 2229, + "18": 572, + "19": 879, + "11": 21, + "15": 125, + "17": 583, + "20": 4217, + "21": 8479, + "24": 25, + "23": 462 + }, + "rank_mass": 890550, + "elementary_xors": 235195, + "stats": { + "augmentations": 85, + "carried_signal_exchanges": 1598, + "exchange_entropy_gain_1e30": 12525907879699441579426280229946796, + "exchange_profile_pairs": 409601, + "regions": 84843, + "matched": 60971, + "multi_node_regions": 11575, + "live_anchor_candidates": 99952, + "live_anchor_xors": 1365, + "reclaimed": 3349, + "clearing_xors": 8037 + }, + "dirty_basis_vectors": 40198, + "complete_dirty_basis_both_orientations": true, + "all_physical_frame_inclusions": true, + "scalar": { + "h": 25, + "inputs": 2300, + "partial_outputs": 6925, + "additions": 94993, + "roles": 101918, + "merged_additions": 17168, + "all_additions_disjoint": true, + "all_partial_outputs_exact": true, + "every_node_has_common_point": true, + "circuit_sha256": "accd79690903b340ec1e60531b9496c0a81aac147d182ed49d5540fd684cd49f" + }, + "graph_configuration": { + "groups": [ + 1, + 1, + 2 + ], + "schedule": "reverse-node", + "anchor": true, + "scalar_node_order": "core-reverse", + "coarse": "columns" + }, + "source_sha256": { + "run.py": "3b8f3a355799882fd1431e3ced934e34149c77e36dce09f62e214fc6156e4c0a", + "schedule_variant.py": "3ce3b4c0886868e3fcd2b75c54b61180d103447cfdb9d3ece1de47dd6d46eecc", + "coarse_graph.py": "b5bbabb8e5bf69769af4b6cd67163954d990dc489e3c9488ed84bd09f0a767c8" + } +} diff --git a/research/round9-balanced-columns/selected-both/transitions-23.bin.json b/research/round9-balanced-columns/selected-both/transitions-23.bin.json new file mode 100644 index 0000000000..fbc07d359c --- /dev/null +++ b/research/round9-balanced-columns/selected-both/transitions-23.bin.json @@ -0,0 +1,35 @@ +{ + "h": 23, + "v": 1771, + "R": 27128, + "frames": 59803, + "distinct_transitions": 151935, + "singles": 15939, + "rank_mass": 624450, + "rank_histogram_with_side_growth_split_into_singletons": { + "1": 68856, + "2": 75777, + "3": 10015, + "4": 14624, + "5": 6757, + "6": 2127, + "7": 278, + "8": 1105, + "9": 364, + "10": 599, + "11": 97, + "12": 691, + "13": 208, + "14": 1893, + "15": 267, + "16": 430, + "17": 543, + "18": 3197, + "19": 6482, + "21": 429, + "22": 23 + }, + "word_sha256": "7e452d6cec73d2433c9ec996fac2bfaf97317294ee515f86cef95c3ad9f154d7", + "copied_centers": 23, + "transition_events_equal_independent_xor_word_reconstruction": true +} diff --git a/research/round9-balanced-columns/selected-both/transitions-25.bin.json b/research/round9-balanced-columns/selected-both/transitions-25.bin.json new file mode 100644 index 0000000000..dac6567ef8 --- /dev/null +++ b/research/round9-balanced-columns/selected-both/transitions-25.bin.json @@ -0,0 +1,37 @@ +{ + "h": 25, + "v": 2300, + "R": 35598, + "frames": 84845, + "distinct_transitions": 212411, + "singles": 20700, + "rank_mass": 890550, + "rank_histogram_with_side_growth_split_into_singletons": { + "1": 90752, + "2": 111403, + "3": 13346, + "4": 18638, + "5": 8916, + "6": 3400, + "7": 576, + "8": 1196, + "9": 553, + "10": 854, + "11": 21, + "12": 776, + "13": 162, + "14": 756, + "15": 125, + "16": 2229, + "17": 583, + "18": 572, + "19": 879, + "20": 4217, + "21": 8479, + "23": 462, + "24": 25 + }, + "word_sha256": "fc6f429363b3c8208fd9bff10ec20386de280a3e1ea4f109ca5e0834d2c60fc4", + "copied_centers": 25, + "transition_events_equal_independent_xor_word_reconstruction": true +} diff --git a/research/round9-balanced-columns/selected-both/word-23.json.gz b/research/round9-balanced-columns/selected-both/word-23.json.gz new file mode 100644 index 0000000000..8d077760e3 Binary files /dev/null and b/research/round9-balanced-columns/selected-both/word-23.json.gz differ diff --git a/research/round9-balanced-columns/selected-both/word-25.json.gz b/research/round9-balanced-columns/selected-both/word-25.json.gz new file mode 100644 index 0000000000..a353dfdbd8 Binary files /dev/null and b/research/round9-balanced-columns/selected-both/word-25.json.gz differ diff --git a/research/round9-balanced-columns/validate_selected.py b/research/round9-balanced-columns/validate_selected.py new file mode 100644 index 0000000000..9f79237c40 --- /dev/null +++ b/research/round9-balanced-columns/validate_selected.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 +"""Independent finite validation of a frozen compiler-exchange witness.""" +from pathlib import Path +from hashlib import sha256 +from fractions import Fraction as Q +from collections import Counter +from math import comb +import argparse,json,os,shlex,subprocess,sys,tempfile +if sys.flags.optimize:raise ValueError('Assertions must remain enabled') +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent;BASE=HERE.parent/'round6-pr71/baseline' +sys.path.insert(0,str(BASE/'scripts/experiments')) +from binary_frame_replay import replay +from binary_frame_profile_prepare import prepare +from split_pair_arithmetic import refine,audit +from width_bridge import bridge_for_width + + +def main(): + p=argparse.ArgumentParser();p.add_argument('--bundle',type=Path,required=True);p.add_argument('--output',type=Path,required=True);a=p.parse_args() + selected=a.bundle.resolve();manifest=json.loads((selected/'MANIFEST.json').read_text()) + for name,digest in manifest['files'].items():assert sha256((HERE/name).read_bytes()).hexdigest()==digest,name + for name,digest in manifest['baseline_files'].items():assert sha256((BASE/name).read_bytes()).hexdigest()==digest,name + receipts={} + with tempfile.TemporaryDirectory(prefix='exchange-validation-')as directory: + work=Path(directory);exe=work/'profiles' + subprocess.run([*shlex.split(os.environ.get('CXX','c++')),'-O3','-std=c++17','-I',str(BASE/'references/frame-compiler/pr48/scripts/partial_swap'),str(BASE/'scripts/experiments/binary_frame_profiles.cpp'),'-o',str(exe)],check=True) + for h in(23,25): + word=selected/f'word-{h}.json.gz';r=replay(word);transitions=work/f'word{h}.bin';prepared=prepare(word,transitions) + subprocess.run([str(exe),str(transitions)],check=True,capture_output=True,text=True) + actual=json.loads(Path(str(transitions)+'.profiles.json').read_text());expected=json.loads((selected/f'profile-{h}.json').read_text());assert actual==expected + receipts[h]=dict(replay=r,transitions=prepared,actual_profiles_equal=True) + a0=json.loads((selected/'arithmetic.json').read_text());profile=a0['profile'];rows={int(t):n for t,n in profile['child_multiplicities'].items()};bit=Q(a0['bit_saving']);kappa=Q(a0['kappa']) + actual_axes=[json.loads((selected/f'profile-{h}.json').read_text())for h in(23,25)] + assert profile['axes']==actual_axes + N=comb(23,3)*comb(25,3);width=2*N;rebuilt=Counter({1:19*N,21:2*N,17:2*N,481:2*N});loss=0 + for v in actual_axes: + h=v['h'];rep=N//v['v'];bank=rep*v['R'];width+=bank;loss+=rep*v['loss'] + rebuilt.update({t:rep*n for t,n in enumerate(v['blocks'])if t and n}) + rebuilt.update({h:bank,575-2*h:bank});rebuilt.update({1:2*N,h-2:2*N}) + assert profile['m']==575 and profile['W']==width and rebuilt==rows + assert sum(t*n for t,n in rebuilt.items())==575*width-N+loss==profile['total_rank'] + accepted=refine.exact_moment(profile['m'],profile['W'],rows,bit);rejected=refine.exact_moment(profile['m'],profile['W'],rows,bit+Q(1,10**18));assert accepted['upper']<1 0 + bridge = deepcopy(inherited) + bridge['bit']['W'] = width + bridge['bit']['wire_bits'] = width.bit_length() + coefficient = sum( + bridge[axis]['halving_degree'] * bridge[axis]['wire_bits'] + for axis in ('bit', 'complex') + ) + bridge['rows']['coefficient'] = coefficient + bridge['rows']['degree_gap'] = Q(bridge['rows']['degree']) - Q(51, 25) * coefficient + assert bridge['rows']['degree_gap'] > 0 + return bridge