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/deferred-cyclic/PROOF.md b/research/deferred-cyclic/PROOF.md new file mode 100644 index 0000000000..c4c239301e --- /dev/null +++ b/research/deferred-cyclic/PROOF.md @@ -0,0 +1,122 @@ +# Deferred readouts on both networks of the stopped product-ring interchange + +## 1. Claim + +Under every hypothesis that PR #104 retains, the stopped product-ring interchange with + +- the bit network replaced by Swapnil Jain's round-seven deferred word (h = 23), and +- PR #104's own complex network (h = 24) given lifted binary frames and deferred readouts, + +gives the conditional bound T(n) = O(n (log n)^(1-κ)) with + +κ = 429239/5000000000 = 8.58478 × 10^-5, + +which is +10.1% over PR #104 (7.79476 × 10^-5). The next κ grid point at denominator 10^10 is rejected. +This is a finite conditional certificate only. + +| | PR #104 | here | +|---|---|---| +| bit network | positive-label producer, R = 38,776 | Swapnil round seven, R = 28,866, 11,565 deferred slots | +| coarse bit saving | 4019/50000000 = 8.038e-5 | 620523/5000000000 = 1.241046e-4 | +| stopped bit saving | 8.034e-5 | 1.240190e-4 | +| complex network | aligned rational centres, R = 44,918 | same DAG and roles, lifted frames, 8,893 deferred roles | +| complex saving | 1949/25000000 = 7.796e-5 | 214657/2500000000 = 8.58628e-5 | +| κ | 7.79476e-5 | 8.58478e-5 | + +## 2. What changes + +Nothing in PR #104's interface changes: opposite-bank factorization, stopped atom recursion, ordinary +wrapper, rational centres, common odd grid, product rows and the balanced assembly are used as they are. +Two finite inputs change. + +**Bit network.** Swapnil Jain's round-seven witness (commit 741e7aa078392553815df7926ee17ac5e25a8c38, files pinned by SHA-256 in +`bit_round7.py`): PR #62's producer, lifted frames, late copies, deferred readouts and V leaves. Swapnil's own +checkers verify the word and every frame exactly, and PR #97 replays its forward and reflected ledgers. We do not +change it. Under PR #104's rule every residual of rank r is one child of width r, so the slot chains, the gauged +exteriors (width m - (h - dim σ_u)), the copied-centre transforms, the target and data-wire chains, the data +residuals and the endpoint copies give the child list in `bit-profile.json` (rank mass 57,403,754,177, the +value PR #97 reports). + +**Complex network.** PR #104's DAG (`scripts/stopped_product/complex.py`, unchanged) and its role count +R = c + q - |M| = 45,764 + 8,120 - 8,966 = 44,918. New: + +1. *Matching.* A maximum carrier matching under the inherited matcher's adjacency (order by rank and node, the + inherited label-inclusion rules), size 8,966. +2. *Roles.* An explicit compile: one role per free leaf use, the pivot continues each addition, copies serve the + other free uses, a linked operand stays on the non-pivot and continues to its linked use. +3. *Lifted frames.* For an addition n, U_n is the common kernel over F2 of the functionals of every root reachable + along slot successors (t_S for an output read into y_S, e_i for the retained centre A_i, whose frame is + span{e_j : j ≠ i}). Every label lies in its kernel (outputs have even intersection with their target; A_i + avoids i). The lift is used where U_n is nondegenerate and kept monotone along successors; elsewhere the + inherited label stays. 20,234 additions are lifted. +4. *Deferred readouts* (Swapnil's design B on the complex word). Phase one is the closure of the 24 centre + completions under per-role precedence. A role untouched by phase one, whose garbage does not reach a centre + (a centre scatters to every target), reads its garbage out at + σ_u ⊆ F0(u) ∩ ⋂ t_S^⊥ over its reached targets, nondegenerate. An insertion rule (largest first) shrinks each + new frame only as far as nesting on its targets requires. Readouts run in increasing (dim σ_u, role). + +The stage-one word is: readouts of the non-deferred roles at frame 0, early V gates, phase one, centre copies +read into their targets, deferred readouts in order, deferred V gates, the rest of L, output reads, L^-1, V^-1. +The readout coefficients come from the transpose sweep of L applied to the root reads (output reads ±1/2, centre +scatter 1/21 - [i ∈ S]/2); their only odd denominator is PR #104's 21. + +## 3. What is checked (`complex_deferred.py`) + +- **A.** Matching size 8,966 and R = 44,918. +- **B.** With zero scratch the compiled word computes every one of the 8,120 root values. +- **C.** The deferred word, replayed over Z/(2^61 - 1) with arbitrary scratch and data (two seeds), restores every + role and adds exactly x_S to every target. +- **D.** Exactly over F2: every role chain (start σ_u or 0, start frame, every gate, linked continuations, root + frame, F) is nested; every lifted and deferral frame is nondegenerate; every σ_u lies in its start frame and in + t_S^⊥ for each reached target; on every target the deferral frames are nested in readout order. +- **E.** The one-child histogram from the explicit role chains has total rank W m - N + L = 109,450,358,336, + every child is below m = 576 (the largest is 574). + +`certificate.py` recomputes both moments exactly with PR #104's routines, the stopped bit saving +(1 - 1/1000)·coarse + (1/1000)·384599/10^10, the finite bridge and the 47-constraint assembly. + +## 4. Endpoints, stage two and the bridge + +- *Endpoints.* A deferred auxiliary role starts at the gauge of σ_u and ends at the complementary gauge, so its + endpoint action is the identity shear on arbitrary inputs: the bit identity D_{I-P} D_P = D_I and its phase + analogue, the translated source C_{D_0} with sink C_I C_{D_0} of `notes/copied-centers-complex.tex` and + `notes/endpoint-gauge-complex.tex` (PR21/PR24). Its exterior residual has rank m - h + dim σ_u. +- *Stage two.* As in Swapnil's round seven and PR #104's two-stage counts, stage two is the complement time + reversal of stage one with the same edge multiset. PR #97 replays the reflected ledger for the bit word; for the + complex deferred word this is stated here, not machine-checked. +- *Bridge.* The larger children (bit 528 of 529, complex 574 of 576) raise the halving degrees to 367 and 200, + so the product-row stock becomes p^33000 (PR #104 used p^4000; PR29 p^47000). As in PR #104, the stock enters + only the row-product slack and the eventual cutoffs, not κ. The semantic induction 2B(m - r) ≥ s + E holds. + +## 5. Scope + +All of PR #104's inherited hypotheses remain: the opposite-bank factorization for every residual class in the +finite lists (including the new gauged exteriors, deferral starts and target levels on both networks, and the +binary one-child normal form on the complex side), atom streaming and the ordinary wrapper, the common exact grid, +routing, recovery, the fixed-tape transfer and the analytic interfaces. The stage-two statement above is the one +new written assumption for the complex network. No global optimality is claimed. + +## 6. Credits + +- **icekylinx**: PR #104's stopped product-ring interchange, opposite-bank factorization, rational centres and the + h = 24 complex producer used unchanged; PR #10/#18/#24/#32/#36 lineage. +- **Swapnil Jain**: deferred readouts (design B), V leaves, lifted frames, late copies and the round-seven bit + witness used unchanged (https://github.com/Swapnil-jain/integer-mult-kappa, commit + 741e7aa078392553815df7926ee17ac5e25a8c38). +- **Zhihao Chen (jacklightChen)**: PR #97's integration of the deferred bit word and its reflected ledgers; + PR21/PR29 translated gauges and two-stage accounting. +- **Aurel Prosz (Paureel)**: the two-stage topology and paid endpoint correction. +- All earlier authors credited in PR #104's NOTICE and SOURCES.json, including Avi Eisenberg/ikeboy (PR #53, #62, + whose producer is the round-seven bit DAG), RaD/hipotures, Rohan Arun, eumemic, Dominik Scholz, Chafik + Boukhalfa, James Chang and Douglas Colkitt. + +The complex deferral construction, its checks and this certificate were prepared by Avi Eisenberg (ikeboy) with +Anthropic Claude assistance. + +## Addendum: cyclic-strip complex DAG (research/deferred-cyclic) + +The construction and checks above are applied verbatim to the complex DAG of `cyclic_producer.py` +instead of `scripts/stopped_product/complex.py`. That producer changes only the order in which the same +cancellation-free sums are added (cyclic interval strips in the PairedTriple recursion; dual-suffix pair +stars), and asserts every exact support, center coefficient, rational scatter coefficient and binary frame +nesting as PR #104 does. All statements of this file therefore apply with R = 38,506 and 5,887 deferred roles. diff --git a/research/deferred-cyclic/README.md b/research/deferred-cyclic/README.md new file mode 100644 index 0000000000..041514c007 --- /dev/null +++ b/research/deferred-cyclic/README.md @@ -0,0 +1,52 @@ +# Deferred readouts on the cyclic-strip complex network + +Validation complete: full repository verification (78 isolated test modules and 20 historical patch checks), fresh bit/complex producer replay, and corrected expanded-charge certificate replay passed. All 36 research-head CI checks passed. Coverage combines the original full run at `4dcb515` with the narrowly corrected certificate at `070b4d6`; see `validation.json` for both commits, logs and source-drift checks. + +Conditional κ = 469537/5000000000 = **9.39074 × 10^-5** — **+9.39% over PR #110** (429239/5·10^9) +and +9.47% over the cyclic-strips witness (1715630240171/2·10^16). + +PR #110 showed that, under PR #104's one-child-per-residual rule, deferred readouts pay on both stopped +networks; its binding side was the complex network built on PR #104's unchanged h = 24 DAG (44,918 roles). +This witness runs **exactly PR #110's deferral pipeline** (maximum carrier matching under the inherited +adjacency, explicit role compile, lifted binary frames, deferred readouts, replay with arbitrary scratch, +exact F2 frame checks) on a smaller complex DAG: + +- PairedTriple strips use **cyclic interval strips** (PR #62's construction), and pair stars use the + **dual-suffix** identity of PR #108 (from PR #55), with PR #104's coordinate order — `cyclic_producer.py`, + identical to `research/cyclic-strips-both-axes/producer.py` on the PR #108→cyclic-strips branch. + +| h = 24 complex network | PR #110 | this | +|---|---:|---:| +| matched carriers | 8,966 | 37,802 | +| roles R | 44,918 | **38,506** | +| deferred roles | 8,893 | 5,887 | +| complex saving (binding) | 214657/2.5·10^9 = 8.58628e-5 | **939253/10^10 = 9.39253e-5** | +| κ | 8.58478e-5 | **9.39074e-5** | + +The bit side is PR #110's unchanged one-child profile of Swapnil Jain's round-seven deferred word +(`bit-profile.json`, stopped saving 1.24019e-4), so the complex side still binds. + +## Reproduce + +```sh +python3 research/deferred-cyclic/complex_deferred.py # ~2 min; writes complex-profile.json +python3 research/deferred-cyclic/bit_round7.py DIR # optional; as in PR #110 (Swapnil's two files) +python3 research/deferred-cyclic/certificate.py # exact moments, next-grid rejections, 47 constraints, kappa +``` + +`certificate.py` rejects the next grid point of the coarse bit saving, the complex saving and κ, checks +all 47 strict constraints and seven margins, and requires κ above PR #110 and the cyclic-strips witness. +Scope, assumptions and the stated-but-not-machine-checked steps are exactly those of PR #110 (see PROOF.md); +the only new input is the complex DAG, whose scalar supports, centers, rational scatter and frame nesting +are asserted by its producer and re-checked by the deferral pipeline. + +Credit: Avi Eisenberg (PR #110 deferral on stopped networks, PR #62 interval strips), Swapnil Jain (deferred +readouts, round-seven word), icekylinx (PR #104), the PR #55 dual-suffix authors, PR #107–#109, and all +predecessors credited in PR #104's NOTICE/SOURCES. Composition by Rohan Arun with Anthropic Claude assistance. + + +### Expanded scalar-work charge (PR114 accounting correction) + +The initial inherited PR110 certificate counted the original addition DAG when forming its scalar guard. Deferred readouts expand into additional operations, so that charge was insufficiently justified. Following eumemic's PR114, the certificate now conservatively charges the literal expanded forward, inverse and reflected words. A local row has at most c+R mixer operations, R leaf copies, and R+q readouts with at most h center and v direct coefficients each. The bound 8(c+2R+(R+q)v(h+1)+h²+h+1), applied to both sets of v rows plus the data term, covers these operations and copies. It raises G from 2,019,773,888 to 76,407,506,746,560. Precision constants and eventual cutoffs increase; the physical profiles, strict savings and κ=9.39074e-5 are unchanged. All 47 inequalities, seven margins and next-grid exclusions are recertified with the enlarged guard. Credit: eumemic, PR114 commit51cd8934128be37830981ca391d3d6fd28b0fce8, OpenAI Codex assistance. + +The already-running full suite tests the preceding fingerprint-repaired head. Its receipt must identify that head and a separate corrected-certificate replay; it must not represent the old certificate as including this correction. diff --git a/research/deferred-cyclic/bit-profile.json b/research/deferred-cyclic/bit-profile.json new file mode 100644 index 0000000000..36105e819a --- /dev/null +++ b/research/deferred-cyclic/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/deferred-cyclic/bit_round7.py b/research/deferred-cyclic/bit_round7.py new file mode 100644 index 0000000000..56f972277b --- /dev/null +++ b/research/deferred-cyclic/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 (not vendored; 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/deferred-cyclic/certificate.json b/research/deferred-cyclic/certificate.json new file mode 100644 index 0000000000..3db94749a9 --- /dev/null +++ b/research/deferred-cyclic/certificate.json @@ -0,0 +1,179 @@ +{ + "assembly": { + "absorption_gap": "15683049761463852811481159964139/250046962552332911699743494696265000000000", + "margins": { + "Gaussian_arithmetic": "5635656242379362243777660051301060747/40007514008373265871958959151402400000000", + "bulk_exposure": "939251060747/10000000000000000", + "compact_phase_layer": "4696255162847341827201060747/50009392510466582339948698939253", + "coordinate_movement": "939251060747/10000000000000000", + "dimension": "49999999500000000000000000000000/50009392510466582339948698939253", + "original_prefix": "469675525677244649302446023398939253/5000939251046658233994869893925300000000", + "scalar_work": "7514358363873361492376811453701060747/40007514008373265871958959151402400000000" + }, + "minimum_margin": "4696255162847341827201060747/50009392510466582339948698939253", + "parameters": { + "C0": 15022913811375457949052070190572587288411606467952484920782007528618473720810681293432946688, + "C1": 1, + "a_bit": "939251060747/10000000000000000", + "a_complex": "939253/10000000000", + "actual_bit_saving": "1240189553/10000000000000", + "alpha_squared_power": "7044632814714840887950000000/50009392510466582339948698939253", + "beta": "1/1000000", + "c": "4696255256772446023398939253/50000000000000000000000000000000", + "delta": "1/800000000", + "epsilon": "49999999500000000000000000000000/50009392510466582339948698939253", + "eta": "1/100000000", + "kappa": "469537/5000000000", + "lambda_": "999906074894864551060747/1000000000000000000000000", + "lambda_prime": "499953037447901901060747/500000000000000000000000", + "q": "46962552098098939253/500000000000000000000000", + "sigma": "9999060747/10000000000", + "tau": "9999060748939253/10000000000000000" + }, + "recurrence": { + "internal": "9999060748939253/10000000000000000", + "leaf": "9999060747939253/10000000000000000", + "reservations": "49995303744743227553976601060747/50000000000000000000000000000000" + }, + "strict_constraints": { + "Gaussian_arithmetic_above_kappa": "46966365534736265405831532267166375231/1000187850209331646798973978785060000000000", + "K_dominates_log": "469625520980989345567447901901060747/5000939251046658233994869893925300000000", + "K_geometry": "469675525677244649302446023398939253/5000939251046658233994869893925300000000", + "alpha_below_one": "50002347877651867499060748939253/50009392510466582339948698939253", + "alpha_below_one_fourth": "49981213979207722976396898939253/200037570041866329359794795757012", + "alpha_positive": "7044632814714840887950000000/50009392510466582339948698939253", + "artificial_boundary": "280061991119098228464453690022672901060747/40007514008373265871958959151402400000000", + "beta_below_one": "999999/1000000", + "beta_positive": "1/1000000", + "bit_positive": "939251060747/10000000000000000", + "bulk_exposure_above_kappa": "177060747/10000000000000000", + "c_below_one": "49995303744743227553976601060747/50000000000000000000000000000000", + "c_positive": "4696255256772446023398939253/50000000000000000000000000000000", + "cell_above_band": "49997651122348132500939251060747/100018785020933164679897397878506", + "compact_leaf": "50939251060747/500000000000000000000000", + "compact_phase_layer_above_kappa": "15683049761463852811481159964139/250046962552332911699743494696265000000000", + "compact_reservations": "46962552098098939253/50000000000000000000000000000000", + "complex_above_bit": "1939253/10000000000000000", + "complex_below_one_over32": "311560747/10000000000", + "coordinate_movement_above_kappa": "177060747/10000000000000000", + "delta_below_one_eighth": "99999999/800000000", + "delta_positive": "1/800000000", + "dimension_above_kappa": "249976516239868813052327847507746159964139/250046962552332911699743494696265000000000", + "epsilon_below_one": "9393010466582339948698939253/50009392510466582339948698939253", + "epsilon_positive": "49999999500000000000000000000000/50009392510466582339948698939253", + "gamma_sublinear": "2348377651867499060748939253/50009392510466582339948698939253", + "guard_width": "9393010466582339948698939253/50009392510466582339948698939253", + "lambda_above_internal": "939251060747/1000000000000000000000000", + "lambda_above_sigma": "194864551060747/1000000000000000000000000", + "lambda_above_tau": "939251060747/1000000000000000000000000", + "lambda_prime_above_lambda": "939251060747/1000000000000000000000000", + "lambda_prime_below_one": "46962552098098939253/500000000000000000000000", + "leaf_saving_above_bit": "1/10000000000", + "literal_scalar_guard": "28548997130583450920923546727679071726255036", + "original_prefix_above_kappa": "2516152675284792969808916106926789/250046962552332911699743494696265000000000", + "phase_boundary": "5635656242379362243777660051301060747/40007514008373265871958959151402400000000", + "phase_local": "7514358363873361492376811453701060747/40007514008373265871958959151402400000000", + "prime_interval_packing": "9393010466582339948698939253/50009392510466582339948698939253", + "q_below_internal": "939251060747/500000000000000000000000", + "q_below_leaf": "50939251060747/500000000000000000000000", + "q_below_reservations": "46962552098098939253/50000000000000000000000000000000", + "q_positive": "46962552098098939253/500000000000000000000000", + "record_suffix": "9393010466582339948698939253/50009392510466582339948698939253", + "row_product_gap": "21189/25", + "scalar_work_above_kappa": "93933918572086246620810317327166375231/1000187850209331646798973978785060000000000", + "short_record_fallback": "499953023625037231185237307367167744066034198009/500093925104665823399486989392530000000000000000", + "small_field_exposure": "4696755303734998121497878506/50009392510466582339948698939253" + } + }, + "base": "PR110 head 09775e9f3fbf1900175010bcd0c3d6d1dbf65ffe (PR104 854ba7d); complex DAG from PR108/cyclic-strips-both-axes", + "bit": { + "coarse_saving": "620523/5000000000", + "counts": { + "R": 28866, + "W": 108516254, + "deferred_slots": 11565, + "h": 23, + "m": 529, + "maxchild": 528, + "total_rank": 57403754177, + "v": 1771 + }, + "moment_gap": "210811394225115117568018038513239592855337768061996351784199300828041381607148420475711921673436778332750996651783152394205578153858435663243959795913385215868392831844509655226993164072062830500832781615792327068936897853818968534771730481866850519439187068953062899333771640996075361901014500735179763112430083120460814689994116646689670445286414265265018468311435502209195246240538069975559360544007937885404793780372701951022292660282948582656517071290400479729799954952580125532795274568021525151839594883237275569314958070368193662075730567130277424969924134425921633872848924585639423998410253779062359718371205767101510073996880454144801457072151080008705648366603197414406872289670642046369219405455128737300640897667220951127018547660455087533581513233999285275099394371781290865408274484542745086391849285198194905751058992419590161634431610100995441112613134240446609058758039909343152776920263419910572835208525277494067408376961456317/225678505065634612156474913616400633538202019254665477026878220214422133931127460164253533068001699469116755578965090566731480236912032281717920888140691998261537790258547549397061712443744511202265657747547567084090291301783866427704803156891369853685579999500594559805069402727752752227038426964007028952158078563045054314475625278140097385695241851533235641996467089273692960018822280793234080014352234618229252999217015923728814468917104222554059646947960375336061268431587018084270516494408656203498548153054913267707164839939006583338918817922618882667407408888179421052689449193499742148706302504238261936554897181289081072466758282367100305194479622149878636307463869297507337915811001244472279386614413535081936912313821531543735588465392499062010570720287729070905437080967709221039366272598541269000920375996285867953823816142239661027100714288630069735295241672325865922423925213948613346461034734632365263739073012128769510020000000000000000000000", + "stopped_saving": "1240189553/10000000000000" + }, + "complex": { + "counts": { + "R": 38506, + "W": 164065440, + "deferred_roles": 5887, + "h": 24, + "m": 576, + "maxchild": 574, + "total_rank": 94499831360, + "v": 2024 + }, + "moment_gap": "264166165413930039794467184447860861980207371359605777564380981808347363368305361536090397093209579096903118290238055740659890487274015068582855512900750021792628061277915653824167902190321308510193048405654217469487792565616239605165779733475846707303424576396792812088820671273414898567530606465638360122565850371693440589454299690395253124563935458640078880680381198340059876851663555113985921675247090123675436750978632122431917940084154597420976850664605737068346240313383788202444634963254765092425923855409903142571946358629473159407138032841688971414715214657108569751343502645442424264821452152764090349530773148819688071955272907712063278140697074521413082751365164987400057286741854298952482951533225121143412340365272982485857977450079431660024819982359086847992816278029059095240491805674673445463716579260726199167715530730678154652496075906063775481380722644510900478661618887110960651505500447590421867767/177319377246052430964425814933843400547456228900072148004710447718085338175208405916344712878030718988130633802738677427248769518329659174734776430984330241743260574266687656484454631589812774839408363956051167337379758510725158653511907021954692743802224445859078314441817907563726249348492712931115356140547183349917861051130320644894337899119482065483977308807626671592343198824089473788132230611452891027922954581236706631103045328921693992793581840395218641175381141971865816106517832528940138851982016998341285500161518556263324854925302598651249993097098390189381208794677540737399993309601538548221190323834330401899527414429030803685768556077583570654765747831999053450896137164390033583730336754387353445927980402095307866970963118305627443184839884673552292294183570845745541537334350033229693629634745883957249455965832880831429421162512093201695842645314438024220154621637109085719965930975348211200000000000000000000000", + "saving": "939253/10000000000" + }, + "finite_bridge": { + "bit_coarse": { + "W": 108516254, + "halving_degree": 367, + "m": 529, + "maxchild": 528, + "wire_bits": 27 + }, + "complex": { + "W": 164065440, + "halving_degree": 200, + "m": 576, + "maxchild": 574, + "s": 94499831360, + "scalar_group_upper": 76407506746560, + "scalar_terms": [ + { + "R": 38506, + "c": 68188, + "description": "Expanded deferred readouts and forward/inverse/reflected words", + "h": 24, + "invocations": 2024, + "local_group_upper": 18875371208, + "q": 8120, + "v": 2024 + }, + { + "R": 38506, + "c": 68188, + "description": "Expanded deferred readouts and forward/inverse/reflected words", + "h": 24, + "invocations": 2024, + "local_group_upper": 18875371208, + "q": 8120, + "v": 2024 + } + ], + "wire_bits": 28 + }, + "ordinary_leaf_row_degree": 252, + "rows": { + "coefficient": 15761, + "contract": "W_complex^D_complex * W_coarse^D_coarse * W_old^D_old; one preceding prefix and one padding; sequential reuse", + "degree": 33000, + "degree_gap": "21189/25", + "suffix_slope": 132000 + }, + "semantic": { + "B": 28548997130587564314251222139612252013049472, + "C0": 15022913811375457949052070190572587288411606467952484920782007528618473720810681293432946688, + "C1": 1, + "E": 28548997130587564314251222139612157513218112, + "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": 85646991391762692942753666418836756039148416, + "literal_charge": 4113393327675411933085786963076, + "strict_literal_gap": 28548997130583450920923546727679071726255036 + } + }, + "kappa": "469537/5000000000", + "status": "Conditional witness: deferred readouts on both networks of the stopped product-ring interchange" +} diff --git a/research/deferred-cyclic/certificate.py b/research/deferred-cyclic/certificate.py new file mode 100644 index 0000000000..515f512b62 --- /dev/null +++ b/research/deferred-cyclic/certificate.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python3 +"""Exact certificate: deferred readouts on both networks of PR104's stopped product-ring interchange. + +Inputs (regenerated by the two scripts in this directory): + bit-profile.json Swapnil Jain's round-seven deferred bit word, one child per residual (bit_round7.py); + complex-profile.json cyclic-strip / dual-suffix h=24 complex network with lifted binary frames and deferred readouts + (complex_deferred.py). +Computes, with PR104's inherited exact routines: the largest coarse bit saving and complex saving on the +10^-10 grid with a contracting moment, the stopped ordinary bit saving (PR104 stopping at theta = 1/1000), +the finite semantic/product-row bridge (row stock raised as the larger children require; it enters only the +row slack and cutoffs) and the 47-constraint balanced assembly at the largest kappa on the 10^-10 grid. +Usage: python3 research/deferred-cyclic/certificate.py (writes certificate.json) +Prepared by Avi Eisenberg (ikeboy) with Anthropic Claude assistance. Apache-2.0. +""" +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 # noqa: E402 +from copied_centers_network import finite_bridge as copied_bridge # noqa: E402 +from structured_bulk_assembly import assembly, js # noqa: E402 + +GRID = 10**10 +ATOM = Q(1, 1000) # PR104 stopping exponent theta +OLD = Q(384599, 10**10) # PR104 retained ordinary leaf saving +PHASE_STOP = Q(1, 10**6) # PR104 beta + + +def require(ok, msg): + if not ok: + raise SystemExit('FAIL: ' + msg) + + +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'] + require(sum(t * c for t, c in z.items()) == p['total_rank'] == p['W'] * p['m'] - p['N'] + p['L'], name + ' rank mass') + require(all(0 < t < p['m'] and c > 0 for t, c in z.items()), name + ' children') + require(max(z) == p['maxchild'], name + ' maxchild') + return p + + +def contracts(p, a): + try: + moment(p['m'], p['W'], p['child_multiplicities'], a, True) + return True + except SystemExit: + return False + except Exception: + return False + + +def largest(p, lo, hi): + a, b = int(lo * GRID), int(hi * GRID) + require(contracts(p, Q(a, GRID)) and not contracts(p, Q(b, GRID)), 'bracket') + while b - a > 1: + mid = (a + b) // 2 + a, b = (mid, b) if contracts(p, Q(mid, GRID)) else (a, mid) + return Q(a, GRID) + + +def main(): + bit, phase = profile('bit-profile.json'), profile('complex-profile.json') + coarse = largest(bit, Q(7, 10**5), Q(2, 10**4)) + ac = largest(phase, Q(7, 10**5), Q(2, 10**4)) + bm = moment(bit['m'], bit['W'], bit['child_multiplicities'], coarse, True) + cm = moment(phase['m'], phase['W'], phase['child_multiplicities'], ac, True) + require(not contracts(bit, coarse + Q(1, GRID)) and not contracts(phase, ac + Q(1, GRID)), 'next grid points rejected') + require(0 < OLD <= coarse < ATOM < 1, 'stopped-adapter exponents') + ab = (1 - ATOM) * coarse + ATOM * OLD + require(ATOM > ab, 'adapter toll subordinate to the stopped saving') + abit = min(ab, (1 - PHASE_STOP) * ac - Q(1, GRID)) + + row = dict(h=phase['h'], v=phase['v'], c=phase['additions'], central_disjoint=24) + previous = json.loads((ROOT / 'certificates' / 'copied-centers-network.json').read_text()) + bridge = copied_bridge(bit, phase, [row, row]) + old_bit = previous['finite_bridge']['bit'] + old_degree = old_bit['halving_degree'] * old_bit['wire_bits'] + require(old_degree == 252, 'inherited ordinary leaf row stock') + # Conservative expanded-readout charge, adapted from eumemic PR114 + # (51cd8934128be37830981ca391d3d6fd28b0fce8), Apache-2.0. + # Charge literal readouts, including forward/inverse/reflected words; + # the original addition-DAG count alone does not bound those operations. + 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, total_rank = (phase[k] for k in ('m', 'W', 'total_rank')) + E = 64 * (W + m + G + 1) ** 3 + charge = 2 * G * W * W + 8 * total_rank + 4 * W + 4 + 32 * m + B = total_rank + E + C0 = 32 * m * B * B + require(charge < E and 2 * B * (m - phase['maxchild']) >= total_rank + E + and 2 * B + 18 < C0, 'expanded literal scalar charge') + bridge['complex']['scalar_group_upper'] = G + bridge['complex']['scalar_terms'] = [dict(h=h, v=v, c=c, R=R, q=q, + invocations=v, local_group_upper=local, + description='Expanded deferred readouts and forward/inverse/reflected words')] * 2 + bridge['semantic'].update(E=E, literal_charge=charge, strict_literal_gap=E-charge, + B=B, C0=C0, C1=1, induction_gap=2*B*(m-phase['maxchild'])-total_rank-E) + coarse_bridge = bridge.pop('bit'); cpx = bridge['complex'] + coefficient = (coarse_bridge['halving_degree'] * coarse_bridge['wire_bits'] + old_degree + + cpx['halving_degree'] * cpx['wire_bits']) + degree = 1000 * ((51 * coefficient) // 25000 + 1) + require(Q(degree) > Q(51 * coefficient, 25), 'product stock strictly sufficient') + bridge.update(bit_coarse=coarse_bridge, ordinary_leaf_row_degree=old_degree) + bridge['rows'] = dict(coefficient=coefficient, degree=degree, suffix_slope=4 * degree, + degree_gap=Q(degree) - Q(51 * coefficient, 25), + contract='W_complex^D_complex * W_coarse^D_coarse * W_old^D_old; one preceding prefix and one padding; sequential reuse') + bridge['semantic'].update(fixed_odd_divisor=21, + exact_grid='One common dyadic grid times the fixed odd divisor to K=G*(D_complex+1); no child rounding') + + def accepted(k): + try: + assembly(abit, ac, bridge, Q(k, GRID), beta=PHASE_STOP) + return True + except AssertionError: + return False + lo, hi = int(Q(7, 10**5) * GRID), int(ac * GRID) + 1 + require(accepted(lo) and not accepted(hi), 'kappa bracket') + while hi - lo > 1: + mid = (lo + hi) // 2 + lo, hi = (mid, hi) if accepted(mid) else (lo, mid) + kappa = Q(lo, GRID) + assembled = assembly(abit, ac, bridge, kappa, beta=PHASE_STOP) + require(not accepted(lo + 1), 'next kappa grid point rejected') + require(len(assembled['strict_constraints']) == 47 and len(assembled['margins']) == 7, 'complete assembly') + assembled['parameters']['actual_bit_saving'] = ab + result = dict(status='Conditional witness: deferred readouts on both networks of the stopped product-ring interchange', + kappa=kappa, bit=dict(coarse_saving=coarse, stopped_saving=ab, moment_gap=bm['strict_gap'], + counts={k: bit[k] for k in ('h', 'v', 'R', 'm', 'W', 'total_rank', 'maxchild', 'deferred_slots')}), + complex=dict(saving=ac, moment_gap=cm['strict_gap'], + counts={k: phase[k] for k in ('h', 'v', 'R', 'm', 'W', 'total_rank', 'maxchild', 'deferred_roles')}), + finite_bridge=bridge, assembly=assembled, + base='PR110 head 09775e9f3fbf1900175010bcd0c3d6d1dbf65ffe (PR104 854ba7d); complex DAG from PR108/cyclic-strips-both-axes') + (HERE / 'certificate.json').write_text(json.dumps(js(result), indent=2, sort_keys=True) + '\n') + require(kappa > Q(429239, 5*10**9) and kappa > Q(1715630240171, 2*10**16), 'kappa exceeds PR110 and the cyclic-strips witness') + print('PASS kappa = %s = %.10e' % (kappa, float(kappa))) + print('coarse bit saving %s, stopped %s, complex saving %s' % (coarse, ab, ac)) + + +if __name__ == '__main__': + main() diff --git a/research/deferred-cyclic/complex-profile.json b/research/deferred-cyclic/complex-profile.json new file mode 100644 index 0000000000..ae364897e0 --- /dev/null +++ b/research/deferred-cyclic/complex-profile.json @@ -0,0 +1,93 @@ +{ + "h": 24, + "v": 2024, + "additions": 68188, + "roots": 8120, + "links": 37802, + "R": 38506, + "m": 576, + "N": 4096576, + "W": 164065440, + "L": 2234496, + "total_rank": 94499831360, + "deficit": 1862080, + "maxchild": 574, + "phase_one_ops": 17967, + "phase_one_roles": 15153, + "deferred_roles": 5887, + "deferred_dims": { + "1": 3, + "2": 53, + "4": 128, + "6": 78, + "8": 127, + "9": 1, + "10": 122, + "12": 304, + "13": 1, + "14": 576, + "15": 40, + "16": 560, + "17": 81, + "18": 1101, + "19": 660, + "20": 301, + "21": 164, + "22": 1587 + }, + "lifted_additions": 32718, + "replay": { + "seeds": [ + 1, + 2 + ], + "scratch_restored": true, + "y_plus_x": true, + "field": "Z/(2^61-1)" + }, + "child_multiplicities": { + "1": 287480864, + "2": 254991616, + "3": 42953328, + "4": 65055408, + "5": 31262704, + "6": 35229744, + "7": 16855872, + "8": 14309680, + "9": 8213392, + "10": 8824640, + "11": 5958656, + "12": 7152816, + "13": 5549808, + "14": 11038896, + "15": 5679344, + "16": 7695248, + "17": 7747872, + "18": 10362880, + "19": 10002608, + "20": 5978896, + "21": 4238256, + "22": 12063040, + "23": 8294352, + "529": 8193152, + "552": 132041712, + "553": 12144, + "554": 214544, + "556": 518144, + "558": 315744, + "560": 514096, + "561": 4048, + "562": 493856, + "564": 1230592, + "565": 4048, + "566": 2331648, + "567": 161920, + "568": 2266880, + "569": 327888, + "570": 4456848, + "571": 2671680, + "572": 1218448, + "573": 663872, + "574": 6424176 + } +} diff --git a/research/deferred-cyclic/complex_deferred.py b/research/deferred-cyclic/complex_deferred.py new file mode 100644 index 0000000000..4ddcf77cc2 --- /dev/null +++ b/research/deferred-cyclic/complex_deferred.py @@ -0,0 +1,459 @@ +#!/usr/bin/env python3 +"""Deferred readouts on PR104's h=24 complex network, with lifted binary frames. + +Builds the cyclic-strip / dual-suffix rational-center DAG (cyclic_producer.py), a maximum carrier +matching under the inherited matcher's adjacency rules, an explicit role compile, lifted binary frames, +phase one, deferred readout frames and the stage-one word. Checks: + A. the role count R = c + q - links (38506 for the selected producer); + B. the compiled word computes every root value (zero scratch, random data, mod p); + C. replay of the deferred word with arbitrary scratch and data (two seeds, mod p): every role restored and + every target y_S receives exactly x_S; + D. exact F2 frame facts: lifted frames nondegenerate and nested along every role chain (gates, links, copies, + root frames), every deferral frame inside its start frame and inside t_S^perp for every reached target, + nondegenerate, and nested on every target in readout order; + E. the one-child histogram from the explicit role chains, with total rank W m - N + L. +Writes complex-profile.json next to this file. Usage: python3 research/deferred-cyclic/complex_deferred.py +Prepared by Avi Eisenberg (ikeboy) with Anthropic Claude assistance. Apache-2.0. +""" +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 as _u # cyclic-strip / dual-suffix complex producer (PR108 + cyclic strips), loaded privately +_s=_u.spec_from_file_location('cyclic_producer',HERE/'cyclic_producer.py');_m=_u.module_from_spec(_s);_s.loader.exec_module(_m);build=_m.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(len(links) == 37802 and R == 38506, 'matching size %d, roles %d' % (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/deferred-cyclic/cyclic_producer.py b/research/deferred-cyclic/cyclic_producer.py new file mode 100644 index 0000000000..80ff092dd7 --- /dev/null +++ b/research/deferred-cyclic/cyclic_producer.py @@ -0,0 +1,270 @@ +# 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. +"""Selected aligned rational-center producer, h=24 with all centers disjoint. + +Copyright 2026 icekylinx, Apache-2.0. AI-assisted adaptation of the research +round-five handoff, using the credited retained PairedTriple circuit; see NOTICE. +Adapted from structured_bulk.complex: align pair-star inputs and permit the +fixed rational divisor21; retain all exact support/frame/scalar checks. + +Builds a concrete scalar addition DAG, its nondegenerate binary frames, and +the unmixed carrier histogram. No historical audit suite is invoked. +""" +import json, struct, array +from itertools import combinations +from pathlib import Path +from partial_swap.binary import write_array +from paired_triple_circuit import 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<