diff --git a/research/productive-helper-fusion-certificate/.gitattributes b/research/productive-helper-fusion-certificate/.gitattributes new file mode 100644 index 0000000000..af6e99c758 --- /dev/null +++ b/research/productive-helper-fusion-certificate/.gitattributes @@ -0,0 +1,4 @@ +*.py text eol=lf +*.md text eol=lf +*.json text eol=lf +*.gz -text diff --git a/research/productive-helper-fusion-certificate/COMBINED-WORD.json.gz b/research/productive-helper-fusion-certificate/COMBINED-WORD.json.gz new file mode 100644 index 0000000000..2e14a77f0c Binary files /dev/null and b/research/productive-helper-fusion-certificate/COMBINED-WORD.json.gz differ diff --git a/research/productive-helper-fusion-certificate/COMMUTATION.json b/research/productive-helper-fusion-certificate/COMMUTATION.json new file mode 100644 index 0000000000..adac3c96b3 --- /dev/null +++ b/research/productive-helper-fusion-certificate/COMMUTATION.json @@ -0,0 +1,566 @@ +{ + "backward": [ + [ + 6347, + 6352 + ], + [ + 6354, + 6356 + ], + [ + 6368, + 6373 + ], + [ + 6375, + 6377 + ], + [ + 6486, + 6496 + ], + [ + 6498, + 6502 + ], + [ + 6580, + 6590 + ], + [ + 6842, + 6843 + ], + [ + 6614, + 6856 + ], + [ + 6617, + 6857 + ], + [ + 8238, + 8241 + ], + [ + 8392, + 8395 + ], + [ + 8546, + 8549 + ], + [ + 8700, + 8703 + ], + [ + 8854, + 8857 + ], + [ + 9009, + 9012 + ], + [ + 9164, + 9167 + ], + [ + 9318, + 9321 + ], + [ + 9472, + 9475 + ], + [ + 9626, + 9629 + ], + [ + 9780, + 9783 + ], + [ + 9934, + 9937 + ], + [ + 10088, + 10091 + ], + [ + 10242, + 10245 + ], + [ + 12944, + 13715 + ], + [ + 12945, + 13719 + ], + [ + 12948, + 13723 + ], + [ + 12951, + 13727 + ], + [ + 13664, + 13748 + ], + [ + 13676, + 13779 + ], + [ + 13634, + 13811 + ], + [ + 13637, + 13813 + ], + [ + 13638, + 13854 + ], + [ + 13665, + 13908 + ], + [ + 13954, + 13955 + ], + [ + 13957, + 13958 + ], + [ + 13959, + 13960 + ], + [ + 13961, + 13962 + ], + [ + 13963, + 13964 + ], + [ + 13965, + 13966 + ], + [ + 13967, + 13968 + ], + [ + 13969, + 13970 + ], + [ + 13956, + 13974 + ], + [ + 13971, + 13975 + ], + [ + 14055, + 14058 + ], + [ + 14239, + 14242 + ], + [ + 14357, + 14360 + ], + [ + 14420, + 14434 + ], + [ + 14505, + 14508 + ], + [ + 14653, + 14656 + ], + [ + 13640, + 14753 + ], + [ + 14841, + 14844 + ], + [ + 14966, + 14969 + ], + [ + 15066, + 15069 + ], + [ + 15168, + 15171 + ], + [ + 15326, + 15329 + ], + [ + 15676, + 15679 + ], + [ + 15791, + 15794 + ], + [ + 15938, + 15941 + ], + [ + 16081, + 16084 + ], + [ + 16884, + 16885 + ], + [ + 16907, + 17170 + ], + [ + 16908, + 17173 + ], + [ + 17206, + 17216 + ], + [ + 17325, + 17329 + ], + [ + 17331, + 17341 + ], + [ + 17945, + 17947 + ], + [ + 17949, + 17954 + ], + [ + 17982, + 17984 + ], + [ + 17986, + 17991 + ] + ], + "forward": [ + [ + 6347, + 6352 + ], + [ + 6354, + 6356 + ], + [ + 6368, + 6373 + ], + [ + 6375, + 6377 + ], + [ + 6486, + 6496 + ], + [ + 6498, + 6502 + ], + [ + 6580, + 6590 + ], + [ + 6842, + 6843 + ], + [ + 6614, + 6856 + ], + [ + 6617, + 6857 + ], + [ + 8238, + 8241 + ], + [ + 8392, + 8395 + ], + [ + 8546, + 8549 + ], + [ + 8700, + 8703 + ], + [ + 8854, + 8857 + ], + [ + 9009, + 9012 + ], + [ + 9164, + 9167 + ], + [ + 9318, + 9321 + ], + [ + 9472, + 9475 + ], + [ + 9626, + 9629 + ], + [ + 9780, + 9783 + ], + [ + 9934, + 9937 + ], + [ + 10088, + 10091 + ], + [ + 10242, + 10245 + ], + [ + 12944, + 13715 + ], + [ + 12945, + 13719 + ], + [ + 12948, + 13723 + ], + [ + 12951, + 13727 + ], + [ + 13664, + 13748 + ], + [ + 13676, + 13779 + ], + [ + 13634, + 13811 + ], + [ + 13637, + 13813 + ], + [ + 13638, + 13854 + ], + [ + 13665, + 13908 + ], + [ + 13954, + 13955 + ], + [ + 13957, + 13958 + ], + [ + 13959, + 13960 + ], + [ + 13961, + 13962 + ], + [ + 13963, + 13964 + ], + [ + 13965, + 13966 + ], + [ + 13967, + 13968 + ], + [ + 13969, + 13970 + ], + [ + 13956, + 13974 + ], + [ + 13971, + 13975 + ], + [ + 14055, + 14058 + ], + [ + 14239, + 14242 + ], + [ + 14357, + 14360 + ], + [ + 14420, + 14434 + ], + [ + 14505, + 14508 + ], + [ + 14653, + 14656 + ], + [ + 13640, + 14753 + ], + [ + 14841, + 14844 + ], + [ + 14966, + 14969 + ], + [ + 15066, + 15069 + ], + [ + 15168, + 15171 + ], + [ + 15326, + 15329 + ], + [ + 15676, + 15679 + ], + [ + 15791, + 15794 + ], + [ + 15938, + 15941 + ], + [ + 16081, + 16084 + ], + [ + 16884, + 16885 + ], + [ + 16907, + 17170 + ], + [ + 16908, + 17173 + ], + [ + 17206, + 17216 + ], + [ + 17325, + 17329 + ], + [ + 17331, + 17341 + ], + [ + 17945, + 17947 + ], + [ + 17949, + 17954 + ], + [ + 17982, + 17984 + ], + [ + 17986, + 17991 + ] + ] +} diff --git a/research/productive-helper-fusion-certificate/FLOW.json.gz b/research/productive-helper-fusion-certificate/FLOW.json.gz new file mode 100644 index 0000000000..f7e0582098 Binary files /dev/null and b/research/productive-helper-fusion-certificate/FLOW.json.gz differ diff --git a/research/productive-helper-fusion-certificate/README.md b/research/productive-helper-fusion-certificate/README.md new file mode 100644 index 0000000000..1b3c2c2c0d --- /dev/null +++ b/research/productive-helper-fusion-certificate/README.md @@ -0,0 +1,132 @@ +# Exact productive-helper/native fusion certificate + +**Scoped negative result; no new kappa.** After a verified commuting-ADD +simplification of Cao Yifan's round-three word, every combination of the +**1,079 supplied original/alternative charts** has paid-minus-helper cost at +least the original cost, for every **0 <= C <= 1/200**, where +`H_r(C) = r^(1-C)` and `H_0 = 0`. The original assignment attains equality. +This covers all `2^1079` choices without enumerating them. + +The family changes helper entrance and exit frames together with internal +contacts. Every helper remains strictly productive in all four endpoint states. +Native warp charges and formerly free transitions are included. The same rank +tables also minimize over all 72 compatible late native maps, preserving the +12 actual shared prelude lines and every other warp occurrence endpoint. Thus optimizing +those maps cannot evade this particular binary-family obstruction. + +## Source and scope + +Source: `research/kappa-round3-warp-20261022/ACTUAL-WORD.json.gz`, at main +`ff3cc58e370d0f678e529246f8c73e8094e18fcf`; decompressed SHA256: +`cfcd36b40326d7a5815e1db5313444379b3fb756b27d5201c561574c085cc0dd`. +The #4692 equal-ADD rule, without its triangle rewrites, performs 70 combinations +including 28 cancellations per orientation: 21,449 events become 21,351. +An independent checker verifies commutation across every intervening surviving +instruction, reconstructs all transports, and compares the complete result. +The paid profile stays `{1:2201,2:412,3:510,4:127,5:40,8:8}`. + +The original helper profile is `{4:28,7:7,8:47,9:326}`. Taking every alternative +changes it to `{4:26,7:36,8:14,9:332}`; the associated paid changes erase that +apparent advantage. The theorem prices every mixed choice, not just these two +extremes. `WITNESS.json.gz` defines the exact finite family, generated by least +subspace propagation with helper endpoints free and source main/owned/adapter +demands retained. There are 50 changed helper entrances and 40 changed exits. +No helper exit had to be re-pinned to enforce positive productivity. + +This is a forward-invoice obstruction. The scalar rewrite is checked in both +orientations. This excludes a lower forward invoice, without analyzing a changed asymmetric +dual accounting rule. We need not claim that every chart combination is physically admissible to +exclude a gain in this larger geometric model. No compiler, absolute-phase, +precision, owner-assembly or outer theorem is newly admitted. Other subspaces, +arbitrary Clifford charts, relaxed prelude constraints and different scalar +programs remain open. The selected frontier is unchanged. + +## Proof certificate + +The verifier independently rebuilds the chronological graph. At each affected +edge it computes the four exact rank costs from binary subspaces. Paid edges +have positive sign; each helper's whole endpoint conversion has negative sign. +Warp inputs are mapped before measuring distance. Former zero edges, parallel +incidences and self-incidences are included. These costs give a binary quadratic +energy `E(x)` relative to the original assignment. + +Complementing selected bits makes the pair terms submodular. The supplied graph +represents exactly `2 E(x)`, coefficient by coefficient in `H_1,...,H_9`; the +factor two avoids half-integral capacities. The independent checker expands +the cut graph back into the original variables rather than trusting its builder. +A symbolic feasible flow equals a cut identically, and their value plus the +graph constant is the zero polynomial. Every capacity, forward residual and +reverse residual is nonnegative on the entire C interval. Weak flow/cut duality +therefore proves the lower bound simultaneously for all assignments and all C. +The original assignment supplies the matching upper bound. + +Signs use either the exact `min(r,k)` basis for increasing concave tariffs or +independent rational logarithm/exponential enclosures. A polynomial vanishing +at C=0 can be certified by a positive derivative enclosure. Floating search +statuses are not acceptance evidence. + +For a selected late map, let input/output subspaces have dimensions u,v and +let its optional prelude constraint be `G(a)=b`. Set +`m=min(u-[a in U and b not in V],v-[b in V and a not in U])`; without a line, +set `m=min(u,v)`. The minimum Gaussian rank is `u+v-2m`: maximize the intersection +of `G(U)` with V subject to the required membership of b, then extend bases to +an invertible binary-linear G. This is the credited #5144 formula. The source-derived check +verifies that all four minima at every selected map equal the fixed-G tables. +Other warp occurrence charts remain unchanged, so sharing one G imposes exactly the +retained line constraints, with no independently chosen per-occurrence maps. + +## Reproduce + +Python 3.12+ and the standard library, from the repository root: + +```sh +python -B scripts/research_package.py --package research/productive-helper-fusion-certificate +python -I -O -B research/productive-helper-fusion-certificate/verify.py +``` + +Expected: `PASS_PRODUCTIVE_HELPER_FUSION_CERTIFICATE`. Direct replay is read-only +apart from private temporary files and works in a Git-free export with declared +inputs. It verifies source hashes, both scalar rewrites, every proposal/rank, +shared-map minima, graph/energy equality, flow conservation, cut saturation, +interval signs, and meaningful corruption controls. A forged negative flow +preserves conservation and cut equality but must fail the sign check. + +`RESULT.json` records deterministic evidence. The proof checker is separate +from the proposal builder, optimizer and discovery interval implementation. +Independent here means separate implementations by separate AI agents, not +independent human or proof-kernel acceptance. + +## Credit and overlap + +The method follows Kolmogorov and Zabih, +[What Energy Functions Can Be Minimized via Graph Cuts?](https://www.cs.cornell.edu/~rdz/Papers/KZ-PAMI04.pdf), +and Lempitsky, Rother, Roth and Blake, +[Fusion Moves for Markov Random Field Optimization](https://robots.ox.ac.uk/~vgg/publications/2010/Lempitsky10a/Lempitsky10a.pdf). +No priority is claimed for graph cuts, fusion moves, the shared-map rank formula +or ADD commutation. + +Credit Cao Yifan/#4610 for the native word/shared-map optimization; Cinna Davis's +#4692/#5124/#5144 and general-contact lineage for scalar compression, chart +geometry, shared-map ranks and full paid/helper accounting; Dugongue for the +Clifford compiler/rank grammar; Matarener, zxv, Jacob Alan Sussman and the retained +native/selected contributors. #5265's 17-pair cancellation and its concurrent +frame study are narrower predecessor work, not claimed here. #5016's numerical +interval study, #5217's fixed functional-one dual certificate, and #5144's +paid shared-map search do not supply this changed-word, +joint-helper, all-C exact flow certificate; this package does not supersede their +broader models. Frozen predecessor packages are untouched. + +Prepared for flyingviper with substantial OpenAI Codex assistance and independent +agent checks. Apache-2.0. + +## Open next questions + +Can a joint change of prelude and late native contacts beat the complete invoice? +First choose one of the twelve line-constrained operators, propose new charts +at every occurrence together, and solve its joint partial-map compatibility +before pricing all affected scalar contacts and helper rewards. The blocker is +a favorable exact invoice and one shared realizable map, not extra free +per-occurrence maps. A further fixed descending-native proposal was screened +negatively in author scratch; it is not part of this packaged certificate. +Any positive candidate needs signed dual native and compiler/outer admission. +`TASK.json` records the structured scope and next question. diff --git a/research/productive-helper-fusion-certificate/RESULT.json b/research/productive-helper-fusion-certificate/RESULT.json new file mode 100644 index 0000000000..521ee6f6e3 --- /dev/null +++ b/research/productive-helper-fusion-certificate/RESULT.json @@ -0,0 +1,163 @@ +{ + "combined_payload_sha256": "aa4a8241da76abd2c06e6576a3ac09e77781321deaac3ad7d3ce4519342a36e6", + "flow": { + "arcs": 3611, + "cut_polynomial": [ + 0, + -234, + -178, + 366, + 31, + 0, + -13, + 1, + -61, + 77 + ], + "independent_exact_signs": { + "concave": 181, + "derivative": 113, + "value": 190 + }, + "interval_C": [ + "0", + "1/200" + ], + "minimum_polynomial": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "nonzero_capacity_polynomials": 484 + }, + "flow_payload_sha256": "db75b9e4cf6332fda5e94c3207febbf9f9ee2b2922313399498a9e672ccdbdde", + "fusion_controls": [ + "source hash mismatch", + "rank table corruption", + "proposal chart corruption", + "energy constant corruption", + "negative circulation with conservation and cut preserved" + ], + "graph": { + "adapter_pins_after_nonidentity_map": 0, + "affected_edges": 2558, + "all_edges": 34850, + "baseline_paid": { + "1": 2201, + "2": 412, + "3": 510, + "4": 127, + "5": 40, + "8": 8 + }, + "boundary_mode": "joint-helper", + "helper_endpoints_changed": 90, + "helper_rewards": { + "4": 28, + "7": 7, + "8": 47, + "9": 326 + }, + "native_warps_affected": 12, + "old_zero_edges_affected_including_warps": 1385, + "old_zero_paid_edges_affected": 1373, + "orientation": "forward", + "proposal_helper_rewards": { + "4": 26, + "7": 36, + "8": 14, + "9": 332 + }, + "proposals": 1079, + "restored_frozen_least_differences": 0, + "retained_helper_exit_pins": [], + "source_nodes": 19099 + }, + "new_kappa": null, + "rewrite": { + "backward": { + "cancelled_pairs": 28, + "crossed_instruction_checks": 6241, + "merges": 70, + "new_physical_pairs": 0, + "paid_profile": { + "1": 2201, + "2": 412, + "3": 510, + "4": 127, + "5": 40, + "8": 8 + }, + "program_sha256": "2c0cb13bed01f649074609dcac8f89beb6d32e281ccd81108032c5294f00b873", + "removed_scalar_events": 98 + }, + "forward": { + "cancelled_pairs": 28, + "crossed_instruction_checks": 6241, + "merges": 70, + "new_physical_pairs": 0, + "paid_profile": { + "1": 2201, + "2": 412, + "3": 510, + "4": 127, + "5": 40, + "8": 8 + }, + "program_sha256": "9617dc84a30c2361b04a1450c10cafa2e042584f19cd1981757a57934f85a65d", + "removed_scalar_events": 98 + } + }, + "rewrite_controls": { + "changed_source_rejected": true, + "changed_warp_rejected": true, + "source_write_barrier_rejected": true, + "target_read_barrier_rejected": true, + "wrong_coefficient_rejected": true + }, + "scope": "Forward 1079-choice canonical chart family, joint helper boundaries and all compatible 72 late native G maps with fixed earlier boundaries; no new physical supplier or global chart optimum.", + "shared_native_minima": { + "all_original_shared_maps_attain_minima": true, + "baseline_fixed_native_nodes": 0, + "changed_native_tables": 0, + "corruption_controls": [ + "wrong prelude line", + "wrong selected operator sign", + "omitted frozen native endpoint" + ], + "four_state_minima": 288, + "late_tables_sha256": "80db97c16a2bc6c2f31f16a2a39095714ca1f9a554194a0d47b80504c3ab1c3a", + "native_occurrences": 240, + "other_native_nodes_fixed": 336, + "other_occurrence_dimensions": { + "0": 72, + "1": 24, + "9": 72 + }, + "prelude_lines": 12, + "scope": "Geometric lower bound over all compatible shared G matrices for the declared original/least chart choices. All other native occurrence charts remain fixed; no physical or phase admission and no new kappa.", + "selected_late_maps": 72, + "small_formula_calibration": { + "dimensions": [ + 1, + 2, + 3 + ], + "exact_minima": 570, + "invertible_maps": 175, + "wrong_line_rank_two_control": true + }, + "source_sha256": "aa4a8241da76abd2c06e6576a3ac09e77781321deaac3ad7d3ce4519342a36e6", + "status": "PASS_INDEPENDENT_SHARED_MAP_EXTENSION" + }, + "source_payload_sha256": "cfcd36b40326d7a5815e1db5313444379b3fb756b27d5201c561574c085cc0dd", + "status": "PASS_PRODUCTIVE_HELPER_FUSION_CERTIFICATE", + "witness_payload_sha256": "73f29aeb7cdce52b1ece4192336400157ff4b340900c15110e3efd23db138caa" +} diff --git a/research/productive-helper-fusion-certificate/SHARED-MAPS.json b/research/productive-helper-fusion-certificate/SHARED-MAPS.json new file mode 100644 index 0000000000..29dcaa4c87 --- /dev/null +++ b/research/productive-helper-fusion-certificate/SHARED-MAPS.json @@ -0,0 +1,754 @@ +{ + "selected_late_maps": [ + [ + 11561, + 11562, + 59 + ], + [ + 11564, + 11565, + 60 + ], + [ + 11591, + 11592, + 61 + ], + [ + 11594, + 11595, + 62 + ], + [ + 11622, + 11623, + 63 + ], + [ + 11649, + 11650, + 64 + ], + [ + 12248, + 12249, + 52 + ], + [ + 12251, + 12252, + 53 + ], + [ + 12320, + 12321, + 48 + ], + [ + 12323, + 12324, + 49 + ], + [ + 12328, + 12329, + 50 + ], + [ + 12256, + 12257, + 54 + ], + [ + 12284, + 12285, + 56 + ], + [ + 12292, + 12293, + 58 + ], + [ + 12317, + 12318, + 47 + ], + [ + 12245, + 12246, + 51 + ], + [ + 12287, + 12288, + 57 + ], + [ + 12281, + 12282, + 55 + ], + [ + 11254, + 11255, + 71 + ], + [ + 11259, + 11260, + 72 + ], + [ + 11940, + 11941, + 1 + ], + [ + 11942, + 11943, + 14 + ], + [ + 11944, + 11945, + 16 + ], + [ + 11946, + 11947, + 17 + ], + [ + 11968, + 11969, + 30 + ], + [ + 11970, + 11971, + 32 + ], + [ + 11976, + 11977, + 31 + ], + [ + 11981, + 11982, + 66 + ], + [ + 11997, + 11998, + 33 + ], + [ + 11999, + 12000, + 34 + ], + [ + 12001, + 12002, + 35 + ], + [ + 12003, + 12004, + 36 + ], + [ + 12030, + 12031, + 43 + ], + [ + 12033, + 12034, + 44 + ], + [ + 12035, + 12036, + 45 + ], + [ + 12037, + 12038, + 46 + ], + [ + 12059, + 12060, + 37 + ], + [ + 12061, + 12062, + 38 + ], + [ + 12063, + 12064, + 39 + ], + [ + 12065, + 12066, + 40 + ], + [ + 12087, + 12088, + 67 + ], + [ + 12092, + 12093, + 68 + ], + [ + 12097, + 12098, + 69 + ], + [ + 12102, + 12103, + 70 + ], + [ + 12115, + 12116, + 2 + ], + [ + 12117, + 12118, + 3 + ], + [ + 12119, + 12120, + 4 + ], + [ + 12121, + 12122, + 29 + ], + [ + 12144, + 12145, + 7 + ], + [ + 12146, + 12147, + 41 + ], + [ + 12148, + 12149, + 42 + ], + [ + 12153, + 12154, + 65 + ], + [ + 12172, + 12173, + 5 + ], + [ + 12174, + 12175, + 6 + ], + [ + 12176, + 12177, + 27 + ], + [ + 12178, + 12179, + 28 + ], + [ + 12209, + 12210, + 23 + ], + [ + 12211, + 12212, + 24 + ], + [ + 12213, + 12214, + 25 + ], + [ + 12215, + 12216, + 26 + ], + [ + 12237, + 12238, + 8 + ], + [ + 12239, + 12240, + 9 + ], + [ + 12241, + 12242, + 21 + ], + [ + 12243, + 12244, + 22 + ], + [ + 12273, + 12274, + 15 + ], + [ + 12275, + 12276, + 18 + ], + [ + 12277, + 12278, + 19 + ], + [ + 12279, + 12280, + 20 + ], + [ + 12309, + 12310, + 10 + ], + [ + 12311, + 12312, + 11 + ], + [ + 12313, + 12314, + 12 + ], + [ + 12315, + 12316, + 13 + ] + ], + "prelude_lines": { + "52": [ + 382, + 45 + ], + "53": [ + 487, + 45 + ], + "48": [ + 324, + 45 + ], + "49": [ + 352, + 45 + ], + "50": [ + 505, + 45 + ], + "54": [ + 375, + 45 + ], + "56": [ + 494, + 45 + ], + "58": [ + 26, + 45 + ], + "47": [ + 138, + 45 + ], + "51": [ + 148, + 45 + ], + "57": [ + 477, + 45 + ], + "55": [ + 176, + 45 + ] + }, + "frozen_earlier_warp_nodes": [ + 632, + 633, + 635, + 636, + 637, + 638, + 640, + 641, + 642, + 643, + 645, + 646, + 647, + 648, + 650, + 651, + 652, + 653, + 655, + 656, + 657, + 658, + 660, + 661, + 662, + 663, + 665, + 666, + 667, + 668, + 670, + 671, + 672, + 673, + 675, + 676, + 677, + 678, + 680, + 681, + 682, + 683, + 685, + 686, + 687, + 688, + 690, + 691, + 692, + 693, + 695, + 696, + 697, + 698, + 700, + 701, + 702, + 703, + 705, + 706, + 707, + 708, + 710, + 711, + 712, + 713, + 715, + 716, + 717, + 718, + 720, + 721, + 722, + 723, + 725, + 726, + 727, + 728, + 730, + 731, + 732, + 733, + 735, + 736, + 737, + 738, + 740, + 741, + 742, + 743, + 745, + 746, + 747, + 748, + 750, + 751, + 752, + 753, + 755, + 756, + 757, + 758, + 760, + 761, + 762, + 763, + 765, + 766, + 767, + 768, + 770, + 771, + 772, + 773, + 775, + 776, + 777, + 778, + 780, + 781, + 782, + 783, + 785, + 786, + 787, + 788, + 790, + 791, + 792, + 793, + 795, + 796, + 797, + 798, + 800, + 801, + 802, + 803, + 805, + 806, + 807, + 808, + 810, + 811, + 6752, + 6753, + 6758, + 6759, + 6760, + 6761, + 6766, + 6767, + 6768, + 6769, + 6774, + 6775, + 6776, + 6777, + 6782, + 6783, + 6784, + 6785, + 6790, + 6791, + 6792, + 6793, + 6798, + 6799, + 6800, + 6801, + 6806, + 6807, + 6808, + 6809, + 6814, + 6815, + 6816, + 6817, + 6822, + 6823, + 6824, + 6825, + 6830, + 6831, + 6832, + 6833, + 6838, + 6839, + 6840, + 6841, + 6846, + 6847, + 13516, + 13517, + 13521, + 13522, + 13524, + 13525, + 13527, + 13528, + 13529, + 13530, + 13531, + 13532, + 13533, + 13534, + 13535, + 13536, + 13552, + 13553, + 13557, + 13558, + 13560, + 13561, + 13563, + 13564, + 13565, + 13566, + 13567, + 13568, + 13569, + 13570, + 13571, + 13572, + 13588, + 13589, + 13593, + 13594, + 13596, + 13597, + 13599, + 13600, + 13601, + 13602, + 13603, + 13604, + 13605, + 13606, + 13607, + 13608, + 13629, + 13630, + 13631, + 13632, + 13633, + 13634, + 13635, + 13636, + 13666, + 13667, + 13668, + 13669, + 13670, + 13671, + 13672, + 13673, + 13691, + 13692, + 13696, + 13697, + 13698, + 13699, + 13700, + 13701, + 13723, + 13724, + 13725, + 13726, + 13727, + 13728, + 13729, + 13730, + 13742, + 13743, + 13747, + 13748, + 13752, + 13753, + 13757, + 13758, + 13779, + 13780, + 13781, + 13782, + 13783, + 13784, + 13785, + 13786, + 13807, + 13808, + 13809, + 13810, + 13811, + 13812, + 13814, + 13815, + 13841, + 13842, + 13843, + 13844, + 13845, + 13846, + 13847, + 13848, + 13863, + 13864, + 13868, + 13869, + 13874, + 13875, + 13876, + 13877, + 13898, + 13899, + 13900, + 13901, + 13902, + 13903, + 13904, + 13905, + 14160, + 14161, + 14181, + 14182, + 14203, + 14204, + 14206, + 14207, + 14221, + 14222, + 14224, + 14225, + 14302, + 14303, + 14307, + 14308 + ], + "excluded_proposals": [], + "changed_native_tables": [] +} diff --git a/research/productive-helper-fusion-certificate/SOURCES.json b/research/productive-helper-fusion-certificate/SOURCES.json new file mode 100644 index 0000000000..00cd20ffc9 --- /dev/null +++ b/research/productive-helper-fusion-certificate/SOURCES.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "base_commit": "ff3cc58e370d0f678e529246f8c73e8094e18fcf", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "c35482cd9035843b15a634cc8276a7e1e40e8395", + "sha256": "6fe0a099b89aa2aed796a13c3a21dafc63f3388ebf397464e44e0451893b9375" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72" + }, + { + "path": "research/kappa-round3-warp-20261022/ACTUAL-WORD.json.gz", + "usage": "input", + "git_blob": "46d929df83817b85a5387bcdb9745e0627d6366e", + "sha256": "7679daa4ec6a40f56fc7f0202379a6f454310e94945aba4f48beaaaafb838d05" + }, + { + "path": "research/scalar-trace-compression/verify.py", + "usage": "provenance", + "git_blob": "59d292131bef552c2823bf068a70bd095f90f680", + "sha256": "b41d69aca44852b4b7b880b74b3b482c2274f7b093573ca663a8f5419c8858be" + }, + { + "path": "research/owned-kernel-shared-map/shared_maps.py", + "usage": "provenance", + "git_blob": "0d259bab5b54d44b6b874e78af4cae9759e7d46e", + "sha256": "8a235e1158024d06bb4814291b99a00396bfca1b59db3ca1696d1627061379d6" + } + ] +} diff --git a/research/productive-helper-fusion-certificate/TASK.json b/research/productive-helper-fusion-certificate/TASK.json new file mode 100644 index 0000000000..5b348efea3 --- /dev/null +++ b/research/productive-helper-fusion-certificate/TASK.json @@ -0,0 +1,76 @@ +{ + "schema_version": 1, + "task_id": "complex-new-helper-inventory", + "priority_revision": 7, + "base_commit": "ff3cc58e370d0f678e529246f8c73e8094e18fcf", + "original_card": { + "id": "complex-new-helper-inventory", + "question": "Can a new local cost interface change the deficit-to-recursive-cost ratio beyond current packing?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/complex-local-word-ceiling/README.md", + "research/heterogeneous-owner-assembly/README.md", + "certificates/selected-result.json", + "research/selected-k8-unrestricted-ends/README.md" + ], + "methods": [ + "Propose a changed helper inventory and derive an optimistic exact moment.", + "Design a small completed instance and independently verify its endpoint and rank bill." + ], + "acceptance_gate": "A new physically realizable contract outside the frozen catalogue whose per-call profile, screened with ceiling.ceiling(), beats the selected word's packing ceiling; a lower cap does not establish identical circuitry or order attainable optima, and is insufficient to pass the stronger-budget target under this model. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin.", + "bottleneck_link": "Packing of the selected word is capped at +0.87% (ceiling model); only a lower local excess spend or a changed coverage law raises the cap.", + "allowed_variations": [ + "Narrow to one changed boundary or helper type with explicit counts.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Mixing only providers already inside the pinned catalogue.", + "Only changing helper terminal subspaces and monotone frames within the fixed scalar word, entrances and cleanup contract already covered by #1995/#2013.", + "Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts." + ], + "overlap_terms": [ + "helper inventory", + "heterogeneous-owner", + "mutable leaver" + ] + }, + "scope_status": "changed", + "actual_scope": "Exact interval certificate excluding gains in one changed-scalar-word family of1079 independent canonical chart choices, jointly varying helper boundaries and minimizing over72 compatible late native maps.", + "scope_change_reason": "Explicit user assignment is productive-helper/native co-optimization. This bounded experiment yields a reusable exact negative certificate, not the original catalogue card's improved physically realized interface.", + "bottleneck_link": "The selected complex supplier is limited by its paid-minus-productive-helper moment. The exact certificate excludes one source-derived joint family after scalar simplification; it does not close arbitrary chart or scalar-program changes.", + "budget_minutes": 120, + "stop_rule": "Stop this unchanged family after its exact no-gain certificate. Any positive proposal requires the full paid/helper invoice and applicable native/compiler/outer admission. User usage stop is70percent consumed; no requirement to consume remaining allowance.", + "outcome": "completed", + "evidence": "RESULT.json; independent rewrite/graph/flow/shared-map checks in verify.py; frozen COMMUTATION, COMBINED-WORD, WITNESS and FLOW payloads.", + "author": "flyingviper, with substantial OpenAI Codex assistance and independent agents", + "ai_assistance": "Substantial OpenAI Codex assistance. Three independent agents covered scalar semantics, literature/fusion discovery, and a separate source/rank/flow/interval auditor; the parent integrated and reviewed the package. Not independent human or proof-kernel acceptance.", + "open_questions": [ + { + "question": "Can joint prelude and late native-contact changes improve the complete paid/helper invoice?", + "why_it_matters": "The exact family fixes every nonselected native occurrence and therefore preserves twelve prelude lines. Releasing a whole shared-map interface changes that hypothesis.", + "first_step": "Choose one line-constrained operator, propose charts at all its occurrences, and solve joint partial-map compatibility before charging every affected scalar/native/helper edge.", + "blocked_by": "A favorable exact invoice and a single compatible shared map. Per-occurrence maps do not suffice; physical dual/compiler/outer admission follows any positive result." + } + ], + "coordination": { + "initial_pr_coverage": "800 most-recently-updated PRs, ending2026-10-21; not an exhaustive all-open-PR review", + "final_delta_coverage": "100 most-recently-updated PRs checked2026-10-23, ending2026-10-23T13:09:35Z; no duplicate1079-family interval certificate found", + "discussions": [ + 1163, + 1166, + 5125 + ], + "overlap": "AliRomman claims the exact17-pair #5265 reoptimization. This contribution uses broader98-event #4692 compression and exact joint-family flow proof; no17-pair priority claim. #5217 uses a different fixed functional-one family." + } +} diff --git a/research/productive-helper-fusion-certificate/VERIFY.json b/research/productive-helper-fusion-certificate/VERIFY.json new file mode 100644 index 0000000000..4425a36bcb --- /dev/null +++ b/research/productive-helper-fusion-certificate/VERIFY.json @@ -0,0 +1,32 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/kappa-round3-warp-20261022/ACTUAL-WORD.json.gz" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Exact frozen source and dual commuting rewrite; independent all-edge ranks,1079-proposal energy,shared72-map minima and all-C symbolic flow proof; five rewrite and five fusion corruption controls. Three shared-map corruption controls and570 exact small-dimension minima." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Exact frozen source and dual commuting rewrite; independent all-edge ranks,1079-proposal energy,shared72-map minima and all-C symbolic flow proof; five rewrite and five fusion corruption controls. Three shared-map corruption controls and570 exact small-dimension minima." + } + ] +} diff --git a/research/productive-helper-fusion-certificate/WITNESS.json.gz b/research/productive-helper-fusion-certificate/WITNESS.json.gz new file mode 100644 index 0000000000..5576bd0793 Binary files /dev/null and b/research/productive-helper-fusion-certificate/WITNESS.json.gz differ diff --git a/research/productive-helper-fusion-certificate/check_fusion.py b/research/productive-helper-fusion-certificate/check_fusion.py new file mode 100644 index 0000000000..cede4904b0 --- /dev/null +++ b/research/productive-helper-fusion-certificate/check_fusion.py @@ -0,0 +1,377 @@ +"""Independent source/energy/flow audit for the scalar-combined least-frame fusion, with an explicit boundary mode. + +No imports from the proposal builder, source graph, interval engine, or search. +Reconstructs chronological nodes using 9-bit point sets, computes each cost as +subspace symmetric-difference dimension, and verifies the supplied residual as +a feasible flow. Capacity signs use separate exact rational Taylor bounds. +""" +from pathlib import Path +from collections import Counter, defaultdict +from functools import lru_cache +from fractions import Fraction as Q +import argparse, copy, gzip, hashlib, json, time + +SOURCE_SHA256='aa4a8241da76abd2c06e6576a3ac09e77781321deaac3ad7d3ce4519342a36e6' +ZERO=(0,)*10 + +def need(ok,msg): + if not ok: raise ValueError(msg) + +def sha(b): return hashlib.sha256(b).hexdigest() +def add(a,b):return tuple(x+y for x,y in zip(a,b)) +def scale(a,k):return tuple(x*k for x in a) +def sub(a,b):return add(a,scale(b,-1)) +def atom(r,k=1):return tuple(k if i==r and r else 0 for i in range(10)) + +def span(vectors): + s={0} + for v in vectors:s|={x^v for x in tuple(s)} + return frozenset(s) + +def dim(s): + need(len(s)>0 and not len(s)&(len(s)-1),'binary subspace cardinality') + return len(s).bit_length()-1 + +@lru_cache(None) +def base(s): + b=[];covered=frozenset({0}) + for v in sorted(s): + if v not in covered:b.append(v);covered=span(b) + need(covered==s,'binary subspace closure') + return tuple(b) + +@lru_cache(None) +def join(a,b):return span(base(a)+base(b)) + +def mv(g,x): + result=0 + for i,col in enumerate(g): + if x>>i&1:result^=col + return result + +@lru_cache(None) +def image(g,s):return frozenset(mv(g,x) for x in s) + +def inverse(g): + lookup={mv(g,x):x for x in range(512)} + need(len(lookup)==512,'native map invertible') + return tuple(lookup[1<>9 + need(x in s and all(((x^z)&u).bit_count()%2==0 for u in base(s)),'canonical zero-phase chart') + +def reconstruct_energy(witness,payload,proof_mode): + old,low,edges,fixed,maps,centers,climbs,initial,final,target=source_graph(payload,proof_mode) + proposals={int(i):chart for i,chart in witness['proposals'].items()} + expected={i for i in range(len(old)) if old[i]!=low[i] and i not in fixed} + need(set(proposals)==expected,'all and only distinct eligible least-frame proposals') + need(len(expected)==(1079 if target else 896),'declared variable inventory') + for i,chart in proposals.items():chart_is_canonical(chart,low[i]) + if not target:need(not expected.intersection(initial+final),'all helper and main endpoints fixed') + else: + need(witness['binding']['combined_word_payload_sha256']==SOURCE_SHA256,'helper witness source binding') + need(witness['retained_helper_exit_pins']==target['retained_helper_exit_pins'],'independent helper exit repins') + need(witness['adapter_demand_nodes_pinned']==target['adapter_demand_nodes_pinned'],'independent adapter pin inventory') + tables=[];paid=Counter(centers);lower_paid=Counter(centers);helpers=Counter();new_helpers=Counter() + linear=defaultdict(lambda:ZERO);pair=defaultdict(lambda:ZERO) + zero_changed=0;warps_changed=0 + for a,b,op,sign in edges: + if a==b and not op:continue + left=[old[a],low[a] if a in expected else old[a]] + right=[old[b],low[b] if b in expected else old[b]] + if op:left=[image(maps[op],s) for s in left] + ranks=[distance(left[i],right[j]) for i,j in [(0,0),(1,0),(0,1),(1,1)]] + need(min(ranks)>=0 and max(ranks)<=9,'physical rank range') + if sign<0: + need(min(ranks)>0,'all helper states strictly productive');helpers[ranks[0]]+=1;new_helpers[ranks[3]]+=1 + else: + if ranks[0]:paid[ranks[0]]+=1 + if ranks[3]:lower_paid[ranks[3]]+=1 + if a not in expected and b not in expected:continue + tables.append([a,b,op,sign,ranks]) + if sign>0 and not ranks[0]:zero_changed+=1 + if op:warps_changed+=1 + v00,v10,v01,v11=[atom(r,sign) for r in ranks] + if a==b: + linear[a]=add(linear[a],sub(v11,v00)) + else: + if a in expected:linear[a]=add(linear[a],sub(v10,v00)) + if b in expected:linear[b]=add(linear[b],sub(v01,v00)) + if a in expected and b in expected: + key=tuple(sorted((a,b)));pair[key]=add(pair[key],sub(sub(v11,v10),sub(v01,v00))) + need(tables==witness['tables'],'every ordered four-state rank table from raw events') + need(paid==climbs+centers,'entire source paid multiset') + need(paid==Counter({int(k):v for k,v in witness['baseline_paid'].items()}),'witness baseline invoice') + need(lower_paid==Counter({int(k):v for k,v in witness['proposal_paid' if target else 'lower_paid'].items()}),'witness least invoice') + need(helpers==Counter({4:28,7:7,8:47,9:326}),'all 408 helper rewards') + if target: + need(helpers==Counter({int(k):v for k,v in witness['baseline_helpers'].items()}),'witness baseline helper invoice') + need(new_helpers==Counter({int(k):v for k,v in witness['proposal_helpers'].items()}),'witness proposal helper invoice') + need(witness['zero_productivity_combinations']==[] and witness['all_binary_combinations_strictly_productive'],'declared strict productivity') + return linear,{k:v for k,v in pair.items() if v!=ZERO},{'source_nodes':len(old),'all_edges':len(edges),'orientation':'forward','proposals':len(expected),'affected_edges':len(tables),'old_zero_edges_affected_including_warps':zero_changed,'old_zero_paid_edges_affected':zero_changed-warps_changed,'native_warps_affected':warps_changed,'helper_endpoints_changed':len(expected.intersection(initial+final)),'proposal_helper_rewards':dict(new_helpers),'boundary_mode':proof_mode,'adapter_pins_after_nonidentity_map':target['adapter_pins_after_nonidentity_map'] if target else None,'retained_helper_exit_pins':target['retained_helper_exit_pins'] if target else None,'restored_frozen_least_differences':sum(old[i]!=low[i] for i in fixed),'helper_rewards':dict(helpers),'baseline_paid':dict(paid)} + +def graph_energy(d,linear,pair): + ids=d['ids'];need(ids==sorted(linear),'ordered graph variable IDs') + n=len(ids);S=n;T=n+1;sw={int(k):v for k,v in d['switch'].items()} + need(set(sw)==set(ids) and set(sw.values())<={0,1},'binary switch') + need(d['groups']==len(ids) and d['pair_terms']==len(pair),'reported graph inventory') + reachable=set(d['terminal_reachable']) + selected=[i for j,i in enumerate(ids) if sw[i]^(j not in reachable)] + need(selected==d['selected_groups'],'reported minimizing assignment') + # Expand cut arcs as a quadratic in original x, independently of the + # author's switched-submodular graph construction. + coeff=defaultdict(lambda:ZERO);coeff[()]=tuple(d['graph_constant']) + def multiply(a,b): + out=defaultdict(int) + for ma,ca in a.items(): + for mb,cb in b.items():out[tuple(sorted(set(ma+mb)))]+=ca*cb + return out + def y(i):return {():sw[ids[i]],(ids[i],):1-2*sw[ids[i]]} + def one_minus(p):return {k:(1 if k==() else 0)-v for k,v in {():0,**p}.items()} + for a,b,cap in d['source_arcs']: + need(0<=a=0 for k in range(1,10)):return 'concave' + mass=sum(r*poly[r] for r in range(1,10));need(mass>=0,'nonnegative at C=0') + for j in range(16): + l=Q(j,3200);h=Q(j+1,3200);bound=Q(0) + for r in range(1,10): + a=power_interval(r,h)[0];b=power_interval(r,l)[1] + coefficient=poly[r] + if not mass: + la,lb=log_interval(r);a*=la;b*=lb;coefficient=-coefficient + bound+=coefficient*(a if coefficient>=0 else b) + need(bound>0,'rational interval positivity') + return 'derivative' if not mass else 'value' + +def verify_flow(d): + n=len(d['ids'])+2;S=n-2;T=n-1;initial=[[] for _ in range(n)];arcs=[] + for a,b,c in d['source_arcs']: + ai,bi=len(initial[a]),len(initial[b]);c=tuple(c) + initial[a].append((b,c,bi));initial[b].append((a,ZERO,ai));arcs.append((a,ai,b,bi,c)) + final=d['final_residual'];need(len(final)==n,'residual node count') + for old,row in zip(initial,final): + need(len(old)==len(row),'residual adjacency shape') + for (ob,oc,oi),(b,c,i) in zip(old,row):need((ob,oi)==(b,i),'residual incidence and reverse pairing') + divergence=[ZERO]*n;polynomials=set();reachable=set(d['terminal_reachable']);need(S in reachable and T not in reachable,'separating cut') + cut=ZERO + for a,ai,b,bi,c in arcs: + residual=tuple(final[a][ai][1]);flow=tuple(final[b][bi][1]) + need(add(residual,flow)==c,'individual arc capacity conservation') + divergence[a]=add(divergence[a],flow);divergence[b]=sub(divergence[b],flow) + polynomials.update([c,residual,flow]) + if a in reachable and b not in reachable:cut=add(cut,c) + for a,row in enumerate(final): + for b,c,r in row: + if a in reachable and b not in reachable:need(tuple(c)==ZERO,'cut saturated identically') + need(all(v==ZERO for i,v in enumerate(divergence) if i not in (S,T)),'flow conservation at every variable') + need(add(divergence[S],divergence[T])==ZERO and divergence[S]==cut,'exact max-flow/min-cut equality') + need(add(cut,tuple(d['graph_constant']))==tuple(d['minimum_polynomial'])==ZERO,'identically zero energy minimum') + need(all(type(i)is int and 0<=ibarrier: + trace.append([ordinals[prior],ordinal]) + out[prior]=summed(out[prior],event) + if out[prior] is None:previous.pop((a,b)) + continue + previous[a,b]=index + if event[0]=='scalar' and event[1][0]=='add': + a,b=map(tuple,event[1][1:3]);writes[a]=index;reads[b]=index + else: + for role in roles(event):barriers[role]=index + if event[0]=='phase':phase=index + out.append(deepcopy(event));ordinals.append(ordinal) + return trace + + +def commute(add,event): + """Exact elementary-matrix criterion, with conservative other barriers. + + An ADD i<-j commutes with k<-l iff i!=l and j!=k. All other + operations crossing its two live roles are rejected. Center events affect + owned C only. Adapters are inert native markers in both retained engines. + Phase markers are conservative barriers, matching the credited rewrite. + """ + a,b=map(tuple,add[1][1:3]) + if event[0]=='phase':return False + if event[0]=='scalar' and event[1][0]=='add': + x,y=map(tuple,event[1][1:3]) + return a!=y and b!=x + if event[0] in ('scalar','warp'): + return not ({a,b}&roles(event)) + need(event[0] in ('center','adapter'),'Unknown crossed event') + return True + + +def trace_verify(program,trace): + raw=[deepcopy(e) for e in program if e[0]!='climb'] + prior_right=-1;crossed=cancelled=0 + for left,right in trace: + need(type(left) is int and type(right) is int and 0<=leftprior_right,'Trace must follow chronological incoming events') + prior_right=right + a,b=raw[left],raw[right] + need(a is not None and b is not None and live_add(a) and live_add(b), + 'Trace endpoints are surviving live ADDs') + need(a[1][1:3]==b[1][1:3],'Different elementary matrices') + need(a[1][1]!=a[1][2],'Self-ADD is not a nilpotent elementary generator') + for event in raw[left+1:right]: + if event is not None: + need(commute(b,event),'Noncommuting crossed instruction') + crossed+=1 + raw[left]=summed(a,b);raw[right]=None + cancelled+=raw[left] is None + return [e for e in raw if e is not None],{'merges':len(trace), + 'cancelled_pairs':cancelled,'crossed_instruction_checks':crossed} + + +def span(basis): + result={0} + for vector in basis:result|={x^vector for x in tuple(result)} + need(len(result)==1<>i&1:result^=c + return result + +def image(columns,s):return frozenset(mv(columns,v) for v in s) + +def inverse(columns): + lookup={mv(columns,v):v for v in range(1<=0,'consistent marked-line dimensions') + return k+l-2*intersection + +def projected_chart(chart): + need(len(chart)==9 and all(type(v)is int and 0>9))&u).bit_count()%2==0 for u in basis(s)),'canonical chart phase') + return s + +def chronological_nodes(payload): + c=payload['canonical'];frames=list(map(span,c['frames'])) + nodes=[];fixed=set();warps=[] + def new(value,frozen=False): + i=len(nodes);nodes.append(value) + if frozen:fixed.add(i) + return i + current=[new(frames[f],r<224) for r,f in enumerate(c['start'])] + for event_index,event in enumerate(payload['programs']['forward']): + kind=event[0] + if kind=='scalar': + gate,f=event[1:];refs=gate[1:3] if gate[0] in ('add','copy') else gate[1:2] + n=new(frames[f],any(typ!='L' for typ,r in refs)) + for typ,r in refs: + if typ=='L':current[r]=n + elif kind=='warp': + _,role,op,a,b=event;need(role[0]=='L','persistent native occurrence') + i=new(frames[a]);j=new(frames[b]);current[role[1]]=j + warps.append({'event':event_index,'op':op,'input':i,'output':j}) + elif kind=='adapter':fixed.add(current[event[2]]) + else:need(kind in ('climb','center','phase'),'known unchanged source event') + for r,f in enumerate(c['final']):new(frames[f],r<224) + return nodes,fixed,warps + +def verify(payload,witness): + raw=json.dumps(payload,sort_keys=True,separators=(',',':')).encode() + need(hashlib.sha256(raw).hexdigest()==SOURCE_SHA256,'pinned combined source') + nodes,base_fixed,warps=chronological_nodes(payload) + props={int(i):projected_chart(chart) for i,chart in witness['proposals'].items()} + need(all(0<=i0 else (y,x)) + else:need(da in (0,9),'only zero/full or line constraints outside late occurrence') + need(len(prescribed)<=1,'single normalized shared prelude line') + line=next(iter(prescribed)) if prescribed else None + if line: + lines[op]=list(line);need(mv(maps[op],line[0])==line[1],'incumbent shared line compatibility') + a,b=chosen['input'],chosen['output'];left=[nodes[a],props.get(a,nodes[a])];right=[nodes[b],props.get(b,nodes[b])] + bounds=[];attained=[] + for i,j in [(0,0),(1,0),(0,1),(1,1)]: + bound=lower_bound(left[i],right[j],line) + actual=distance(image(maps[op],left[i]),right[j]) + need(bound==actual,'original shared G attains each independent lower bound') + bounds.append(bound);attained.append(actual) + need(bounds[0]==0,'baseline late rank zero') + if a in props or b in props: + need(old_cost_tables[a,b,op,1]==bounds,'shared rank table matches full invoice certificate') + tables.append([a,b,op,bounds]) + need(len(selected)==72 and len(lines)==12,'all 72 late maps and 12 prelude lines') + need(selected==witness['selected_late_maps'],'selected occurrence inventory') + need(lines=={int(k):v for k,v in witness['prelude_lines'].items()},'prelude line inventory') + need(sorted(extra_fixed-base_fixed)==witness['frozen_earlier_warp_nodes'],'other occurrence frozen-node inventory') + need(witness['excluded_proposals']==[] and witness['changed_native_tables']==[],'no excluded choices or improved native table') + return {'status':'PASS_INDEPENDENT_SHARED_MAP_EXTENSION','source_sha256':SOURCE_SHA256, + 'native_occurrences':len(warps),'selected_late_maps':len(selected),'four_state_minima':4*len(selected), + 'prelude_lines':len(lines),'other_occurrence_dimensions':{str(k):v for k,v in sorted(profiles.items())}, + 'other_native_nodes_fixed':len(extra_fixed),'baseline_fixed_native_nodes':len(extra_fixed&base_fixed), + 'all_original_shared_maps_attain_minima':True,'changed_native_tables':0, + 'late_tables_sha256':hashlib.sha256(json.dumps(tables,separators=(',',':')).encode()).hexdigest(), + 'scope':'Geometric lower bound over all compatible shared G matrices for the declared original/least chart choices. All other native occurrence charts remain fixed; no physical or phase admission and no new kappa.'} + +def small_formula_audit(): + cases=maps_total=0 + for n in (1,2,3): + universe=range(1<>(v-1)&1) for mask in range(1<<((1<