diff --git a/research/p104-relay-split-composition/LITERAL-CHANGES.diff b/research/p104-relay-split-composition/LITERAL-CHANGES.diff new file mode 100644 index 0000000000..e84af9b3d7 --- /dev/null +++ b/research/p104-relay-split-composition/LITERAL-CHANGES.diff @@ -0,0 +1,31 @@ +--- PR5599/pricing.py ++++ composition/pricing.py +@@ -12,8 +12,8 @@ + from fractions import Fraction as Q + import local as L + +-KAPPA, TESTED = Q('.00309839'), Q('.0030983905') +-PREVIOUS = Q('.00308189') ++KAPPA, TESTED = Q('.00310184'), Q('.0031018405') ++PREVIOUS = Q('.00309839') + + + def encode(x): +@@ -62,7 +62,7 @@ + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') +- L.need(sum(targets.values()) == 13084 and sum(paid.values()) == 66852, 'Complete field and call counts') ++ L.need(sum(targets.values()) == 13048 and sum(paid.values()) == 66690, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + +@@ -150,7 +150,7 @@ + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') +- return encode({'kappa':KAPPA,'kappa_decimal':'.00309839','previous_open_pr5580':PREVIOUS,'gain':KAPPA-PREVIOUS, ++ return encode({'kappa':KAPPA,'kappa_decimal':'.00310184','previous_open_pr5599':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA], + 'raw_ceiling':{'interval':[Q(0),cap],'derivative_upper':derivative_upper},'margin_at_previous':E.display(margin(PREVIOUS)), diff --git a/research/p104-relay-split-composition/PROOF.md b/research/p104-relay-split-composition/PROOF.md new file mode 100644 index 0000000000..4fa031ea4e --- /dev/null +++ b/research/p104-relay-split-composition/PROOF.md @@ -0,0 +1,79 @@ +# Exact composition and complete invoice + +All three ingredients start from the same pinned PR5580 word. Event indices in +`construct_parent` refer to that immutable source, not an already edited list. + +## The corrected relay and commuting cascade + +PR5605 replaces owned738's deliveries into public203 and public148 by the +earlier public587 relay. Its signal has the form `2P+N`, where +`N=x587-4x734` consists of arbitrary original inputs. The initial nilpotent +correction `I-uN` and its explicit inverse cancel the nuisance; 18 coframed +late ADDs restore the full-frame residuals. The published construction is +retained and regenerated exactly before composition. + +PR5565's commuting cascade changes other scalar contacts and raises helper531's +productive rank from eight to nine. The retained generator is independently +regenerated and compared to its published word. Its edits and the relay edits +occupy disjoint intervals of the original event sequence. The verifier merges +those literal edits independently of `construct_parent` and compares every +word field. Disjointness alone is not used to infer correctness: the resulting +735-input word must also pass complete exact scalar/frame/ownership replay. + +## Applying independent helper splits + +Use Ali Romman's retained PR5599 split construction. For a prefix matrix P, +suffix matrix S, and a chosen common intermediate chart, a witness supplies +row a, column b, and boundary vectors c,d with + +`a P = c`, `S b = d`, `a b = c d = 1`. + +Both boundary vectors belong to one helper group with the same initial and +final charts. Explicit ordinary basis operations isolate this one channel at +the initial boundary and at the cut. The old independent input finishes at +the cut, while a newly introduced independent input runs the remaining suffix. +The final basis operations restore the independent endpoint interface. No +new Gaussian call, COPY or CLEAR is introduced by the split itself. + +The original 15 witnesses are ordered. Original numbers 12 and 15 need pivot +visits to line597 removed by the cascade; those witnesses and their credits +are omitted. For the remaining 13, all rational vectors, pivots, charts and +split ranks are identical to the source. Only `cut_after` changes. +The verifier checks the full equalities above over every current public and +owned coordinate at each evolving cut, then replays all rows after that split. +This matters because a split basis can interact with later relay cleanup; the +old six-row residual description is not blindly transferred to the split word. + +The final independently counted inventory is 748 public inputs and 540 helpers, +with the same eight owned lifetimes and peak one. Every extra input remains an +independent degree of freedom. A zero-dimensional chart never means a +zero-valued helper. All 25,502 events and every changed native map are checked. + +## Signed bill and pricing + +Against PR5599 the local paid and target changes respectively are + +`Delta paid = -9H1-H2-2H3-2H4+4H5+H6`, + +`Delta target = -2H1-H4+H5-2H8+2H9`. + +The unchanged physical caller invokes the local word 18 times. All main banks, +queries, whole idles, adapters, routing and normalizations remain charged. +The resulting complete bill has 66,690 paid calls, 13,048 targets and unchanged +rank surplus 760. In particular, omitted split targets are not still credited. + +The retained PR5599 price implementation independently recounts this bill, +encloses the raw crossing with its primary exact rational interval engine, +independently checks interval overlap and positive funding at the tested +endpoint with a second engine, and checks the completion tails, uniform +compiler and all 58 outer predicates at 0.0031018405. It retains decay 39/40 and compiler +power 1024. The reported claim is 0.00310184. Its exact raw crossing is +(0.00310184254783,0.00310184254784); a negative derivative bound on [0,0.0034] +makes this the ceiling for this invoice under the inherited BIT cap. + +The finite certificate and conditional calculation preserve the inherited +framework assumptions listed in README.md. They do not establish a new +unconditional multiplication theorem or a universal optimality result. + +Prepared for flyingviper with substantial OpenAI Codex assistance and independent +agents, preserving the predecessor attribution in README.md. Apache-2.0. diff --git a/research/p104-relay-split-composition/README.md b/research/p104-relay-split-composition/README.md new file mode 100644 index 0000000000..f4860b4a08 --- /dev/null +++ b/research/p104-relay-split-composition/README.md @@ -0,0 +1,125 @@ +# Conditional kappa 0.00310184 by composing a relay, cascade and helper splits + +This package combines the compensated public relay in +[PR #5605](https://github.com/CrocSwap/integer-mult-bounds/pull/5605), the full +commuting-contact cascade in +[PR #5565](https://github.com/CrocSwap/integer-mult-bounds/pull/5565), and 13 of +the 15 independent helper splits in +[PR #5599](https://github.com/CrocSwap/integer-mult-bounds/pull/5599). +The complete conditional endpoint is **kappa 0.00310184**, a gain of +**0.00000345** over the consumed PR5599 version's 0.00309839. +During verification, PR5599 advanced to **0.00310045** at +`09dd0965711ca7eeb169057a420abab1c9052137`, independently composing its splits +with PR5565. Our endpoint is **0.00000139 higher** than that newer claim. +Our immutable inputs and historical comparison receipt retain the consumed +versions explicitly; no source head is silently replaced. The selected +frontier is unchanged. + +The exact raw crossing lies in **(0.00310184254783, 0.00310184254784)**; +the claim is tested at 0.0031018405. The full bill contains **66,690 paid +calls** and **13,048 independent productive targets**, with rank surplus 760. +The local word has **748 arbitrary public inputs, 540 helpers, eight owned +lifetimes, owned peak one and 25,502 events**, below the retained 26,000 bound. +All extra independent inputs and ordinary basis operations are charged. + +Read [PROOF.md](PROOF.md), [construct.py](construct.py), the exact +[SPLITS.json](SPLITS.json), [RESULT.json](RESULT.json), and [source pins](SOURCES.json). + +## Why the composition is not just adding headline gains + +The cascade removes the intermediate line visits needed by original split +numbers 12 and 15. They are omitted, including their target credits. The +other 13 retain their exact rational witness vectors; only their event cuts +move. At every new cut, the verifier recomputes the complete prefix functional +and suffix direction on the evolving word. It then replays every independent +input and output before proceeding to the next split. + +Relative to PR5599, the local paid change is +`-9H1-H2-2H3-2H4+4H5+H6`, and the target change is +`-2H1-H4+H5-2H8+2H9`. Both enter the full invoice 18 times. +The root crossing and compiler reserve are recomputed from that actual bill. +No universal optimality or concave-order improvement for every possible +tariff is claimed. Other combinations were used during discovery; the +submitted claim concerns this explicit word only. + +## Reproduce + +Python 3.12 and its standard library suffice: + +```sh +python3.12 -B scripts/research_package.py --package research/p104-relay-split-composition +``` + +Both registered modes must print `PASS_P104_RELAY_SPLIT_COMPOSITION_KAPPA_00310184`; +the launcher must print `PASS_REGISTERED_RESEARCH_PACKAGE`. + +The verifier authenticates immutable sources and every payload in the unchanged +33-file PR5545 closure; independently merges the two retained predecessor +generators' disjoint source edits; checks all 13 rational split witnesses and +every intermediate arbitrary-input endpoint; regenerates the entire saved word; +checks the dense transpose and every signed native map; replays the complete +physical caller; and checks two exact interval engines, charged tail completion, +compiler conditions and all 58 outer predicates. Five controls reject a false +split prefix, missing initial/final basis changes, unearned targets and unpaid +transport. Compressed outputs are compared by complete decompressed payload. + +The retained PR5599 pricing code changes only five declarations: the claimed +and tested endpoints, comparison endpoint, complete target/call counts, reported +decimal and predecessor key. [LITERAL-CHANGES.diff](LITERAL-CHANGES.diff) records +them. In particular, its completion decay 39/40 and compiler logarithm power +1024 are preserved; the older power 1000 is not reused. + +## Limits and ceiling + +The five framework assumptions remain: native all-column implementation, +owned erasure, uniform compiler closure, precision and fixed-tape costs, and +analytic recovery. The source helper-endpoint contract remains inherited. +Neither a complete rounded multiplier nor the enormous uniform word is +materialized. Exact finite replay is not proof-kernel verification or selected +frontier admission. + +The signed moment for this fixed invoice is strictly decreasing on [0,0.0034]. +Its raw funding ceiling is the crossing above, leaving between 2.54783e-9 and +2.54784e-9 above the claimed endpoint. This is not a ceiling for other words, +helper bases, inventories or compiler choices. + +## Sources, scope and credit + +Canonical main base: `5e0052ca0aa3036a3afa8b0438927377c8d97d53`, priority revision 7. +The assigned scalar-to-moment task is refined to a fully charged composition +of changed public dependencies, contacts and independent target splits. + +Pinned sources are Ali Romman's PR5580 at +`6efa248cf456d6101d757e9d09ba29711d18a13a` and PR5599 at +`0644592d421b375c221045954fdf13932575ffa8`; Pierre-Loic Doulcet (@hexapode)'s +PR5565 at `9af814164b9dfc21f19ec737959d67cb71488c95`; and flyingviper's PR5605 at +`4a57d245ac3918ccc9947a867ece24573605e243`. Retained source files are unchanged. +Source retention commits make their bytes reachable without unmerged-object +caches. Exact source paths, Git blobs and SHA256 values are in SOURCES.json. + +Further credit follows those sources: Joel Pulikkan/GamingPuzzled for the +helper-706 and successor handoffs; DreamingOfClouds for free endpoints and +event-level tools; thu-nmrc for coupled contacts; Ali Romman for the complete +caller and source closure; Gareth Davidson, David Arias and Cinna Davis for +P104 word, coalescing and private reuse; Cinna Davis for the controller; +Jacob Alan Sussman for productive recursion; zxv and Cao Yifan for interval, +compiler and native machinery; and all retained geometry, BIT and analytic +notices. The elementary basis identity is credited, not claimed as new. + +New composition and verification prepared for flyingviper with substantial +OpenAI Codex assistance and independent agents. Separate agents derived the +composition, audited its algebraic hazards and reviewed the source/price checks. +No independent human review is claimed. Apache-2.0. + +## Open next questions + +Can a different legal cut recover productive credit after the cascade removes +the old line contacts? Begin with exact prefix/suffix subspaces at a changed +common chart, not a root search. A new split must introduce an independent input, +retain a valid endpoint and fund its added completion/ordinary costs. + +Can another dirty relay alter the remaining owned consumers? First establish +the live-input endpoint identity, then an invertible correction and charged +cleanup. The simple free zero-frame correction lemma for the original 735-input +word must not be assumed for newly split successors that start at positive +frames. See structured questions in [TASK.json](TASK.json). diff --git a/research/p104-relay-split-composition/RESULT.json b/research/p104-relay-split-composition/RESULT.json new file mode 100644 index 0000000000..3565332f42 --- /dev/null +++ b/research/p104-relay-split-composition/RESULT.json @@ -0,0 +1,485 @@ +{ + "complete_cost": { + "compiler": { + "H": 707182000000000, + "N": "2^707182000000000", + "eta": { + "lower": "0.000000135997441504511654222402", + "upper": "0.000000135997441504511654222403" + }, + "gap": "1/14000000000", + "integer_test_exponent": 50513, + "logarithm_power": 1024, + "theta": "63/64", + "uniform_saving": "21712883/7000000000", + "word_materialized": false + }, + "full_forward_calls": 18, + "gain": "69/20000000", + "kappa": "38773/12500000", + "kappa_decimal": ".00310184", + "margin_at_previous": { + "lower": "0.840327945796600063948525755804", + "upper": "0.840327945796600063948525755805" + }, + "negative_controls": { + "old_BIT": "Rejected by outer inequalities", + "old_cutoff": "Rejected by completion-tail ratio greater than one" + }, + "nonrecursive": { + "fixed_scalar_growth_bound": "At most 2^(16*26000) before native factors; a declared constant, not an attained norm.", + "local_paid_rank_mass": 6014, + "local_routes": 5181000, + "local_scalar": 220508, + "peak_owned_fields": 1, + "raw_budget": 1000000000, + "raw_scalar_upper": 184647552, + "tensor_native_growth_bound": "Each rank-r Gaussian has row l1 norm at most 2^(rf); use local_paid_rank_mass for the whole word." + }, + "ordinary_BIT": { + "admitted": "17/5000", + "after_cover": "69/20000", + "atom": "1/250", + "before_cover": "3459/1000000", + "ordinary_saving": "8590884599/2500000000000", + "prime_rule": "odd q > 2^26*N^5 avoiding all fixed denominators and rank witnesses" + }, + "outer": { + "functional_checks": { + "actual_new_BIT_stock_sublinear": "3485999999253/3500000000000", + "fixed_halo_explicit_metadata_branch": "269500000001/3500000000", + "new_BIT_row_stock_sublinear_in_active_group": "13957999997009/14000000000000", + "new_semantic_group_guard": "3/14000000000" + }, + "margins": { + "boundary_algebraic_matrix": "607960695956574237/196000000000000000000", + "fused_gaussian": "607960695869722711/196000000000000000000", + "global_coordinate_router": "10856441/3500000000", + "group_bit_router": "151990177467430677/49000000000000000000", + "group_scans": "6999999999/7000000000", + "main_transform": "607960681956574237/196000000000000000000", + "microbox_face_corrections": "269500000001/3500000000", + "polynomial_products": "13999999999/14000000000", + "sparse_union_movement": "80232960695956574237/196000000000000000000" + }, + "parameters": { + "a": "10856441/3500000000", + "b": "8685153/2800000000", + "beta": "13999999997/14000000000", + "bit_saving": "17/5000", + "cap_xi": "178232960681956574237/196000000000000000000", + "complex_uniform_saving": "21712883/7000000000", + "d": "1/14000000000", + "epsilon": "13999999999/14000000000", + "kappa": "38773/12500000", + "lambda_": "3987592639/4000000000", + "lambda_prime": "13956574237/14000000000", + "layout": "1/14000000000", + "q": "43425763/14000000000", + "r0": "1/140000000000", + "stop": "1/14000000000", + "tested_saving": "6203681/2000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "1043559/3500000000", + "actual_logarithmic_gamma_guard": "1/14000000000", + "actual_logarithmic_group_guard": "17767039339043425763/98000000000000000000", + "alpha_logarithm_absorption": "1/140000000000", + "boundary_algebraic_matrix_above_kappa": "55956574237/196000000000000000000", + "cap_above_band": "80232960681956574237/196000000000000000000", + "cap_below_cell": "17767039304043425763/196000000000000000000", + "cap_below_phase_cell_power": "213767039318043425763/196000000000000000000", + "complex_above_effective": "1/14000000000", + "complex_below_one_over_32": "78814847/2800000000", + "complex_endpoint": "1/7000000000", + "epsilon_below_one": "1/14000000000", + "epsilon_positive": "13999999999/14000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "55869722711/196000000000000000000", + "gaussian_above_main": "6956574237/98000000000000000000", + "global_coordinate_router_above_kappa": "1/3500000000", + "global_gamma_power_slack": "9/140000000000", + "group_below_dimension": "1/7000000000", + "group_bit_router_above_kappa": "17467430677/49000000000000000000", + "group_gauge_power_slack": "17767039338343425763/98000000000000000000", + "group_key_fits_record": "1/7000000000", + "group_positive": "13999999997/14000000000", + "group_scans_above_kappa": "6978287119/7000000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "685434790400418148631/500000000000000000000000", + "lambda_above_internal": "1/28000000000", + "lambda_above_sigma": "3/28000000000", + "lambda_above_tau": "1/28000000000", + "lambda_prime_above_lambda": "1/28000000000", + "lambda_prime_above_leaf": "5591314847/39200000000000000000", + "leaf_saving_above_effective": "2791314847/39200000000000000000", + "main_transform_above_kappa": "41956574237/196000000000000000000", + "membership_arithmetic_fits_record": "1/14000000000", + "microbox_face_corrections_above_kappa": "269489143561/3500000000", + "microbox_halo_volume": "1106000000003/14000000000", + "new_complex_uniform_saving_above_b": "1/14000000000", + "new_semantic_guard_with_C1_one": "1/14000000000", + "polynomial_products_above_kappa": "13956574239/14000000000", + "positive_layout_slack": "1/14000000000", + "q_below_effective": "1/14000000000", + "q_below_internal": "1/14000000000", + "q_below_leaf": "5591314847/39200000000000000000", + "q_positive": "43425763/14000000000", + "short_record_fallback": "2791314847/2800000000", + "source_axis_superpolynomial": "1/14000000000", + "sparse_union_movement_above_kappa": "79625000055956574237/196000000000000000000", + "stop_below_one": "13999999999/14000000000", + "stop_positive": "1/14000000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/14000000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/14000000000", + "union_tag_work_per_visit_fits_record": "3/14000000000" + } + }, + "paid": { + "1": 41196, + "16": 416, + "2": 8244, + "24": 416, + "3": 8856, + "32": 416, + "4": 1656, + "40": 416, + "48": 416, + "5": 3024, + "56": 416, + "6": 342, + "64": 416, + "7": 252, + "72": 208 + }, + "paid_calls": 66690, + "previous_open_pr5599": "309839/100000000", + "productive_fields": 13048, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_ceiling": { + "derivative_upper": "-370661341111693165656225336219510250148905211657535472545106249/1569275433846670190958947355801916604025588861116008628224", + "interval": [ + "0", + "17/5000" + ] + }, + "raw_headroom": [ + "254783/100000000000000", + "3981/1562500000000" + ], + "raw_root_interval": [ + "310184254783/100000000000000", + "4846628981/1562500000000" + ], + "relative_gain_percent": "34500/309839", + "strictification": { + "alpha": { + "lower": "0.999999997918572702568624417808", + "upper": "0.999999997918572702568624417809" + }, + "cutoff": 17, + "delta": { + "lower": "0.972209213403910702778649423417", + "upper": "0.972209213403910702778649423418" + }, + "floor": 18, + "gamma": { + "lower": "0.967603414811730840573044333482", + "upper": "0.967603414811730840573044333483" + }, + "normalized_paid_upper": "5242880004882813/5242880536870912", + "power": 1024, + "reserve": "1/10000000000", + "tail_block": 128, + "tail_decay": "39/40", + "tail_offset": "1/5", + "tested": "6203681/2000000000" + }, + "targets": { + "1": 36, + "145": 208, + "17": 416, + "2": 90, + "25": 416, + "33": 416, + "4": 1602, + "41": 416, + "49": 416, + "5": 198, + "57": 416, + "65": 416, + "7": 90, + "73": 208, + "8": 288, + "9": 7416 + }, + "whole_idle_jobs": 3120 + }, + "cuts": [ + { + "cut_after": 13784, + "events": 25182, + "pivot": 648, + "public": 736, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13774, + "events": 25204, + "pivot": 592, + "public": 737, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13715, + "events": 25222, + "pivot": 664, + "public": 738, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13682, + "events": 25244, + "pivot": 680, + "public": 739, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 12538, + "events": 25280, + "pivot": 259, + "public": 740, + "ranks": [ + 4, + 5 + ] + }, + { + "cut_after": 12460, + "events": 25312, + "pivot": 432, + "public": 741, + "ranks": [ + 4, + 5 + ] + }, + { + "cut_after": 13970, + "events": 25326, + "pivot": 722, + "public": 742, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13654, + "events": 25344, + "pivot": 14, + "public": 743, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13655, + "events": 25362, + "pivot": 76, + "public": 744, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13655, + "events": 25396, + "pivot": 345, + "public": 745, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13644, + "events": 25446, + "pivot": 573, + "public": 746, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 12090, + "events": 25472, + "pivot": 405, + "public": 747, + "ranks": [ + 8, + 1 + ] + }, + { + "cut_after": 12622, + "events": 25502, + "pivot": 225, + "public": 748, + "ranks": [ + 8, + 1 + ] + } + ], + "events": 25502, + "local": { + "endpoint_coefficients": 571536, + "helpers": { + "1": 2, + "2": 5, + "4": 89, + "5": 11, + "7": 5, + "8": 16, + "9": 412 + }, + "owned_lifetimes": 8, + "paid": { + "1": 2202, + "2": 458, + "3": 492, + "4": 92, + "5": 168, + "6": 19, + "7": 14 + }, + "paid_rank_mass": 6014, + "peak_owned_fields": 1, + "public_inputs": 748, + "real_scalar_allowance": 220508 + }, + "local_paid_delta_vs_pr5599": { + "1": -9, + "2": -1, + "3": -2, + "4": -2, + "5": 4, + "6": 1 + }, + "local_target_delta_vs_pr5599": { + "1": -2, + "4": -1, + "5": 1, + "8": -2, + "9": 2 + }, + "native": { + "distinct_maps": 2920, + "helper_normalizers": 1080, + "helpers": { + "1": 2, + "2": 5, + "4": 89, + "5": 11, + "7": 5, + "8": 16, + "9": 412 + }, + "main_adapters": 208, + "proof": "Every signed Pauli image and exact global phase; frame induction at every positive tensor width", + "recipe_payload_sha256": "e2cc74142a685a420905414f500ee7fb864de8cfca6dabcd41fb731191829408", + "wrong_phase_rejected": true + }, + "negative_controls": { + "false_prefix": "Exact prefix functional; no other input", + "missing_input_basis": "All public and owned rows", + "missing_output_basis": "All public and owned rows", + "unearned_target": "Every productive helper has a native target", + "unpaid_transport": "Complete field and call counts" + }, + "omitted_original_splits": [ + { + "frame": 597, + "pivot": 649, + "reason": "The cascade removes this intermediate chart visit." + }, + { + "frame": 597, + "pivot": 648, + "reason": "The cascade removes this intermediate chart visit." + } + ], + "physical": { + "central_square_columns": 53248, + "full_calls": 18, + "main_targets": { + "145": 208, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208 + }, + "new_paid_jobs": 0, + "physical_contacts": 7488, + "ports": 104, + "route_payload_sha256": "7f4f0ca768ffbc4f93dcff575592c4c67411f46b4289e45b73f715a2ad47b142", + "tensor_rule": "Factorwise native maps; scalar signs stay outside the tensor power.", + "whole_idle_jobs": { + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 416, + "72": 208 + }, + "wrapper_sites": [ + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31 + ] + }, + "status": "PASS_P104_RELAY_SPLIT_COMPOSITION_KAPPA_00310184", + "transpose": { + "arithmetic": "Dense integer rows with binary denominators; reverse chronology", + "coefficients": 571536, + "columns": 756 + } +} diff --git a/research/p104-relay-split-composition/SOURCES.json b/research/p104-relay-split-composition/SOURCES.json new file mode 100644 index 0000000000..4d5744fb7d --- /dev/null +++ b/research/p104-relay-split-composition/SOURCES.json @@ -0,0 +1,190 @@ +{ + "schema_version": 1, + "base_commit": "5e0052ca0aa3036a3afa8b0438927377c8d97d53", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "fc3d4ba105e1f097d0d7d051a308281e86ab1446", + "sha256": "66974efdced4083c00025f97d95d83909a226cdf801edb9301c195c6641f6903" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5580-WORD.json.gz", + "usage": "input", + "sha256": "b2a98c4bd0dbe86c09e9d15ee060dcf1aab09dbef90aa1e2127676f4039f406b", + "git_blob": "9434855e7dad0d0236d23210b3e71a2b83a9ae64", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5580-WORD.json.gz" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5605-construct.py", + "usage": "input", + "sha256": "5831eb6f88cd6ed8200f32d2794dd9535ea06aa0d3ae6dd111a58bc01b611cbd", + "git_blob": "31f9b76c9b3d9c410aec1d0945d967ed985154c3", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5605-construct.py" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5605-WORD.json.gz", + "usage": "input", + "sha256": "4568dce630de3b75db5037b1e7e123b6759c2fa5c1122680be1b9801ee512667", + "git_blob": "508ad96b04b7d251f32705aefd1af64705722080", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5605-WORD.json.gz" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5599-construct.py", + "usage": "input", + "sha256": "8e1a674ebed7bffb9fd6995555895a9925b665c2dec0e91f2876ff043901006f", + "git_blob": "698a4cbcc0d7afbba8dccfb7f453315ed7230795", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5599-construct.py" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5599-local.py", + "usage": "input", + "sha256": "ef430511ce36fc658ab711bd84cd2d7b484b8af173238ff89cbfec6139fefbad", + "git_blob": "e6e28bacdad7cb51400d827b9a6e02f2b605d357", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5599-local.py" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5599-pricing.py", + "usage": "input", + "sha256": "473e10cbd92b06736d33d80c0ef742f12f2d08cfeba9e698b1de6c3648bbb217", + "git_blob": "fe03d7eebec36acb0d9f79b376cd020ec6245f84", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5599-pricing.py" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5599-SPLITS.json", + "usage": "input", + "sha256": "9ab3ff3ef83d74aae3ae43e8c622d70c81879d1e9881cbe623e71c389b5e7bc5", + "git_blob": "81e7f0ad221cc295a2a6f970644b48a3b64ede50", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5599-SPLITS.json" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5599-WORD.json.gz", + "usage": "input", + "sha256": "4924640fa7fcbb3895a43bf5f07e7274260feac06ecc95285f77dd8eaee30fa1", + "git_blob": "d9ebf6cace13279bba2fd662d941ddebb4c61278", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5599-WORD.json.gz" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5565-construct.py", + "usage": "input", + "sha256": "7e36f4e8413943ea9f76ce789529aa51d983c6048aba50474083610bdd7c7ef1", + "git_blob": "1abbe7659ec8a2a442895d823bb65f6bef207da7", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5565-construct.py" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5565-WORD.json.gz", + "usage": "input", + "sha256": "3d62828f53e654e3db218bf4611a47aed4a677d48043713dc004db0f8a32990d", + "git_blob": "4ebe6fcb7adf319bf6b247cf23d89eb1ca4cd914", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5565-WORD.json.gz" + }, + { + "path": "research/p104-relay-split-composition/common.py", + "usage": "input", + "sha256": "e7c1bd9bfc0060d2d55da5c6e61cd3fae756e0fc8facacc2a074061d2f73c800", + "git_blob": "bd244313fc023a737055415f87003f2963c290f6", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/common.py" + }, + { + "path": "research/p104-relay-split-composition/inputs/pr5545-source-closure.tar.gz", + "usage": "input", + "sha256": "59768da554e11b11fae52d07f520f50684cc7a9ee0bec2873edbcd6b63814837", + "git_blob": "3084088544d1e3136e1f38b8011b9e24edc969c6", + "pin": "head:d193787d668c7d995da875bd61899eb90e923e2b:research/p104-relay-split-composition/inputs/pr5545-source-closure.tar.gz" + } + ], + "retained_source": { + "path": "research/p104-event-contact-step/inputs/pr5545-source-closure.tar.gz", + "sha256": "59768da554e11b11fae52d07f520f50684cc7a9ee0bec2873edbcd6b63814837", + "export_manifest_sha256": "0a20358f9c089be1f5606c78077314e30a72998fb3c5123848d921a8d1814e76", + "commit": "18968423711fd902aaee1099979497d55603e1dc", + "files": 33, + "source_url": "https://github.com/CrocSwap/integer-mult-bounds/pull/5545", + "note": "Byte-identical copy of the capsule retained by PR5551/PR5561; used UNMODIFIED (the hand-off word keeps 735 public inputs)." + }, + "external_inputs": [ + { + "local_path": "inputs/pr5580-WORD.json.gz", + "source_commit": "6efa248cf456d6101d757e9d09ba29711d18a13a", + "source_path": "research/p104-event-contact-step/WORD.json.gz", + "sha256": "b2a98c4bd0dbe86c09e9d15ee060dcf1aab09dbef90aa1e2127676f4039f406b", + "git_blob": "9434855e7dad0d0236d23210b3e71a2b83a9ae64" + }, + { + "local_path": "inputs/pr5605-construct.py", + "source_commit": "4a57d245ac3918ccc9947a867ece24573605e243", + "source_path": "research/p104-shared-residual-relay/construct.py", + "sha256": "5831eb6f88cd6ed8200f32d2794dd9535ea06aa0d3ae6dd111a58bc01b611cbd", + "git_blob": "31f9b76c9b3d9c410aec1d0945d967ed985154c3" + }, + { + "local_path": "inputs/pr5605-WORD.json.gz", + "source_commit": "4a57d245ac3918ccc9947a867ece24573605e243", + "source_path": "research/p104-shared-residual-relay/WORD.json.gz", + "sha256": "4568dce630de3b75db5037b1e7e123b6759c2fa5c1122680be1b9801ee512667", + "git_blob": "508ad96b04b7d251f32705aefd1af64705722080" + }, + { + "local_path": "inputs/pr5599-construct.py", + "source_commit": "0644592d421b375c221045954fdf13932575ffa8", + "source_path": "research/p104-helper-subspace-splits/construct.py", + "sha256": "8e1a674ebed7bffb9fd6995555895a9925b665c2dec0e91f2876ff043901006f", + "git_blob": "698a4cbcc0d7afbba8dccfb7f453315ed7230795" + }, + { + "local_path": "inputs/pr5599-local.py", + "source_commit": "0644592d421b375c221045954fdf13932575ffa8", + "source_path": "research/p104-helper-subspace-splits/local.py", + "sha256": "ef430511ce36fc658ab711bd84cd2d7b484b8af173238ff89cbfec6139fefbad", + "git_blob": "e6e28bacdad7cb51400d827b9a6e02f2b605d357" + }, + { + "local_path": "inputs/pr5599-pricing.py", + "source_commit": "0644592d421b375c221045954fdf13932575ffa8", + "source_path": "research/p104-helper-subspace-splits/pricing.py", + "sha256": "473e10cbd92b06736d33d80c0ef742f12f2d08cfeba9e698b1de6c3648bbb217", + "git_blob": "fe03d7eebec36acb0d9f79b376cd020ec6245f84" + }, + { + "local_path": "inputs/pr5599-SPLITS.json", + "source_commit": "0644592d421b375c221045954fdf13932575ffa8", + "source_path": "research/p104-helper-subspace-splits/SPLITS.json", + "sha256": "9ab3ff3ef83d74aae3ae43e8c622d70c81879d1e9881cbe623e71c389b5e7bc5", + "git_blob": "81e7f0ad221cc295a2a6f970644b48a3b64ede50" + }, + { + "local_path": "inputs/pr5599-WORD.json.gz", + "source_commit": "0644592d421b375c221045954fdf13932575ffa8", + "source_path": "research/p104-helper-subspace-splits/WORD.json.gz", + "sha256": "4924640fa7fcbb3895a43bf5f07e7274260feac06ecc95285f77dd8eaee30fa1", + "git_blob": "d9ebf6cace13279bba2fd662d941ddebb4c61278" + }, + { + "local_path": "inputs/pr5565-construct.py", + "source_commit": "9af814164b9dfc21f19ec737959d67cb71488c95", + "source_path": "research/p104-commuting-contact/construct.py", + "sha256": "7e36f4e8413943ea9f76ce789529aa51d983c6048aba50474083610bdd7c7ef1", + "git_blob": "1abbe7659ec8a2a442895d823bb65f6bef207da7" + }, + { + "local_path": "inputs/pr5565-WORD.json.gz", + "source_commit": "9af814164b9dfc21f19ec737959d67cb71488c95", + "source_path": "research/p104-commuting-contact/WORD.json.gz", + "sha256": "3d62828f53e654e3db218bf4611a47aed4a677d48043713dc004db0f8a32990d", + "git_blob": "4ebe6fcb7adf319bf6b247cf23d89eb1ca4cd914" + }, + { + "local_path": "common.py", + "source_commit": "6efa248cf456d6101d757e9d09ba29711d18a13a", + "source_path": "research/p104-event-contact-step/common.py", + "sha256": "e7c1bd9bfc0060d2d55da5c6e61cd3fae756e0fc8facacc2a074061d2f73c800", + "git_blob": "bd244313fc023a737055415f87003f2963c290f6" + } + ] +} diff --git a/research/p104-relay-split-composition/SPLITS.json b/research/p104-relay-split-composition/SPLITS.json new file mode 100644 index 0000000000..4632462af1 --- /dev/null +++ b/research/p104-relay-split-composition/SPLITS.json @@ -0,0 +1,407 @@ +[ + { + "cut_after": 13784, + "frame": 120, + "pivot": 648, + "a": { + "652": "1" + }, + "b": { + "652": "1", + "648": "-1", + "650": "1", + "649": "-1" + }, + "c": { + "652": "1" + }, + "d": { + "652": "1", + "205": "-2", + "648": "-1", + "650": "1", + "649": "-1" + }, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13774, + "frame": 1053, + "pivot": 592, + "a": { + "596": "1" + }, + "b": { + "596": "1", + "594": "1", + "592": "-1", + "593": "1" + }, + "c": { + "596": "1" + }, + "d": { + "596": "1", + "594": "1", + "188": "-1", + "592": "-1", + "593": "1" + }, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13715, + "frame": 1051, + "pivot": 664, + "a": { + "668": "1" + }, + "b": { + "668": "1", + "665": "1", + "666": "-1", + "664": "1" + }, + "c": { + "668": "1" + }, + "d": { + "668": "1", + "115": "2", + "665": "1", + "666": "-1", + "664": "1" + }, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13682, + "frame": 1049, + "pivot": 680, + "a": { + "684": "1" + }, + "b": { + "684": "1", + "681": "1", + "680": "-1", + "682": "1" + }, + "c": { + "684": "1" + }, + "d": { + "684": "1", + "681": "1", + "126": "2", + "680": "-1", + "682": "1" + }, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 12538, + "frame": 306, + "pivot": 259, + "a": { + "261": "1", + "256": "1/2", + "9": "1/2", + "259": "2" + }, + "b": { + "259": "1/2" + }, + "c": { + "259": "2", + "61": "2", + "265": "2" + }, + "d": { + "262": "1/2", + "270": "-1/2", + "265": "1/2", + "264": "1/2", + "256": "-1/2", + "271": "-1/2", + "263": "1/2" + }, + "ranks": [ + 4, + 5 + ] + }, + { + "cut_after": 12460, + "frame": 516, + "pivot": 432, + "a": { + "437": "1", + "20": "-1", + "435": "-1/2" + }, + "b": { + "432": "1", + "20": "-1" + }, + "c": { + "435": "-1", + "21": "-1" + }, + "d": { + "443": "1/2", + "434": "-1", + "432": "1/2", + "442": "1/2", + "439": "1/2", + "435": "-1", + "444": "-1/2", + "438": "1/2", + "445": "-1/2", + "433": "1/2" + }, + "ranks": [ + 4, + 5 + ] + }, + { + "cut_after": 13970, + "frame": 424, + "pivot": 722, + "a": { + "722": "1", + "3": "1/4", + "67": "1/8" + }, + "b": { + "722": "1" + }, + "c": { + "3": "1/4" + }, + "d": { + "722": "1", + "115": "-4", + "3": "4", + "372": "-4", + "370": "-4" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13654, + "frame": 462, + "pivot": 14, + "a": { + "52": "1", + "14": "-1/2" + }, + "b": { + "727": "-1/4", + "52": "1/2", + "14": "-1" + }, + "c": { + "14": "-1" + }, + "d": { + "727": "-1/4", + "14": "-1", + "403": "1", + "126": "1", + "402": "1" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13655, + "frame": 252, + "pivot": 76, + "a": { + "87": "1", + "76": "-1/2" + }, + "b": { + "717": "-1/4", + "87": "1/2", + "76": "-1" + }, + "c": { + "76": "-1" + }, + "d": { + "717": "-1/4", + "76": "-1", + "227": "1", + "188": "1", + "226": "1" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13655, + "frame": 391, + "pivot": 345, + "a": { + "351": "1", + "345": "-1/2" + }, + "b": { + "712": "-1/4", + "351": "1/2", + "345": "-1" + }, + "c": { + "93": "-1" + }, + "d": { + "712": "-1/4", + "351": "-1/2", + "344": "1/2", + "205": "1", + "350": "-1/2", + "343": "1/2", + "93": "-1", + "341": "-1", + "347": "1/2", + "349": "1/2", + "348": "1/2", + "345": "1/2" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13644, + "frame": 603, + "pivot": 573, + "a": { + "710": "1", + "573": "-1/2", + "572": "1/2" + }, + "b": { + "710": "1/2", + "573": "-1" + }, + "c": { + "573": "-1/2", + "572": "1/2" + }, + "d": { + "710": "1/2", + "115": "1", + "572": "1", + "498": "2", + "306": "-1", + "499": "1", + "502": "-1", + "457": "-2", + "249": "1", + "243": "-1", + "242": "1", + "456": "2", + "252": "-1", + "247": "-1", + "311": "-2", + "205": "-1", + "126": "-1", + "573": "-1", + "317": "-1", + "503": "1" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 12090, + "frame": 477, + "pivot": 405, + "a": { + "405": "1", + "42": "-1", + "403": "-1/2" + }, + "b": { + "405": "1", + "41": "2" + }, + "c": { + "403": "-1" + }, + "d": { + "415": "1", + "403": "-1", + "402": "-1", + "405": "-1", + "400": "2", + "404": "-1", + "414": "1", + "409": "-1", + "408": "-1" + }, + "ranks": [ + 8, + 1 + ] + }, + { + "cut_after": 12622, + "frame": 267, + "pivot": 225, + "a": { + "234": "1", + "224": "-1/4", + "81": "1/4", + "225": "-1/2", + "57": "1/4", + "92": "1/4" + }, + "b": { + "225": "-2" + }, + "c": { + "227": "1" + }, + "d": { + "229": "1", + "226": "1", + "230": "-1", + "225": "-1", + "224": "-1", + "231": "-1", + "228": "1", + "227": "1" + }, + "ranks": [ + 8, + 1 + ] + } +] diff --git a/research/p104-relay-split-composition/TASK.json b/research/p104-relay-split-composition/TASK.json new file mode 100644 index 0000000000..88b85ada02 --- /dev/null +++ b/research/p104-relay-split-composition/TASK.json @@ -0,0 +1,112 @@ +{ + "schema_version": 1, + "task_id": "scalar-to-moment", + "priority_revision": 7, + "base_commit": "5e0052ca0aa3036a3afa8b0438927377c8d97d53", + "original_card": { + "id": "scalar-to-moment", + "question": "Can a changed frame itinerary remove a paid transition beyond the already covered scalar A2 contractions?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/staged544-a2-graph-rewrite/README.md", + "research/staged544-separated-a2/README.md", + "research/staged544-a2-composition-audit/README.md", + "research/staged544-a1858-contraction-audit/README.md" + ], + "methods": [ + "Derive the changed legal frame itinerary and exact child histogram.", + "Prove a scoped obstruction showing why that scalar gain cannot change the paid contract." + ], + "acceptance_gate": "An unchanged histogram is not a kappa gain; record any separate runtime or proof benefit explicitly.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the A2 and separated-A2 constructions and their composition/contraction audits. Scalar contractions can preserve the complete recursive histogram; fewer ADDs alone do not justify further scans.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "Identify an actual paid transition to remove and construct a legal replacement frame itinerary, charging restoration, source windows and changed helpers. Compare complete before/after histograms. Stop if only scalar count changes; report that benefit honestly, without expanding the same scalar-only census.", + "bottleneck_link": "A legal change to the histogram, not addition count alone, is the bridge to an exponent gain.", + "allowed_variations": [ + "One existing scalar simplification and one proposed frame-path change." + ], + "scope_change_triggers": [ + "Submitting only another scalar count as completion of a paid-profile task." + ], + "overlap_terms": [ + "scalar simplification", + "paid profile", + "R439", + "3998", + "4019", + "4112", + "4152", + "staged544-a2-graph-rewrite", + "staged544-separated-a2", + "staged544-a2-composition-audit", + "staged544-a1858-contraction-audit" + ], + "existing_checks": [ + { + "scope": "PR #3998: consecutive A2 scalar contraction", + "evidence": "research/staged544-a2-graph-rewrite/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "389268a6b5e0373a3125d5c6fcd6995f4ea324f5", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4019: separated A2 sites with unchanged recursive histogram", + "evidence": "research/staged544-separated-a2/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "f408e09df300b575235f7f77f81948071397e16d", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4112: composition audit", + "evidence": "research/staged544-a2-composition-audit/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "205b7380656ba4b6316a8a493b1a3c679b8f7a0e", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4152: A1858 contraction audit", + "evidence": "research/staged544-a1858-contraction-audit/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "caaa14cde5962adc372fdca71f63d0f29e73c8b2", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Compose the compensated shared P104 relay with a commuting-contact cascade and thirteen exact independent helper splits, then verify the complete native caller and conditional bound.", + "scope_change_reason": "The user assigned continued changed-dependency/shared-owned research. Newly published target splits and contact changes provide compatible ingredients; two conflicting split credits must be removed.", + "bottleneck_link": "The combined construction changes both complete paid and target histograms and supports conditional kappa .00310184 above .00309839 in PR5599.", + "budget_minutes": 240, + "stop_rule": "Freeze this composition after independent construction, every cut/endpoint, native caller and full pricing pass. Broader user-authorized research continues separately until30percentremaining.", + "outcome": "completed", + "evidence": "PROOF.md, construct.py, SPLITS.json and RESULT.json:13 exact prefix/suffix witnesses, all748 arbitrary inputs, dense transpose, every native map, physical caller, complete two-engine price, compiler,58 outer predicates and five negative controls.", + "author": "flyingviper with substantial OpenAI Codex assistance and independent agents", + "ai_assistance": "Substantial OpenAI Codex assistance and independent agents. One agent derived the adapted composition, root independently merged literal source edits and ran full framework checks, and another audited basis/correction hazards. Not independent human or formal acceptance.", + "open_questions": [ + { + "question": "Can another legal common-chart cut recover credit after the cascade removes the old line visits?", + "why_it_matters": "Additional independent target credit can improve the complete moment.", + "first_step": "Check exact prefix and suffix subspaces at the changed charts and establish a unit-paired independent helper channel.", + "blocked_by": "A nonzero prefix alone is insufficient; matching suffix support, endpoint independence and complete pricing are required." + }, + { + "question": "Can another compensated relay replace remaining owned consumers?", + "why_it_matters": "This can lower paid work beyond the frozen invoice.", + "first_step": "Establish an exact live-input identity and invertible nuisance correction with a legal cleanup itinerary.", + "blocked_by": "New split successors can start at positive frames; the original free zero-frame correction lemma does not automatically cover them." + } + ] +} diff --git a/research/p104-relay-split-composition/VERIFY.json b/research/p104-relay-split-composition/VERIFY.json new file mode 100644 index 0000000000..11a70fd55e --- /dev/null +++ b/research/p104-relay-split-composition/VERIFY.json @@ -0,0 +1,47 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/p104-relay-split-composition/inputs/pr5580-WORD.json.gz", + "research/p104-relay-split-composition/inputs/pr5605-construct.py", + "research/p104-relay-split-composition/inputs/pr5605-WORD.json.gz", + "research/p104-relay-split-composition/inputs/pr5599-construct.py", + "research/p104-relay-split-composition/inputs/pr5599-local.py", + "research/p104-relay-split-composition/inputs/pr5599-pricing.py", + "research/p104-relay-split-composition/inputs/pr5599-SPLITS.json", + "research/p104-relay-split-composition/inputs/pr5599-WORD.json.gz", + "research/p104-relay-split-composition/inputs/pr5565-construct.py", + "research/p104-relay-split-composition/inputs/pr5565-WORD.json.gz", + "research/p104-relay-split-composition/common.py", + "research/p104-relay-split-composition/inputs/pr5545-source-closure.tar.gz" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 540, + "checks": "Authenticate immutable inputs and closure; independently reconstruct parent and all13 cuts; replay all748 inputs, transpose, native maps, physical caller, complete invoice, two rational engines, compiler and58 outer predicates; reject five corruptions and compare complete saved receipt." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 540, + "checks": "Authenticate immutable inputs and closure; independently reconstruct parent and all13 cuts; replay all748 inputs, transpose, native maps, physical caller, complete invoice, two rational engines, compiler and58 outer predicates; reject five corruptions and compare complete saved receipt." + } + ] +} diff --git a/research/p104-relay-split-composition/WORD.json.gz b/research/p104-relay-split-composition/WORD.json.gz new file mode 100644 index 0000000000..50b685ecbc Binary files /dev/null and b/research/p104-relay-split-composition/WORD.json.gz differ diff --git a/research/p104-relay-split-composition/common.py b/research/p104-relay-split-composition/common.py new file mode 100644 index 0000000000..bd244313fc --- /dev/null +++ b/research/p104-relay-split-composition/common.py @@ -0,0 +1,47 @@ +"""Open the byte-pinned PR5545 source closure (same pins as PR5551/PR5561); Apache-2.0. + +Copied from PR5561's research/p104-free-endpoint-retime/common.py (DreamingOfClouds), package path +renamed only. Mechanism and all predecessor credit: see README.md. +""" +from contextlib import contextmanager +from hashlib import sha256 +from io import BytesIO +from pathlib import Path,PurePosixPath +import gzip,importlib.util,json,sys,tarfile,tempfile + +HERE=Path(__file__).resolve().parent +def need(ok,why): + if not ok: + raise ValueError(why) + +def read(path): + raw=Path(path).read_bytes() + return json.loads(gzip.decompress(raw) if str(path).endswith('.gz') else raw) + +def load(path,name): + spec=importlib.util.spec_from_file_location(name,path) + mod=importlib.util.module_from_spec(spec);sys.modules[name]=mod;spec.loader.exec_module(mod);return mod + +@contextmanager +def closure(): + pins=json.loads((HERE/'SOURCES.json').read_bytes())['retained_source'] + raw=(HERE/'inputs'/Path(pins['path']).name).read_bytes() + need(sha256(raw).hexdigest()==pins['sha256'],'Retained PR5545 capsule byte pin') + with tempfile.TemporaryDirectory(prefix='p104-priced-handoff-')as tmp: + root=Path(tmp) + with tarfile.open(fileobj=BytesIO(gzip.decompress(raw)),mode='r:')as archive: + members=archive.getmembers();names=[m.name for m in members] + need(len(names)==len(set(names)),'Unique retained source paths') + for m in members: + n=PurePosixPath(m.name) + need(m.isfile()and not n.is_absolute()and '..'not in n.parts,'Regular retained source path') + t=root/m.name;t.parent.mkdir(parents=True,exist_ok=True);t.write_bytes(archive.extractfile(m).read()) + mraw=(root/'.research-export.json').read_bytes() + need(sha256(mraw).hexdigest()==pins['export_manifest_sha256'],'Exact export inventory') + man=json.loads(mraw) + need(man['commit']==pins['commit']and len(man['files'])==pins['files']==33,'Exact predecessor closure') + need(set(names)=={'.research-export.json'}|{r['path']for r in man['files']},'No omitted or extra file') + for r in man['files']: + b=(root/r['path']).read_bytes() + need(len(b)==r['size']and sha256(b).hexdigest()==r['sha256'],'Source file '+r['path']) + yield root diff --git a/research/p104-relay-split-composition/construct.py b/research/p104-relay-split-composition/construct.py new file mode 100644 index 0000000000..66c94ddb5c --- /dev/null +++ b/research/p104-relay-split-composition/construct.py @@ -0,0 +1,75 @@ +"""Explicit composition: shared587 relay, PR5565 cascade, 13 PR5599 splits. + +The source is Ali Romman's PR5580 word. The commuting cascade is Pierre-Loic +Doulcet's PR5565; the independent helper splits and split operation are Ali +Romman's PR5599. The shared relay and this checked composition were prepared +for flyingviper with substantial OpenAI Codex and independent-agent assistance. +Apache-2.0. Retain the complete predecessor notices in publication. + +No search or heuristic event matching is used. The supplied thirteen witnesses +are the frozen adapted cascade-relay-13splits-SPLITS.json. `split` is the pinned +PR5599 split function, which verifies each full prefix and suffix over Q. +""" +from copy import deepcopy +from fractions import Fraction as Q + + +def need(ok,why): + if not ok:raise ValueError(why) + + +def construct_parent(base): + old=base['program'] + need(base['public']==735 and len(old)==25140,'Exact PR5580 source inventory') + need(base['initial'][531]==597 and base['final'][531]==127,'Original531 endpoints') + replacement={ + 13413:[old[13413],['MOVE',738,565,597,True]], + 13414:[],13415:[],13416:[],13417:[],13418:[],13420:[], + 13524:[['ADD',113,531,'1',3],['MOVE',113,3,597,False]], + 13528:[['ADD',198,648,'1/2',3],['ADD',198,649,'-1/2',3], + ['ADD',198,650,'1/2',3],['ADD',198,652,'1/2',3], + ['MOVE',198,3,597,False]], + 13610:[old[13610],['MOVE',587,3,597,False],['ADD',587,734,'-4',597]], + 13624:[],13625:[],13627:[],13628:[],13630:[],13631:[],13633:[],13634:[], + 13770:[['MOVE',648,3,120,False]],13772:[['MOVE',649,3,120,False]], + 13774:[['MOVE',650,3,120,False]],13778:[['MOVE',652,3,120,False]], + 13806:[],13842:[],13843:[['ADD',197,531,'-1',3]], + 13844:[['MOVE',197,3,355,False]],13845:[],13846:[['ADD',197,319,'1',355]], + 14010:[old[14010],['MOVE',587,597,652,False],['ADD',21,587,'1',652]], + 14017:[['MOVE',148,467,655,False]], + 14378:[['MOVE',319,355,728,False]],14403:[], + 14404:[['ADD',507,531,'-1',3]],14405:[['MOVE',507,3,728,False]], + 14477:[['MOVE',531,3,741,False]],14633:[],14634:[], + 14635:[['MOVE',587,652,773,False]],14684:[['MOVE',197,355,788,False]], + } + # The immutable source is byte-authenticated by the caller. These sentinel + # checks also make the cut conventions explicit and catch wrong indexing. + expected={13413:['ADD',159,738,'-1',565], + 13610:['ADD',147,587,'1/2',3], + 14010:['ADD',165,21,'-1/2',652], + 14635:['MOVE',587,597,773,False]} + need(all(old[i]==event for i,event in expected.items()),'Exact source sentinel events') + affected={123:Q(1,2),148:Q(-1,2),175:Q(-1,2),182:Q(-1,2),203:Q(1,2),223:Q(-1,2)} + program=[['ADD',r,s,str(-u*v),3] for r,u in sorted(affected.items()) + for s,v in ((587,Q(1)),(734,Q(-4)))] + for i,event in enumerate(old): + if i==24461: + for r,sign in ((21,-1),(47,-1),(434,1),(435,1),(436,1),(437,1)): + program.extend([['ADD',r,133,str(sign),127], + ['ADD',r,587,str(Q(sign,2)),127], + ['ADD',r,734,str(-2*sign),127]]) + program.extend(deepcopy(replacement.get(i,[event]))) + word=deepcopy(base) + word['initial'][531]=3 + word['program']=program + need(len(program)==25160,'Exact composed pre-split event inventory') + return word + + +def construct(base,witnesses,split): + need(len(witnesses)==13,'Thirteen retained explicit split witnesses') + word=construct_parent(base) + for witness in witnesses: + word=split(word,witness) + need(word['public']==748 and len(word['program'])==25502,'Exact final composed inventory') + return word diff --git a/research/p104-relay-split-composition/inputs/pr5545-source-closure.tar.gz b/research/p104-relay-split-composition/inputs/pr5545-source-closure.tar.gz new file mode 100644 index 0000000000..3084088544 Binary files /dev/null and b/research/p104-relay-split-composition/inputs/pr5545-source-closure.tar.gz differ diff --git a/research/p104-relay-split-composition/inputs/pr5565-WORD.json.gz b/research/p104-relay-split-composition/inputs/pr5565-WORD.json.gz new file mode 100644 index 0000000000..4ebe6fcb7a Binary files /dev/null and b/research/p104-relay-split-composition/inputs/pr5565-WORD.json.gz differ diff --git a/research/p104-relay-split-composition/inputs/pr5565-construct.py b/research/p104-relay-split-composition/inputs/pr5565-construct.py new file mode 100644 index 0000000000..1abbe7659e --- /dev/null +++ b/research/p104-relay-split-composition/inputs/pr5565-construct.py @@ -0,0 +1,156 @@ +"""Commuting-write contact cascade on the PR5580 P104 word. + +Pierre-Loic Doulcet (hexapode). Apache-2.0. +The source word is by Ali Romman (PR5580), GamingPuzzled (PR5569), +DreamingOfClouds (PR5561), thu-nmrc (PR5551), and the retained P104 contributors. +""" + +from copy import deepcopy + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def construct_fixed_endpoints(source): + """Stage A: Commute four ADD writes into port 198 from helpers 648, 649, 650, 652 + before 198's move 3 -> 597 at event 13528, keeping all 735 initial/final frames fixed. + """ + word = deepcopy(source) + old = source['program'] + expected = { + 13528: ['MOVE', 198, 3, 597, False], + 13529: ['ADD', 198, 710, '2', 597], + 13624: ['MOVE', 648, 3, 597, False], + 13625: ['ADD', 198, 648, '1/2', 597], + 13627: ['MOVE', 649, 3, 597, False], + 13628: ['ADD', 198, 649, '-1/2', 597], + 13630: ['MOVE', 650, 3, 597, False], + 13631: ['ADD', 198, 650, '1/2', 597], + 13633: ['MOVE', 652, 3, 597, False], + 13634: ['ADD', 198, 652, '1/2', 597], + 13770: ['MOVE', 648, 597, 120, False], + 13772: ['MOVE', 649, 597, 120, False], + 13774: ['MOVE', 650, 597, 120, False], + 13778: ['MOVE', 652, 597, 120, False], + } + need(len(old) == 25140, 'Exact PR5580 source event count') + need(all(old[i] == e for i, e in expected.items()), 'Exact Stage A source contacts') + replacement = { + 13528: [ + ['ADD', 198, 648, '1/2', 3], + ['ADD', 198, 649, '-1/2', 3], + ['ADD', 198, 650, '1/2', 3], + ['ADD', 198, 652, '1/2', 3], + ['MOVE', 198, 3, 597, False], + ], + 13624: [], + 13625: [], + 13627: [], + 13628: [], + 13630: [], + 13631: [], + 13633: [], + 13634: [], + 13770: [['MOVE', 648, 3, 120, False]], + 13772: [['MOVE', 649, 3, 120, False]], + 13774: [['MOVE', 650, 3, 120, False]], + 13778: [['MOVE', 652, 3, 120, False]], + } + word['program'] = [ + e for i, old_event in enumerate(old) + for e in replacement.get(i, [deepcopy(old_event)]) + ] + need(len(word['program']) == 25136, 'Exact Stage A event count (25136)') + return word + + +def construct(source): + """Full two-group commuting cascade (Stage A + Stage B): + - Stage A: Commute 13625, 13628, 13631, 13634 (on 198 and 648, 649, 650, 652) + before 13528 to frame 3 (0D), vacating 597 (1D) on 648, 649, 650, 652. + - Stage B: Commute 13806 (ADD 113 += 531) before 13524 (MOVE 113: 3 -> 597) to + frame 3 (0D), retime 13843 (ADD 197 += -531) and 14404 (ADD 507 += -531) from + 597 (1D) to 3 (0D) with initial[531] = 3, and demote 13846 (ADD 197 += 319) + from 617 (3D) to 355 (2D), vacating 597 on 531, 197, 507 and vacating 617 on 197, 319. + """ + word = deepcopy(source) + old = source['program'] + expected = { + 13524: ['MOVE', 113, 3, 597, False], + 13525: ['ADD', 113, 710, '2', 597], + 13528: ['MOVE', 198, 3, 597, False], + 13529: ['ADD', 198, 710, '2', 597], + 13624: ['MOVE', 648, 3, 597, False], + 13625: ['ADD', 198, 648, '1/2', 597], + 13627: ['MOVE', 649, 3, 597, False], + 13628: ['ADD', 198, 649, '-1/2', 597], + 13630: ['MOVE', 650, 3, 597, False], + 13631: ['ADD', 198, 650, '1/2', 597], + 13633: ['MOVE', 652, 3, 597, False], + 13634: ['ADD', 198, 652, '1/2', 597], + 13770: ['MOVE', 648, 597, 120, False], + 13772: ['MOVE', 649, 597, 120, False], + 13774: ['MOVE', 650, 597, 120, False], + 13778: ['MOVE', 652, 597, 120, False], + 13806: ['ADD', 113, 531, '1', 597], + 13842: ['MOVE', 197, 3, 597, False], + 13843: ['ADD', 197, 531, '-1', 597], + 13844: ['MOVE', 197, 597, 617, False], + 13845: ['MOVE', 319, 355, 617, False], + 13846: ['ADD', 197, 319, '1', 617], + 14378: ['MOVE', 319, 617, 728, False], + 14403: ['MOVE', 507, 3, 597, False], + 14404: ['ADD', 507, 531, '-1', 597], + 14405: ['MOVE', 507, 597, 728, False], + 14477: ['MOVE', 531, 597, 741, False], + 14684: ['MOVE', 197, 617, 788, False], + } + need(len(old) == 25140, 'Exact PR5580 source event count') + need(source['initial'][531] == 597 and source['final'][531] == 127, 'Exact helper 531 source endpoints') + need(all(old[i] == e for i, e in expected.items()), 'Exact source contacts') + word['initial'][531] = 3 + replacement = { + 13524: [ + ['ADD', 113, 531, '1', 3], + ['MOVE', 113, 3, 597, False], + ], + 13528: [ + ['ADD', 198, 648, '1/2', 3], + ['ADD', 198, 649, '-1/2', 3], + ['ADD', 198, 650, '1/2', 3], + ['ADD', 198, 652, '1/2', 3], + ['MOVE', 198, 3, 597, False], + ], + 13624: [], + 13625: [], + 13627: [], + 13628: [], + 13630: [], + 13631: [], + 13633: [], + 13634: [], + 13770: [['MOVE', 648, 3, 120, False]], + 13772: [['MOVE', 649, 3, 120, False]], + 13774: [['MOVE', 650, 3, 120, False]], + 13778: [['MOVE', 652, 3, 120, False]], + 13806: [], + 13842: [], + 13843: [['ADD', 197, 531, '-1', 3]], + 13844: [['MOVE', 197, 3, 355, False]], + 13845: [], + 13846: [['ADD', 197, 319, '1', 355]], + 14378: [['MOVE', 319, 355, 728, False]], + 14403: [], + 14404: [['ADD', 507, 531, '-1', 3]], + 14405: [['MOVE', 507, 3, 728, False]], + 14477: [['MOVE', 531, 3, 741, False]], + 14684: [['MOVE', 197, 355, 788, False]], + } + word['program'] = [ + e for i, old_event in enumerate(old) + for e in replacement.get(i, [deepcopy(old_event)]) + ] + need(len(word['program']) == 25133, 'Exact cascade event count (25133)') + return word diff --git a/research/p104-relay-split-composition/inputs/pr5580-WORD.json.gz b/research/p104-relay-split-composition/inputs/pr5580-WORD.json.gz new file mode 100644 index 0000000000..9434855e7d Binary files /dev/null and b/research/p104-relay-split-composition/inputs/pr5580-WORD.json.gz differ diff --git a/research/p104-relay-split-composition/inputs/pr5599-SPLITS.json b/research/p104-relay-split-composition/inputs/pr5599-SPLITS.json new file mode 100644 index 0000000000..81e7f0ad22 --- /dev/null +++ b/research/p104-relay-split-composition/inputs/pr5599-SPLITS.json @@ -0,0 +1,457 @@ +[ + { + "cut_after": 13778, + "frame": 120, + "pivot": 648, + "a": { + "652": "1" + }, + "b": { + "652": "1", + "648": "-1", + "650": "1", + "649": "-1" + }, + "c": { + "652": "1" + }, + "d": { + "652": "1", + "205": "-2", + "648": "-1", + "650": "1", + "649": "-1" + }, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13768, + "frame": 1053, + "pivot": 592, + "a": { + "596": "1" + }, + "b": { + "596": "1", + "594": "1", + "592": "-1", + "593": "1" + }, + "c": { + "596": "1" + }, + "d": { + "596": "1", + "594": "1", + "188": "-1", + "592": "-1", + "593": "1" + }, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13709, + "frame": 1051, + "pivot": 664, + "a": { + "668": "1" + }, + "b": { + "668": "1", + "665": "1", + "666": "-1", + "664": "1" + }, + "c": { + "668": "1" + }, + "d": { + "668": "1", + "115": "2", + "665": "1", + "666": "-1", + "664": "1" + }, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 13676, + "frame": 1049, + "pivot": 680, + "a": { + "684": "1" + }, + "b": { + "684": "1", + "681": "1", + "680": "-1", + "682": "1" + }, + "c": { + "684": "1" + }, + "d": { + "684": "1", + "681": "1", + "126": "2", + "680": "-1", + "682": "1" + }, + "ranks": [ + 5, + 4 + ] + }, + { + "cut_after": 12526, + "frame": 306, + "pivot": 259, + "a": { + "261": "1", + "256": "1/2", + "9": "1/2", + "259": "2" + }, + "b": { + "259": "1/2" + }, + "c": { + "259": "2", + "61": "2", + "265": "2" + }, + "d": { + "262": "1/2", + "270": "-1/2", + "265": "1/2", + "264": "1/2", + "256": "-1/2", + "271": "-1/2", + "263": "1/2" + }, + "ranks": [ + 4, + 5 + ] + }, + { + "cut_after": 12448, + "frame": 516, + "pivot": 432, + "a": { + "437": "1", + "20": "-1", + "435": "-1/2" + }, + "b": { + "432": "1", + "20": "-1" + }, + "c": { + "435": "-1", + "21": "-1" + }, + "d": { + "443": "1/2", + "434": "-1", + "432": "1/2", + "442": "1/2", + "439": "1/2", + "435": "-1", + "444": "-1/2", + "438": "1/2", + "445": "-1/2", + "433": "1/2" + }, + "ranks": [ + 4, + 5 + ] + }, + { + "cut_after": 13967, + "frame": 424, + "pivot": 722, + "a": { + "722": "1", + "3": "1/4", + "67": "1/8" + }, + "b": { + "722": "1" + }, + "c": { + "3": "1/4" + }, + "d": { + "722": "1", + "115": "-4", + "3": "4", + "372": "-4", + "370": "-4" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13642, + "frame": 462, + "pivot": 14, + "a": { + "52": "1", + "14": "-1/2" + }, + "b": { + "727": "-1/4", + "52": "1/2", + "14": "-1" + }, + "c": { + "14": "-1" + }, + "d": { + "727": "-1/4", + "14": "-1", + "403": "1", + "126": "1", + "402": "1" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13643, + "frame": 252, + "pivot": 76, + "a": { + "87": "1", + "76": "-1/2" + }, + "b": { + "717": "-1/4", + "87": "1/2", + "76": "-1" + }, + "c": { + "76": "-1" + }, + "d": { + "717": "-1/4", + "76": "-1", + "227": "1", + "188": "1", + "226": "1" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13643, + "frame": 391, + "pivot": 345, + "a": { + "351": "1", + "345": "-1/2" + }, + "b": { + "712": "-1/4", + "351": "1/2", + "345": "-1" + }, + "c": { + "93": "-1" + }, + "d": { + "712": "-1/4", + "351": "-1/2", + "344": "1/2", + "205": "1", + "350": "-1/2", + "343": "1/2", + "93": "-1", + "341": "-1", + "347": "1/2", + "349": "1/2", + "348": "1/2", + "345": "1/2" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13632, + "frame": 603, + "pivot": 573, + "a": { + "710": "1", + "573": "-1/2", + "572": "1/2" + }, + "b": { + "710": "1/2", + "573": "-1" + }, + "c": { + "573": "-1/2", + "572": "1/2" + }, + "d": { + "710": "1/2", + "115": "1", + "572": "1", + "498": "2", + "306": "-1", + "499": "1", + "502": "-1", + "457": "-2", + "249": "1", + "243": "-1", + "242": "1", + "456": "2", + "252": "-1", + "247": "-1", + "311": "-2", + "205": "-1", + "126": "-1", + "573": "-1", + "317": "-1", + "503": "1" + }, + "ranks": [ + 2, + 7 + ] + }, + { + "cut_after": 13779, + "frame": 597, + "pivot": 649, + "a": { + "649": "1", + "648": "-1" + }, + "b": { + "650": "-1", + "649": "1", + "198": "-1" + }, + "c": { + "649": "1" + }, + "d": { + "650": "-1", + "649": "1" + }, + "ranks": [ + 1, + 8 + ] + }, + { + "cut_after": 12079, + "frame": 477, + "pivot": 405, + "a": { + "405": "1", + "42": "-1", + "403": "-1/2" + }, + "b": { + "405": "1", + "41": "2" + }, + "c": { + "403": "-1" + }, + "d": { + "415": "1", + "403": "-1", + "402": "-1", + "405": "-1", + "400": "2", + "404": "-1", + "414": "1", + "409": "-1", + "408": "-1" + }, + "ranks": [ + 8, + 1 + ] + }, + { + "cut_after": 12611, + "frame": 267, + "pivot": 225, + "a": { + "234": "1", + "224": "-1/4", + "81": "1/4", + "225": "-1/2", + "57": "1/4", + "92": "1/4" + }, + "b": { + "225": "-2" + }, + "c": { + "227": "1" + }, + "d": { + "229": "1", + "226": "1", + "230": "-1", + "225": "-1", + "224": "-1", + "231": "-1", + "228": "1", + "227": "1" + }, + "ranks": [ + 8, + 1 + ] + }, + { + "cut_after": 13817, + "frame": 597, + "pivot": 648, + "a": { + "652": "1" + }, + "b": { + "652": "1", + "648": "-1", + "198": "-1/2", + "650": "1", + "649": "-1" + }, + "c": { + "648": "1" + }, + "d": { + "648": "1" + }, + "ranks": [ + 1, + 4 + ] + } +] diff --git a/research/p104-relay-split-composition/inputs/pr5599-WORD.json.gz b/research/p104-relay-split-composition/inputs/pr5599-WORD.json.gz new file mode 100644 index 0000000000..d9ebf6cace Binary files /dev/null and b/research/p104-relay-split-composition/inputs/pr5599-WORD.json.gz differ diff --git a/research/p104-relay-split-composition/inputs/pr5599-construct.py b/research/p104-relay-split-composition/inputs/pr5599-construct.py new file mode 100644 index 0000000000..698a4cbcc0 --- /dev/null +++ b/research/p104-relay-split-composition/inputs/pr5599-construct.py @@ -0,0 +1,157 @@ +"""Split independent helper jobs with three scalar basis changes. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The source word and caller retain the credits in README.md. +""" +from copy import deepcopy +from fractions import Fraction as Q +import local as L + + +def inverse(program): + return [[e[0], *e[1:-2], + str(1/Q(e[-2]) if e[0] == 'SCALE' else -Q(e[-2])), e[-1]] + for e in reversed(program)] + + +def basis(a, b, pivot, frame): + """Return B with row pivot equal to a and B b equal to e_pivot.""" + L.need(sum(v*b.get(k, 0) for k, v in a.items()) == 1, 'Unit basis pairing') + roles = sorted(set(a) | set(b) | {pivot}) + values, program = dict(b), [] + + def emit(event): + program.append(event) + r, q = event[1], Q(event[-2]) + if event[0] == 'SCALE': + values[r] = values.get(r, 0)*q + else: + values[r] = values.get(r, 0)+q*values.get(event[2], 0) + + j = pivot if b.get(pivot) else next(r for r in roles if b.get(r)) + if j != pivot: + for event in [['ADD', pivot, j, '1', frame], + ['ADD', j, pivot, '-1', frame], + ['ADD', pivot, j, '1', frame], + ['SCALE', j, '-1', frame]]: + emit(event) + if values[pivot] != 1: + emit(['SCALE', pivot, str(1/values[pivot]), frame]) + for r in roles: + if r != pivot and values.get(r): + emit(['ADD', r, pivot, str(-values[r]), frame]) + L.need(all(values.get(r, 0) == int(r == pivot) for r in roles), 'Basis column') + inverse_rows = {r: {r: Q(1)} for r in roles} + for e in inverse(program): + if e[0] == 'SCALE': + inverse_rows[e[1]] = {k: Q(e[-2])*v for k, v in inverse_rows[e[1]].items()} + else: + L.add(inverse_rows[e[1]], inverse_rows[e[2]], Q(e[-2])) + row = {} + for r, q in a.items(): + L.add(row, inverse_rows[r], q) + L.need(row[pivot] == 1, 'Basis row coefficient') + for r in roles: + if r != pivot and row.get(r): + program.append(['ADD', pivot, r, str(row[r]), frame]) + return program + + +def check_cut(word, h): + """Check the whole prefix row and suffix column over the rationals.""" + n, cut, f, p = word['public'], h['cut_after'], h['frame'], h['pivot'] + a, b, c, d = ({int(k): Q(v) for k, v in h[s].items()} for s in ('a', 'b', 'c', 'd')) + main = set(word['live']) | {r+112 for r in word['live']} + L.need(p < n and p not in main, 'A helper supplies the retained output role') + u, v = word['initial'][p], word['final'][p] + group = {r for r in range(n) if r not in main and + (word['initial'][r], word['final'][r]) == (u, v)} + L.need(set(c) | set(d) <= group, 'Both boundary vectors use one helper group') + L.need(L.span(word['frames'][u]) < L.span(word['frames'][f]) < L.span(word['frames'][v]), + 'Two strictly productive nested targets') + L.need(h['ranks'] == [len(word['frames'][f])-len(word['frames'][u]), + len(word['frames'][v])-len(word['frames'][f])], 'Declared split ranks') + rows = [{r: Q(1)} if r < n else {} for r in range(n+8)] + current = word['initial']+[None]*8 + for e in word['program'][:cut+1]: + op, r = e[:2] + if op == 'MOVE': + current[r] = e[3] + elif op in ('INIT', 'CLEAR'): + rows[r] = {} + current[r] = e[2] if op == 'INIT' else None + elif op == 'SCALE': + rows[r] = {k: Q(e[-2])*x for k, x in rows[r].items()} + elif op == 'COPY': + rows[r] = {k: Q(e[-2])*x for k, x in rows[e[2]].items()} + else: + L.add(rows[r], rows[e[2]], Q(e[-2])) + L.need(all(current[r] == f for r in set(a) | set(b) | {p}), 'One intermediate chart') + total = {} + for r, q in a.items(): + L.add(total, rows[r], q) + L.need(total == c, 'Exact prefix functional; no other input') + column = [b.get(r, Q(0)) for r in range(n+8)] + for e in word['program'][cut+1:]: + op, r = e[:2] + if op in ('INIT', 'CLEAR'): + column[r] = Q(0) + elif op == 'SCALE': + column[r] *= Q(e[-2]) + elif op == 'COPY': + column[r] = Q(e[-2])*column[e[2]] + elif op == 'ADD': + column[r] += Q(e[-2])*column[e[2]] + L.need(column == [d.get(r, Q(0)) for r in range(n+8)], 'Exact suffix direction; no other output') + L.need(sum(x*b.get(r, 0) for r, x in a.items()) == + sum(x*d.get(r, 0) for r, x in c.items()) == 1, 'Both independent pairings') + return a, b, c, d + + +def split(word, h): + a, b, c, d = check_cut(word, h) + n, p, f, cut = word['public'], h['pivot'], h['frame'], h['cut_after'] + u, v = word['initial'][p], word['final'][p] + + def shift_owned(event): + e = event.copy() + e[1] += int(e[1] >= n) + if e[0] in ('ADD', 'COPY'): + e[2] += int(e[2] >= n) + return e + + def use_successor(event): + e = event.copy() + if e[1] == p: + e[1] = n + if e[0] in ('ADD', 'COPY') and e[2] == p: + e[2] = n + return e + + boundary, middle = basis(c, d, p, u), basis(a, b, p, f) + out = deepcopy(word) + out['public'] = n+1 + out['initial'].append(f) + out['final'].append(v) + out['final'][p] = f + out['program'] = inverse(boundary) + out['program'] += [shift_owned(e) for e in word['program'][:cut+1]] + out['program'] += [shift_owned(e) for e in middle] + out['program'] += [use_successor(shift_owned(e)) for e in inverse(middle)] + out['program'] += [use_successor(shift_owned(e)) for e in word['program'][cut+1:]] + out['program'] += [use_successor([*e[:-1], v]) for e in boundary] + return out + + +def construct(source, witnesses): + word = deepcopy(source) + baseline = L.replay(source) + receipts = [] + for h in witnesses: + word = split(word, h) + result = L.replay(word) + L.need(result['paid'] == baseline['paid'], 'Every paid Gaussian occurrence retained') + receipts.append({'cut_after': h['cut_after'], 'pivot': h['pivot'], + 'ranks': h['ranks'], 'public': word['public'], + 'events': len(word['program'])}) + return word, receipts diff --git a/research/p104-relay-split-composition/inputs/pr5599-local.py b/research/p104-relay-split-composition/inputs/pr5599-local.py new file mode 100644 index 0000000000..e6e28bacda --- /dev/null +++ b/research/p104-relay-split-composition/inputs/pr5599-local.py @@ -0,0 +1,206 @@ +"""Check the complete P104 word with an independent helper inventory. + +Adapted from Ali Romman's PR5544/5545. David Arias supplied the word; +Cinna Davis supplied private reuse; Gareth Davidson supplied composition. +Prepared by Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +from functools import lru_cache +from hashlib import sha256 +from pathlib import Path +import gzip +import importlib.util +import json +import sys + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + +def need(ok, why): + if not ok: + raise ValueError(why) + +def read(path): + raw = path.read_bytes() + return json.loads(gzip.decompress(raw) if path.suffix == '.gz' else raw) + +def load(path, name): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + +def add(dst, src, q): + for k, v in tuple(src.items()): + value = dst.get(k, 0) + q*v + if value: + dst[k] = value + else: + dst.pop(k, None) + +def span(basis): + out = {0} + for v in basis: + need(type(v) is int and 0 < v < 512 and v not in out, 'Independent binary basis') + out |= {x ^ v for x in tuple(out)} + return frozenset(out) + +def replay(w): + public = w['public'] + need(type(public) is int and 735 <= public <= 750, 'Public inventory bound') + need(len(w['initial']) == len(w['final']) == public, 'Public boundary size') + need(len(w['program']) < 26000, 'Fixed operation bound') + frames = [span(x) for x in w['frames']] + rows = [{r:Q(1)} for r in range(public+8)] + current = list(w['initial']) + [None]*8 + paid, scalar, live_owned, peak = Counter(), 0, set(), 0 + lifetimes = 0 + for e in w['program']: + op, r = e[:2] + need(0 <= r < public+8, 'Role index') + if op == 'MOVE': + _, r, a, b, private = e + need(current[r] == a and (r in live_owned) == private, 'Transport source and ownership') + need(frames[b] < frames[a] if private else frames[a] < frames[b], 'Nested chronological transport') + paid[abs(len(w['frames'][b])-len(w['frames'][a]))] += 1 + current[r] = b + elif op == 'INIT': + need(r >= public and r not in live_owned, 'Owned initialization') + live_owned.add(r) + lifetimes += 1 + peak = max(peak, len(live_owned)) + rows[r] = {} + current[r] = e[2] + scalar += 2 + elif op == 'CLEAR': + need(r in live_owned and current[r] == e[2], 'Owned erasure at declared frame') + rows[r] = {} + current[r] = None + live_owned.remove(r) + scalar += 2 + else: + q, f = Q(e[-2]), e[-1] + need(q and current[r] == f, 'Scalar destination and coefficient') + n, d = abs(q.numerator), q.denominator + need(d & (d-1) == 0, 'Dyadic scalar coefficient') + need(abs(q)+1 < 2**16, 'Fixed scalar growth bound') + if op == 'SCALE': + need(n & (n-1) == 0, 'Dyadic unit SCALE') + rows[r] = {k:q*x for k,x in rows[r].items()} + scalar += 2*(abs(n.bit_length()-d.bit_length()) + int(q < 0)) + else: + s = e[2] + need(s != r and 0 <= s < public+8 and current[s] == f, 'Common scalar chart') + if op == 'COPY': + need(r in live_owned and not rows[r], 'COPY into cleared owned field') + rows[r] = {k:q*x for k,x in rows[s].items()} + else: + need(op == 'ADD', 'Scalar opcode') + add(rows[r], rows[s], q) + scalar += 2*(3+n.bit_length()-1+n.bit_count()+d.bit_length()-1) + need(not live_owned and peak == 1 and current[:public] == w['final'], 'All public and owned exits') + live = set(w['live']) + for r,row in enumerate(rows): + expected = {r:Q(1)} if r < public else {} + if r-112 in live: + expected[r-112] = Q(1) + need(row == expected, 'All public and owned rows') + main = live | {r+112 for r in live} + helpers = Counter(len(w['frames'][w['final'][r]])-len(w['frames'][w['initial'][r]]) for r in range(public) if r not in main) + need(len(live) == len(w['ports']) == 104 and len(main) == 208 and min(helpers) > 0, 'Independent productive inputs') + return {'paid':dict(paid), 'helpers':dict(helpers), 'public_inputs':public, 'owned_lifetimes':lifetimes, + 'peak_owned_fields':peak, 'real_scalar_allowance':scalar, 'endpoint_coefficients':(public+8)*(public+8), + 'paid_rank_mass':sum(r*count for r,count in paid.items())} + +def reverse_columns(w): + """Check the transpose with dense dyadic rows and the reverse chronology.""" + public = w['public'] + n = public+8 + rows = [[int(i == j) for j in range(n)] for i in range(n)] + exponents = [0]*n + for e in reversed(w['program']): + op,r = e[:2] + if op == 'MOVE': + continue + if op in ('INIT','CLEAR'): + rows[r] = [0]*n + exponents[r] = 0 + continue + q = Q(e[-2]) + qe = q.denominator.bit_length()-1 + if op == 'SCALE': + rows[r] = [q.numerator*x for x in rows[r]] + exponents[r] += qe + else: + s = e[2] + level = max(exponents[s], exponents[r]+qe) + a, b = 1 << (level-exponents[s]), q.numerator << (level-exponents[r]-qe) + rows[s] = [a*x+b*y for x,y in zip(rows[s],rows[r])] + exponents[s] = level + if op == 'COPY': + rows[r] = [0]*n + exponents[r] = 0 + r = s + while exponents[r] and not any(x & 1 for x in rows[r]): + rows[r] = [x//2 for x in rows[r]] + exponents[r] -= 1 + for r,row in enumerate(rows): + expected = [0]*n + if r < public: + expected[r] = 1 << exponents[r] + if r in w['live']: + expected[r+112] = 1 << exponents[r] + need(row == expected, 'Independent dense transpose columns') + return {'columns':n, 'coefficients':n*n, 'arithmetic':'Dense integer rows with binary denominators; reverse chronology'} + +def native(w): + n = w['public'] + C = load(ROOT/'research/p104-native-channel/vendor/clifford_exact.py', 'p104_productive_clifford') + V = load(ROOT/'research/p104-native-channel/vendor/native_verify.py', 'p104_productive_gaussian') + @lru_cache(None) + def chart(i): + return C.canonical_frame(9, tuple(w['frames'][i])) + recipes = {} + def check(a,b): + if (a,b) not in recipes: + recipe,_ = C.lower_child(chart(a).adjoint().then(chart(b))) + expected = V.adjoint(V.frame(w['frames'][a],9)) + V.frame(w['frames'][b],9) + V.equal(V.recipe(recipe),expected,'Native chart change and exact global phase') + need(recipe['rank'] == abs(len(w['frames'][a])-len(w['frames'][b])), 'Native boundary rank') + recipes[a,b] = recipe + return recipes[a,b] + for e in w['program']: + if e[0] == 'MOVE': + check(e[2],e[3]) + main = set(w['live']) | {r+112 for r in w['live']} + helper_profile = Counter() + for r in range(n): + if r not in main: + helper_profile[check(w['initial'][r],w['final'][r])['rank']] += 1 + adapters = [] + for r,q in zip(w['live'],w['ports']): + need(w['frames'][w['initial'][r]] == [q], 'Literal central port') + need(span(w['frames'][w['final'][r+112]]) == frozenset(x for x in range(512) if not (x&q).bit_count()%2), 'Literal output hyperplane') + tests = [ + (C.cgate(9,q,1).adjoint().then(chart(w['initial'][r])), V.adjoint((('C',q,1),))+V.frame(w['frames'][w['initial'][r]],9)), + (chart(w['final'][r+112]).adjoint().then(C.cgate(9,q,-1).then(C.fourier(9))), V.adjoint(V.frame(w['frames'][w['final'][r+112]],9))+(('C',q,-1),)+V.fourier(9))] + for actual,expected in tests: + recipe,_ = C.lower_child(actual) + need(recipe['rank'] == 0, 'Free intrinsic main adapter') + V.equal(V.recipe(recipe),expected,'Main endpoint phase') + adapters.append(recipe) + bad = json.loads(json.dumps(next(iter(recipes.values())))) + bad['left']['phase'] = (bad['left']['phase']+1)%4 + a,b = next(iter(recipes)) + try: + V.equal(V.recipe(bad),V.adjoint(V.frame(w['frames'][a],9))+V.frame(w['frames'][b],9),'Wrong phase control') + except ValueError: + pass + else: + raise ValueError('Wrong native phase accepted') + payload = [[a,b,recipes[a,b]] for a,b in sorted(recipes)] + adapters + return {'distinct_maps':len(recipes),'main_adapters':len(adapters),'helper_normalizers':2*sum(helper_profile.values()), + 'helpers':dict(helper_profile),'recipe_payload_sha256':sha256(json.dumps(payload,sort_keys=True,separators=(',',':')).encode()).hexdigest(), + 'wrong_phase_rejected':True, 'proof':'Every signed Pauli image and exact global phase; frame induction at every positive tensor width'} diff --git a/research/p104-relay-split-composition/inputs/pr5599-pricing.py b/research/p104-relay-split-composition/inputs/pr5599-pricing.py new file mode 100644 index 0000000000..fe03d7eebe --- /dev/null +++ b/research/p104-relay-split-composition/inputs/pr5599-pricing.py @@ -0,0 +1,169 @@ +"""Complete mixed-target price, compiler and outer transfer. + +The interval and compiler bounds follow zxv and Cao Yifan. The productive +recursion is by Jacob Alan Sussman. The controller is by Cinna Davis. +Adapted from Ali Romman's PR5544/5545 for the two coupled contact changes. +Successor choices were prepared for thu-nmrc with OpenAI Codex assistance. +Helper-subspace targets were added by Ali Romman with OpenAI Codex assistance. +Ali Romman's complete caller/price proof and all predecessor credit are retained. +Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('.00309839'), Q('.0030983905') +PREVIOUS = Q('.00308189') + + +def encode(x): + if isinstance(x,Q): + return str(x) + if isinstance(x,dict): + return {str(k):encode(v) for k,v in x.items()} + if isinstance(x,(list,tuple)): + return [encode(v) for v in x] + return x + + +def assemble(local, native, word, physical): + paid, targets = Counter(), Counter() + counts = Counter() + L.need(local['helpers'] == native['helpers'], 'Every productive helper has a native target') + for e in word['physical_events']: + counts[e[0]] += 1 + if e[0] == 'LOCAL': + L.need(e[3] is False, 'Every source invocation is forward') + paid.update(local['paid']) + targets.update(local['helpers']) + elif e[0] == 'QUERY_SHEAR': + paid[1] += 104 + elif e[0] == 'IDLE': + paid[8*len(e[2])] += 208 + main = Counter() + idle = Counter({8*len(e[2]):0 for e in word['physical_events'] if e[0] == 'IDLE'}) + for e in word['physical_events']: + if e[0] == 'IDLE': + idle[8*len(e[2])] += 208 + L.need(idle == physical['whole_idle_jobs'], 'Every whole idle has a native Gaussian and full rank') + for term in word['diagonal']: + main[1+8*sum(term[1:])] += 104 + L.need(main == physical['main_targets'], 'Every main target has its full native phase') + targets.update(main) + L.need(counts['LOCAL'] == 18 and counts['QUERY_SHEAR'] == counts['IDLE'] == 15, 'Complete call census') + # Recount by the two path lengths, without using emitted main diagonals. + second_t = Counter({r:18*n for r,n in local['helpers'].items()}) + second_p = Counter({r:18*n for r,n in local['paid'].items()}) + second_t[145] += 208 + second_p[1] += 15*104 + for length in (7,8): + for j in range(1,length+1): + second_t[1+8*(j+1)] += 208 + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') + L.need(sum(targets.values()) == 13084 and sum(paid.values()) == 66852, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + + +def run(local,native,word,physical): + T,P,counts = assemble(local,native,word,physical) + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py','p104_productive_intervals') + other = L.load(L.ROOT/'research/kappa-rebuild/architecture/mixed_target_probe.py','p104_productive_second_intervals') + def margin(k): + a,b = E.moment(T,1-k), E.moment(P,1-k) + return a[0]-b[1],a[1]-b[0] + lo,hi,grid = 0,10**12,10**14 + while hi-lo > 1: + m=(lo+hi)//2 + if margin(Q(m,grid))[0] > 0: + lo=m + else: + hi=m + lower,upper = Q(lo,grid),Q(hi,grid) + signed = Counter(T) + signed.subtract(P) + cap = Q('.0034') + derivative_upper = Q(0) + for rank, count in signed.items(): + logarithm = E.log_bounds(rank) + low = E.mul(E.power(rank, 1-cap), logarithm)[0] + high = rank*logarithm[1] + derivative_upper -= count*(low if count >= 0 else high) + L.need(derivative_upper < 0, 'Unique raw crossing below the retained BIT cap') + L.need(margin(lower)[0] > 0 and margin(upper)[1] < 0, 'Strict rational crossing enclosure') + L.need(PREVIOUS < KAPPA < TESTED < lower and margin(PREVIOUS)[0] > 0, 'Changed complete bill improves selected kappa') + t,u,v,c,b = 1-TESTED,Q(1,5),1024,17,18 + target,paid = E.moment(T,t),E.moment(P,t) + tl,th = other.moment(T,TESTED) + pl,ph = other.moment(P,TESTED) + L.need(tl > ph and max(tl,target[0]) <= min(th,target[1]) and max(pl,paid[0]) <= min(ph,paid[1]), 'Two exact moment engines') + alpha = E.divide(paid,target) + gamma = E.divide(E.moment(P,t+u),E.mul(E.power(c,u),target)) + delta = E.divide((Q(sum(T.values())*b),)*2,E.mul(E.power(c,TESTED),target)) + reserve,decay = Q(1,10**10),Q(39,40) + L.need(alpha[1] < 1-reserve and gamma[1] < decay and delta[1] < decay, 'All three charged tail ratios') + L.need(decay**128 < Q(1,16), 'Both tail decay blocks') + normalized = 1/(1+v*reserve)+Q(4,2**32) + L.need(normalized < 1 and c**64 < b**63, 'Full completion, splitting and rounding charges') + theta,power = Q(63,64),1024 + eta = E.scale(E.power(145,-v*TESTED),t) + L.need(2*(c**v)**64 <= (145**v)**63 and eta[0] > theta**power, 'Shifted exits and complement capacity') + L.need(E.power(145,v*TESTED)[1] < 2**power, 'Compiler initial range') + gap = (TESTED-KAPPA)/7 + L.need(gap.numerator == 1, 'Exact compiler integer grid') + step = gap.denominator + def wins(j): + return (step*j+1)**power < 2**j + left,right=1,2 + while not wins(right): + left,right=right,2*right + while right-left > 1: + m=(left+right)//2 + if wins(m): + right=m + else: + left=m + H=step*right + L.need(H > 8*v and wins(right) and not wins(right-1), 'Finite uniform threshold with predecessor rejection') + local_routes = (sum(local['paid'].values())+native['helper_normalizers']+native['main_adapters']+4*104+4*local['owned_lifetimes'])*1000 + L.need(local['real_scalar_allowance']+local_routes < 10**7, 'Every local scalar, route and owned operation is funded') + boundary = sum(len(word['boundaries'][side+'_program']) for side in ('left','right')) + raw = 18*10**7 + 15*1664 + 32*104*(len(word['physical_events'])+boundary) + raw += 32*104*(26+1000) + L.need(raw < 10**9, 'Complete nonrecursive raw bound') + bit = L.read(L.ROOT/'research/query-thinned-controllers/RESULT.json')['ordinary_BIT'] + atom = Q(bit['atom']) + ordinary=(1-atom)*Q(bit['after_cover'])+atom*Q('.0000384599') + admitted=Q(bit['admitted']) + L.need(atom > ordinary > admitted > TESTED and atom < 1-ordinary, 'Retained BIT admission and stock') + outer_module=L.load(L.ROOT/'research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py','p104_productive_outer') + params={'kappa':KAPPA,'tested_saving':TESTED,'complex_uniform_saving':KAPPA+6*gap, + 'b':KAPPA+5*gap,'a':KAPPA+4*gap,'q':KAPPA+3*gap,'bit_saving':admitted, + 'epsilon':1-gap,'beta':1-3*gap,'r0':gap/10,'stop':gap,'layout':gap,'d':gap} + outer=outer_module.ledger(params) + outer['functional_checks']['actual_new_BIT_stock_sublinear']=params['beta']*(1-atom) + L.need(len(outer['strict_checks']) == 54 and len(outer['functional_checks']) == 4, 'Complete outer predicate inventory') + L.need(all(x > 0 for key in ('strict_checks','functional_checks') for x in outer[key].values()), 'All outer inequalities strict') + wrong_cutoff = E.divide((Q(sum(T.values())*21),)*2,E.mul(E.power(20,TESTED),target)) + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') + return encode({'kappa':KAPPA,'kappa_decimal':'.00309839','previous_open_pr5580':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA], + 'raw_ceiling':{'interval':[Q(0),cap],'derivative_upper':derivative_upper},'margin_at_previous':E.display(margin(PREVIOUS)), + 'targets':T,'paid':P,'productive_fields':sum(T.values()),'paid_calls':sum(P.values()), + 'rank_mass_surplus':760,'full_forward_calls':18,'query_shears':15,'whole_idle_jobs':3120, + 'strictification':{'tested':TESTED,'power':v,'cutoff':c,'floor':b,'tail_offset':u,'reserve':reserve,'tail_decay':decay,'tail_block':128, + 'alpha':E.display(alpha),'gamma':E.display(gamma),'delta':E.display(delta),'normalized_paid_upper':normalized}, + 'compiler':{'theta':theta,'logarithm_power':power,'eta':E.display(eta),'gap':gap,'H':H,'N':'2^'+str(H), + 'integer_test_exponent':right,'uniform_saving':params['complex_uniform_saving'],'word_materialized':False}, + 'nonrecursive':{'local_scalar':local['real_scalar_allowance'],'local_routes':local_routes, + 'raw_scalar_upper':raw,'raw_budget':10**9,'peak_owned_fields':1, + 'fixed_scalar_growth_bound':'At most 2^(16*26000) before native factors; a declared constant, not an attained norm.', + 'local_paid_rank_mass':local['paid_rank_mass'], + 'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); use local_paid_rank_mass for the whole word.'}, + 'ordinary_BIT':bit,'outer':outer, + 'negative_controls':{'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-relay-split-composition/inputs/pr5605-WORD.json.gz b/research/p104-relay-split-composition/inputs/pr5605-WORD.json.gz new file mode 100644 index 0000000000..508ad96b04 Binary files /dev/null and b/research/p104-relay-split-composition/inputs/pr5605-WORD.json.gz differ diff --git a/research/p104-relay-split-composition/inputs/pr5605-construct.py b/research/p104-relay-split-composition/inputs/pr5605-construct.py new file mode 100644 index 0000000000..31f9b76c9b --- /dev/null +++ b/research/p104-relay-split-composition/inputs/pr5605-construct.py @@ -0,0 +1,60 @@ +"""Reconstruct the shared587 relay from the frozen PR5580 word. + +Prepared for flyingviper with substantial OpenAI Codex assistance and +independent agents. Source word: Ali Romman and the retained P104 lineage. +Apache-2.0. +""" +from copy import deepcopy + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def construct(base): + old = base['program'] + need(len(old) == 25140, 'Pinned PR5580 event count') + expected = { + 13413: ['ADD',159,738,'-1',565], + 13414: ['MOVE',738,565,564,True], + 13415: ['ADD',203,738,'2',564], + 13416: ['MOVE',148,467,596,False], + 13417: ['MOVE',738,564,596,True], + 13418: ['ADD',148,738,'2',596], + 13420: ['MOVE',738,596,597,True], + 14010: ['ADD',165,21,'-1/2',652], + 14017: ['MOVE',148,596,655,False], + 14633: ['MOVE',587,3,597,False], + 14634: ['ADD',587,734,'-4',597], + 14635: ['MOVE',587,597,773,False], + } + need(all(old[i] == e for i,e in expected.items()), 'Pinned changed source events') + affected = {123: '1/2',148: '-1/2',175: '-1/2',182: '-1/2',203: '1/2',223: '-1/2'} + # Q = I-uN, N=e587-4e734. Supports are disjoint, so these ADDs + # implement the exact nilpotent inverse without implementation feedback. + from fractions import Fraction as Q + out = [['ADD',r,s,str(-Q(u)*v),3] + for r,u in sorted(affected.items()) for s,v in ((587,Q(1)),(734,Q(-4)))] + remove = {13414,13415,13416,13417,13418,13420,14633,14634} + for i,e in enumerate(old): + if i == 24461: + # Undo the shared residual while all six targets and three + # unmodified sources coexist at the full frame. + for r,sign in ((21,-1),(47,-1),(434,1),(435,1),(436,1),(437,1)): + out += [['ADD',r,133,str(sign),127], + ['ADD',r,587,str(Q(sign,2)),127], + ['ADD',r,734,str(-2*sign),127]] + if i not in remove: + out.append(['MOVE',587,652,773,False] if i == 14635 else + ['MOVE',148,467,655,False] if i == 14017 else deepcopy(e)) + if i == 13413: + out.append(['MOVE',738,565,597,True]) + if i == 13610: + out.extend(deepcopy([old[14633],old[14634]])) + if i == 14010: + out.extend([['MOVE',587,597,652,False],['ADD',21,587,'1',652]]) + word=deepcopy(base) + word['program']=out + need(len(out) == 25167, 'Exact reconstructed event count') + return word diff --git a/research/p104-relay-split-composition/pricing.py b/research/p104-relay-split-composition/pricing.py new file mode 100644 index 0000000000..06319f1cdf --- /dev/null +++ b/research/p104-relay-split-composition/pricing.py @@ -0,0 +1,169 @@ +"""Complete mixed-target price, compiler and outer transfer. + +The interval and compiler bounds follow zxv and Cao Yifan. The productive +recursion is by Jacob Alan Sussman. The controller is by Cinna Davis. +Adapted from Ali Romman's PR5544/5545 for the two coupled contact changes. +Successor choices were prepared for thu-nmrc with OpenAI Codex assistance. +Helper-subspace targets were added by Ali Romman with OpenAI Codex assistance. +Ali Romman's complete caller/price proof and all predecessor credit are retained. +Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('.00310184'), Q('.0031018405') +PREVIOUS = Q('.00309839') + + +def encode(x): + if isinstance(x,Q): + return str(x) + if isinstance(x,dict): + return {str(k):encode(v) for k,v in x.items()} + if isinstance(x,(list,tuple)): + return [encode(v) for v in x] + return x + + +def assemble(local, native, word, physical): + paid, targets = Counter(), Counter() + counts = Counter() + L.need(local['helpers'] == native['helpers'], 'Every productive helper has a native target') + for e in word['physical_events']: + counts[e[0]] += 1 + if e[0] == 'LOCAL': + L.need(e[3] is False, 'Every source invocation is forward') + paid.update(local['paid']) + targets.update(local['helpers']) + elif e[0] == 'QUERY_SHEAR': + paid[1] += 104 + elif e[0] == 'IDLE': + paid[8*len(e[2])] += 208 + main = Counter() + idle = Counter({8*len(e[2]):0 for e in word['physical_events'] if e[0] == 'IDLE'}) + for e in word['physical_events']: + if e[0] == 'IDLE': + idle[8*len(e[2])] += 208 + L.need(idle == physical['whole_idle_jobs'], 'Every whole idle has a native Gaussian and full rank') + for term in word['diagonal']: + main[1+8*sum(term[1:])] += 104 + L.need(main == physical['main_targets'], 'Every main target has its full native phase') + targets.update(main) + L.need(counts['LOCAL'] == 18 and counts['QUERY_SHEAR'] == counts['IDLE'] == 15, 'Complete call census') + # Recount by the two path lengths, without using emitted main diagonals. + second_t = Counter({r:18*n for r,n in local['helpers'].items()}) + second_p = Counter({r:18*n for r,n in local['paid'].items()}) + second_t[145] += 208 + second_p[1] += 15*104 + for length in (7,8): + for j in range(1,length+1): + second_t[1+8*(j+1)] += 208 + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') + L.need(sum(targets.values()) == 13048 and sum(paid.values()) == 66690, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + + +def run(local,native,word,physical): + T,P,counts = assemble(local,native,word,physical) + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py','p104_productive_intervals') + other = L.load(L.ROOT/'research/kappa-rebuild/architecture/mixed_target_probe.py','p104_productive_second_intervals') + def margin(k): + a,b = E.moment(T,1-k), E.moment(P,1-k) + return a[0]-b[1],a[1]-b[0] + lo,hi,grid = 0,10**12,10**14 + while hi-lo > 1: + m=(lo+hi)//2 + if margin(Q(m,grid))[0] > 0: + lo=m + else: + hi=m + lower,upper = Q(lo,grid),Q(hi,grid) + signed = Counter(T) + signed.subtract(P) + cap = Q('.0034') + derivative_upper = Q(0) + for rank, count in signed.items(): + logarithm = E.log_bounds(rank) + low = E.mul(E.power(rank, 1-cap), logarithm)[0] + high = rank*logarithm[1] + derivative_upper -= count*(low if count >= 0 else high) + L.need(derivative_upper < 0, 'Unique raw crossing below the retained BIT cap') + L.need(margin(lower)[0] > 0 and margin(upper)[1] < 0, 'Strict rational crossing enclosure') + L.need(PREVIOUS < KAPPA < TESTED < lower and margin(PREVIOUS)[0] > 0, 'Changed complete bill improves selected kappa') + t,u,v,c,b = 1-TESTED,Q(1,5),1024,17,18 + target,paid = E.moment(T,t),E.moment(P,t) + tl,th = other.moment(T,TESTED) + pl,ph = other.moment(P,TESTED) + L.need(tl > ph and max(tl,target[0]) <= min(th,target[1]) and max(pl,paid[0]) <= min(ph,paid[1]), 'Two exact moment engines') + alpha = E.divide(paid,target) + gamma = E.divide(E.moment(P,t+u),E.mul(E.power(c,u),target)) + delta = E.divide((Q(sum(T.values())*b),)*2,E.mul(E.power(c,TESTED),target)) + reserve,decay = Q(1,10**10),Q(39,40) + L.need(alpha[1] < 1-reserve and gamma[1] < decay and delta[1] < decay, 'All three charged tail ratios') + L.need(decay**128 < Q(1,16), 'Both tail decay blocks') + normalized = 1/(1+v*reserve)+Q(4,2**32) + L.need(normalized < 1 and c**64 < b**63, 'Full completion, splitting and rounding charges') + theta,power = Q(63,64),1024 + eta = E.scale(E.power(145,-v*TESTED),t) + L.need(2*(c**v)**64 <= (145**v)**63 and eta[0] > theta**power, 'Shifted exits and complement capacity') + L.need(E.power(145,v*TESTED)[1] < 2**power, 'Compiler initial range') + gap = (TESTED-KAPPA)/7 + L.need(gap.numerator == 1, 'Exact compiler integer grid') + step = gap.denominator + def wins(j): + return (step*j+1)**power < 2**j + left,right=1,2 + while not wins(right): + left,right=right,2*right + while right-left > 1: + m=(left+right)//2 + if wins(m): + right=m + else: + left=m + H=step*right + L.need(H > 8*v and wins(right) and not wins(right-1), 'Finite uniform threshold with predecessor rejection') + local_routes = (sum(local['paid'].values())+native['helper_normalizers']+native['main_adapters']+4*104+4*local['owned_lifetimes'])*1000 + L.need(local['real_scalar_allowance']+local_routes < 10**7, 'Every local scalar, route and owned operation is funded') + boundary = sum(len(word['boundaries'][side+'_program']) for side in ('left','right')) + raw = 18*10**7 + 15*1664 + 32*104*(len(word['physical_events'])+boundary) + raw += 32*104*(26+1000) + L.need(raw < 10**9, 'Complete nonrecursive raw bound') + bit = L.read(L.ROOT/'research/query-thinned-controllers/RESULT.json')['ordinary_BIT'] + atom = Q(bit['atom']) + ordinary=(1-atom)*Q(bit['after_cover'])+atom*Q('.0000384599') + admitted=Q(bit['admitted']) + L.need(atom > ordinary > admitted > TESTED and atom < 1-ordinary, 'Retained BIT admission and stock') + outer_module=L.load(L.ROOT/'research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py','p104_productive_outer') + params={'kappa':KAPPA,'tested_saving':TESTED,'complex_uniform_saving':KAPPA+6*gap, + 'b':KAPPA+5*gap,'a':KAPPA+4*gap,'q':KAPPA+3*gap,'bit_saving':admitted, + 'epsilon':1-gap,'beta':1-3*gap,'r0':gap/10,'stop':gap,'layout':gap,'d':gap} + outer=outer_module.ledger(params) + outer['functional_checks']['actual_new_BIT_stock_sublinear']=params['beta']*(1-atom) + L.need(len(outer['strict_checks']) == 54 and len(outer['functional_checks']) == 4, 'Complete outer predicate inventory') + L.need(all(x > 0 for key in ('strict_checks','functional_checks') for x in outer[key].values()), 'All outer inequalities strict') + wrong_cutoff = E.divide((Q(sum(T.values())*21),)*2,E.mul(E.power(20,TESTED),target)) + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') + return encode({'kappa':KAPPA,'kappa_decimal':'.00310184','previous_open_pr5599':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA], + 'raw_ceiling':{'interval':[Q(0),cap],'derivative_upper':derivative_upper},'margin_at_previous':E.display(margin(PREVIOUS)), + 'targets':T,'paid':P,'productive_fields':sum(T.values()),'paid_calls':sum(P.values()), + 'rank_mass_surplus':760,'full_forward_calls':18,'query_shears':15,'whole_idle_jobs':3120, + 'strictification':{'tested':TESTED,'power':v,'cutoff':c,'floor':b,'tail_offset':u,'reserve':reserve,'tail_decay':decay,'tail_block':128, + 'alpha':E.display(alpha),'gamma':E.display(gamma),'delta':E.display(delta),'normalized_paid_upper':normalized}, + 'compiler':{'theta':theta,'logarithm_power':power,'eta':E.display(eta),'gap':gap,'H':H,'N':'2^'+str(H), + 'integer_test_exponent':right,'uniform_saving':params['complex_uniform_saving'],'word_materialized':False}, + 'nonrecursive':{'local_scalar':local['real_scalar_allowance'],'local_routes':local_routes, + 'raw_scalar_upper':raw,'raw_budget':10**9,'peak_owned_fields':1, + 'fixed_scalar_growth_bound':'At most 2^(16*26000) before native factors; a declared constant, not an attained norm.', + 'local_paid_rank_mass':local['paid_rank_mass'], + 'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); use local_paid_rank_mass for the whole word.'}, + 'ordinary_BIT':bit,'outer':outer, + 'negative_controls':{'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-relay-split-composition/verify.py b/research/p104-relay-split-composition/verify.py new file mode 100644 index 0000000000..8e321db560 --- /dev/null +++ b/research/p104-relay-split-composition/verify.py @@ -0,0 +1,132 @@ +"""Verify the complete P104 shared-relay/cascade/helper-split composition. + +Prepared for flyingviper with substantial OpenAI Codex assistance and independent +agents. Ali Romman supplied the split and pricing framework; Pierre-Loic Doulcet +supplied the commuting cascade. All retained source notices remain. Apache-2.0. +""" +from collections import Counter +from copy import deepcopy +from difflib import SequenceMatcher +from fractions import Fraction as Q +from hashlib import sha1,sha256 +from pathlib import Path +import json,sys +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent +sys.path.insert(0,str(HERE)) +from common import closure,load,need,read +from construct import construct,construct_parent + + +def independent_parent(base,relay,cascade): + """Merge disjoint literal edits from the two retained predecessor generators.""" + old=base['program'];edits=[] + for word in (relay,cascade): + matcher=SequenceMatcher(None,list(map(tuple,old)),list(map(tuple,word['program'])),autojunk=False) + edits += [(i,j,word['program'][a:b]) for kind,i,j,a,b in matcher.get_opcodes() if kind!='equal'] + edits.sort(key=lambda e:(e[0],e[1]));cursor=0;program=[] + for i,j,part in edits: + need(i>=cursor,'Disjoint source edit intervals') + program+=deepcopy(old[cursor:i])+deepcopy(part);cursor=j + program+=deepcopy(old[cursor:]) + result=deepcopy(cascade);result['program']=program + return result + + +def delta(new,old): + return {r:new.get(r,0)-old.get(r,0) for r in new.keys()|old.keys() if new.get(r,0)!=old.get(r,0)} + + +def reject(action): + try:action() + except ValueError as e:return str(e) + raise ValueError('Invalid control accepted') + + +def main(): + pins=read(HERE/'SOURCES.json') + for p in pins['external_inputs']: + raw=(HERE/p['local_path']).read_bytes() + need(sha256(raw).hexdigest()==p['sha256'],'Immutable input SHA256: '+p['local_path']) + need(sha1(('blob '+str(len(raw))+'\0').encode()+raw).hexdigest()==p['git_blob'],'Immutable input blob: '+p['local_path']) + source_price=(HERE/'inputs/pr5599-pricing.py').read_text() + for before,after in [ + ("KAPPA, TESTED = Q('.00309839'), Q('.0030983905')","KAPPA, TESTED = Q('.00310184'), Q('.0031018405')"), + ("PREVIOUS = Q('.00308189')","PREVIOUS = Q('.00309839')"), + ("sum(targets.values()) == 13084 and sum(paid.values()) == 66852","sum(targets.values()) == 13048 and sum(paid.values()) == 66690"), + ("'kappa_decimal':'.00309839'","'kappa_decimal':'.00310184'"), + ("'previous_open_pr5580':PREVIOUS","'previous_open_pr5599':PREVIOUS")]: + need(source_price.count(before)==1,'Unique pricing declaration') + source_price=source_price.replace(before,after) + need(source_price==(HERE/'pricing.py').read_text(),'Only five declared pricing edits') + base=read(HERE/'inputs/pr5580-WORD.json.gz') + relay_module=load(HERE/'inputs/pr5605-construct.py','retained_relay') + cascade_module=load(HERE/'inputs/pr5565-construct.py','retained_cascade') + relay,cascade=relay_module.construct(base),cascade_module.construct(base) + need(relay==read(HERE/'inputs/pr5605-WORD.json.gz'),'Exact published relay reconstruction') + need(cascade==read(HERE/'inputs/pr5565-WORD.json.gz'),'Exact published cascade reconstruction') + parent=construct_parent(base) + need(parent==independent_parent(base,relay,cascade),'Independent disjoint-edit parent construction') + witnesses=read(HERE/'SPLITS.json');original=read(HERE/'inputs/pr5599-SPLITS.json') + kept=[h for i,h in enumerate(original,1) if i not in (12,15)] + need(len(original)==15 and len(witnesses)==len(kept)==13,'Exact retained split inventory') + for h,prior in zip(witnesses,kept): + need({k:v for k,v in h.items() if k!='cut_after'}=={k:v for k,v in prior.items() if k!='cut_after'},'Only split cut offsets change') + with closure() as root: + L=load(HERE/'inputs/pr5599-local.py','local');L.ROOT=root + S=load(HERE/'inputs/pr5599-construct.py','retained_split') + split_base=L.replay(read(HERE/'inputs/pr5599-WORD.json.gz')) + word=parent;cuts=[];paid=L.replay(parent)['paid'] + for h in witnesses: + word=S.split(word,h) + stage=L.replay(word) + need(stage['paid']==paid,'Every split preserves exact paid histogram') + cuts.append({'pivot':h['pivot'],'cut_after':h['cut_after'],'ranks':h['ranks'],'public':word['public'],'events':len(word['program'])}) + need(word==read(HERE/'WORD.json.gz'),'Entire regenerated final word payload') + local=L.replay(word) + need((local['public_inputs'],local['owned_lifetimes'],local['peak_owned_fields'])==(748,8,1),'Public and owned inventory') + pd=delta(local['paid'],split_base['paid']);td=delta(local['helpers'],split_base['helpers']) + need(pd=={1:-9,2:-1,3:-2,4:-2,5:4,6:1},'Complete local paid delta versus PR5599') + need(td=={1:-2,4:-1,5:1,8:-2,9:2},'Complete local target delta versus PR5599') + print('PASS immutable inputs, independent construction, all13 exact cuts and748 arbitrary inputs',flush=True) + reverse=L.reverse_columns(word) + print('PASS dense exact transpose',flush=True) + native=L.native(word) + print('PASS all signed native maps',native['distinct_maps'],flush=True) + C=load(root/'research/p104-productive-controller/caller.py','composed_caller') + caller=C.construct();need(caller==read(root/'research/p104-productive-controller/CONTROLLER.json'),'Exact unchanged physical caller') + physical=C.physical(caller,word) + print('PASS physical caller',flush=True) + P=load(HERE/'pricing.py','composed_price') + price=P.run(local,native,caller,physical) + print('PASS complete invoice, two interval engines, compiler and58 outer predicates',price['raw_root_interval'],flush=True) + controls={} + bad=deepcopy(witnesses[0]);key=next(iter(bad['a']));bad['a'][key]=str(Q(bad['a'][key])+1) + controls['false_prefix']=reject(lambda:S.check_cut(parent,bad)) + bad=deepcopy(word);bad['program'].pop(0) + controls['missing_input_basis']=reject(lambda:L.replay(bad)) + bad=deepcopy(word);bad['program'].pop() + controls['missing_output_basis']=reject(lambda:L.replay(bad)) + bad=deepcopy(local);bad['helpers'][1]+=1 + controls['unearned_target']=reject(lambda:P.assemble(bad,native,caller,physical)) + bad=deepcopy(local);bad['paid'][1]-=1 + controls['unpaid_transport']=reject(lambda:P.assemble(bad,native,caller,physical)) + # At the two omitted old cuts there is no remaining line597 visit of + # the pivot. Reinserting them would require a new charged itinerary. + omitted=[original[11],original[14]] + missing=[] + for h in omitted: + r,f=h['pivot'],h['frame'] + need(not any(e[0]=='MOVE' and e[1]==r and e[3]==f for e in parent['program']),'Omitted split pivot never visits old chart') + missing.append({'pivot':r,'frame':f,'reason':'The cascade removes this intermediate chart visit.'}) + result=P.encode({'status':'PASS_P104_RELAY_SPLIT_COMPOSITION_KAPPA_00310184','cuts':cuts, + 'omitted_original_splits':missing,'events':len(word['program']), + 'local_paid_delta_vs_pr5599':pd,'local_target_delta_vs_pr5599':td, + 'local':local,'transpose':reverse,'native':native,'physical':physical, + 'complete_cost':price,'negative_controls':controls}) + if '--write' in sys.argv:(HERE/'RESULT.json').write_text(json.dumps(result,indent=2,sort_keys=True)+'\n',encoding='utf-8',newline='\n') + else:need(result==read(HERE/'RESULT.json'),'Exact complete committed receipt') + print(result['status'],flush=True) + + +if __name__=='__main__':main()