diff --git a/.github/workflows/cube-deferred.yml b/.github/workflows/cube-deferred.yml new file mode 100644 index 0000000000..2c75aeec3f --- /dev/null +++ b/.github/workflows/cube-deferred.yml @@ -0,0 +1,21 @@ +name: Verify cube deferred witness +on: [push, pull_request, workflow_dispatch] +permissions: + contents: read +jobs: + focused: + runs-on: ubuntu-24.04 + timeout-minutes: 25 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.13', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: ${{ matrix.python-version }} + - run: python3 research/cube-deferred/verify.py + - run: git diff --exit-code diff --git a/.github/workflows/cyclic-deferred.yml b/.github/workflows/cyclic-deferred.yml new file mode 100644 index 0000000000..48ef40fb9a --- /dev/null +++ b/.github/workflows/cyclic-deferred.yml @@ -0,0 +1,21 @@ +name: Verify cyclic deferred witness +on: [push, pull_request, workflow_dispatch] +permissions: + contents: read +jobs: + focused: + runs-on: ubuntu-24.04 + timeout-minutes: 25 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.13', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: ${{ matrix.python-version }} + - run: python3 research/cyclic-deferred/verify.py + - run: git diff --exit-code diff --git a/Makefile b/Makefile index 84fe8290f3..e60b843993 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ verify-community: community-audit-check community-followup-check copied-reversed $(MAKE) climbed-48-verify verify-producers: + $(MAKE) stopped-product-verify $(MAKE) copied-centers-verify $(MAKE) structured-bulk-verify $(MAKE) endpoint-gauge-producer endpoint-gauge-certificate @@ -428,3 +429,12 @@ pair-assembly-verify: pair-assembly-producer pair-assembly-check .PHONY: verify-pair verify-pair: pair-assembly-verify python3 scripts/audit_pair_candidate.py --check docs/research/community-pair-arithmetic.json + +.PHONY: stopped-product-producer stopped-product-certificate stopped-product-verify +stopped-product-producer: + python3 scripts/stopped_product_producer.py + +stopped-product-certificate: + python3 scripts/stopped_product_network.py + +stopped-product-verify: stopped-product-producer stopped-product-certificate diff --git a/NOTICE b/NOTICE index b565637758..50c6d1236d 100644 --- a/NOTICE +++ b/NOTICE @@ -302,3 +302,20 @@ inherited PR #48 sources. The stacked witness in research/pair-assembly/frame uses eumemic's PR #57 joint frame compiler unchanged; its driver and verifier are adaptations of PR #57's skip_frame_compiler.py, skip_frame_compose.py and verify_skip_frame.py. Original notices are retained. + +Stopped product-ring extension, 9 October 2026 +Copyright 2026 icekylinx + +The opposite-bank generic projector factorization, componentwise atom-ring +adapters, stopped recurrence and outer ordinary-interchange conversion, +aligned pair-star producer with rational centers, exact denominator-21 +grid and selected (23,23)/(24,24) composition are contributed by icekylinx +with substantial OpenAI GPT-6 Astra and Codex assistance. This extension +builds on merged PR #36, 11817ccacb564bb7f98789c20dc11d3fece207e3, and is +integrated on upstream main 56b66d58297deca1d7dd130247d720e960f77a37. + +The retained ordinary leaf uses the preceding projector, corner and +copied-center proofs. The selected two-stage topology retains Aurel Prosz +(Paureel), Swapnil Jain and Zhihao Chen's credits; the semantic assembly +retains PR #21/#23 and RaD's attribution. Paired producers, carrier matching, +original source notices and each imported license remain unchanged. diff --git a/PATCHING.md b/PATCHING.md index b60f3f101b..a02e230256 100644 --- a/PATCHING.md +++ b/PATCHING.md @@ -1,6 +1,6 @@ # Applying the inherited manuscript patch -This patch is the PR #10 baseline. The current copied-center extension is +This patch is the PR #10 baseline. The PR #36 copied-center extension is presented in `notes/copied-centers-note.tex`; it is not included in this historical combined manuscript patch. @@ -30,3 +30,6 @@ alternatives for the same base. PR7 is pinned at `6725c6a17b17871a35353fd29157f4ed851bc114` for the retained producer sources. The old uniform recurrences keep their original exponents. The active consumers use `lem:batched-chunk-swap` and `prop:batched-simultaneous-layer`. + +The stopped product-ring extension is supplied separately in +`notes/stopped-product-note.tex`; it does not regenerate this historical patch. diff --git a/README.md b/README.md index 035c259b68..31aa46c2e2 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,36 @@ **Community research maintained by Douglas Colkitt — conditional on the original OpenAI #109 framework.** +## Stopped product-ring extension + +The new construction contributed by **icekylinx**, extending merged +[PR #36](https://github.com/CrocSwap/integer-mult-bounds/pull/36), gives + +$$ +T(n)=O\!\left(n(\log n)^{1-\kappa}\right),\qquad +\kappa=\frac{194869}{2500000000}=7.79476\times10^{-5}. +$$ + +It combines a stopped product-ring bit interchange on `(23,23)` with an +all-disjoint rational-center complex network on `(24,24)`. The new generic +opposite-bank factorization pays one reversed child per projector rank; +atom adapters, ordinary leaves, endpoint copies and the exact denominator-21 +grid are included in the proof. The bound retains the original analytic +and fixed-tape hypotheses. + +[Proof source](notes/stopped-product-note.tex) · +[Exact certificate](certificates/stopped-product-network.json) · +[Incremental reproduction](docs/stopped-product.md) + +```sh +make stopped-product-verify +``` + +The maintainer-reviewed community checkpoint below remains its own result +and validation record. + +## Reviewed community checkpoint + The reviewed community witness gives $$ diff --git a/SOURCES.json b/SOURCES.json index 6096d5aff9..380b5425c2 100644 --- a/SOURCES.json +++ b/SOURCES.json @@ -234,5 +234,47 @@ } ], "continuing_analytic_dependencies": "See structured_bulk_extension.adopted and references/semantic-bulk/MANIFEST.json." + }, + "stopped_product_extension": { + "contributor": "icekylinx", + "base_commit": "56b66d58297deca1d7dd130247d720e960f77a37", + "proof_predecessor_PR": "https://github.com/CrocSwap/integer-mult-bounds/pull/36", + "proof_predecessor_commit": "11817ccacb564bb7f98789c20dc11d3fece207e3", + "predecessor_merged": true, + "archive": "integer_mult_round5_kappa_7_79476e-5_complete.zip", + "archive_sha256": "714cbffa0cccba3c18f046a63e62d6981683cb386b5d5cd09761be7b70f0b0be", + "kappa": "194869/2500000000", + "proof": "notes/stopped-product-note.tex", + "certificate": "certificates/stopped-product-network.json", + "producer": "scripts/stopped_product_producer.py", + "assistance": "Substantial OpenAI GPT-6 Astra and Codex assistance.", + "scope": "Conditional on the retained analytic and fixed-tape framework; new product-ring and exact rational-grid arguments supplied as written proofs.", + "continuing_dependencies": [ + "copied_centers_extension", + "structured_bulk_extension" + ], + "icekylinx_lineage": [ + { + "pr": 10, + "commit": "62691e395a0458ce089a1c7b5d89e74291e95e29" + }, + { + "pr": 18, + "commit": "f2ab41aebad47861caf6316282c1793e5513845e" + }, + { + "pr": 24, + "commit": "ed90fd940279c336ebc45968631bdebfb087b505" + }, + { + "pr": 32, + "commit": "0ef3aeb61f55cc0b321ce6a0ef00acee25cefe52" + }, + { + "pr": 36, + "commit": "11817ccacb564bb7f98789c20dc11d3fece207e3" + } + ], + "curation": "Selected h23/h24 inputs, generator, exact certificate and proofs only; excludes raw graphs, research alternatives and recursive predecessor copies." } } diff --git a/certificates/joint-dual-kappa.json b/certificates/joint-dual-kappa.json index d92f653fe4..31628a32dc 100644 --- a/certificates/joint-dual-kappa.json +++ b/certificates/joint-dual-kappa.json @@ -842,7 +842,7 @@ "scripts/experiments/pin_joint_dual_sources.py": "4d31cc0e38b7902709ca5f8f714cba109760d2592346dd7f8dc0b900a2d9fe00", "scripts/experiments/verify_joint_dual.py": "7a31bba1e9c0ded32ae285df2ca9bc91ef20c330f6789fdba361876f3c7a1985" }, - "source_manifest_sha256": "fd1aab7d75753b4b55b2377f26119dae74f367b0b4fab66cba42d944b3042cc9", + "source_manifest_sha256": "db926540bbc818963af5ac78ed8949e6263afffdbbe2f05ee781ef7d3cde48f0", "sources": [ { "files": { diff --git a/certificates/joint-dual-validation.json b/certificates/joint-dual-validation.json index 99adb4cf74..b2624180c2 100644 --- a/certificates/joint-dual-validation.json +++ b/certificates/joint-dual-validation.json @@ -226,7 +226,7 @@ } }, "bit_saving": "2382370177/50000000000000", - "certificate_sha256": "2ed658f05365b28825e24a6e7bac9fc9cc015d5a5d63d9579f4ac6e0640ae559", + "certificate_sha256": "b8263db0d04aabb98a31965a40c198667709bd6a6c7f98df2990baf523bcd075", "kappa": "4764513337/100000000000000", "margins": 7, "producer_words_regenerated_and_matched": true, diff --git a/certificates/stopped-product-bit-axis.json b/certificates/stopped-product-bit-axis.json new file mode 100644 index 0000000000..5824891de9 --- /dev/null +++ b/certificates/stopped-product-bit-axis.json @@ -0,0 +1,38 @@ +{ + "h": 23, + "v": 1771, + "c": 34764, + "q": 5336, + "baseline_R": 40100, + "matching": 1324, + "R": 38776, + "loss": 506, + "histogram": [ + 9840, + 38409, + 32471, + 8898, + 9754, + 2116, + 5737, + 1725, + 4145, + 1547, + 3128, + 1551, + 2893, + 1925, + 2841, + 2450, + 2327, + 3096, + 2344, + 3628, + 9435, + 2110, + 23, + 23 + ], + "label_source": "positive", + "description": "Retained-total aligned triple producer, base-two recursion, original maximum carrier matching, and compatible positive labels." +} diff --git a/certificates/stopped-product-complex-input.json b/certificates/stopped-product-complex-input.json new file mode 100644 index 0000000000..7b1d99c518 --- /dev/null +++ b/certificates/stopped-product-complex-input.json @@ -0,0 +1,41 @@ +{ + "h": 24, + "v": 2024, + "c": 45764, + "q": 8120, + "baseline_R": 53884, + "matched": 8966, + "R": 44918, + "orientation_changes": 7338, + "rank_sum": 1079136, + "loss": 552, + "histogram": [ + 8930, + 49042, + 30844, + 15972, + 11883, + 8272, + 6399, + 4356, + 6682, + 2263, + 5109, + 1808, + 5317, + 1733, + 5391, + 1757, + 4908, + 3290, + 6233, + 4363, + 4056, + 264, + 564, + 24, + 24 + ], + "central_disjoint": 24, + "center_denominator": 21 +} diff --git a/certificates/stopped-product-input.json b/certificates/stopped-product-input.json new file mode 100644 index 0000000000..f0a910a495 --- /dev/null +++ b/certificates/stopped-product-input.json @@ -0,0 +1,253 @@ +{ + "bit": { + "dimensions": [ + 23, + 23 + ], + "m": 529, + "N": 3136441, + "W": 143617474, + "L": 1792252, + "total_rank": 75972299557, + "deficit": 1344189, + "maxchild": 506, + "child_multiplicities": { + "1": 139262585, + "2": 115012282, + "3": 31516716, + "4": 34548668, + "5": 7494872, + "6": 20320454, + "7": 6109950, + "8": 14681590, + "9": 5479474, + "10": 11079376, + "11": 5493642, + "12": 10247006, + "13": 6818350, + "14": 10062822, + "15": 8677900, + "16": 8242234, + "17": 10966032, + "18": 8302448, + "19": 12850376, + "20": 33418770, + "21": 7473620, + "22": 12627230, + "484": 6272882, + "506": 137344592 + } + }, + "complex": { + "dimensions": [ + 24, + 24 + ], + "m": 576, + "N": 4096576, + "B1": 90914032, + "B2": 90914032, + "W": 190021216, + "L": 2234496, + "total_rank": 109450358336, + "deficit": 1862080, + "child_multiplicities": { + "552": 181828064, + "529": 8193152, + "1": 202715744, + "2": 124856512, + "3": 64654656, + "4": 48102384, + "5": 33485056, + "6": 25903152, + "7": 17633088, + "8": 27048736, + "9": 9160624, + "10": 20681232, + "11": 7318784, + "12": 21523216, + "13": 7015184, + "14": 21822768, + "15": 7112336, + "16": 19867584, + "17": 13317920, + "18": 25231184, + "19": 17661424, + "20": 16418688, + "21": 1068672, + "22": 2283072, + "23": 16483456 + }, + "maxchild": 552, + "copied_histogram": [ + 8930, + 49066, + 30844, + 15972, + 11883, + 8272, + 6399, + 4356, + 6682, + 2263, + 5109, + 1808, + 5317, + 1733, + 5391, + 1757, + 4908, + 3290, + 6233, + 4363, + 4056, + 264, + 564, + 24, + 0 + ] + }, + "bit_moment_gap": "5833629405069796335513229037/13595148940731587639987765177686687744", + "complex_moment_gap": "5499421901694541095908997425024101371546537414283732387206104389099738183215366564793192567257041780652609318673168302647523216560182242981533611801155442603608986943408777543208667066118724847925169249370145237707441178592436788856344246441565482324551821454604550454953780270300756671351666361036963486701477553679079126088067165335949185500960812006586245961913848693714754073033035419679174118868763905107326417918471742975833959733450001524553321932789312500612407132407690299/41230077325513267360846956938521502341474073689326505257121676970478810391277326276471865083362032190646188250982499628351612283105589897175543987487125650452330304348151388045812369968133964037865011250349179368669257862504666828211703334554008512518414563221340357395437053315115874615168412042904680012697363239611038021437069048505672439008745508864584512067644825937731293242352557278635159598633861792145775836588122497044363982384099548431927704944786606529202786560000000000000000000", + "finite_bridge": { + "bit_coarse": { + "m": 529, + "W": 143617474, + "maxchild": 506, + "halving_degree": 16, + "wire_bits": 28 + }, + "ordinary_leaf_row_degree": 252, + "complex": { + "m": 576, + "W": 190021216, + "s": 109450358336, + "maxchild": 552, + "halving_degree": 17, + "wire_bits": 28, + "scalar_terms": [ + { + "h": 24, + "v": 2024, + "c": 45764, + "invocations": 2024, + "local_group_upper": 408200, + "copied_center_extra_groups": 48 + }, + { + "h": 24, + "v": 2024, + "c": 45764, + "invocations": 2024, + "local_group_upper": 408200, + "copied_center_extra_groups": 48 + } + ], + "scalar_group_upper": 1656684480 + }, + "semantic": { + "E": 403063477262941121443761178688, + "literal_charge": 119639333593035096270287748, + "strict_literal_gap": 402943837929348086347490890940, + "B": 403063477262941121553211537024, + "C0": 2994465792675104952757349965746759652008778122322142627817848832, + "C1": 1, + "induction_gap": 18943983431358232713000942240128, + "fixed_odd_divisor": 21, + "exact_grid": "One common dyadic grid times the fixed odd divisor to K=G*(D_complex+1); no child rounding" + }, + "rows": { + "coefficient": 1176, + "degree": 4000, + "suffix_slope": 16000, + "degree_gap": "40024/25", + "contract": "W_complex^D_complex * W_coarse^D_coarse * W_old^D_old; one preceding prefix and one padding; sequential reuse" + } + }, + "assembly": { + "parameters": { + "actual_bit_saving": "803380799/10000000000000", + "a_bit": "1948995551/25000000000000", + "a_complex": "1949/25000000", + "tau": "24998051004449/25000000000000", + "sigma": "24998051/25000000", + "eta": "1/100000000", + "beta": "1/1000000", + "q": "97449775601004449/1250000000000000000000", + "c": "9744977657550220501004449/125000000000000000000000000000", + "epsilon": "124999998750000000000000000000/125019489955217650665401004449", + "lambda_": "2499805100446848995551/2500000000000000000000", + "lambda_prime": "1249902550224398995551/1250000000000000000000", + "alpha_squared_power": "14618091340150667350000000/125019489955217650665401004449", + "delta": "1/800000000", + "C0": 2994465792675104952757349965746759652008778122322142627817848832, + "C1": 1, + "kappa": "194869/2500000000" + }, + "strict_constraints": { + "bit_positive": "1948995551/25000000000000", + "complex_above_bit": "4449/25000000000000", + "complex_below_one_over32": "779301/25000000", + "beta_positive": "1/1000000", + "beta_below_one": "999999/1000000", + "leaf_saving_above_bit": "1/10000000000", + "q_positive": "97449775601004449/1250000000000000000000", + "q_below_internal": "1948995551/1250000000000000000000", + "q_below_leaf": "126948995551/1250000000000000000000", + "c_positive": "9744977657550220501004449/125000000000000000000000000000", + "c_below_one": "124990255022342449779498995551/125000000000000000000000000000", + "q_below_reservations": "97449775601004449/125000000000000000000000000000", + "lambda_above_tau": "1948995551/2500000000000000000000", + "lambda_above_sigma": "446848995551/2500000000000000000000", + "lambda_above_internal": "1948995551/2500000000000000000000", + "lambda_prime_above_lambda": "1948995551/2500000000000000000000", + "compact_leaf": "126948995551/1250000000000000000000", + "compact_reservations": "97449775601004449/125000000000000000000000000000", + "lambda_prime_below_one": "97449775601004449/1250000000000000000000", + "epsilon_positive": "124999998750000000000000000000/125019489955217650665401004449", + "epsilon_below_one": "19491205217650665401004449/125019489955217650665401004449", + "guard_width": "19491205217650665401004449/125019489955217650665401004449", + "K_geometry": "974622765755022147550220501004449/12501948995521765066540100444900000000", + "K_dominates_log": "974497756010044392550224398995551/12501948995521765066540100444900000000", + "record_suffix": "19491205217650665401004449/125019489955217650665401004449", + "phase_local": "15592839154630577103152893798995551/100015591964174120532320803559200000000", + "phase_boundary": "11694348052630578662349334598995551/100015591964174120532320803559200000000", + "gamma_sublinear": "4873113877499998051004449/125019489955217650665401004449", + "cell_above_band": "124995125636122500001948995551/250038979910435301330802008898", + "prime_interval_packing": "19491205217650665401004449/125019489955217650665401004449", + "alpha_positive": "14618091340150667350000000/125019489955217650665401004449", + "alpha_below_one": "125004871863877499998051004449/125019489955217650665401004449", + "alpha_below_one_fourth": "124961017589857047996001004449/500077959820870602661604017796", + "delta_positive": "1/800000000", + "delta_below_one_eighth": "99999999/800000000", + "short_record_fallback": "3124756306320288991609616461252697967793601/3125487248880441266635025111225000000000000", + "small_field_exposure": "9746227754999996102008898/125019489955217650665401004449", + "artificial_boundary": "700128635079475474301789581367398995551/100015591964174120532320803559200000000", + "literal_scalar_guard": "402943837929348086347490890940", + "row_product_gap": "40024/25", + "original_prefix_above_kappa": "786538948061330309871047284761/78137181222011031665875627780625000000", + "coordinate_movement_above_kappa": "305551/25000000000000", + "compact_phase_layer_above_kappa": "20668543364879972849164027819/312548724888044126663502511122500000000", + "bulk_exposure_above_kappa": "305551/25000000000000", + "Gaussian_arithmetic_above_kappa": "97459317411097999618605138287111327/2500389799104353013308020088980000000000", + "scalar_work_above_kappa": "194921594961097960638694118287111327/2500389799104353013308020088980000000000", + "dimension_above_kappa": "312475634452011916691632483971664027819/312548724888044126663502511122500000000" + }, + "margins": { + "original_prefix": "974622765755022147550220501004449/12501948995521765066540100444900000000", + "coordinate_movement": "1948995551/25000000000000", + "compact_phase_layer": "9744977462650669298995551/125019489955217650665401004449", + "bulk_exposure": "1948995551/25000000000000", + "Gaussian_arithmetic": "11694348052630578662349334598995551/100015591964174120532320803559200000000", + "scalar_work": "15592839154630577103152893798995551/100015591964174120532320803559200000000", + "dimension": "124999998750000000000000000000/125019489955217650665401004449" + }, + "minimum_margin": "9744977462650669298995551/125019489955217650665401004449", + "absorption_gap": "20668543364879972849164027819/312548724888044126663502511122500000000", + "recurrence": { + "internal": "24998051004449/25000000000000", + "leaf": "24998051001949/25000000000000", + "reservations": "124990255022342449779498995551/125000000000000000000000000000" + } + } +} diff --git a/certificates/stopped-product-network.json b/certificates/stopped-product-network.json new file mode 100644 index 0000000000..998a8a7ea2 --- /dev/null +++ b/certificates/stopped-product-network.json @@ -0,0 +1,482 @@ +{ + "assembly": { + "absorption_gap": "20668543364879972849164027819/312548724888044126663502511122500000000", + "margins": { + "Gaussian_arithmetic": "11694348052630578662349334598995551/100015591964174120532320803559200000000", + "bulk_exposure": "1948995551/25000000000000", + "compact_phase_layer": "9744977462650669298995551/125019489955217650665401004449", + "coordinate_movement": "1948995551/25000000000000", + "dimension": "124999998750000000000000000000/125019489955217650665401004449", + "original_prefix": "974622765755022147550220501004449/12501948995521765066540100444900000000", + "scalar_work": "15592839154630577103152893798995551/100015591964174120532320803559200000000" + }, + "minimum_margin": "9744977462650669298995551/125019489955217650665401004449", + "parameters": { + "C0": 2994465792675104952757349965746759652008778122322142627817848832, + "C1": 1, + "a_bit": "1948995551/25000000000000", + "a_complex": "1949/25000000", + "actual_bit_saving": "803380799/10000000000000", + "alpha_squared_power": "14618091340150667350000000/125019489955217650665401004449", + "beta": "1/1000000", + "c": "9744977657550220501004449/125000000000000000000000000000", + "delta": "1/800000000", + "epsilon": "124999998750000000000000000000/125019489955217650665401004449", + "eta": "1/100000000", + "kappa": "194869/2500000000", + "lambda_": "2499805100446848995551/2500000000000000000000", + "lambda_prime": "1249902550224398995551/1250000000000000000000", + "q": "97449775601004449/1250000000000000000000", + "sigma": "24998051/25000000", + "tau": "24998051004449/25000000000000" + }, + "recurrence": { + "internal": "24998051004449/25000000000000", + "leaf": "24998051001949/25000000000000", + "reservations": "124990255022342449779498995551/125000000000000000000000000000" + }, + "strict_constraints": { + "Gaussian_arithmetic_above_kappa": "97459317411097999618605138287111327/2500389799104353013308020088980000000000", + "K_dominates_log": "974497756010044392550224398995551/12501948995521765066540100444900000000", + "K_geometry": "974622765755022147550220501004449/12501948995521765066540100444900000000", + "alpha_below_one": "125004871863877499998051004449/125019489955217650665401004449", + "alpha_below_one_fourth": "124961017589857047996001004449/500077959820870602661604017796", + "alpha_positive": "14618091340150667350000000/125019489955217650665401004449", + "artificial_boundary": "700128635079475474301789581367398995551/100015591964174120532320803559200000000", + "beta_below_one": "999999/1000000", + "beta_positive": "1/1000000", + "bit_positive": "1948995551/25000000000000", + "bulk_exposure_above_kappa": "305551/25000000000000", + "c_below_one": "124990255022342449779498995551/125000000000000000000000000000", + "c_positive": "9744977657550220501004449/125000000000000000000000000000", + "cell_above_band": "124995125636122500001948995551/250038979910435301330802008898", + "compact_leaf": "126948995551/1250000000000000000000", + "compact_phase_layer_above_kappa": "20668543364879972849164027819/312548724888044126663502511122500000000", + "compact_reservations": "97449775601004449/125000000000000000000000000000", + "complex_above_bit": "4449/25000000000000", + "complex_below_one_over32": "779301/25000000", + "coordinate_movement_above_kappa": "305551/25000000000000", + "delta_below_one_eighth": "99999999/800000000", + "delta_positive": "1/800000000", + "dimension_above_kappa": "312475634452011916691632483971664027819/312548724888044126663502511122500000000", + "epsilon_below_one": "19491205217650665401004449/125019489955217650665401004449", + "epsilon_positive": "124999998750000000000000000000/125019489955217650665401004449", + "gamma_sublinear": "4873113877499998051004449/125019489955217650665401004449", + "guard_width": "19491205217650665401004449/125019489955217650665401004449", + "lambda_above_internal": "1948995551/2500000000000000000000", + "lambda_above_sigma": "446848995551/2500000000000000000000", + "lambda_above_tau": "1948995551/2500000000000000000000", + "lambda_prime_above_lambda": "1948995551/2500000000000000000000", + "lambda_prime_below_one": "97449775601004449/1250000000000000000000", + "leaf_saving_above_bit": "1/10000000000", + "literal_scalar_guard": "402943837929348086347490890940", + "original_prefix_above_kappa": "786538948061330309871047284761/78137181222011031665875627780625000000", + "phase_boundary": "11694348052630578662349334598995551/100015591964174120532320803559200000000", + "phase_local": "15592839154630577103152893798995551/100015591964174120532320803559200000000", + "prime_interval_packing": "19491205217650665401004449/125019489955217650665401004449", + "q_below_internal": "1948995551/1250000000000000000000", + "q_below_leaf": "126948995551/1250000000000000000000", + "q_below_reservations": "97449775601004449/125000000000000000000000000000", + "q_positive": "97449775601004449/1250000000000000000000", + "record_suffix": "19491205217650665401004449/125019489955217650665401004449", + "row_product_gap": "40024/25", + "scalar_work_above_kappa": "194921594961097960638694118287111327/2500389799104353013308020088980000000000", + "short_record_fallback": "3124756306320288991609616461252697967793601/3125487248880441266635025111225000000000000", + "small_field_exposure": "9746227754999996102008898/125019489955217650665401004449" + } + }, + "base_commit": "56b66d58297deca1d7dd130247d720e960f77a37", + "bit": { + "counts": { + "B1": 68672296, + "B2": 68672296, + "L": 1792252, + "N": 3136441, + "W": 143617474, + "child_multiplicities": { + "1": 139262585, + "10": 11079376, + "11": 5493642, + "12": 10247006, + "13": 6818350, + "14": 10062822, + "15": 8677900, + "16": 8242234, + "17": 10966032, + "18": 8302448, + "19": 12850376, + "2": 115012282, + "20": 33418770, + "21": 7473620, + "22": 12627230, + "3": 31516716, + "4": 34548668, + "484": 6272882, + "5": 7494872, + "506": 137344592, + "6": 20320454, + "7": 6109950, + "8": 14681590, + "9": 5479474 + }, + "copied_histogram": [ + 9840, + 38432, + 32471, + 8898, + 9754, + 2116, + 5737, + 1725, + 4145, + 1547, + 3128, + 1551, + 2893, + 1925, + 2841, + 2450, + 2327, + 3096, + 2344, + 3628, + 9435, + 2110, + 23, + 0 + ], + "deficit": 1344189, + "dimensions": [ + 23, + 23 + ], + "m": 529, + "maxchild": 506, + "total_rank": 75972299557 + }, + "exponent": "49995981/50000000", + "logarithm_upper_bounds": { + "1": "1987355562417364065669439618237/316912650057057350374175801344", + "10": "2515274437229490418617839725263/633825300114114700748351602688", + "11": "4909728867822167960512763283247/1267650600228229401496703205376", + "12": "2399714421777289519579293961239/633825300114114700748351602688", + "13": "4697962657128327885574713503543/1267650600228229401496703205376", + "14": "1151004910436491358992364195459/316912650057057350374175801344", + "15": "2258280393397031167285649759463/633825300114114700748351602688", + "16": "2217374245868088984102352158015/633825300114114700748351602688", + "17": "4357897653501964928993364503311/1267650600228229401496703205376", + "18": "4285440755889660536494207989699/1267650600228229401496703205376", + "19": "1054225602598430741931079593279/316912650057057350374175801344", + "2": "3535376905093068344529747466859/633825300114114700748351602688", + "20": "4151880434975661263617415911297/1267650600228229401496703205376", + "21": "4090031554081046933305076849055/1267650600228229401496703205376", + "22": "4031060428338848386894499744017/1267650600228229401496703205376", + "3": "6556765722521218186395115000937/1267650600228229401496703205376", + "4": "6192085370702817115441231394489/1267650600228229401496703205376", + "484": "28174651752060127777810254067/316912650057057350374175801344", + "5": "1477304328485575102713485747439/316912650057057350374175801344", + "506": "28174651752060127777810254067/633825300114114700748351602688", + "6": "1419524320759474653194212865427/316912650057057350374175801344", + "7": "2741344040614642504793860160533/633825300114114700748351602688", + "8": "5313416931219497541822967855259/1267650600228229401496703205376", + "9": "161378412355405628441014735279/39614081257132168796771975168" + }, + "moment_upper": "13595148934897958234917968842173458707/13595148940731587639987765177686687744", + "rank_moment": "1865129/1865162", + "rounding_denominator": 1267650600228229401496703205376, + "saving": "4019/50000000", + "stopped_adapter": { + "atom_exponent": "1/1000", + "base_ordinary_saving": "384599/10000000000", + "coarse_toll_exponent": "999/1000", + "coarse_toll_subordinate_gap": "45981/50000000", + "effective_saving": "803380799/10000000000000" + }, + "strict_gap": "5833629405069796335513229037/13595148940731587639987765177686687744" + }, + "complex": { + "child_width_multiplicities": [ + [ + 1, + 202715744 + ], + [ + 2, + 124856512 + ], + [ + 3, + 64654656 + ], + [ + 4, + 48102384 + ], + [ + 5, + 33485056 + ], + [ + 6, + 25903152 + ], + [ + 7, + 17633088 + ], + [ + 8, + 27048736 + ], + [ + 9, + 9160624 + ], + [ + 10, + 20681232 + ], + [ + 11, + 7318784 + ], + [ + 12, + 21523216 + ], + [ + 13, + 7015184 + ], + [ + 14, + 21822768 + ], + [ + 15, + 7112336 + ], + [ + 16, + 19867584 + ], + [ + 17, + 13317920 + ], + [ + 18, + 25231184 + ], + [ + 19, + 17661424 + ], + [ + 20, + 16418688 + ], + [ + 21, + 1068672 + ], + [ + 22, + 2283072 + ], + [ + 23, + 16483456 + ], + [ + 529, + 8193152 + ], + [ + 552, + 181828064 + ] + ], + "counts": { + "B1": 90914032, + "B2": 90914032, + "L": 2234496, + "N": 4096576, + "W": 190021216, + "child_multiplicities": { + "1": 202715744, + "10": 20681232, + "11": 7318784, + "12": 21523216, + "13": 7015184, + "14": 21822768, + "15": 7112336, + "16": 19867584, + "17": 13317920, + "18": 25231184, + "19": 17661424, + "2": 124856512, + "20": 16418688, + "21": 1068672, + "22": 2283072, + "23": 16483456, + "3": 64654656, + "4": 48102384, + "5": 33485056, + "529": 8193152, + "552": 181828064, + "6": 25903152, + "7": 17633088, + "8": 27048736, + "9": 9160624 + }, + "copied_histogram": [ + 8930, + 49066, + 30844, + 15972, + 11883, + 8272, + 6399, + 4356, + 6682, + 2263, + 5109, + 1808, + 5317, + 1733, + 5391, + 1757, + 4908, + 3290, + 6233, + 4363, + 4056, + 264, + 564, + 24, + 0 + ], + "deficit": 1862080, + "dimensions": [ + 24, + 24 + ], + "m": 576, + "maxchild": 552, + "total_rank": 109450358336 + }, + "enclosure": "1+u+u^2/(2(1-u/3))", + "exponent": "24998051/25000000", + "logarithm_upper_bounds": { + "1": "794513457587/125000000000", + "10": "2026761283851/500000000000", + "11": "1979106193949/500000000000", + "12": "967800252727/250000000000", + "13": "758231660647/200000000000", + "14": "3717050331081/1000000000000", + "15": "1824028729797/500000000000", + "16": "3583518938457/1000000000000", + "17": "22018089479/6250000000", + "18": "8664339757/2500000000", + "19": "341166868153/100000000000", + "2": "707870060017/125000000000", + "20": "1680187693571/500000000000", + "21": "3311585222973/1000000000000", + "22": "1632532603669/500000000000", + "23": "3220613444767/1000000000000", + "3": "1314373843007/250000000000", + "4": "4969813299577/1000000000000", + "5": "2373334874131/500000000000", + "529": "42559614419/500000000000", + "552": "42559614419/1000000000000", + "6": "1141087047867/250000000000", + "7": "4410197511641/1000000000000", + "8": "4276666119017/1000000000000", + "9": "25993019271/6250000000" + }, + "moment_upper": "41230077320013845459152415842612504916449972317779967842837944583272706002177588093256498518568839623389146470329890309678443980458066680615361744505592038651174861744542401102403592424925296971746286402424010119299112624797225649619266545697664266076849080896788535940832502860162094344867655371553013651660399752909560467757989922417605273672796323363623700061058579975817444548637803205602124178954687673277011931480796079125892239408265588698477703420233284596413474059387592867592309701/41230077325513267360846956938521502341474073689326505257121676970478810391277326276471865083362032190646188250982499628351612283105589897175543987487125650452330304348151388045812369968133964037865011250349179368669257862504666828211703334554008512518414563221340357395437053315115874615168412042904680012697363239611038021437069048505672439008745508864584512067644825937731293242352557278635159598633861792145775836588122497044363982384099548431927704944786606529202786560000000000000000000", + "saving": "1949/25000000", + "strict_gap": "5499421901694541095908997425024101371546537414283732387206104389099738183215366564793192567257041780652609318673168302647523216560182242981533611801155442603608986943408777543208667066118724847925169249370145237707441178592436788856344246441565482324551821454604550454953780270300756671351666361036963486701477553679079126088067165335949185500960812006586245961913848693714754073033035419679174118868763905107326417918471742975833959733450001524553321932789312500612407132407690299/41230077325513267360846956938521502341474073689326505257121676970478810391277326276471865083362032190646188250982499628351612283105589897175543987487125650452330304348151388045812369968133964037865011250349179368669257862504666828211703334554008512518414563221340357395437053315115874615168412042904680012697363239611038021437069048505672439008745508864584512067644825937731293242352557278635159598633861792145775836588122497044363982384099548431927704944786606529202786560000000000000000000" + }, + "finite_bridge": { + "bit_coarse": { + "W": 143617474, + "halving_degree": 16, + "m": 529, + "maxchild": 506, + "wire_bits": 28 + }, + "complex": { + "W": 190021216, + "halving_degree": 17, + "m": 576, + "maxchild": 552, + "s": 109450358336, + "scalar_group_upper": 1656684480, + "scalar_terms": [ + { + "c": 45764, + "copied_center_extra_groups": 48, + "h": 24, + "invocations": 2024, + "local_group_upper": 408200, + "v": 2024 + }, + { + "c": 45764, + "copied_center_extra_groups": 48, + "h": 24, + "invocations": 2024, + "local_group_upper": 408200, + "v": 2024 + } + ], + "wire_bits": 28 + }, + "ordinary_leaf_row_degree": 252, + "rows": { + "coefficient": 1176, + "contract": "W_complex^D_complex * W_coarse^D_coarse * W_old^D_old; one preceding prefix and one padding; sequential reuse", + "degree": 4000, + "degree_gap": "40024/25", + "suffix_slope": 16000 + }, + "semantic": { + "B": 403063477262941121553211537024, + "C0": 2994465792675104952757349965746759652008778122322142627817848832, + "C1": 1, + "E": 403063477262941121443761178688, + "exact_grid": "One common dyadic grid times the fixed odd divisor to K=G*(D_complex+1); no child rounding", + "fixed_odd_divisor": 21, + "induction_gap": 18943983431358232713000942240128, + "literal_charge": 119639333593035096270287748, + "strict_literal_gap": 402943837929348086347490890940 + } + }, + "kappa": "194869/2500000000", + "proof_predecessor_commit": "11817ccacb564bb7f98789c20dc11d3fece207e3", + "scope": "Exact finite moments, stopped savings and assembly; the new complex producer is checked separately. Opposite-bank factorization, atom streaming, ordinary conversion, common exact grid and retained analytic/tape interfaces are written proof dependencies.", + "source_sha256": { + "certificates/copied-centers-bit-axes.json": "ed307cef595091b11ba8f8e6ff11302ad8db190227a2fbf34c232fd680206254", + "certificates/copied-centers-network.json": "7dbd675e42e22ac076280360f8750031851564bb7a56079e66236fee5d0a6cdf", + "certificates/stopped-product-bit-axis.json": "52f493a0019b7e4ce69a4c26bd3d35af5d3397461126abc4be44d1430ae8930d", + "certificates/stopped-product-complex-input.json": "5bcf00402bbfb768bd2fc0935f32ad329ee0780a3dfe5827bb010831d7909c4d", + "certificates/stopped-product-input.json": "8185c7bf8c307728f32484c5972af9a1b948ac5d0838e02f85c86cb438060417", + "notes/stopped-product-assembly.tex": "1c3c7147851f30f1ff97679cfcda157b1cbe2655b8766e34f1345f20c630eaec", + "notes/stopped-product-complex.tex": "4738089103a4b263b3b0ef458f5ef35519c696f1ea871ae79e508d3720f5870a", + "notes/stopped-product-factorization.tex": "70d5a4405e1be9c7b6cfb326bb4ffdf88e5585d1fb3d16c7bb5ad62ac421fae3", + "notes/stopped-product-interface.tex": "454a8f3924afc26e575b2a8cec6d0860397cb7f2dc431f3ba63fb8a7142cc96b", + "notes/stopped-product-note.tex": "486d14c599f4c2551c019f3358898f72e6ecafeb04ad590726ea69ed987fe025", + "scripts/copied_centers/physical.py": "837345d1f8753eab0e70f105b1d1bb0db965b993da037b1825ddef3672609d7d", + "scripts/copied_centers_network.py": "409ebfbd8a41c4c4d089aa0949fcf5a949415dc26f57440ffd48b7bd8881e6a9", + "scripts/partial_swap_network.py": "acdd81b4dea2815f8838a0c3ea8ac4968f2bc13fd7c99173473d865779096782", + "scripts/stopped_product/README.md": "6c1805dda45b01ed0ef420c674ec2cd0048fb9d7a1b015ab6cd837067fe66176", + "scripts/stopped_product/__init__.py": "7b794c22bccc00bb6ae8ba4d3379f469570565bbcb1a86090699133b8cf1b7d3", + "scripts/stopped_product/complex.py": "407650d56dceb5cb09d74928658cebed1bb42f4d7e28ca9e3fd36eea075f1ad0", + "scripts/stopped_product_network.py": "a8baaa87dd7679db4f2dd1a18a720397ee6f443262ad04fa26cf51b39909b74c", + "scripts/stopped_product_producer.py": "2c5c71399136ebcfebb8e5277317d5f334eb8df5716ad287391d0996fcc1492c", + "scripts/structured_bulk_assembly.py": "e99467e14211fba699878ed036e1e2362eb8e395dc22f9ecdcecc7fbf2cc736d" + }, + "status": "Conditional stopped product-ring multiplication witness" +} diff --git a/docs/reproducibility.md b/docs/reproducibility.md index e48f4190cd..7b966039e0 100644 --- a/docs/reproducibility.md +++ b/docs/reproducibility.md @@ -1,5 +1,10 @@ # Reproducing the result +For the new stopped product-ring extension, run `make stopped-product-verify`. +Its [incremental reproduction guide](stopped-product.md) covers the h24 +rational-center producer, new moments, stopping parameters and assembly. +The community checkpoint and historical targets below retain their own scope. + The selected release is documented in the [joint-frame community review](research/community-round2-review.md) and [current status](research/current-status.md), with the [selected parameter certificate](../research/matrix-exponent-synthesis/candidate/arithmetic.json). diff --git a/docs/stopped-product.md b/docs/stopped-product.md new file mode 100644 index 0000000000..a53cfa9638 --- /dev/null +++ b/docs/stopped-product.md @@ -0,0 +1,46 @@ +# Stopped product-ring reproduction + +The extension gives the conditional saving `194869/2500000000 = 7.79476e-5`. +It starts from merged PR #36 and is submitted on upstream main at +`56b66d58297deca1d7dd130247d720e960f77a37`. + +From the repository root, with Python 3.11+, Make and a C++17 compiler: + +```sh +make stopped-product-verify +``` + +The incremental checks: + +- Match the unchanged positive-label h23 bit producer to its verified + copied-center input, preserving the same matching and histogram. +- Rebuild only the new h24 all-disjoint complex producer with aligned pair + stars, exact rational center decoding, support and binary-frame checks, + then reproduce every matching count and histogram entry. +- Reconstruct both child lists and strict rational moments; derive the + stopped ordinary-bit saving and check that the atom-adapter toll is lower. +- Check the denominator-21 semantic charge, product row stock `p^4000`, + seven assembly margins and all 47 strict constraints. + +Intermediate DAGs and the matcher executable are temporary. To retain them: + +```sh +python3 scripts/stopped_product_producer.py --work-dir /tmp/stopped-product-producers +``` + +For arithmetic alone, use `make stopped-product-certificate`. The inherited +`make verify-producers` also includes this target; the full `make verify` +retains the community and historical checks. Those unchanged suites are +not part of this round's local incremental validation. + +The [proof](../notes/stopped-product-note.tex) is supplied as LaTeX source; +no PDF is generated. Its common-basis factorization, atom streaming and +stopping argument, outer ordinary conversion and shared exact rational +grid are written proofs. Finite checks verify the selected scalar data and +arithmetic, not the complete all-size theorem. + +[SOURCES.json](../SOURCES.json) and [NOTICE](../NOTICE) preserve contribution +credits and source pins. Existing two-stage, ordinary-leaf and semantic +proof dependencies remain in `references/copied-centers/` and +`references/semantic-bulk/`. Research alternatives, raw binary DAGs and +recursive predecessor copies are excluded from this submission. diff --git a/notes/stopped-product-assembly.tex b/notes/stopped-product-assembly.tex new file mode 100644 index 0000000000..3932d3ade5 --- /dev/null +++ b/notes/stopped-product-assembly.tex @@ -0,0 +1,108 @@ +\subsection{Simultaneous row reserves} +Use a conservative global width bound $e$ for every adapter and child. +For each recursive family $j$, the least integer $t_j$ with +$m_j^{t_j}>2r_j^{t_j}$ gives depth at most +$t_j\lceil\log_2\max(2,e)\rceil$ plus a fixed constant. +The new coarse bit family has $(t_j,\operatorname{bitlength}W_j)=(16,28)$, +the ordinary leaf family $(9,28)$, and the complex family $(17,28)$. +The required reserve is the product of all three stocks: +\[ + Q=W_c^{D_c}W_b^{D_b}W_{\rm old}^{D_{\rm old}}. +\] +After the complex and coarse divisions, the old stock remains available +to every peeled-atom or stopped-leaf call. Sequential copies and outer +ordinary wrappers reuse restored rows; they introduce no independent +row factor. The combined coefficient is +\[ + 16\cdot28+9\cdot28+17\cdot28=1176, + \qquad4000-\frac{51}{25}\,1176=\frac{40024}{25}>0. +\] +Thus the retained logarithmic comparison, for eventual $e\le Cp$, +supplies a sufficient $p^{4000}$ stock including the fixed constants. +Use one physically preceding transformed prefix and one complete-row +padding, as in \path{notes/structured-bulk-assembly.tex}. Complete +spectators and parked fields are preserved by every descendant. +The suffix condition +$b_{\rm in}^{1-\epsilon}>16000(\log_2b_{\rm in}+8)$ is eventual +for every fixed $\epsilon<1$. + +\subsection{Analytic transfer and selected parameters} +The retained analytic proof map in +\path{notes/structured-bulk-assembly.tex} supplies the active-masked +arbitrary-source router with paid repair scans, the rounded phase-cell +inverse, persistent bulk halos with original period cuts, sequential +overlap tapes and factor pages, prime packing and exact recovery. +The new ordinary bit primitive has precisely the arbitrary-width, +complete-spectator and restored-row contract consumed by that router. +The new complex primitive supplies the exact completed tensor contract +on one common grid. Its outer grid conversions add only logarithmic +work. The changed finite implementations therefore meet the same +analytic interfaces, including the full bulk bound +\[ + O\!\left(Tp\left[p^\tau\operatorname{polylog}p+ + d\operatorname{polylog}p+dp^\delta+w_G^2p^\delta+ + dw_G^2p^\delta/L\right]\right)+n^{o(1)}, +\] +where $L=2^{\lceil8\log_2p\rceil}$, Gaussian band width +$w_G^2=O(p^{1-r})$, and normalization retains $\epsilon+r<1$. +Here $w_G$ is unrelated to the address atom width. + +Use the proved ordinary bit saving $a_b=803380799/10^{13}$ and complex +saving $b=1949/25000000$. To instantiate the retained assembly, weaken +the bit parameter explicitly to +\[ + \beta=10^{-6},\qquad + a=(1-\beta)b-10^{-10}=\frac{1948995551}{25000000000000}6.6129027953\times10^{-11}>0. +\] +The strict gaps absorb fixed logarithms, including the common-grid +conversions. The stopped atom recurrence supplies the ordinary +interchange interface, the rational-center construction supplies the +exact complex interface, and the product stock supports all nested +recursions. The unchanged analytic transfer then proves the stated +bound, with its constructive setup, descriptor and catalogue domination, +prime-existence and exact-recovery thresholds retained as eventual +conditions. +\end{proof} diff --git a/notes/stopped-product-complex.tex b/notes/stopped-product-complex.tex new file mode 100644 index 0000000000..4a9037137c --- /dev/null +++ b/notes/stopped-product-complex.tex @@ -0,0 +1,137 @@ +\subsection{All-disjoint retained centers} +Use two factors $h=24$. For triple inputs write $G=\sum_TX_T$, +$T_i=\sum_{T\ni i}X_T$, and retain all $A_i=G-T_i$. +Each input triple avoids exactly 21 points, so +\[ + \sum_{i=1}^{24}A_i=21G,\qquad G=\frac1{21}\sum_i A_i. +\] +For a target triple $S$ the central correction is +\[ + G-\frac12\sum_{i\in S}A_i + =\frac{\sum_{i\in S}T_i-G}{2}. +\] +An input triple meeting $S$ in $j$ points has central coefficient +$(j-1)/2$. Adding half the disjoint sum and subtracting half the +intersection-two sum leaves coefficient one exactly when $j=3$. +The scalar source-to-scatter transfer is therefore the identity. +The transparent old-value subtraction and new-value addition use this +identity only on fresh contributions and restore arbitrary old values. + +The base-two paired exclusion and aligned pair-star producer retains +nested binary labels: common-pair supports have their orthonormal triple +span, other ordinary sums have their coordinate cover. Each retained +$A_i$ has the nondegenerate coordinate hyperplane excluding $i$, +of dimension 23. Hence all copied-center arguments and general +nondegenerate binary residuals of the preceding proof apply. The +selected local counts are +\[ + v=2024,\quad c_h=45764,\quad q_h=8120,\quad + |\mathcal M|=8966,\quad R=44918,\quad\ell=552. +\] +The old internal histogram, starting at rank zero, is +\begin{small}\begin{align*} +[&8930,49042,30844,15972,11883,8272,6399,4356,6682,2263,\\ + &5109,1808,5317,1733,5391,1757,4908,3290,6233,4363,\\ + &4056,264,564,24,24]. +\end{align*}\end{small} +It has rank mass $24R+2\ell$. Replace 24 rank-24 original transitions +by 24 rank-one transitions; all rank-23 copied transforms remain. +The new mass is $24R+\ell$. + +\subsection{Physical endpoints and strict complex moment} +The copied-center two-stage complex contract in +\path{notes/copied-centers-complex.tex} is unchanged by the scalar +center decoding. For the tensor triple line $U$, let +$T=C_U$, $F=C_I$, $E=C_{U^\perp}=FT^{-1}$. +The two data outputs are $A=-Fy$ and $B=FT^{-2}x+Ey$. +Add $T^{-1}$ applied to a copy of $A$ into $B$, paying one rank-one +child per data pair. The inherited input/output $Z$ phases and +$i^{9f}$ scalar normalize $FT^{-2}$ to $F$; sign and bank corrections +complete the exact tensor $C$. Auxiliary source/sink operators remain +$C_{D_0}$ and $FC_{D_0}$ in the second stage. Every original role +therefore returns the exact selected-axis tensor operation on arbitrary +inputs. This algebraic statement holds over $\mathbb Q(i)$ as well as +over Gaussian dyadics. + +With $m_c=576$, $N_c=v^2=4096576$, $B_c=vR=90914032$, put +\[ + W_c=2N_c+2B_c=190021216,\quad L_c=2v\ell=2234496, +\] +\[ + s_c=W_cm_c-N_c+L_c=109450358336,\qquad N_c-L_c=1862080. +\] +The complete list is $2B_c$ width-552 auxiliary exteriors, +$2N_c$ width-529 data macros, $2vH'_r$ width-$r$ internal children, +$4N_c$ width-23 data fronts, and $N_c$ width-one endpoint copies. +These disjoint classes include both kinds of paid copies and sum to +$s_c$. All binary residuals, including alternating forms, use the retained +one-child Gauss normal form with paid bit adapters and unit phases. +At $a_c=1949/25000000$ the exact rational enclosure gives +\[ + \sum_r\frac{n_r}{W_c}(r/m_c)^{1-a_c} + <1-1.3338373969\times10^{-10}. +\] + +\subsection{One exact odd-denominator grid} +The only new odd divisor is 21. Let $d$ bound the root axis count, +$D$ bound its maximum complex recursion depth, and $G_0$ bound the +number of grouped scalar operations per node. Choose +\[ + K=G_0(D+1),\qquad \text{common grid }2^{-P}21^{-K}. +\] +Root inputs and arbitrary dirty auxiliaries start Gaussian dyadic. +Multiply their integer numerators by $21^K$ once at the outer boundary. +Every local coefficient contains at most one factor 21 in its denominator, +so a local finite program adds at most $G_0$ to the odd-denominator +exponent. A completed $u$-axis child has Gaussian-dyadic coefficients +and therefore preserves its input's existing odd-denominator exponent; +it adds no new odd factor. Only the active chain of unfinished calls +can accumulate new factors. Its length is at most $D+1$, proving that +all intermediates lie on the common grid and every local division by +21 is an exact integer division of its encoded numerator. + +This divisibility claim uses the root dyadic-input invariant, not an +assumption about arbitrary numerators on the finest grid. Internal values +may have odd denominators. They are neither rounded nor re-encoded when +a child returns. At the completed outer return the operator is the exact +Gaussian-dyadic tensor on root dyadic inputs, so the final numerators +are divisible by $21^K$; exact unscaling restores dyadic encoding. + +Since the largest child is $552<576$, $D=O(\log d)$ and +$K=O(\log d)$ with fixed constants. Constant-divisor long division +is linear in numerator length. Initial and final scaling by $K$ +successive constant multiplications/divisions cost $O(V\log d)$ and +occur only at the outer boundary. The extra numerator length is +$O(\log d)$, preserving the retained $O(p)$ word bound. This overhead +is subordinate to the positive-power complex layer bound. + +For explicit semantic constants use +\[ + g_h=4(c_h+v)+10v+4hv+4h^2+8h+8=408200, +\] +\[ + G_0=N_c+2v(g_h+2h)=1656684480, +\] +where endpoint additions and copied-center scalar work are included. +The complete child contributes at most $u$ binary denominator bits +and row-norm factor $2^u$, with no additional odd exponent. A local +21-division contributes fewer than five denominator-height bits, +covered by the fixed scalar charge. Set +\[ +\begin{aligned} + E_0&=64(W_c+m_c+G_0+1)^3=403063477262941121443761178688,\\ + \mathcal E&=2G_0W_c^2+8s_c+4W_c+4+32m_c\\ + &=1196393335930350962702877484.2909639537\times10^{-10}. +\] +It uses the retained 24-term positive atanh-series logarithm enclosure, +its geometric tail, range reduction and upward rational exponential +bound. Also $\mu_1=s_b/(W_bm_b)<1$. These are the two gaps used below. diff --git a/notes/stopped-product-interface.tex b/notes/stopped-product-interface.tex new file mode 100644 index 0000000000..20c44ce486 --- /dev/null +++ b/notes/stopped-product-interface.tex @@ -0,0 +1,95 @@ +\subsection{Paid atom adapters and remainders} +Expand each fixed lower-triangular formal factor into unit scalings and +additions from earlier to later formal fields. Execute intrabank targets +in descending formal-field order, so earlier controls still have their +required original values. Every atom update reads only physically earlier +controls. In a cross-bank shear the update is +\[ + D_{i,t}\leftarrow D_{i,t}+k_{ij}H_{j,f-1-t}. +\] +Even with the reversed source index, the source lies in the earlier head +bank. The retained ordered-affine streaming primitive applies to each +ordinary width-$w$ atom update, costing $O(V)$ per pass. +There are $O(f)$ passes per fixed matrix and thus $O(Vn)$ per finite +node. The reversed control is an indexed earlier atom, not a reversed +field operation. Atom loops use binary descriptors on a fixed tape set; +all inactive digits remain complete spectators. The inherited parking +schedule never scans through parked ancestors, and polynomial descriptor +work is absorbed by the complete stream volume. + +For $n=m_bf+\delta$, $0\le\deltaa_b$, the paid adapter term is strictly lower order. +All bounded widths use the old interface. Numerical padding of a binary +chunk range to the least suitable radix-$q$ range has volume factor +below $q^2$; it preserves numerical order and is removed after the +completed ordinary wrapper, whose endpoint is ordinary interchange. + +If external rows are unavailable, use the inherited ordinary high-digit +borrowing construction from \path{notes/batched-bit-rows.tex}. +Borrow $O(\log e)$ high digits, exchange and join them into a preceding +row field, pad that field once, act on the body, and separate the high +parts. It applies literally to the completed ordinary wrapper; no claim +about borrowed high positions is made for an unwrapped reversed call. +Single-digit moves cost $O(V\log e)$, and small widths use the old +algorithm. Atom indices and rational coefficients are finitely specified; +the algorithm uses the same fixed tape set and complete spectator ranges. diff --git a/notes/stopped-product-note.tex b/notes/stopped-product-note.tex new file mode 100644 index 0000000000..a8b23254c8 --- /dev/null +++ b/notes/stopped-product-note.tex @@ -0,0 +1,76 @@ +\documentclass[11pt]{article} +\usepackage[margin=1in]{geometry} +\usepackage[T1]{fontenc} +\usepackage{lmodern,amsmath,amssymb,amsthm,mathtools,booktabs,longtable,microtype} +\usepackage[hidelinks]{hyperref} +\setlength{\emergencystretch}{3em} +\allowdisplaybreaks +\newtheorem{theorem}{Theorem}[section] +\newtheorem{lemma}[theorem]{Lemma} +\newtheorem{proposition}[theorem]{Proposition} +\title{A conditional integer-multiplication saving of $194869/2500000000$\\ +\large Stopped product-ring interchange and rational retained centers} +\author{icekylinx\\\small With substantial OpenAI GPT-6 Astra and Codex assistance} +\date{9 October 2026} +\begin{document}\maketitle +\begin{abstract} +A common rational basis and opposite bank orders reduce each projector +residual to one contiguous reversed child over a fixed atom product ring. +Ordered atom adapters are paid explicitly; stopping at a growing atom +width and using the retained ordinary primitive supplies an ordinary +bit interface. An independent 24-dimensional complex producer uses +rational retained-center decoding on one exact common grid. The selected +interfaces and retained semantic/bulk assembly give the conditional bound +$T(n)=O(n(\log n)^{1-\kappa})$, where +$\kappa=194869/2500000000=0.0000779476$. +\end{abstract} + +\section{Scope and retained dependencies} +The model is the retained fixed finite-alphabet multitape Turing machine. +Finite graphs, rational bases, address primes, coefficient tables and tape +counts are fixed independently of input length. Bit payload arithmetic is +binary, while its address geometry is rational and then evaluated on atom +rings. Complex payloads use exact Gaussian rational arithmetic with the +specified common grid; their address labels remain binary. + +The proof predecessor is icekylinx's merged copied-center PR36, +\texttt{11817ccacb564bb7f98789c20dc11d3fece207e3}, whose proof is +\path{notes/copied-centers-note.tex}. Its ordinary interchange saving +$a_{\rm old}=384599/10^{10}$, copied-center schedule in both orientations, +two-stage data and auxiliary endpoint identities, general binary residual +normal form, and fixed-tape complete-row contracts are retained. +The present opposite-bank factorization, stopped product-ring interface, +rational-center specialization and exact composition are by icekylinx, +with substantial OpenAI GPT-6 Astra assistance and Codex integration. +Earlier own contributions include PR10 batching, PR18 partial swaps, +PR24 endpoint gauges and PR32 structured blocks and semantic composition. + +Aurel Prosz (Paureel) supplies the two-stage topology and paid endpoint +copy, with Swapnil Jain's linked development credited by Zhihao Chen's +PR29. The retained leaf proof also credits Rohan Arun's PR31 corner method +and Dominik Scholz's PR33 parameterization. Zhihao Chen's PR21/23 and the +RaD/hipotures PR20 source provide the phase endpoints, semantic guard, +arbitrary-source routing, phase-cell inverse and bulk locality/tape +interfaces. Their pinned proof map remains in +\path{notes/structured-bulk-assembly.tex}; adopted sources and notices are +in \path{references/semantic-bulk/} and \path{references/copied-centers/}. +The underlying Douglas Colkitt framework, OpenAI manuscript, eumemic, +Bortlesboat, dleen, earlier finite contributions and Harvey--van der Hoeven +analytic work retain their credits and recorded AI assistance in +\texttt{NOTICE} and \texttt{SOURCES.json}. + +The conclusion remains conditional on those analytic, ordered-affine, +exact-recovery and machine interfaces and their eventual setup and +prime-existence thresholds. The new algebraic and tape constructions +below establish the changed finite interfaces; exact arithmetic certifies +their selected counts and margins. + +\section{One reversed child for each projector} +\input{notes/stopped-product-factorization.tex} +\section{Stopped atom recursion and ordinary interchange} +\input{notes/stopped-product-interface.tex} +\section{Rational centers and exact semantic precision} +\input{notes/stopped-product-complex.tex} +\section{Product rows and exact assembly} +\input{notes/stopped-product-assembly.tex} +\end{document} diff --git a/research/cube-deferred/PROOF.md b/research/cube-deferred/PROOF.md new file mode 100644 index 0000000000..27e7e066e3 --- /dev/null +++ b/research/cube-deferred/PROOF.md @@ -0,0 +1,9 @@ +# Conditional extension and review boundary + +The changed component is a scalar producer, not a new multiplication reduction. Fix h=24, the same 2,024 triple variables, retained coordinate hyperplanes and divisor21 as PR114. For three paired groups, PR115's cube recurrence groups the eight surviving-subset contributions into two four-output planes, combining the plane without the third coordinate and the appropriate plane containing it. Each plane is a partition into disjoint source supports. All additions are therefore ordinary disjoint sums with coefficient1; interning equal supports changes sharing, not the linear map. The cube implementation and its dependencies retain icekylinx's source attribution. + +Within those planes and contracted pair calls, retain PR114's balanced column coarse sums and core-aware pair assembly. The final pair-star leave-one-out outputs retain PR111/55's dual-suffix identities. Retained center outputs are computed after restoring inherited class methods, exactly as in the selected implementation. The resulting selected source map is verified for every triple output, every pair-star output and all24 centers, not just sampled values. Every scalar-to-target correction remains (j-1+[j=0]-[j=2])/2 for intersection size j, hence equals the diagonal identity. + +The unchanged PR114 compiler builds an explicit legal carrier matching and chronological role word. It checks full root values, two arbitrary-data/scratch replays, every lifted-frame containment and nondegeneracy condition, untouched-center dependency cuts, deferred target nesting and all source/target chains. The independent PR114 reflection audit additionally checks integer source coefficients, the old-value transpose, the literal inverse/sign-negate/bank-swap word, complemented frame incidences and the complete reflected histogram, with three adversarial mutations. These finite checks establish the stated local extension only; simultaneous rational bases, routing/recovery, stopped atom streaming, translated endpoint gauges, analytic estimates and fixed-tape interfaces remain inherited assumptions. + +The full physical histogram is recomputed from actual chains. Its rank mass must equal Wm-N+L. The ordinary bit profile is unchanged and regenerated from the two SHA-bound Swapnil round-seven inputs. Scalar guard G includes literal expanded readouts according to PR114's conservative bound; no free basis transform or omitted cleanup is introduced. Exact rational moment enclosures reject the next bit and complex grid points. The retained assembly checks all47 strict constraints and seven margins and rejects the next final grid point. PR114's old complete complex profile must fail at the new complex saving. A finite search does not prove global optimality. diff --git a/research/cube-deferred/README.md b/research/cube-deferred/README.md new file mode 100644 index 0000000000..20eb3c65fe --- /dev/null +++ b/research/cube-deferred/README.md @@ -0,0 +1,18 @@ +# Cube recurrence with balanced core pairs and deferred readouts + +Conditional κ = **49349675169/500000000000000 = 9.8699350338×10⁻⁵**, approximately **4.17409% above PR114** (9.4744627892×10⁻⁵). The strict complex saving is 98718939/10¹²; the retained stopped bit saving is 1240189553/10¹³. + +This composes icekylinx's PR115 pair-first cube recurrence with eumemic's PR114 balanced core-aware pair subproblems, Rohan Arun's PR111 dual-suffix pair stars, and Avi Eisenberg's PR110 lifted/deferred compiler. The cube recurrence replaces the entire triple-exclusion recurrence. Its outputs are assembled from the same disjoint coefficient partitions, so the existing producer checks all scalar supports and frame inclusions. The selected circuit has 70,252 additions, 8,120 roots, 42,694 legal matched carriers, 35,678 roles and 4,909 deferred roles. PR114 has 37,859 roles; a smaller role count alone is not used to claim improvement. + +The bit supplier is unchanged. All copied-center transforms, auxiliary exteriors, source and target fronts, data residuals, endpoint corrections, scalar work and three row reserves remain paid. In particular, this retains PR114's conservative expanded-readout scalar charge. The complete complex histogram and exact moments determine the comparison. + +The implementation deliberately preserves the tested producer's two construction phases: the initial CubeTriple output construction uses PR114 core-pair/vector overrides; after the overrides are removed, the retained center outputs use the inherited CubeTriple/IntervalTriple methods. Both sets of selected roots are checked together by the complete scalar and frame compiler. + +```sh +python3 research/cube-deferred/verify.py +make verify +``` + +Full verification passed on research commit `97750ec74fc714638c0aa4f31aaa880e56cb8b4d`: `make -j1 verify`, package verification and 14 controls completed in 3733.46 seconds with no source drift. All 42 GitHub checks on that research commit passed. See [validation.json](validation.json) for commands, log/archive hashes and scope. The inherited general interfaces remain conditional. No claim of an unconditional theorem, global optimality or measured runtime improvement is made. + +See [PROOF.md](PROOF.md). Credits: icekylinx (PR115 cube recurrence; PR104 stopped products), eumemic (PR114 balanced core pairs, independent reflection verifier and conservative scalar accounting), Avi Eisenberg/ikeboy (PR62/110 primitives and deferred compiler, Claude assistance), Rohan Gupta/gupt1156 (PR55 dual-suffix identity), Rohan Arun (PR111/113, Claude assistance), Swapnil Jain (frozen round-seven deferred bit word), Zhihao Chen/jacklightChen, RaD/hipotures, Aurel Prosz/Paureel, Douglas Colkitt, OpenAI and all inherited contributors. Imported Apache-2.0 code retains original notices. This integration was prepared by Rohan Arun with OpenAI Codex assistance. diff --git a/research/cube-deferred/SOURCE.json b/research/cube-deferred/SOURCE.json new file mode 100644 index 0000000000..e68a3a4a55 --- /dev/null +++ b/research/cube-deferred/SOURCE.json @@ -0,0 +1,69 @@ +{ + "attribution": "Avi Eisenberg / ikeboy (PR62 and PR110, Anthropic Claude assistance); Rohan Arun (PR111, Anthropic Claude assistance); Swapnil Jain (round-seven bit word); icekylinx (retained stopped-product, copied-center and finite assembly interfaces); Zhihao Chen and RaD (retained assembly). Core-aware pair transfer, integration and verification for eumemic with OpenAI Codex assistance. Original source notices remain authoritative.", + "package_files": { + "PROOF.md": "cf0463a037196fe1ed60e45c68c6d8b9d127f1dd1e47aad52830cdbc87e154f4", + "README.md": "f93df36578a831e05be4f348258a1fbd2e73eb813447527b8f29b08b3590bdd1", + "bit-profile.json": "7293f330518b78650bd86d76b93681e43f3a55541cdb8110993714148a4b4a6a", + "bit_round7.py": "35d261a9248c2e06f9179e3c47e554a96b8fe763a9a3de2731256b8c0fbc74b0", + "certificate.json": "aa2d182046cbf7aa45a42d79f902ed577e30b2027b969c1e35500d742a198445", + "certificate.py": "441b727a07466388456205deec685a52bb464bbb50dce2a2b27cf3decd98e10d", + "complex-profile.json": "56fd54d316129d90c4c91d500f38afa712434e5622ee6ea3b20fa795f8424680", + "complex_deferred.py": "6bea79108859a98523b3fc8ad9d374f28209c2d4fdf71b6edfc4ca685acfc3ad", + "core_pair_block.py": "b97da88c5635688859b3330b66dd64756e28e3713da88954d519f8ea3a3f9568", + "cube115.py": "afad64cbea7f943a9a87233576aaf1a94ff0270ad853d1f8b4df7b12144914e2", + "inputs/deferred_23.json.gz": "8c38e947ff9e021e308000dd82bb5e2194eb265d8b75194e22ce783d3e75317c", + "inputs/witness_23.json.gz": "b2486aa2bb222bacea6e52162a3920780e45dd8edc5d7cb03eabea336a1c6588", + "interval115.py": "b85106476cd041e2b85e884beee0beeaf850d32f61c22d091ce1beb8238dbd40", + "producer.py": "79e106a35b42d9ea07f4353933a477f3a3c3a08192724f45763667a458e8f795", + "reflection-audit.json": "306a8090c9fcf5c2f6f14e7837f8e6c82137f4df7c11fa95895e673cc3a2eb5e", + "reflection_audit.py": "7f534ddc406b1454f71831790b0f519007fa4120a025a30fe162ef9c9215a9d7", + "test_controls.py": "264f5c3e7de6bb5ba4d4205b8480ee3c6ae91054fe6128ed05e42da083f84384", + "verify.py": "c78e5cc09ee08c3de54aee969f69f31433281cd000e1e5b2f7b6fb3845a08b86" + }, + "provenance": { + "base": "https://github.com/CrocSwap/integer-mult-bounds/pull/114", + "base_commit": "51cd8934128be37830981ca391d3d6fd28b0fce8", + "core_aware_pair_assembly": "https://github.com/CrocSwap/integer-mult-bounds/pull/62", + "cube": "https://github.com/CrocSwap/integer-mult-bounds/pull/115", + "cube_commit": "cf60442983c153a3a0f5272ea4713f99eba13c86", + "cyclic_strips": "https://github.com/CrocSwap/integer-mult-bounds/pull/111", + "round7_commit": "741e7aa078392553815df7926ee17ac5e25a8c38", + "round7_repository": "https://github.com/Swapnil-jain/integer-mult-kappa", + "round7_sha256": { + "deferred_23.json.gz": "8c38e947ff9e021e308000dd82bb5e2194eb265d8b75194e22ce783d3e75317c", + "witness_23.json.gz": "b2486aa2bb222bacea6e52162a3920780e45dd8edc5d7cb03eabea336a1c6588" + } + }, + "reflection": { + "receipt": "reflection-audit.json", + "script": "reflection_audit.py" + }, + "repository_files": { + "certificates/copied-centers-network.json": "7dbd675e42e22ac076280360f8750031851564bb7a56079e66236fee5d0a6cdf", + "research/cyclic-deferred/complex-profile.json": "6b6c8a40a1d27cd792e12feb42baba91d792caafe49c476527b3ce79511c7da5", + "scripts/audit_short_guards.py": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1", + "scripts/certify.py": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e", + "scripts/compact_control_layer.py": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f", + "scripts/complex_circuit.py": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "scripts/complex_network.py": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + "scripts/copied_centers/__init__.py": "13db4f09038a2ff5335cbd4dbd93274b0fb16b3c7b51e4de67cbb2801a3f78e1", + "scripts/copied_centers/corners.py": "9eecdc39c67cc18c806a33f0be03986c28591d322881fd60c11f52c625c8067b", + "scripts/copied_centers/physical.py": "837345d1f8753eab0e70f105b1d1bb0db965b993da037b1825ddef3672609d7d", + "scripts/copied_centers_network.py": "409ebfbd8a41c4c4d089aa0949fcf5a949415dc26f57440ffd48b7bd8881e6a9", + "scripts/exclusion_circuit.py": "b253f9d7318becda1c1f3b24e2287ed44a9c27fcea00cf9d531afb950d0457a0", + "scripts/fast_gaussian.py": "11430c2df0783b933dc91080595bb7514bb052b8c7b12107e27a1ef701e31e43", + "scripts/paired_exclusion_circuit.py": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2", + "scripts/paired_network.py": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7", + "scripts/paired_triple_circuit.py": "8f5f2de32fdbd8e0005154638660ff416e5a8cd59623bd0dc03f6f7f97ce2fb1", + "scripts/partial_swap/__init__.py": "0438eaa34134600467a5864f93c3e15142eb025b35cef189c2e969cffea72a7f", + "scripts/partial_swap/binary.py": "d32d7a23548cc738e974e8e55dd1fa2a8b11d2b80228515617ffe35410bb8805", + "scripts/partial_swap_network.py": "acdd81b4dea2815f8838a0c3ea8ac4968f2bc13fd7c99173473d865779096782", + "scripts/prepare_layers.py": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947", + "scripts/search_network.py": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a", + "scripts/shared_point_circuit.py": "c9bb7a5df92d260a4e3ad532b53e26936730d7c93f7facfb0784957c1e81c8ba", + "scripts/shared_point_network.py": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697", + "scripts/structured_bulk_assembly.py": "e99467e14211fba699878ed036e1e2362eb8e395dc22f9ecdcecc7fbf2cc736d" + }, + "schema": 1, + "scope": "Frozen finite producer, profiles, exact assembly and reflection audit; inherited all-size transfer remains conditional." +} diff --git a/research/cube-deferred/bit-profile.json b/research/cube-deferred/bit-profile.json new file mode 100644 index 0000000000..36105e819a --- /dev/null +++ b/research/cube-deferred/bit-profile.json @@ -0,0 +1,69 @@ +{ + "h": 23, + "v": 1771, + "R": 28866, + "m": 529, + "N": 3136441, + "W": 108516254, + "L": 1792252, + "total_rank": 57403754177, + "deficit": 1344189, + "maxchild": 528, + "deferred_slots": 11565, + "source": { + "repository": "https://github.com/Swapnil-jain/integer-mult-kappa", + "commit": "741e7aa078392553815df7926ee17ac5e25a8c38", + "sha256": { + "witness_23.json.gz": "b2486aa2bb222bacea6e52162a3920780e45dd8edc5d7cb03eabea336a1c6588", + "deferred_23.json.gz": "8c38e947ff9e021e308000dd82bb5e2194eb265d8b75194e22ce783d3e75317c" + } + }, + "child_multiplicities": { + "1": 239511811, + "2": 238288050, + "3": 53377940, + "4": 46970462, + "5": 23632224, + "6": 7409864, + "7": 4105178, + "8": 5755750, + "9": 2082696, + "10": 878416, + "11": 1388464, + "12": 1080310, + "13": 945714, + "14": 226688, + "15": 2451064, + "16": 1508892, + "17": 4771074, + "18": 2149994, + "19": 7367360, + "20": 8182020, + "21": 1466388, + "22": 88550, + "484": 6272882, + "506": 61280142, + "507": 545468, + "508": 173558, + "509": 293986, + "510": 580888, + "511": 14168, + "512": 322322, + "513": 17710, + "514": 1129898, + "515": 127512, + "516": 410872, + "517": 99176, + "518": 1186570, + "519": 340032, + "520": 322322, + "521": 106260, + "522": 1583274, + "523": 626934, + "524": 2854852, + "525": 13711082, + "526": 4629394, + "527": 5653032, + "528": 6233920 + } +} diff --git a/research/cube-deferred/bit_round7.py b/research/cube-deferred/bit_round7.py new file mode 100644 index 0000000000..3c5df409a6 --- /dev/null +++ b/research/cube-deferred/bit_round7.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python3 +"""One-child bit profile of Swapnil Jain's round-seven deferred word (h=23), under PR104's opposite-bank rule. + +Reads the two frozen round-seven data files (vendored in inputs/; pinned by SHA-256 below) from a directory given on +the command line, e.g. a checkout of https://github.com/Swapnil-jain/integer-mult-kappa at +741e7aa078392553815df7926ee17ac5e25a8c38 (certificates/round7/), or PR97's imported copy +(research/deferred-signed/swapnil-round7/certificates/round7/). The frame dimensions are the ones recorded in +the data file; Swapnil's check_frames.py re-derives each of them exactly and PR97 replays the word. + +Every projector residual of rank r is one child of width r (PR104, notes/stopped-product-factorization.tex): + each slot: its chain steps from the deferral frame sigma_u to F, and one exterior child m - (h - dim sigma_u); + each retained centre: one copied transform of width h-1; + each target y_T: its chain 0 -> deferred readout levels -> t_T^perp; each data wire X_S: its chain of V frames; + each data pair: one data residual of width (h-1)^2 and one endpoint copy. +Usage: python3 research/deferred-stopped/bit_round7.py DIR (writes bit-profile.json next to this file) +Prepared by Avi Eisenberg (ikeboy) with Anthropic Claude assistance. Apache-2.0. +""" +import gzip +import hashlib +import json +import sys +from collections import Counter, defaultdict +from itertools import combinations +from pathlib import Path + +HERE = Path(__file__).resolve().parent +PINS = {'witness_23.json.gz': 'b2486aa2bb222bacea6e52162a3920780e45dd8edc5d7cb03eabea336a1c6588', + 'deferred_23.json.gz': '8c38e947ff9e021e308000dd82bb5e2194eb265d8b75194e22ce783d3e75317c'} + + +def require(ok, msg): + if not ok: + raise SystemExit('FAIL: ' + msg) + + +def main(directory): + data = {} + for name, digest in PINS.items(): + raw = (Path(directory) / name).read_bytes() + require(hashlib.sha256(raw).hexdigest() == digest, 'pinned hash of ' + name) + data[name] = json.loads(gzip.decompress(raw)) + W, D = data['witness_23.json.gz'], data['deferred_23.json.gz'] + h = D['h']; R = D['R']; trip = list(combinations(range(h), 3)); v = len(trip); m = h * h; N = v * v + tid = {T: i for i, T in enumerate(trip)} + args = {int(n): (tuple(a) if a else None) for n, a in W['args'].items()} + late = {int(n): (list(e), list(l)) for n, (e, l) in W['late'].items()} + ops = [tuple(o[:2]) + (tuple(o[2]),) if o[0] == 'fan' else tuple(o) for o in D['ops']] + hold, start = D['hold'], D['start'] + out = {s: (c, tuple(T)) for s, c, T in D['out']}; ret = {s: c for s, c in D['ret']} + sigma = dict(zip(D['readout_order'], D['sigma'])); sel = set(D['readout_order']) + f = [0] * R + for s, B in sigma.items(): f[s] = len(B) + vstart = dict(zip(D['vleaf_slots'], D['vleaf_start'])) + node_dims = {n: d for n, d in D['node_dims']} + late_dims = {(n, tuple(lt)): d for n, lt, d in D['late_dims']} + pivslot = {o[3]: o[1] for o in ops if o[0] == 'add'} + + def start_key(s): + n0 = hold[s][0] + if args[n0] is None: return ('v', s) + st = start[s]; k = st[2] if len(st) > 2 else None; dec = late.get(n0) + if dec is None or k in dec[0]: return ('n', n0) + lt = dec[1]; return ('c', n0, tuple(lt[lt.index(k):])) + + def chain(s): + ch = [('sigma', s) if s in sel else ('0',), start_key(s)] + for idx, n in enumerate(hold[s]): + if idx > 0: ch.append(('n', n)) + if args[n] is not None and pivslot.get(n) == s and n in late: + lt = late[n][1] + for i in range(len(lt) - 1): ch.append(('c', n, tuple(lt[i:]))) + if s in out: ch.append(('out',)) + if s in ret: ch.append(('ret',)) + ch.append(('F',)); return ch + + def dim(key): + k = key[0] + if k == '0': return 0 + if k == 'F': return h + if k in ('out', 'ret'): return h - 1 + if k == 'n': return node_dims[key[1]] + if k == 'c': return late_dims[key[1], key[2]] + if k == 'sigma': return f[key[1]] + if k == 'v': return len(vstart[key[1]]) + raise KeyError(key) + + # garbage supports (transpose sweep) for the deferred levels on each target + cov = [set() for _ in range(R)] + for s, (c, T) in out.items(): cov[s].add(tid[T]) + for s, c in ret.items(): cov[s].update(t for t, T in enumerate(trip) if c in T) + for o in reversed(ops): + if o[0] == 'add': cov[o[2]] |= cov[o[1]] + elif o[0] == 'fan': + for g in o[2]: cov[o[1]] |= cov[g] + levels = defaultdict(set) + for s in sel: + for t in cov[s]: levels[t].add(f[s]) + + z = Counter() + for s in range(R): + ds = [dim(k) for k in chain(s)] + require(all(b >= a for a, b in zip(ds, ds[1:])) and ds[-1] == h, 'monotone chain %d' % s) + for a, b in zip(ds, ds[1:]): + if b > a: z[b - a] += 2 * v + z[m - (h - f[s])] += 2 * v + z[h - 1] += 2 * v * h + for t in range(v): + ls = sorted(levels[t] | {0, h - 1}) + for a, b in zip(ls, ls[1:]): z[b - a] += 2 * v + for n, us in D['xs_order']: + ds = [1] + [len(vstart[s]) for s in us] + [h] + ds = [d for i, d in enumerate(ds) if i == 0 or d != ds[i - 1]] + require(all(b > a for a, b in zip(ds, ds[1:])), 'data-wire chain') + for a, b in zip(ds, ds[1:]): z[b - a] += 2 * v + z[(h - 1) ** 2] += 2 * N + z[1] += N + Wb = 2 * N + 2 * v * R; L = 2 * v * h * (h - 1); s_ = Wb * m - N + L + require(sum(t * c for t, c in z.items()) == s_, 'bit rank mass') + require(all(0 < t < m for t in z), 'children below m') + prof = dict(h=h, v=v, R=R, m=m, N=N, W=Wb, L=L, total_rank=s_, deficit=N - L, maxchild=max(z), + deferred_slots=len(sel), source=dict(repository='https://github.com/Swapnil-jain/integer-mult-kappa', + commit='741e7aa078392553815df7926ee17ac5e25a8c38', sha256=PINS), + child_multiplicities=dict(sorted(z.items()))) + (HERE / 'bit-profile.json').write_text(json.dumps(prof, indent=1) + '\n') + print('PASS bit: R=%d, deferred slots %d, maxchild %d, rank mass %d' % (R, len(sel), max(z), s_)) + + +if __name__ == '__main__': + main(sys.argv[1] if len(sys.argv) > 1 else '.') diff --git a/research/cube-deferred/certificate.json b/research/cube-deferred/certificate.json new file mode 100644 index 0000000000..cbce9a75d5 --- /dev/null +++ b/research/cube-deferred/certificate.json @@ -0,0 +1,321 @@ +{ + "status": "Finite conditional cyclic/deferred witness", + "kappa": "49349675169/500000000000000", + "complex_saving": "98718939/1000000000000", + "coarse_bit_saving": "620523/5000000000", + "actual_bit_saving": "1240189553/10000000000000", + "bit_parameter": "98718840271061/1000000000000000000", + "complex_profile": { + "h": 24, + "v": 2024, + "additions": 70252, + "roots": 8120, + "links": 42694, + "R": 35678, + "m": 576, + "N": 4096576, + "W": 152617696, + "L": 2234496, + "total_rank": 87905930816, + "deficit": 1862080, + "maxchild": 574, + "phase_one_ops": 18517, + "phase_one_roles": 15404, + "deferred_roles": 4909, + "deferred_dims": { + "1": 4, + "2": 45, + "4": 60, + "5": 1, + "6": 39, + "8": 79, + "10": 241, + "12": 348, + "13": 1, + "14": 234, + "15": 1, + "16": 218, + "17": 1, + "18": 1511, + "19": 682, + "20": 236, + "21": 225, + "22": 983 + }, + "lifted_additions": 34513, + "replay": { + "seeds": [ + 1, + 2 + ], + "scratch_restored": true, + "y_plus_x": true, + "field": "Z/(2^61-1)" + }, + "child_multiplicities": { + "1": 289160784, + "2": 238698416, + "3": 41451520, + "4": 67346576, + "5": 32064208, + "6": 32238272, + "7": 14451360, + "8": 14831872, + "9": 7549520, + "10": 10423600, + "11": 4849504, + "12": 8816544, + "13": 4602576, + "14": 12297824, + "15": 5505280, + "16": 8468416, + "17": 8828688, + "18": 9541136, + "19": 9367072, + "20": 4748304, + "21": 3149344, + "22": 6108432, + "23": 8322688, + "529": 8193152, + "552": 124552912, + "553": 16192, + "554": 182160, + "556": 242880, + "557": 4048, + "558": 157872, + "560": 319792, + "562": 975568, + "564": 1408704, + "565": 4048, + "566": 947232, + "567": 4048, + "568": 882464, + "569": 4048, + "570": 6116528, + "571": 2760736, + "572": 955328, + "573": 910800, + "574": 3979184 + } + }, + "bit_profile": { + "h": 23, + "v": 1771, + "R": 28866, + "m": 529, + "N": 3136441, + "W": 108516254, + "L": 1792252, + "total_rank": 57403754177, + "deficit": 1344189, + "maxchild": 528, + "deferred_slots": 11565, + "source": { + "repository": "https://github.com/Swapnil-jain/integer-mult-kappa", + "commit": "741e7aa078392553815df7926ee17ac5e25a8c38", + "sha256": { + "witness_23.json.gz": "b2486aa2bb222bacea6e52162a3920780e45dd8edc5d7cb03eabea336a1c6588", + "deferred_23.json.gz": "8c38e947ff9e021e308000dd82bb5e2194eb265d8b75194e22ce783d3e75317c" + } + }, + "child_multiplicities": { + "1": 239511811, + "2": 238288050, + "3": 53377940, + "4": 46970462, + "5": 23632224, + "6": 7409864, + "7": 4105178, + "8": 5755750, + "9": 2082696, + "10": 878416, + "11": 1388464, + "12": 1080310, + "13": 945714, + "14": 226688, + "15": 2451064, + "16": 1508892, + "17": 4771074, + "18": 2149994, + "19": 7367360, + "20": 8182020, + "21": 1466388, + "22": 88550, + "484": 6272882, + "506": 61280142, + "507": 545468, + "508": 173558, + "509": 293986, + "510": 580888, + "511": 14168, + "512": 322322, + "513": 17710, + "514": 1129898, + "515": 127512, + "516": 410872, + "517": 99176, + "518": 1186570, + "519": 340032, + "520": 322322, + "521": 106260, + "522": 1583274, + "523": 626934, + "524": 2854852, + "525": 13711082, + "526": 4629394, + "527": 5653032, + "528": 6233920 + } + }, + "bit_moment_gap": "210811394225115117568018038513239592855337768061996351784199300828041381607148420475711921673436778332750996651783152394205578153858435663243959795913385215868392831844509655226993164072062830500832781615792327068936897853818968534771730481866850519439187068953062899333771640996075361901014500735179763112430083120460814689994116646689670445286414265265018468311435502209195246240538069975559360544007937885404793780372701951022292660282948582656517071290400479729799954952580125532795274568021525151839594883237275569314958070368193662075730567130277424969924134425921633872848924585639423998410253779062359718371205767101510073996880454144801457072151080008705648366603197414406872289670642046369219405455128737300640897667220951127018547660455087533581513233999285275099394371781290865408274484542745086391849285198194905751058992419590161634431610100995441112613134240446609058758039909343152776920263419910572835208525277494067408376961456317/225678505065634612156474913616400633538202019254665477026878220214422133931127460164253533068001699469116755578965090566731480236912032281717920888140691998261537790258547549397061712443744511202265657747547567084090291301783866427704803156891369853685579999500594559805069402727752752227038426964007028952158078563045054314475625278140097385695241851533235641996467089273692960018822280793234080014352234618229252999217015923728814468917104222554059646947960375336061268431587018084270516494408656203498548153054913267707164839939006583338918817922618882667407408888179421052689449193499742148706302504238261936554897181289081072466758282367100305194479622149878636307463869297507337915811001244472279386614413535081936912313821531543735588465392499062010570720287729070905437080967709221039366272598541269000920375996285867953823816142239661027100714288630069735295241672325865922423925213948613346461034734632365263739073012128769510020000000000000000000000", + "complex_moment_gap": "8713002844707470603810572602811292071491073861680845100468422371355958805664066456911340430581799759600275009891823114363455829566580551875226631915385552312120196234612200803204747207581360283870615890933973275541564754841444929880722876454538980847382880418521125090192737893482026319811048890579527952283973971770565808566874123052772783728880396398501453926792854413801375581070904150758646234078385074698384766042470679842764127343147308702721937377031942962483179809457278468728016243855770540660748546130943436758631451390487721642687040141070692725038546160870511261869754088334985065355083171789000779136720105840161036647076727518225343113560482305684073025864624378546056184784682494133791860301459307496815192457520304549554230482449793458763471948201700244472296795468366154352663969582175552823611715631240040844525868091672812638299169911214584495614265716706603859560014103057335754226573090926347153532213808307662065799694509789753747254605469698072651442614773968667354348480268789577707428337/82004595540487109222410472477584395055225491990612804025505949409210739120479669585422360259650556631013333007897240375010898496811585023796883493143444442230421442067579096095992625288692678084097364687380712500354565103444673005468571785486668403984361592817616412790231595283157179174295196417719561001023285211289278916124290564007327793841455387378435404548160415050113934008394722146017891540035448075876605319966074939051969777457326758978562797928706674129126199967346585226840774785239700506261422039149360933383141939946634909499491199165047645095133906172497002898943912030078641043695394060930799110997796118255678267900941808208143351080782964611532545791013666853036267576749951161024850609430651823565128566811916696237249601001826588863053163566178603319010010171194364183773308589146646653448901324852152074358769410805096463824695542692196738974692473208326683945740548009619928898866419895976538089696888620694630599254827899786029946953622959760066903810758504244456789924369830656000000000000000000000000", + "finite_bridge": { + "complex": { + "m": 576, + "W": 152617696, + "s": 87905930816, + "maxchild": 574, + "halving_degree": 200, + "wire_bits": 28, + "scalar_terms": [ + { + "h": 24, + "v": 2024, + "c": 70252, + "R": 35678, + "q": 8120, + "invocations": 2024, + "local_group_upper": 17730568072, + "description": "Expanded deferred readouts and forward/inverse/reflected words" + }, + { + "h": 24, + "v": 2024, + "c": 70252, + "R": 35678, + "q": 8120, + "invocations": 2024, + "local_group_upper": 17730568072, + "description": "Expanded deferred readouts and forward/inverse/reflected words" + } + ], + "scalar_group_upper": 71773343652032 + }, + "semantic": { + "E": 23663134977676537687468327305713605031848000, + "literal_charge": 3343512570701091329748038698372, + "strict_literal_gap": 23663134977673194174897626214383856993149628, + "B": 23663134977676537687468327305713692937778816, + "C0": 10320887014903089483460091488744256300011976338006629722006596843490496619188358441485729792, + "C1": 1, + "induction_gap": 70989404933029613062404981917141078813336448, + "fixed_odd_divisor": 21, + "exact_grid": "2^(-P)*21^(-K), K=G*(D_complex+1); completed children preserve incoming odd denominator; no child rounding" + }, + "rows": { + "coefficient": 15761, + "degree": 33000, + "suffix_slope": 132000, + "degree_gap": "21189/25", + "contract": "W_complex^D_complex * W_coarse^D_coarse * W_old^D_old; prefix and padding; sequential reuse" + }, + "bit_coarse": { + "m": 529, + "W": 108516254, + "maxchild": 528, + "halving_degree": 367, + "wire_bits": 27 + }, + "ordinary_leaf_row_degree": 252 + }, + "assembly": { + "parameters": { + "a_bit": "98718840271061/1000000000000000000", + "a_complex": "98718939/1000000000000", + "tau": "999901281159728939/1000000000000000000", + "sigma": "999901281061/1000000000000", + "eta": "1/100000000", + "beta": "1/1000000", + "q": "4935941914834209728939/50000000000000000000000000", + "c": "493594196419362887728109728939/5000000000000000000000000000000000", + "epsilon": "4999999950000000000000000000000000/5000987188387902783860622009728939", + "lambda_": "99990128116071612740271061/100000000000000000000000000", + "lambda_prime": "49995064058085165790271061/50000000000000000000000000", + "alpha_squared_power": "740416287225131459340850000000/5000987188387902783860622009728939", + "delta": "1/800000000", + "C0": 10320887014903089483460091488744256300011976338006629722006596843490496619188358441485729792, + "C1": 1, + "kappa": "49349675169/500000000000000" + }, + "strict_constraints": { + "bit_positive": "98718840271061/1000000000000000000", + "complex_above_bit": "98728939/1000000000000000000", + "complex_below_one_over32": "31151281061/1000000000000", + "beta_positive": "1/1000000", + "beta_below_one": "999999/1000000", + "leaf_saving_above_bit": "1/100000000000000", + "q_positive": "4935941914834209728939/50000000000000000000000000", + "q_below_internal": "98718840271061/50000000000000000000000000", + "q_below_leaf": "99218840271061/50000000000000000000000000", + "c_positive": "493594196419362887728109728939/5000000000000000000000000000000000", + "c_below_one": "4999506405803580637112271890271061/5000000000000000000000000000000000", + "q_below_reservations": "4935941914834209728939/5000000000000000000000000000000000", + "lambda_above_tau": "98718840271061/100000000000000000000000000", + "lambda_above_sigma": "9971612740271061/100000000000000000000000000", + "lambda_above_internal": "98718840271061/100000000000000000000000000", + "lambda_prime_above_lambda": "98718840271061/100000000000000000000000000", + "compact_leaf": "99218840271061/50000000000000000000000000", + "compact_reservations": "4935941914834209728939/5000000000000000000000000000000000", + "lambda_prime_below_one": "4935941914834209728939/50000000000000000000000000", + "epsilon_positive": "4999999950000000000000000000000000/5000987188387902783860622009728939", + "epsilon_below_one": "987238387902783860622009728939/5000987188387902783860622009728939", + "guard_width": "987238387902783860622009728939/5000987188387902783860622009728939", + "K_geometry": "49364419641936293708752887728109728939/500098718838790278386062200972893900000000", + "K_dominates_log": "49359419148342092353448085165790271061/500098718838790278386062200972893900000000", + "record_suffix": "987238387902783860622009728939/5000987188387902783860622009728939", + "phase_local": "789785709335038700594823922529190271061/4000789750710322227088497607783151200000000", + "phase_boundary": "592328028792916779569896139377990271061/4000789750710322227088497607783151200000000", + "gamma_sublinear": "246822100677652401281159728939/5000987188387902783860622009728939", + "cell_above_band": "4999753127899322347598718840271061/10001974376775805567721244019457878", + "prime_interval_packing": "987238387902783860622009728939/5000987188387902783860622009728939", + "alpha_positive": "740416287225131459340850000000/5000987188387902783860622009728939", + "alpha_below_one": "5000246772100677652401281159728939/5000987188387902783860622009728939", + "alpha_below_one_fourth": "4998025523239002258023258609728939/20003948753551611135442488038915756", + "delta_positive": "1/800000000", + "delta_below_one_eighth": "99999999/800000000", + "short_record_fallback": "4999506258344551912178872895357025046364910104065721/5000987188387902783860622009728939000000000000000000", + "small_field_exposure": "493644201355304802562319457878/5000987188387902783860622009728939", + "artificial_boundary": "28006515498362132750241103006187738790271061/4000789750710322227088497607783151200000000", + "literal_scalar_guard": "23663134977673194174897626214383856993149628", + "row_product_gap": "21189/25", + "original_prefix_above_kappa": "25004938407857391091926690133547305984309/2500493594193951391930311004864469500000000000000", + "coordinate_movement_above_kappa": "19489933061/1000000000000000000", + "compact_phase_layer_above_kappa": "2465917877172623580084902610984309/2500493594193951391930311004864469500000000000000", + "bulk_exposure_above_kappa": "19489933061/1000000000000000000", + "Gaussian_arithmetic_above_kappa": "123407924724299376078512575160828822024109309/2500493594193951391930311004864469500000000000000", + "scalar_work_above_kappa": "246818975063125576719092439630328822024109309/2500493594193951391930311004864469500000000000000", + "dimension_above_kappa": "2499753177906728726388847327488049584902610984309/2500493594193951391930311004864469500000000000000" + }, + "margins": { + "original_prefix": "49364419641936293708752887728109728939/500098718838790278386062200972893900000000", + "coordinate_movement": "98718840271061/1000000000000000000", + "compact_phase_layer": "493594186547479058059690271061/5000987188387902783860622009728939", + "bulk_exposure": "98718840271061/1000000000000000000", + "Gaussian_arithmetic": "592328028792916779569896139377990271061/4000789750710322227088497607783151200000000", + "scalar_work": "789785709335038700594823922529190271061/4000789750710322227088497607783151200000000", + "dimension": "4999999950000000000000000000000000/5000987188387902783860622009728939" + }, + "minimum_margin": "493594186547479058059690271061/5000987188387902783860622009728939", + "absorption_gap": "2465917877172623580084902610984309/2500493594193951391930311004864469500000000000000", + "recurrence": { + "internal": "999901281159728939/1000000000000000000", + "leaf": "999901281159718939/1000000000000000000", + "reservations": "4999506405803580637112271890271061/5000000000000000000000000000000000" + } + }, + "next_grid_rejections": { + "bit": "1e-10", + "complex": "1e-12", + "kappa": "1e-15" + } +} \ No newline at end of file diff --git a/research/cube-deferred/certificate.py b/research/cube-deferred/certificate.py new file mode 100644 index 0000000000..b31e1ed0c9 --- /dev/null +++ b/research/cube-deferred/certificate.py @@ -0,0 +1,112 @@ +#!/usr/bin/env python3 +"""Exact finite assembly for cyclic strips with deferred readouts. + +Built on Avi Eisenberg's PR110 (Anthropic Claude assistance), icekylinx's +PR104 stopped-product and copied-center interfaces, and Zhihao Chen's +assembly of the RaD interfaces. Integration for eumemic with OpenAI Codex +assistance. Apache-2.0. General transfer hypotheses remain inherited. +""" +import argparse +import json +import sys +from fractions import Fraction as Q +from pathlib import Path +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +sys.path.insert(0, str(ROOT / 'scripts')) +from partial_swap_network import moment +from copied_centers_network import finite_bridge as copied_bridge +from structured_bulk_assembly import assembly, js +ATOM = Q(1, 1000) +OLD = Q(384599, 10**10) +BETA = Q(1, 10**6) +COARSE = Q(620523, 5000000000) +COMPLEX = Q(98718939, 1000000000000) +KGRID = 10**15 + +def profile(name): + p = json.loads((HERE / name).read_text()) + p['child_multiplicities'] = {int(t): c for t, c in p['child_multiplicities'].items()} + z = p['child_multiplicities'] + assert all(0 < t < p['m'] and c > 0 for t,c in z.items()) + assert sum(t*c for t,c in z.items()) == p['total_rank'] == p['W']*p['m']-p['N']+p['L'] + assert max(z) == p['maxchild'] + return p + +def contracts(p, a): + try: moment(p['m'],p['W'],p['child_multiplicities'],a,True) + except ValueError: return False + return True + +def exact(bit=None, phase=None): + bit = profile('bit-profile.json') if bit is None else bit + phase = profile('complex-profile.json') if phase is None else phase + assert (bit['h'], phase['h']) == (23,24) + bm = moment(bit['m'],bit['W'],bit['child_multiplicities'],COARSE,True) + cm = moment(phase['m'],phase['W'],phase['child_multiplicities'],COMPLEX,True) + assert not contracts(bit,COARSE+Q(1,10**10)) + assert not contracts(phase,COMPLEX+Q(1,10**12)) + ab = (1-ATOM)*COARSE+ATOM*OLD + assert 0 < OLD < COARSE < ATOM and ab < ATOM + a = min(ab,(1-BETA)*COMPLEX-Q(1,10**14)) + row = dict(h=phase['h'],v=phase['v'],c=phase['additions'],central_disjoint=24) + bridge = copied_bridge(bit,phase,[row,row]) + # A literal expanded readout is charged even if it could be factored. + # Each row has <=c+R mixer operations and <=R leaf copies. There are + # <=R+q readouts, each containing <=h center coefficients and <=v direct + # coefficients; <=4*v*(h+1) scalar groups suffice per readout. A factor + # eight covers forward/inverse words, both reflected words, and copies. + h,v,R,q,c = (phase[k] for k in ('h','v','R','roots','additions')) + local = 8*(c+2*R+(R+q)*v*(h+1)+h*h+h+1) + G = phase['N'] + 2*v*local + m,W,s = (phase[k] for k in ('m','W','total_rank')) + E=64*(W+m+G+1)**3 + charge=2*G*W*W+8*s+4*W+4+32*m + B=s+E; C0=32*m*B*B + assert charge= s+E and 2*B+181: + mid=(lo+hi)//2 + if accepts(mid): lo=mid + else: hi=mid + k=Q(lo,KGRID) + assembled=assembly(a,COMPLEX,bridge,k,beta=BETA) + assert len(assembled['strict_constraints'])==47 and len(assembled['margins'])==7 + assert not accepts(lo+1) + return dict(status='Finite conditional cyclic/deferred witness',kappa=k, + complex_saving=COMPLEX,coarse_bit_saving=COARSE,actual_bit_saving=ab, + bit_parameter=a,complex_profile=phase,bit_profile=bit, + bit_moment_gap=bm['strict_gap'],complex_moment_gap=cm['strict_gap'], + finite_bridge=bridge,assembly=assembled, + next_grid_rejections=dict(bit='1e-10',complex='1e-12',kappa='1e-15')) + +def main(): + parser=argparse.ArgumentParser();parser.add_argument('--write',action='store_true');args=parser.parse_args() + assert not sys.flags.optimize + result=js(exact()); path=HERE/'certificate.json' + if args.write:path.write_text(json.dumps(result,indent=2,sort_keys=True)+'\n') + else:assert result==json.loads(path.read_text()),'Frozen exact certificate mismatch' + print('PASS conditional kappa = %s = %.12e; 47 constraints, 7 margins; expanded scalar charge' % (result['kappa'],float(Q(result['kappa'])))) +if __name__=='__main__':main() diff --git a/research/cube-deferred/complex-profile.json b/research/cube-deferred/complex-profile.json new file mode 100644 index 0000000000..49cfd4740c --- /dev/null +++ b/research/cube-deferred/complex-profile.json @@ -0,0 +1,93 @@ +{ + "h": 24, + "v": 2024, + "additions": 70252, + "roots": 8120, + "links": 42694, + "R": 35678, + "m": 576, + "N": 4096576, + "W": 152617696, + "L": 2234496, + "total_rank": 87905930816, + "deficit": 1862080, + "maxchild": 574, + "phase_one_ops": 18517, + "phase_one_roles": 15404, + "deferred_roles": 4909, + "deferred_dims": { + "1": 4, + "2": 45, + "4": 60, + "5": 1, + "6": 39, + "8": 79, + "10": 241, + "12": 348, + "13": 1, + "14": 234, + "15": 1, + "16": 218, + "17": 1, + "18": 1511, + "19": 682, + "20": 236, + "21": 225, + "22": 983 + }, + "lifted_additions": 34513, + "replay": { + "seeds": [ + 1, + 2 + ], + "scratch_restored": true, + "y_plus_x": true, + "field": "Z/(2^61-1)" + }, + "child_multiplicities": { + "1": 289160784, + "2": 238698416, + "3": 41451520, + "4": 67346576, + "5": 32064208, + "6": 32238272, + "7": 14451360, + "8": 14831872, + "9": 7549520, + "10": 10423600, + "11": 4849504, + "12": 8816544, + "13": 4602576, + "14": 12297824, + "15": 5505280, + "16": 8468416, + "17": 8828688, + "18": 9541136, + "19": 9367072, + "20": 4748304, + "21": 3149344, + "22": 6108432, + "23": 8322688, + "529": 8193152, + "552": 124552912, + "553": 16192, + "554": 182160, + "556": 242880, + "557": 4048, + "558": 157872, + "560": 319792, + "562": 975568, + "564": 1408704, + "565": 4048, + "566": 947232, + "567": 4048, + "568": 882464, + "569": 4048, + "570": 6116528, + "571": 2760736, + "572": 955328, + "573": 910800, + "574": 3979184 + } +} diff --git a/research/cube-deferred/complex_deferred.py b/research/cube-deferred/complex_deferred.py new file mode 100644 index 0000000000..59012fc43c --- /dev/null +++ b/research/cube-deferred/complex_deferred.py @@ -0,0 +1,466 @@ +#!/usr/bin/env python3 +"""Cyclic strips and core-aware pair assembly with lifted frames and deferred readouts. + +The scalar h=24 producer uses PR111's cyclic PairedTriple strips and dual-suffix +pair stars, with PR62's core-aware pair assembly, a two-point base case, and +column-pair coarse sums inside contracted pair subproblems. PR110's maximum +carrier matching, explicit role compiler, lifted binary frames, deferred +readouts, finite-field replay, exact F2 frame checks, and actual one-child +profile are retained. The selected graph has 70252 additions, 8120 roots, +42694 carrier links, and 35678 roles. + +Credits: Avi Eisenberg (PR110 deferred complex compiler and PR62 pair assembly), +Rohan Arun (PR111 cyclic-strip and dual-suffix producer), Swapnil Jain (deferred +readouts), icekylinx (PR104 stopped product-ring and PairedTriple lineage), and +all predecessors credited in those sources. Integration and the contracted +pair replacement were prepared with OpenAI Codex assistance. Apache-2.0. + +This script checks the original assertions and writes complex-profile.json +next to itself. Reflected-word verification is a separate audit. +""" +import array +import json +import random +import struct +import sys +import tempfile +from collections import Counter, defaultdict +from itertools import combinations +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +sys.path.insert(0, str(ROOT / 'scripts')) +import importlib.util +producer_path = HERE / 'producer.py' +spec = importlib.util.spec_from_file_location('cyclic_producer', producer_path) +producer = importlib.util.module_from_spec(spec); spec.loader.exec_module(producer) +build = producer.build + +P = (1 << 61) - 1 + + +def require(ok, msg): + if not ok: + raise SystemExit('FAIL: ' + msg) + + +def load(prefix): + def rd(fh, typ, cnt): + a = array.array(typ); a.fromfile(fh, cnt); return a + with open(str(prefix) + '.bin', 'rb') as f: + h, v, n, q = struct.unpack('<4I', f.read(16)) + flat = rd(f, 'I', 2 * n); core = rd(f, 'Q', n); cover = rd(f, 'Q', n) + roots = rd(f, 'I', q); kind = rd(f, 'I', q); active = rd(f, 'B', n) + with open(str(prefix) + '.labels', 'rb') as f: + ranks = rd(f, 'I', n); types = rd(f, 'B', n) + args = [(flat[2 * i], flat[2 * i + 1]) for i in range(n)] + return h, v, n, q, args, core, cover, roots, kind, active, ranks, types + + +# ---------------------------------------------------------------- F2 linear algebra on bit vectors +def dot(a, b): return bin(a & b).count('1') & 1 + + +def reduce(basis): + rows = []; piv = [] + for vec in basis: + for p, r in zip(piv, rows): + if vec >> p & 1: vec ^= r + if vec: + p = vec.bit_length() - 1 + for i in range(len(rows)): + if rows[i] >> p & 1: rows[i] ^= vec + rows.append(vec); piv.append(p) + return rows + + +def kernel(funcs, h): + K = reduce(funcs); piv = [r.bit_length() - 1 for r in K] + out = [] + for c in (i for i in range(h) if i not in piv): + vec = 1 << c + for r, p in zip(K, piv): + if r >> c & 1: vec |= 1 << p + out.append(vec) + return out + + +def restrict(basis, funcs): + B = reduce(basis) + for f in funcs: + if not B: break + vals = [dot(b, f) for b in B] + if not any(vals): continue + k = vals.index(1); pv = B[k] + B = [b ^ pv if val else b for b, val in zip(B, vals)]; B.pop(k) + return reduce(B) + + +def contains(A, B): + RB = reduce(B) + return len(reduce(RB + list(A))) == len(RB) + + +def cap(A, B): + A = reduce(A); B = reduce(B) + if not A or not B: return [] + ker = []; red = [] + for i, vec in enumerate(A + B): + tag = 1 << i + for rv, rt in red: + if vec >> (rv.bit_length() - 1) & 1: vec ^= rv; tag ^= rt + if vec: red.append((vec, tag)) + else: + comb_ = 0 + for k in range(len(A)): + if tag >> k & 1: comb_ ^= A[k] + ker.append(comb_) + return reduce(ker) + + +def nondeg(B): + B = reduce(B); k = len(B) + if not k: return True + M = [sum(dot(B[i], B[j]) << j for j in range(k)) for i in range(k)] + return len(reduce(M)) == k + + +def hopcroft_karp(left, adj): + """maximum bipartite matching; adj[x] = sorted list of right vertices.""" + INF = 1 << 60 + mate_l = {x: None for x in left}; mate_r = {} + while True: + dist = {}; queue = [] + for x in left: + if mate_l[x] is None: dist[x] = 0; queue.append(x) + else: dist[x] = INF + found = INF; head = 0 + while head < len(queue): + x = queue[head]; head += 1 + if dist[x] >= found: continue + for r in adj[x]: + y = mate_r.get(r) + if y is None: found = min(found, dist[x] + 1) + elif dist[y] == INF: dist[y] = dist[x] + 1; queue.append(y) + if found == INF: break + gained = 0 + for x0 in left: + if mate_l[x0] is not None: continue + stack = [(x0, iter(adj[x0]))]; path = [] + while stack: + x, it = stack[-1] + advanced = False + for r in it: + y = mate_r.get(r) + if (y is None and dist[x] + 1 == found) or (y is not None and dist[y] == dist[x] + 1): + path.append((x, r)) + if y is None: + for xx, rr in path: mate_l[xx] = rr; mate_r[rr] = xx + gained += 1; stack = []; break + stack.append((y, iter(adj[y]))); advanced = True; break + else: + dist[x] = INF; stack.pop() + if path: path.pop() + continue + if not advanced: break + if not gained: break + return mate_l + + +def main(): + with tempfile.TemporaryDirectory(prefix='deferred-stopped-') as work: + prefix = Path(work) / 'complex' + build(24, prefix, central_disjoint=24) + h, v, n, q, args, core, cover, roots, kind, active, ranks, types = load(prefix) + trip = list(combinations(range(h), 3)); require(len(trip) == v, 'triple count') + m = h * h; N = v * v; FULL = (1 << h) - 1 + tmask = [sum(1 << p for p in T) for T in trip] + tid = {T: i for i, T in enumerate(trip)} + + # ------------------------------------------------------------ uses and matching (inherited adjacency) + degree = [0] * n; uses = defaultdict(list); c_add = 0 + for x in range(1, n): + if active[x] and args[x][0]: + c_add += 1 + for pos, y in enumerate(args[x]): degree[y] += 1; uses[y].append(('gate', x, pos)) + for j, x in enumerate(roots): degree[x] += 1; uses[x].append(('root', j)) + def unode(u): return roots[u[1]] if u[0] == 'root' else u[1] + def before(x, u): + y = unode(u) + return (ranks[x], x) < (ranks[y], (n + u[1]) if u[0] == 'root' else y) + def incl(x, y): + tx, ty = types[x], types[y] + if tx == 1 and ty == 1: return not (core[y] & ~core[x]) and not (cover[x] & ~cover[y]) + if tx in (1, 2) and ty == 2: return not (cover[x] & ~cover[y]) + if tx == 1 and ty == 3: return bool(core[x] & core[y]) + if tx == 2 and ty == 3: return not (cover[x] & ~core[y]) + if tx == 3 and ty == 2: return cover[y] == FULL + if tx == 3 and ty == 3: return core[x] == core[y] + return False + left = []; adj = {} + for x in range(1, n): + if not (active[x] and args[x][0]): continue + rs = sorted({(y, k) for y in args[x] for k, u in enumerate(uses[y]) if before(x, u) and incl(x, unode(u))}) + if rs: left.append(x); adj[x] = rs + mate = hopcroft_karp(left, adj) + links = {x: r for x, r in mate.items() if r is not None} + R = c_add + q - len(links) + require((c_add, q, len(links), R) == (70252, 8120, 42694, 35678), + 'selected graph size: additions=%d, roots=%d, matching=%d, roles=%d' % (c_add, q, len(links), R)) + linked_use = {(y, k): x for x, (y, k) in links.items()} + + # ------------------------------------------------------------ root targets, read coefficients, root functionals + target = [None] * q + for j in range(v): target[j] = j + idx = v + for a, b in combinations(range(h), 2): + others = sorted((i for i in range(h) if i not in (a, b)), key=lambda i: ((i ^ 1) in (a, b), i)) + for i in others: target[idx] = tid[tuple(sorted((a, b, i)))]; idx += 1 + centre_of = {} + for j in range(q): + if kind[j]: + miss = FULL & ~cover[roots[j]]; require(bin(miss).count('1') == 1, 'centre cover') + centre_of[j] = miss.bit_length() - 1 + require(idx + len(centre_of) == q, 'root order') + rootfun = [(1 << centre_of[j]) if kind[j] else tmask[target[j]] for j in range(q)] + + # ------------------------------------------------------------ lifted binary frames, monotone + succ = defaultdict(set); droot = defaultdict(set) + for x in range(1, n): + if not active[x]: continue + for k, u in enumerate(uses[x]): + if (x, k) in linked_use: continue + (succ[x].add(u[1]) if u[0] == 'gate' else droot[x].add(u[1])) + for x, (y, k) in links.items(): + u = uses[y][k]; (succ[x].add(u[1]) if u[0] == 'gate' else droot[x].add(u[1])) + order_desc = sorted((x for x in range(1, n) if active[x]), key=lambda x: (ranks[x], x), reverse=True) + K = {} + for x in order_desc: + rows = [rootfun[j] for j in droot[x]] + for t in succ[x]: rows += K[t] + K[x] = reduce(rows) + def envelope(x): + if not args[x][0]: return [tmask[x - 1]] + if types[x] == 2: return [1 << i for i in range(h) if cover[x] >> i & 1] + require(types[x] == 1, 'only ordinary and common-pair labels occur') + ks = [i for i in range(h) if (cover[x] & ~core[x]) >> i & 1] + require(len(ks) == ranks[x], 'common-pair support') + return [core[x] | (1 << k) for k in ks] + U = {} + for x in range(1, n): + if not active[x]: continue + if not args[x][0]: U[x] = envelope(x); continue + B = kernel(K[x], h) + require(contains(envelope(x), B), 'label outside lifted frame') + U[x] = B if nondeg(B) else envelope(x) + changed = True + while changed: + changed = False + for x in order_desc: + if args[x][0] and any(not contains(U[x], U[t]) for t in succ[x]): + env = envelope(x) + if len(reduce(U[x])) != len(reduce(env)) or not contains(U[x], env): U[x] = env; changed = True + dimU = {x: len(reduce(B)) for x, B in U.items()} + + # ------------------------------------------------------------ explicit role compile + order = sorted((x for x in range(1, n) if active[x]), key=lambda x: (ranks[x], x)) + holds = []; first_node = []; ops = []; edge_key = {}; role_root = {} + def new_role(node): holds.append([node]); first_node.append(node); return len(holds) - 1 + def serve(s, y, k): + u = uses[y][k] + if u[0] == 'gate': edge_key[(y, k)] = s + else: role_root[s] = u[1] + for x in order: + free = [k for k in range(len(uses[x])) if (x, k) not in linked_use] + if not args[x][0]: + for k in free: + s = new_role(x); ops.append(('src', s, x)); serve(s, x, k) + continue + a, b = args[x] + ka = next(k for k, u in enumerate(uses[a]) if u == ('gate', x, 0)) + kb = next(k for k, u in enumerate(uses[b]) if u == ('gate', x, 1)) + sa, sb = edge_key.pop((a, ka)), edge_key.pop((b, kb)) + if x in links and links[x][0] == a: sa, sb = sb, sa + piv, oth = sa, sb + ops.append(('add', piv, oth, x)); holds[piv].append(x); holds[oth].append(x) + if x in links: serve(oth, *links[x]) + require(free, 'every use linked at node %d' % x) + serve(piv, x, free[0]) + for k in free[1:]: + f = new_role(x); ops.append(('copy', piv, f, x)); serve(f, x, k) + require(not edge_key and len(holds) == R, 'compile') + Rr = R + + # ------------------------------------------------------------ B. the word computes every root value + rng = random.Random(20261008) + xs = [rng.randrange(P) for _ in range(v)] + val = [0] * n + for i in range(v): val[i + 1] = xs[i] + for x in order: + if args[x][0]: val[x] = (val[args[x][0]] + val[args[x][1]]) % P + leaf_of = {s: first_node[s] for s in range(Rr) if not args[first_node[s]][0]} + a_ = [0] * Rr + for s, leaf in leaf_of.items(): a_[s] = xs[leaf - 1] + for o in ops: + if o[0] == 'add': a_[o[1]] = (a_[o[1]] + a_[o[2]]) % P + elif o[0] == 'copy': a_[o[2]] = (a_[o[2]] + a_[o[1]]) % P + require(all(a_[s] == val[roots[j]] for s, j in role_root.items()), 'root values') + + # ------------------------------------------------------------ phase one and garbage reach + def touch(o): return [o[1], o[2]] if o[0] in ('add', 'copy') else [] + prev = {}; pred = defaultdict(list); last = {} + for i, o in enumerate(ops): + for s in touch(o): + if s in prev: pred[i].append(prev[s]) + prev[s] = i; last[s] = i + centre_roles = [s for s, j in role_root.items() if kind[j]] + Anc = set(); st = [last[s] for s in centre_roles] + while st: + i = st.pop() + if i not in Anc: Anc.add(i); st.extend(pred[i]) + touched = set(centre_roles) + for i in Anc: touched.update(touch(ops[i])) + require(all(last[s] in Anc for s in centre_roles), 'centres complete in phase one') + reach = [set() for _ in range(Rr)]; reach_all = [False] * Rr + for s, j in role_root.items(): + if kind[j]: reach_all[s] = True + else: reach[s].add(target[j]) + for o in reversed(ops): + if o[0] == 'add': reach[o[2]] |= reach[o[1]]; reach_all[o[2]] = reach_all[o[2]] or reach_all[o[1]] + elif o[0] == 'copy': reach[o[1]] |= reach[o[2]]; reach_all[o[1]] = reach_all[o[1]] or reach_all[o[2]] + + # ------------------------------------------------------------ deferral frames, insertion nesting + def F0(s): return U[first_node[s]] + cand = {} + for s in range(Rr): + if s in touched or reach_all[s]: continue + S_ = restrict(F0(s), [tmask[t] for t in reach[s]]) + if S_ and nondeg(S_): cand[s] = S_ + byT = defaultdict(list); placed = {} + for s in sorted(cand, key=lambda s: (-len(cand[s]), s)): + X = cand[s]; changed = True + while changed and X: + changed = False + for t in reach[s]: + for w in byT[t]: + B = placed[w] + if (len(B) >= len(X) and not contains(X, B)) or (len(B) < len(X) and not contains(B, X)): + X = cap(X, B); changed = True + if not X: break + if not X: break + if X and nondeg(X): + placed[s] = X + for t in reach[s]: byT[t].append(s) + deferred = sorted(placed, key=lambda s: (len(placed[s]), s)); dset = set(deferred) + + # ------------------------------------------------------------ C. replay with arbitrary scratch and data + inv = lambda a: pow(a % P, P - 2, P); HALF = inv(2); I21 = inv(21) + cvec = [None] * Rr; dpart = [dict() for _ in range(Rr)] + for s, j in role_root.items(): + if kind[j]: c = [0] * h; c[centre_of[j]] = 1; cvec[s] = c + else: dpart[s][target[j]] = (P - HALF) if j >= v else HALF + seed_c = {s: (None if cvec[s] is None else list(cvec[s])) for s in role_root} + seed_d = {s: dict(dpart[s]) for s in role_root} + def addc(dst, src): + if cvec[src] is not None: + cvec[dst] = list(cvec[src]) if cvec[dst] is None else [(p + q_) % P for p, q_ in zip(cvec[dst], cvec[src])] + for t, c in dpart[src].items(): dpart[dst][t] = (dpart[dst].get(t, 0) + c) % P + for o in reversed(ops): + if o[0] == 'add': addc(o[2], o[1]) + elif o[0] == 'copy': addc(o[1], o[2]) + scatter = [[(I21 - (HALF if i in trip[t] else 0)) % P for t in range(v)] for i in range(h)] + def readout(y, s, value, sign, seed=False): + cv = seed_c[s] if seed else cvec[s]; dp = seed_d[s] if seed else dpart[s] + if cv is not None: + for i, ci in enumerate(cv): + if ci: + f = sign * ci * value % P; row = scatter[i] + for t in range(v): y[t] = (y[t] + f * row[t]) % P + for t, c in dp.items(): y[t] = (y[t] + sign * c * value) % P + phase1 = sorted(Anc); rest = [i for i in range(len(ops)) if i not in Anc] + def replay(seed): + rng = random.Random(seed) + x = [rng.randrange(P) for _ in range(v)]; z = [rng.randrange(P) for _ in range(Rr)] + y0 = [rng.randrange(P) for _ in range(v)]; a = list(z); y = list(y0) + for s in range(Rr): + if s not in dset: readout(y, s, a[s], -1) + for s, leaf in leaf_of.items(): + if s not in dset: a[s] = (a[s] + x[leaf - 1]) % P + def run(i, sign=1): + o = ops[i] + if o[0] == 'add': a[o[1]] = (a[o[1]] + sign * a[o[2]]) % P + elif o[0] == 'copy': a[o[2]] = (a[o[2]] + sign * a[o[1]]) % P + for i in phase1: run(i) + for s in centre_roles: readout(y, s, a[s], +1, True) + for s in deferred: readout(y, s, a[s], -1) + for s in deferred: + if s in leaf_of: a[s] = (a[s] + x[leaf_of[s] - 1]) % P + for i in rest: run(i) + for s, j in role_root.items(): + if not kind[j]: readout(y, s, a[s], +1, True) + for i in reversed(range(len(ops))): run(i, -1) + for s, leaf in leaf_of.items(): a[s] = (a[s] - x[leaf - 1]) % P + return a == z, all((y[t] - y0[t] - x[t]) % P == 0 for t in range(v)) + rep = [replay(seed) for seed in (1, 2)] + require(all(r == (True, True) for r in rep), 'replay %s' % rep) + + # ------------------------------------------------------------ D. exact F2 frame facts + root_frame = {} + for s, j in role_root.items(): + root_frame[s] = [1 << i for i in range(h) if i != centre_of[j]] if kind[j] else kernel([tmask[target[j]]], h) + FULLB = [1 << i for i in range(h)] + chain_dims = [] + for s in range(Rr): + seq = [placed.get(s, []), F0(s)] + [U[x] for x in holds[s][1:]] + if s in root_frame: seq.append(root_frame[s]) + seq.append(FULLB) + require(all(contains(A, B) for A, B in zip(seq, seq[1:])), 'role chain nesting %d' % s) + require(all(nondeg(B) for B in seq[1:-1] if B), 'degenerate frame on role %d' % s) + chain_dims.append([len(reduce(B)) for B in seq]) + for s, X in placed.items(): + require(contains(X, F0(s)) and nondeg(X), 'deferral frame %d' % s) + require(all(not any(dot(xv, tmask[t]) for xv in X) for t in reach[s]), 'target frame %d' % s) + byT2 = defaultdict(list) + for s in deferred: + for t in reach[s]: byT2[t].append(s) + for t, ss in byT2.items(): + ss.sort(key=lambda s: (len(placed[s]), s)) + require(all(contains(placed[p], placed[q_]) for p, q_ in zip(ss, ss[1:])), 'target chain %d' % t) + + # ------------------------------------------------------------ E. one-child histogram + z = Counter() + for s in range(Rr): + ds = chain_dims[s] + for a, b in zip(ds[:-1], ds[1:-1]): + if b > a: z[b - a] += 2 * v + lastd = ds[-2] + if s in role_root and kind[role_root[s]]: z[h - 1] += 2 * v # copied centre transform + z[h - lastd] += 2 * v # final growth to F + z[m - h + ds[0]] += 2 * v # exterior, gauged by sigma + levels = defaultdict(set) + for s in deferred: + for t in reach[s]: levels[t].add(len(placed[s])) + for t in range(v): + ds = sorted(levels[t] | {0, h - 1}) + for a, b in zip(ds, ds[1:]): z[b - a] += 2 * v # target fronts + z[h - 1] += 2 * N # data-wire fronts + z[(h - 1) ** 2] += 2 * N # data macros + z[1] += N # endpoint copies + z.pop(0, None) + W = 2 * N + 2 * v * R; L = 2 * v * h * (h - 1); s_ = W * m - N + L + require(sum(t * c for t, c in z.items()) == s_, 'complex rank mass') + require(all(0 < t < m for t in z), 'children below m') + out = dict(h=h, v=v, additions=c_add, roots=q, links=len(links), R=R, m=m, N=N, W=W, L=L, total_rank=s_, + deficit=N - L, maxchild=max(z), phase_one_ops=len(Anc), phase_one_roles=len(touched), + deferred_roles=len(deferred), + deferred_dims=dict(sorted(Counter(len(X) for X in placed.values()).items())), + lifted_additions=sum(1 for x in U if args[x][0] and dimU[x] > ranks[x]), + replay=dict(seeds=[1, 2], scratch_restored=True, y_plus_x=True, field='Z/(2^61-1)'), + child_multiplicities=dict(sorted(z.items()))) + (HERE / 'complex-profile.json').write_text(json.dumps(out, indent=1) + '\n') + print('PASS complex: R=%d, deferred roles %d, maxchild %d, rank mass %d' % (R, len(deferred), max(z), s_)) + + +if __name__ == '__main__': + main() diff --git a/research/cube-deferred/core_pair_block.py b/research/cube-deferred/core_pair_block.py new file mode 100644 index 0000000000..b80eb8b5cb --- /dev/null +++ b/research/cube-deferred/core_pair_block.py @@ -0,0 +1,47 @@ +"""Core-aware pair assembly within PairedTriple's contracted pair subproblems. + +Adapted from Avi Eisenberg's PR62 interval-strip/core-aware pair producer +(Apache-2.0, Anthropic Claude assistance), on the inherited icekylinx paired +exclusion recursion. This adaptation uses a two-point base case, the caller's +cyclic-strip vector routine, and column-pair coarse sums at every level. +Prepared with OpenAI Codex assistance. All operations remain disjoint sums; +the enclosing producer checks exact supports and binary frame inclusions. +""" +from itertools import combinations + +def block(self,points,edges,weights): + if len(points)<=2: + total=lambda omit:self.total([x for p,x in edges.items()if not set(p)&set(omit)]+[x for p,x in weights.items()if p not in omit]) + return total(()),{a:total((a,))for a in points},{(a,b):total((a,b))for a,b in combinations(points,2)} + groups=self.grouping(points);ng=len(groups);e=lambda a,b:edges[tuple(sorted((a,b)))] + coarse={(i,j):self.total([self.total([e(a,b)for a in groups[i]])for b in groups[j]])for i,j in combinations(range(ng),2)} + wt={i:self.total([weights[a]for a in g]+[e(a,b)for a,b in combinations(g,2)])for i,g in enumerate(groups)} + total,outside,far=self.block(list(range(ng)),coarse,wt) + strips={};sums={} + for i,g in enumerate(groups): + other=[j for j in range(ng)if j!=i] + for a in g: + carry=self.total([weights[u]for u in g if u!=a]) + vals=[self.total([e(u,v)for u in g if u!=a for v in groups[j]])for j in other] + st,one,_=self.vector([carry]+vals,False) + strips[a]={j:z for j,z in zip(other,one[1:])};sums[a]=st + out={};single={a:self.add(outside[i],sums[a])for i,g in enumerate(groups)for a in g} + for i,g in enumerate(groups): + for a,b in combinations(g,2):out[a,b]=outside[i] + for i,j in combinations(range(ng),2): + if len(groups[i])==2 and len(groups[j])==2: + (a,a2),(b,b2)=groups[i],groups[j];F=far[i,j] + Sa,Sa2,Sb,Sb2=strips[a][j],strips[a2][j],strips[b][i],strips[b2][i] + FSa,FSa2=self.add(F,Sa),self.add(F,Sa2) + FSb,FSb2=self.add(F,Sb),self.add(F,Sb2) + Y1=self.add(FSb,Sa);Y2=self.add(FSa,Sb2) + Y3=self.add(FSa2,e(a,b2));Y4=self.add(FSb2,e(a,b)) + out[a,b]=self.add(e(a2,b2),Y1);out[a,b2]=self.add(e(a2,b),Y2) + out[a2,b]=self.add(Y3,Sb);out[a2,b2]=self.add(Y4,Sa2) + else: + for a in groups[i]: + left=self.add(far[i,j],strips[a][j]) + for b in groups[j]: + cross=self.total([e(u,v)for u in groups[i]if u!=a for v in groups[j]if v!=b]) + out[a,b]=self.add(left,self.add(strips[b][i],cross)) + return total,single,out diff --git a/research/cube-deferred/cube115.py b/research/cube-deferred/cube115.py new file mode 100644 index 0000000000..136c0898d6 --- /dev/null +++ b/research/cube-deferred/cube115.py @@ -0,0 +1,93 @@ +# Imported from icekylinx PR115 cf60442983c153a3a0f5272ea4713f99eba13c86; local import adapted. +# Copyright 2026 icekylinx. Apache-2.0. +# Prepared with OpenAI GPT-6 Astra and Codex assistance; see NOTICE. +"""Pair-first cube override of the retained PairedTriple recursion.""" +from itertools import combinations +from collections import defaultdict +from interval115 import IntervalTriple + +def cube_values(self,G,groups,out_coarse,one,two,w): + (a,a2),(b,b2),(c,c2)=[groups[g] for g in G] + def piece(*points): + p=tuple(sorted(points)) + if not p:return out_coarse[G] + if len(p)==1: + u=p[0];omit=tuple(g for g in G if u not in groups[g]);return one[u][omit] + if len(p)==2: + omit=tuple(g for g in G if not set(p)&set(groups[g]));return two[p][omit] + return w.get(p,0) + def plane(z): + val=lambda *p:piece(*(p+(() if z is None else (z,)))) + F=val();Sa,Sa2,Sb,Sb2=[val(x) for x in (a2,a,b2,b)] + e=lambda u,v:val(u,v) + FSa,FSa2,FSb,FSb2=[self.add(F,x) for x in (Sa,Sa2,Sb,Sb2)] + Y1=self.add(FSb,Sa);Y2=self.add(FSa,Sb2) + Y3=self.add(FSa2,e(a,b2));Y4=self.add(FSb2,e(a,b)) + return {(a2,b2):self.add(e(a2,b2),Y1),(a2,b):self.add(e(a2,b),Y2), + (a,b2):self.add(Y3,Sb),(a,b):self.add(Y4,Sa2)} + F=plane(None);V={z:plane(z) for z in (c,c2)} + return {tuple(sorted((u,v,z))):self.add(F[u,v],V[z][u,v]) for u,v in F for z in (c,c2)} + +class CubeTriple(IntervalTriple): + cube_values=cube_values + def triple(self,pts,w): + subsets=[s for k in range(4) for s in combinations(pts,k)] + if len(pts)<=self.base: + return {s:self.total([v for t,v in w.items() if not set(s)&set(t)]) for s in subsets} + groups=self.grouping(pts);ng=len(groups) + group_of={u:i for i,g in enumerate(groups) for u in g} + coarse_parts=defaultdict(list) + for t,v in w.items():coarse_parts[tuple(sorted({group_of[u] for u in t}))].append(v) + coarse={s:self.total(xs) for s,xs in coarse_parts.items()} + out_coarse=self.triple(list(range(ng)),coarse) + # Contract one surviving point and aggregate by the other point groups. + one={} + for u in pts: + g=group_of[u];others=[j for j in range(ng) if j!=g] + pieces=defaultdict(list) + for t,v in w.items(): + if u not in t:continue + rest=[a for a in t if a!=u] + if any(group_of[a]==g for a in rest):continue + pieces[tuple(sorted({group_of[a] for a in rest}))].append(v) + coeff={s:self.total(xs) for s,xs in pieces.items()} + edges={s:coeff.get(s,0) for s in combinations(others,2)} + weights={j:coeff.get((j,),0) for j in others} + total,single,pair=self.block(others,edges,weights) + const=coeff.get((),0) + one[u]={():self.add(const,total)} + one[u].update({(j,):self.add(const,x) for j,x in single.items()}) + one[u].update({s:self.add(const,x) for s,x in pair.items()}) + # Contract two surviving points. The remaining degree is at most one. + two={} + for u,v in combinations(pts,2): + i,j=group_of[u],group_of[v] + if i==j:continue + others=[k for k in range(ng) if k not in (i,j)] + vals=[self.total([w.get(tuple(sorted((u,v,a))),0) for a in groups[k]]) for k in others] + total,leave,_=self.vector([w.get((u,v),0)]+vals,False) + two[u,v]={():total}|{(k,):x for k,x in zip(others,leave[1:])} + + result={};cube_cache={} + for excluded in subsets: + E=set(excluded);G=tuple(sorted({group_of[a] for a in E})) + survivors=[u for i in G for u in groups[i] if u not in E] + assert len(survivors)<=3 + pieces={():out_coarse[G]} + for u in survivors: + omit=tuple(i for i in G if i!=group_of[u]) + pieces[u,]=one[u][omit] + for u,v in combinations(survivors,2): + omit=tuple(i for i in G if i not in (group_of[u],group_of[v])) + pieces[u,v]=two[u,v][omit] + if len(survivors)==3:pieces[tuple(survivors)]=w.get(tuple(survivors),0) + if len(survivors)==3 and all(len(groups[g])==2 for g in G): + if G not in cube_cache:cube_cache[G]=self.cube_values(G,groups,out_coarse,one,two,w) + result[excluded]=cube_cache[G][tuple(sorted(survivors))] + continue + if len(survivors)==3: + a,b,c=survivors + order=[(),(a,),(b,),(a,b),(c,),(a,c),(b,c),(a,b,c)] + else:order=[s for k in range(len(survivors)+1) for s in combinations(survivors,k)] + result[excluded]=self.total([pieces[s] for s in order]) + return result diff --git a/research/cube-deferred/inputs/deferred_23.json.gz b/research/cube-deferred/inputs/deferred_23.json.gz new file mode 100644 index 0000000000..4a4431bd42 Binary files /dev/null and b/research/cube-deferred/inputs/deferred_23.json.gz differ diff --git a/research/cube-deferred/inputs/witness_23.json.gz b/research/cube-deferred/inputs/witness_23.json.gz new file mode 100644 index 0000000000..3d86f83b87 Binary files /dev/null and b/research/cube-deferred/inputs/witness_23.json.gz differ diff --git a/research/cube-deferred/interval115.py b/research/cube-deferred/interval115.py new file mode 100644 index 0000000000..980555b0ab --- /dev/null +++ b/research/cube-deferred/interval115.py @@ -0,0 +1,71 @@ +# Imported from icekylinx PR115 cf60442983c153a3a0f5272ea4713f99eba13c86; local import adapted. +# Copyright 2026 icekylinx. Apache-2.0. +# Prepared with OpenAI GPT-6 Astra and Codex assistance; see NOTICE. +"""Cyclic intervals and core-aware pairs, adapted from Avi Eisenberg PR62.""" +from pathlib import Path +from itertools import combinations +import sys +from paired_triple_circuit import PairedTriple +from paired_exclusion_circuit import PairedExclusionCircuit + +def interval_sums(add,values): + nz=[(i,x) for i,x in enumerate(values) if x] + n=len(nz) + if not n:return 0,[0]*len(values) + if n==1: + result=[nz[0][1]]*len(values);result[nz[0][0]]=0 + return nz[0][1],result + v=[x for _,x in nz];states={(a,1):x for a,x in enumerate(v)} + for length in range(2,n): + for a in range(n):states[a,length]=add(states[a,length-1],v[(a+length-1)%n]) + total=add(states[0,n-1],v[-1]) + out=[total]*len(values) + for j,(i,x) in enumerate(nz):out[i]=states[(j+1)%n,n-1] + return total,out + +class IntervalTriple(PairedTriple): + def vector(self,values,two=True): + if two:return super().vector(values,two) + total,one=interval_sums(self.add,values) + return total,one,{} + + def block(self,points,edges,weights): + if len(points)<=2: + return PairedExclusionCircuit.block(self,points,edges,weights) + groups=self.grouping(points);ng=len(groups) + edge=lambda a,b:edges[tuple(sorted((a,b)))] + coarse={(i,j):self.total([edge(a,b) for a in groups[i] for b in groups[j]]) + for i,j in combinations(range(ng),2)} + wt={i:self.total([weights[a] for a in g]+[edge(a,b) for a,b in combinations(g,2)]) + for i,g in enumerate(groups)} + total,outside,far=self.block(list(range(ng)),coarse,wt) + strips={};sums={} + for i,g in enumerate(groups): + other=[j for j in range(ng) if j!=i] + for a in g: + carry=self.total([weights[u] for u in g if u!=a]) + vals=[self.total([edge(u,v) for u in g if u!=a for v in groups[j]]) for j in other] + st,one=interval_sums(self.add,[carry]+vals) + strips[a]={j:z for j,z in zip(other,one[1:])};sums[a]=st + out={};single={a:self.add(outside[i],sums[a]) for i,g in enumerate(groups) for a in g} + for i,g in enumerate(groups): + for a,b in combinations(g,2):out[a,b]=outside[i] + for i,j in combinations(range(ng),2): + if len(groups[i])==len(groups[j])==2: + (a,a2),(b,b2)=groups[i],groups[j] + F=far[i,j];Sa,Sa2,Sb,Sb2=strips[a][j],strips[a2][j],strips[b][i],strips[b2][i] + FSa,FSa2=self.add(F,Sa),self.add(F,Sa2) + FSb,FSb2=self.add(F,Sb),self.add(F,Sb2) + Y1=self.add(FSb,Sa);Y2=self.add(FSa,Sb2) + Y3=self.add(FSa2,edge(a,b2));Y4=self.add(FSb2,edge(a,b)) + out[a,b]=self.add(edge(a2,b2),Y1) + out[a,b2]=self.add(edge(a2,b),Y2) + out[a2,b]=self.add(Y3,Sb) + out[a2,b2]=self.add(Y4,Sa2) + else: + for a in groups[i]: + left=self.add(far[i,j],strips[a][j]) + for b in groups[j]: + cross=self.total([edge(u,v) for u in groups[i] if u!=a for v in groups[j] if v!=b]) + out[a,b]=self.add(left,self.add(strips[b][i],cross)) + return total,single,out diff --git a/research/cube-deferred/producer.py b/research/cube-deferred/producer.py new file mode 100644 index 0000000000..03831b4e4f --- /dev/null +++ b/research/cube-deferred/producer.py @@ -0,0 +1,276 @@ +# Cube recurrence from icekylinx PR115 composed with eumemic PR114 core pairs and Rohan Arun PR111 pair stars. +# Cyclic-strip recursion plus dual-suffix pair stars, by Rohan Arun with Anthropic Claude assistance. +# Parent: PR107 (Rohan Arun with OpenAI Codex) on icekylinx PR104 at 854ba7dca98651eab2050402384e1a7784534f0a. +# Pair-star leave-one-out identity: PR55 dual-suffix strips (credited there). +# Original copyright, Apache-2.0 notice and scalar/frame assertions retained. +"""Aligned h=24 rational-center producer with cyclic strips and core-aware pairs. + +PR111's cyclic-strip PairedTriple recursion and dual-suffix pair stars are +retained. Contracted pair subproblems use core_pair_block.py: PR62's core-aware +four-output assembly, two-point base cases, and balanced column coarse sums. +All ordinary-support, exact rational-scatter, center, and binary-frame +assertions from PR111/PR104 remain enabled. + +Copyright 2026 icekylinx and the credited contributors, Apache-2.0. PR111 by +Rohan Arun with Anthropic Claude assistance; PR62 pair assembly by Avi +Eisenberg with Anthropic Claude assistance. This integration was prepared +with OpenAI Codex assistance. See the inherited NOTICE and source credits. +""" +import json, struct, array +from itertools import combinations +from pathlib import Path +from partial_swap.binary import write_array +from cube115 import CubeTriple as PairedTriple +from exclusion_circuit import ExclusionCircuit + + +def cyclic_vector(self,values,two=True): + """Leave-one-out by cyclic interval strips (PR62 idea): I(a,m)=I(a,m-1)+v_(a+m-1). + + Used for every strip of the PairedTriple recursion; leave-two-out vectors are unchanged. + Zero entries are omitted (their leave-one-out value is the total), exactly as before.""" + if two:return ExclusionCircuit.vector(self,values,two) + vals=list(values);n=len(vals) + if n==0:return 0,[],{} + nz=[i for i,x in enumerate(vals) if x] + if not nz:return 0,[0]*n,{} + if len(nz)==1: + x=vals[nz[0]];return x,[0 if i==nz[0] else x for i in range(n)],{} + v=[vals[i] for i in nz];k=len(v) + if k<3: + tot=self.add(v[0],v[1]);one=[v[1],v[0]] + else: + full=(1<