diff --git a/research/p104-neutral-helper-cleanup/NOTICE b/research/p104-neutral-helper-cleanup/NOTICE new file mode 100644 index 0000000000..52b80e0882 --- /dev/null +++ b/research/p104-neutral-helper-cleanup/NOTICE @@ -0,0 +1,6 @@ +P104 neutral helper cleanup +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. + +The retained PR5627 archive contains the full source notices. The source +pricing module retains its predecessor notices. Read README.md for links +and the contribution map. No source notice was removed. diff --git a/research/p104-neutral-helper-cleanup/PROOF.md b/research/p104-neutral-helper-cleanup/PROOF.md new file mode 100644 index 0000000000..8572bf7a3a --- /dev/null +++ b/research/p104-neutral-helper-cleanup/PROOF.md @@ -0,0 +1,136 @@ +# Three neutral helper relations remove paid calls + +This construction starts from the exact PR5627 word at +`ed4dc88a09a7d201971f6603b8c2074e95dd9c32`. It keeps all 743 independent +inputs, all 535 helper targets and the 104 main pairs. The selected frontier +is unchanged. The five source framework assumptions and the helper endpoint +contract remain. + +## 1. The boundary identity + +Write the scalar state in native normalized coordinates. Let h be a helper +with initial chart S and final chart F. At a chronological cut, suppose h +and each cancellation supplier are at F. Suppose the exact prefix rows give + +```math +r_h-\sum_j b_j r_j=c x_h+\sum_{j\ne h} a_j x_j. +``` + +Every input on the right has initial chart S, and c is a dyadic unit. Suppose +there is no later source read of h. Before the word, apply +`h += -a_j/c * j` for every j other than h. At the cut, apply +`h -= b_j * j` and then `h *= 1/c`. The resulting h is exactly the original +independent input x_h. Delete the later scalar operations whose destination +is h. They have no effect on another output. + +The source returns every helper unchanged and has no helper contribution +to a main output. Thus the input basis change can affect only the old h +output. The cut repairs that output exactly. No helper is set to zero, +no new input is created and no productive target is removed or added. +All basis coefficients are dyadic, and every SCALE has a dyadic inverse. + +The constructor checks the complete prefix relation, common charts, the +last-read condition, the exact removed operations and the full arbitrary-input +endpoint after each step. It also checks that the complete chronological +subsequence of owned operations is unchanged. + +## 2. Exact witnesses + +The cuts below are zero-based and refer to each successive word after +transport coalescing. `WITNESS.json` retains the full event anchors and vectors. +Here `e_j` denotes the j-th independent input. + +| Helper | Cut | Final chart | Prefix row after cancellation | +| ---: | ---: | ---: | --- | +| 291 | 10627 | 234 | -2 e291 - e293 + 2 e39 + 2 e303 | +| 321 | 11072 | 237 | e321 - 2 e320 - 2 e34 + 2 e330 | +| 369 | 11718 | 243 | e369 + 2 e383 - 2 e372 - 2 e3 - 2 e382 - 2 e378 | + +Their cancellation vectors are respectively +`{293:-1}`, `{22:2,320:-3/2,330:2}`, and +`{368:-3/2,26:2,378:-2}`. All initial basis operations use chart 3. +The three steps remove six, five and five old scalar cleanup events. +The inserted cancellation and input operations are included in the cost. + +## 3. The paid change + +The removed cleanup contacts let main roles 55, 49 and 80 bypass one +intermediate chart each. Their old paths are + +```text +role 55: 722 -> 234 -> 127 +role 49: 734 -> 237 -> 127 +role 80: 749 -> 243 -> 127 +``` + +Each path has ranks 1 and 5. The new direct path has rank 6. For chart +operators C_A, C_B and C_D, the exact product is + +```math +(C_D C_B^{-1})(C_B C_A^{-1})=C_D C_A^{-1}. +``` + +No scalar operation uses that role between these transports. The chronological +replay checks strict chart containment, and the native verifier checks the +exact signed map and global phase. This identity applies at every positive +tensor width under the retained native implementation assumption. + +The local paid delta is `-3 H1 -3 H5 +3 H6`. Every target stays fixed. +For 00. +``` + +This is a changed physical invoice. It does not add predecessor kappa gains. +The alternative PR5613 inventory has 72 additional H5 paid calls and 72 +additional H5 targets. It has the same signed source moment, but this package +uses only the smaller PR5627 inventory. + +## 4. Complete cost and verification + +The final local word has 25,448 events, 743 independent inputs, 535 helpers, +nine owned roles, eleven owned lifetimes and peak owned occupancy two. +Its paid profile is + +```text +{1:2197, 2:456, 3:494, 4:91, 5:160, 6:21, 7:15}. +``` + +The complete caller retains 18 full forward calls, 15 thin query sites, +3,120 whole idle jobs and 3,328 main targets. Its complete invoice has +66,492 paid calls and 12,958 productive targets. The rank-mass surplus is 760. +Helpers, native normalizers, main adapters, basis operations, COPY/CLEAR, +all owned lifetimes, routes, thin queries and idles are charged. + +A separate dense integer transpose checks all 565,504 matrix entries. +The native check verifies 2,916 distinct maps. The physical caller verifies +all 7,488 contacts, 53,248 central-square columns and complete main phases. +Two rational interval engines check the same complete moment. + +The exact raw crossing lies in +`(0.00310626336369, 0.00310626336370)`. The claim is `0.00310626335`, tested +at `0.003106263355`. The gain over PR5627's claim is `0.00000185789`, +about 0.05985%. This is a small gain. +The raw ceiling is proved only for this fixed invoice on `[0,0.0034]`. +Its headroom above the claim is between `1.369e-11` and `1.370e-11`. +It is not an optimum over constructions. + +The source strictification parameters remain: power 1024, cutoff 17, +target floor 18, tail offset 1/5, reserve 10^-12 and tail decay 39/40. +The compiler checks its finite integer threshold, the preceding integer, +initial range, shifted exits and complement capacity. All 54 strict outer +conditions and four functional conditions pass. The ordinary BIT contract +remains 0.0034. + +The local scalar allowance is 220,208 and the local route allowance is +5,172,000, below the retained 10^7 bound. The complete ordinary-work bound +is 184,647,552, below 10^9. Fewer than 26,000 scalar events and the checked +coefficient bound retain the source growth bound. The paid native rank sum +is 5,986 per local word. No growth or route cost is omitted. + +The huge uniform word and complete rounded multiplier are not materialized. +These are author checks by the same AI-assisted author. Independent scientific +acceptance and a proof-kernel theorem remain absent. Source native, owned +erasure, uniform compiler, precision/tape and analytic recovery assumptions +remain. The package makes no large-gain or global-optimum claim. diff --git a/research/p104-neutral-helper-cleanup/README.md b/research/p104-neutral-helper-cleanup/README.md new file mode 100644 index 0000000000..d21c40e63f --- /dev/null +++ b/research/p104-neutral-helper-cleanup/README.md @@ -0,0 +1,121 @@ +# Conditional kappa 0.00310626335 from three helper cleanups + +This construction raises complete conditional kappa from +**0.00310440546 to 0.00310626335**, a gain of **0.00000185789** +(about **0.05985%**) over +[PR #5627](https://github.com/CrocSwap/integer-mult-bounds/pull/5627). +This is a small gain. The requested large improvement is not established. +The selected frontier is not changed by this package. + +Three exact helper relations remove scalar contacts on main roles 55, 49 +and 80. Each role can then replace an H1+H5 path with H6. The local paid +delta is `-3 H1 -3 H5 +3 H6`. All independent inputs, productive targets +and owned operations stay fixed. The complete caller saves 54 paid calls. + +Read [PROOF.md](PROOF.md), [WITNESS.json](WITNESS.json), +[RESULT.json](RESULT.json), [SOURCES.json](SOURCES.json), and +[VALIDATION.md](VALIDATION.md). The constructor checks every relation before +it emits the new [word](WORD.json.gz). + +| Complete quantity | Value | +| --- | ---: | +| Paid calls | 66,492 | +| Productive targets | 12,958 | +| Rank-mass surplus | 760 | +| Public inputs / helpers per full call | 743 / 535 | +| Owned roles / lifetimes / peak | 9 / 11 / 2 | +| Local events | 25,448 | +| Raw crossing | (0.00310626336369, 0.00310626336370) | +| Tested saving | 0.003106263355 | +| Claimed conditional kappa | 0.00310626335 | + +The complete cost includes helpers, native maps, input/output normalizers, +main adapters, scalar bases, COPY/CLEAR, allocation, routes, thin queries, +whole idles, compiler completion and rounding. Two rational interval engines, +all compiler conditions and all 58 outer conditions pass. The ordinary BIT +contract stays at 0.0034. The fixed-invoice ceiling is the raw crossing above; +it is not a ceiling over constructions. + +## Reproduce + +Use Python 3.12 and its standard library, from the repository root: + +```sh +python3 -B scripts/research_package.py --package research/p104-neutral-helper-cleanup --check-only +python3 -B scripts/research_package.py --package research/p104-neutral-helper-cleanup +``` + +The registered command runs normally and with `-O`. Expected markers are +`PASS_P104_NEUTRAL_HELPER_KAPPA_00310626335` and +`PASS_REGISTERED_RESEARCH_PACKAGE`. Direct replay needs no Git or network: + +```sh +python3 -I -W error -B research/p104-neutral-helper-cleanup/verify.py +python3 -I -W error -B -O research/p104-neutral-helper-cleanup/verify.py +``` + +Normal replay is read-only. `--write` regenerates the word and receipt. +The verifier authenticates the exact source archive and all 36 payload files +before it imports source code. It checks all 565,504 endpoint coefficients, +2,916 signed native maps, the complete physical caller and the full cost. +Controls reject a false cancellation, wrong cut, missing input basis, +missing owned erasure, extra target credit and unpaid query. The native, +controller and pricing checks retain their own controls. + +## Source and credit + +The consumed source is [PR #5627](https://github.com/CrocSwap/integer-mult-bounds/pull/5627) +at `ed4dc88a09a7d201971f6603b8c2074e95dd9c32`: +[source proof](https://github.com/aliromman/integer-mult-bounds/blob/ed4dc88a09a7d201971f6603b8c2074e95dd9c32/research/p104-helper-subspace-splits/PROOF.md), +[source word](https://github.com/aliromman/integer-mult-bounds/blob/ed4dc88a09a7d201971f6603b8c2074e95dd9c32/research/p104-helper-subspace-splits/WORD.json.gz), +and [source notices](https://github.com/aliromman/integer-mult-bounds/blob/ed4dc88a09a7d201971f6603b8c2074e95dd9c32/research/p104-helper-subspace-splits/NOTICE). +Its official self-contained export is retained. Reproduction does not require +a cached unmerged Git object. The exact word, caller and all shared proof +engines are unchanged source inputs. The derived pricing file changes only +the declared claim, comparison and paid count; its byte-level derivation is checked. + +Ali Romman supplied the new three relations with substantial OpenAI Codex +assistance. The same assistant performed the author checks; no subagents or +independent scientific review. The helper-boundary method extends +[PR #5602](https://github.com/CrocSwap/integer-mult-bounds/pull/5602). +The source package supplies the complete composition of +[PR #5601](https://github.com/CrocSwap/integer-mult-bounds/pull/5601), +[PR #5605](https://github.com/CrocSwap/integer-mult-bounds/pull/5605), +[PR #5612](https://github.com/CrocSwap/integer-mult-bounds/pull/5612), +[PR #5606](https://github.com/CrocSwap/integer-mult-bounds/pull/5606) +and [PR #5599](https://github.com/CrocSwap/integer-mult-bounds/pull/5599). +Its notices credit flyingviper's relays, Scratch-net's prepared helper, +Pierre-Loic Doulcet's cascade, Joel Pulikkan, DreamingOfClouds, thu-nmrc, +Gareth Davidson, David Arias, Cinna Davis, Jacob Alan Sussman, zxv and +Cao Yifan, with the earlier geometry, BIT and analytic sources. +All notices remain in the retained export and pricing module. Apache-2.0. + +The discovery first passed on +[PR #5613](https://github.com/CrocSwap/integer-mult-bounds/pull/5613) at +`32f23af8790cc3c435bb1f495d861332b4f000e3`. That source has the same signed +moment but 72 more H5 paid calls and 72 more H5 targets. It is comparison +evidence, not the consumed input. Its counts are not combined with this receipt. + +## Coordination and limits + +The frozen research base is canonical main +`6cf7a683f447b9f1e2333791907fd92be5009a63`, priority revision 7. +The [canonical claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/5125#discussioncomment-19154639) +records the source pins, live overlap checks and released finite screens. +The separate Discussion5600 main-port retirement campaign is excluded. +The final publication checkpoint is recorded in `VALIDATION.md`. + +The five selected assumptions remain: native implementation at all widths, +owned erasure, uniform compiler closure, precision/tape cost and analytic +recovery. The helper endpoint contract also remains. The huge uniform word +and complete rounded multiplier are not materialized. This package does not +claim independent acceptance, a proof-kernel theorem or global optimality. + +## Open next questions + +An independent reviewer can check the three prefix relations and transport +products, then replay the full package. Further coordinated bases may remove +more scalar contacts, but the larger exploratory screens have not produced +a new complete gain. A new construction must first check current claims and +must include every changed target and paid operation. [TASK.json](TASK.json) +records the next bounded question and its blockers. diff --git a/research/p104-neutral-helper-cleanup/RESULT.json b/research/p104-neutral-helper-cleanup/RESULT.json new file mode 100644 index 0000000000..2908bf95db --- /dev/null +++ b/research/p104-neutral-helper-cleanup/RESULT.json @@ -0,0 +1,680 @@ +{ + "authenticated_source_files": 36, + "changes": [ + { + "cancellation": [ + [ + "ADD", + 291, + 293, + "1", + 234 + ], + [ + "SCALE", + 291, + "-1/2", + 234 + ] + ], + "cut": 10627, + "events": 25446, + "frame": 234, + "helper": 291, + "paid": { + "1": 2199, + "2": 456, + "3": 494, + "4": 91, + "5": 162, + "6": 19, + "7": 15 + }, + "preparation": [ + [ + "ADD", + 291, + 39, + "1", + 3 + ], + [ + "ADD", + 291, + 293, + "-1/2", + 3 + ], + [ + "ADD", + 291, + 303, + "1", + 3 + ] + ], + "removed_scalar_events": [ + [ + "SCALE", + 291, + "-1/2", + 234 + ], + [ + "ADD", + 291, + 289, + "1/2", + 234 + ], + [ + "ADD", + 291, + 39, + "1/2", + 234 + ], + [ + "ADD", + 291, + 40, + "1/2", + 234 + ], + [ + "ADD", + 291, + 18, + "-1/2", + 234 + ], + [ + "ADD", + 291, + 55, + "-1", + 234 + ] + ], + "scalar": 220140 + }, + { + "cancellation": [ + [ + "ADD", + 321, + 22, + "-2", + 237 + ], + [ + "ADD", + 321, + 320, + "3/2", + 237 + ], + [ + "ADD", + 321, + 330, + "-2", + 237 + ] + ], + "cut": 11072, + "events": 25446, + "frame": 237, + "helper": 321, + "paid": { + "1": 2198, + "2": 456, + "3": 494, + "4": 91, + "5": 161, + "6": 20, + "7": 15 + }, + "preparation": [ + [ + "ADD", + 321, + 34, + "2", + 3 + ], + [ + "ADD", + 321, + 320, + "2", + 3 + ], + [ + "ADD", + 321, + 330, + "-2", + 3 + ] + ], + "removed_scalar_events": [ + [ + "ADD", + 321, + 320, + "1", + 237 + ], + [ + "ADD", + 321, + 23, + "-1", + 237 + ], + [ + "ADD", + 321, + 22, + "-1", + 237 + ], + [ + "ADD", + 321, + 108, + "1", + 237 + ], + [ + "ADD", + 321, + 49, + "-1", + 237 + ] + ], + "scalar": 220164 + }, + { + "cancellation": [ + [ + "ADD", + 369, + 26, + "-2", + 243 + ], + [ + "ADD", + 369, + 368, + "3/2", + 243 + ], + [ + "ADD", + 369, + 378, + "2", + 243 + ] + ], + "cut": 11718, + "events": 25448, + "frame": 243, + "helper": 369, + "paid": { + "1": 2197, + "2": 456, + "3": 494, + "4": 91, + "5": 160, + "6": 21, + "7": 15 + }, + "preparation": [ + [ + "ADD", + 369, + 3, + "2", + 3 + ], + [ + "ADD", + 369, + 372, + "2", + 3 + ], + [ + "ADD", + 369, + 378, + "2", + 3 + ], + [ + "ADD", + 369, + 382, + "2", + 3 + ], + [ + "ADD", + 369, + 383, + "-2", + 3 + ] + ], + "removed_scalar_events": [ + [ + "ADD", + 369, + 368, + "1", + 243 + ], + [ + "ADD", + 369, + 26, + "-1", + 243 + ], + [ + "ADD", + 369, + 95, + "-1", + 243 + ], + [ + "ADD", + 369, + 8, + "1", + 243 + ], + [ + "ADD", + 369, + 80, + "-1", + 243 + ] + ], + "scalar": 220208 + } + ], + "complete_cost": { + "compiler": { + "H": 80511200000000000, + "N": "2^80511200000000000", + "eta": { + "lower": "0.000000132965805256205580454152", + "upper": "0.000000132965805256205580454153" + }, + "gap": "1/1400000000000", + "integer_test_exponent": 57508, + "logarithm_power": 1024, + "theta": "63/64", + "uniform_saving": "543596087/175000000000", + "word_materialized": false + }, + "full_forward_calls": 18, + "gain": "185789/100000000000", + "kappa": "62125267/20000000000", + "kappa_decimal": ".00310626335", + "margin_at_previous": { + "lower": "0.451550879336614603359787426152", + "upper": "0.451550879336614603359787426153" + }, + "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": 5986, + "local_routes": 5172000, + "local_scalar": 220208, + "peak_owned_fields": 2, + "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": "348599999999253/350000000000000", + "fixed_halo_explicit_metadata_branch": "26950000000001/350000000000", + "new_BIT_row_stock_sublinear_in_active_group": "1395799999997009/1400000000000000", + "new_semantic_group_guard": "3/1400000000000" + }, + "margins": { + "boundary_algebraic_matrix": "6088276171595651231307/1960000000000000000000000", + "fused_gaussian": "6088276171586953693921/1960000000000000000000000", + "global_coordinate_router": "2174384347/700000000000", + "group_bit_router": "3044138086493476846959/980000000000000000000000", + "group_scans": "699999999999/700000000000", + "main_transform": "6088276170195651231307/1960000000000000000000000", + "microbox_face_corrections": "26950000000001/350000000000", + "polynomial_products": "1399999999999/1400000000000", + "sparse_union_movement": "802338276171595651231307/1960000000000000000000000" + }, + "parameters": { + "a": "2174384347/700000000000", + "b": "869753739/280000000000", + "beta": "1399999999997/1400000000000", + "bit_saving": "17/5000", + "cap_xi": "1782338276170195651231307/1960000000000000000000000", + "complex_uniform_saving": "543596087/175000000000", + "d": "1/1400000000000", + "epsilon": "1399999999999/1400000000000", + "kappa": "62125267/20000000000", + "lambda_": "398757494659/400000000000", + "lambda_prime": "1395651231307/1400000000000", + "layout": "1/1400000000000", + "q": "4348768693/1400000000000", + "r0": "1/14000000000000", + "stop": "1/1400000000000", + "tested_saving": "621252671/200000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "205615653/700000000000", + "actual_logarithmic_gamma_guard": "1/1400000000000", + "actual_logarithmic_group_guard": "177661723831904348768693/980000000000000000000000", + "alpha_logarithm_absorption": "1/14000000000000", + "boundary_algebraic_matrix_above_kappa": "5595651231307/1960000000000000000000000", + "cap_above_band": "802338276170195651231307/1960000000000000000000000", + "cap_below_cell": "177661723828404348768693/1960000000000000000000000", + "cap_below_phase_cell_power": "2137661723829804348768693/1960000000000000000000000", + "complex_above_effective": "1/1400000000000", + "complex_below_one_over_32": "7880246261/280000000000", + "complex_endpoint": "1/700000000000", + "epsilon_below_one": "1/1400000000000", + "epsilon_positive": "1399999999999/1400000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "5586953693921/1960000000000000000000000", + "gaussian_above_main": "695651231307/980000000000000000000000", + "global_coordinate_router_above_kappa": "1/350000000000", + "global_gamma_power_slack": "9/14000000000000", + "group_below_dimension": "1/700000000000", + "group_bit_router_above_kappa": "3493476846959/980000000000000000000000", + "group_gauge_power_slack": "177661723831834348768693/980000000000000000000000", + "group_key_fits_record": "1/700000000000", + "group_positive": "1399999999997/1400000000000", + "group_scans_above_kappa": "348912807827/350000000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "687646465400418148631/500000000000000000000000", + "lambda_above_internal": "1/2800000000000", + "lambda_above_sigma": "3/2800000000000", + "lambda_above_tau": "1/2800000000000", + "lambda_prime_above_lambda": "1/2800000000000", + "lambda_prime_above_leaf": "559130246261/392000000000000000000000", + "leaf_saving_above_effective": "279130246261/392000000000000000000000", + "main_transform_above_kappa": "4195651231307/1960000000000000000000000", + "membership_arithmetic_fits_record": "1/1400000000000", + "microbox_face_corrections_above_kappa": "53897825615657/700000000000", + "microbox_halo_volume": "110600000000003/1400000000000", + "new_complex_uniform_saving_above_b": "1/1400000000000", + "new_semantic_guard_with_C1_one": "1/1400000000000", + "polynomial_products_above_kappa": "1395651231309/1400000000000", + "positive_layout_slack": "1/1400000000000", + "q_below_effective": "1/1400000000000", + "q_below_internal": "1/1400000000000", + "q_below_leaf": "559130246261/392000000000000000000000", + "q_positive": "4348768693/1400000000000", + "short_record_fallback": "279130246261/280000000000", + "source_axis_superpolynomial": "1/1400000000000", + "sparse_union_movement_above_kappa": "796250000005595651231307/1960000000000000000000000", + "stop_below_one": "1399999999999/1400000000000", + "stop_positive": "1/1400000000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/1400000000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/1400000000000", + "union_tag_work_per_visit_fits_record": "3/1400000000000" + } + }, + "paid": { + "1": 41106, + "16": 416, + "2": 8208, + "24": 416, + "3": 8892, + "32": 416, + "4": 1638, + "40": 416, + "48": 416, + "5": 2880, + "56": 416, + "6": 378, + "64": 416, + "7": 270, + "72": 208 + }, + "paid_calls": 66492, + "previous_open_pr5627": "155220273/50000000000", + "productive_fields": 12958, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_ceiling": { + "derivative_upper": "-185059801945251167500572380988789019128885006440939063323697675/784637716923335095479473677900958302012794430558004314112", + "interval": [ + "0", + "17/5000" + ] + }, + "raw_headroom": [ + "1369/100000000000000", + "137/10000000000000" + ], + "raw_root_interval": [ + "310626336369/100000000000000", + "31062633637/10000000000000" + ], + "relative_gain_percent": "9289450/155220273", + "strictification": { + "alpha": { + "lower": "0.999999999991151995165679182213", + "upper": "0.999999999991151995165679182214" + }, + "cutoff": 17, + "delta": { + "lower": "0.967530914044170735058316873915", + "upper": "0.967530914044170735058316873916" + }, + "floor": 18, + "gamma": { + "lower": "0.968140817783099208114307070153", + "upper": "0.968140817783099208114307070154" + }, + "normalized_paid_upper": "1048576000976562501/1048576001073741824", + "power": 1024, + "reserve": "1/1000000000000", + "tail_block": 128, + "tail_decay": "39/40", + "tail_offset": "1/5", + "tested": "621252671/200000000000" + }, + "targets": { + "1": 36, + "145": 208, + "17": 416, + "2": 72, + "25": 416, + "33": 416, + "4": 1638, + "41": 416, + "49": 416, + "5": 108, + "57": 416, + "65": 416, + "7": 90, + "73": 208, + "8": 288, + "9": 7398 + }, + "whole_idle_jobs": 3120 + }, + "limits": [ + "The five selected framework assumptions and helper-endpoint contract remain.", + "The enormous uniform word and complete rounded multiplier are not materialized.", + "These author checks are not independent scientific review or a proof-kernel theorem.", + "The improvement is small. No large gain or global optimum is established." + ], + "local": { + "endpoint_coefficients": 565504, + "helpers": { + "1": 2, + "2": 4, + "4": 91, + "5": 6, + "7": 5, + "8": 16, + "9": 411 + }, + "owned_fields": 9, + "owned_lifetimes": 11, + "paid": { + "1": 2197, + "2": 456, + "3": 494, + "4": 91, + "5": 160, + "6": 21, + "7": 15 + }, + "paid_rank_mass": 5986, + "peak_owned_fields": 2, + "public_inputs": 743, + "real_scalar_allowance": 220208 + }, + "local_helper_delta": {}, + "local_paid_delta": { + "1": -3, + "5": -3, + "6": 3 + }, + "native": { + "distinct_maps": 2916, + "helper_normalizers": 1070, + "helpers": { + "1": 2, + "2": 4, + "4": 91, + "5": 6, + "7": 5, + "8": 16, + "9": 411 + }, + "main_adapters": 208, + "proof": "Every signed Pauli image and exact global phase; frame induction at every positive tensor width", + "recipe_payload_sha256": "92eef26313b53686f5f78c181e8a75549280be0a714dbd069ae2cc2f24bbd820", + "wrong_phase_rejected": true + }, + "negative_controls": { + "extra_target_credit": "Every productive helper has a native target", + "false_cancellation": "Exact prefix relation on every input", + "missing_central_translation": "Rejected by the complete Laurent endpoint", + "missing_input_basis": "All public and owned rows", + "missing_owned_erasure": "All public and owned exits", + "unpaid_query": "Complete field and call counts", + "wrong_cut": "Exact chronological anchor" + }, + "physical_caller": { + "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 + ] + }, + "separate_columns": { + "arithmetic": "Dense integer rows with binary denominators; reverse chronology", + "coefficients": 565504, + "columns": 752 + }, + "source_commit": "ed4dc88a09a7d201971f6603b8c2074e95dd9c32", + "source_local": { + "endpoint_coefficients": 565504, + "helpers": { + "1": 2, + "2": 4, + "4": 91, + "5": 6, + "7": 5, + "8": 16, + "9": 411 + }, + "owned_fields": 9, + "owned_lifetimes": 11, + "paid": { + "1": 2200, + "2": 456, + "3": 494, + "4": 91, + "5": 163, + "6": 18, + "7": 15 + }, + "paid_rank_mass": 5986, + "peak_owned_fields": 2, + "public_inputs": 743, + "real_scalar_allowance": 220154 + }, + "status": "PASS_P104_NEUTRAL_HELPER_KAPPA_00310626335" +} diff --git a/research/p104-neutral-helper-cleanup/SOURCES.json b/research/p104-neutral-helper-cleanup/SOURCES.json new file mode 100644 index 0000000000..410fd77bfd --- /dev/null +++ b/research/p104-neutral-helper-cleanup/SOURCES.json @@ -0,0 +1,34 @@ +{ + "base_commit": "6cf7a683f447b9f1e2333791907fd92be5009a63", + "files": [ + { + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "path": "docs/research/agent-task-catalog.json", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72", + "usage": "provenance" + }, + { + "git_blob": "fc3d4ba105e1f097d0d7d051a308281e86ab1446", + "path": "certificates/selected-result.json", + "sha256": "66974efdced4083c00025f97d95d83909a226cdf801edb9301c195c6641f6903", + "usage": "provenance" + }, + { + "git_blob": "bc900f0a1561b17b35492a80d10ae94f790d8378", + "path": "research/p104-neutral-helper-cleanup/inputs/pr5627-source.tar", + "pin": "head:47da58a1446ff744c6a558a16719024375e77e81:research/p104-neutral-helper-cleanup/inputs/pr5627-source.tar", + "sha256": "86c6bb839e14d79175ff8f3ed80b51a02d5c51a04deb0eff7ccea1afbe72923b", + "usage": "input" + } + ], + "schema_version": 1, + "source_export": { + "commit": "ed4dc88a09a7d201971f6603b8c2074e95dd9c32", + "files": 36, + "git_blob": "bc900f0a1561b17b35492a80d10ae94f790d8378", + "local_path": "inputs/pr5627-source.tar", + "package": "research/p104-helper-subspace-splits", + "sha256": "86c6bb839e14d79175ff8f3ed80b51a02d5c51a04deb0eff7ccea1afbe72923b", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/5627" + } +} diff --git a/research/p104-neutral-helper-cleanup/TASK.json b/research/p104-neutral-helper-cleanup/TASK.json new file mode 100644 index 0000000000..4e04ce714e --- /dev/null +++ b/research/p104-neutral-helper-cleanup/TASK.json @@ -0,0 +1,106 @@ +{ + "actual_scope": "Use three exact helper relations to remove main scalar contacts and fuse three paid paths. Verify the complete conditional kappa.", + "ai_assistance": "Substantial OpenAI Codex assistance. The same assistant performed the author checks. No subagents or independent review.", + "author": "Ali Romman", + "base_commit": "6cf7a683f447b9f1e2333791907fd92be5009a63", + "bottleneck_link": "Three H1+H5 paths become H6 in each of eighteen full calls.", + "budget_minutes": 240, + "evidence": "PROOF.md, WITNESS.json and RESULT.json", + "open_questions": [ + { + "blocked_by": "No further large gain is established. Complete native, caller and compiler checks are required.", + "first_step": "Check live claims, then test a changed basis on the exact new word and retain every target debit.", + "question": "Can coordinated helper basis changes remove more main scalar contacts?", + "why_it_matters": "A longer paid path can improve the complete moment." + } + ], + "original_card": { + "acceptance_gate": "An unchanged histogram is not a kappa gain; record any separate runtime or proof benefit explicitly.", + "allowed_variations": [ + "One existing scalar simplification and one proposed frame-path change." + ], + "bottleneck_link": "A legal change to the histogram, not addition count alone, is the bridge to an exponent gain.", + "existing_checks": [ + { + "evidence": "research/staged544-a2-graph-rewrite/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "scope": "PR #3998: consecutive A2 scalar contraction", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "389268a6b5e0373a3125d5c6fcd6995f4ea324f5", + "status": "author-checked" + }, + { + "evidence": "research/staged544-separated-a2/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "scope": "PR #4019: separated A2 sites with unchanged recursive histogram", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "f408e09df300b575235f7f77f81948071397e16d", + "status": "author-checked" + }, + { + "evidence": "research/staged544-a2-composition-audit/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "scope": "PR #4112: composition audit", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "205b7380656ba4b6316a8a493b1a3c679b8f7a0e", + "status": "author-checked" + }, + { + "evidence": "research/staged544-a1858-contraction-audit/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "scope": "PR #4152: A1858 contraction audit", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "caaa14cde5962adc372fdca71f63d0f29e73c8b2", + "status": "author-checked" + } + ], + "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.", + "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." + }, + "id": "scalar-to-moment", + "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." + ], + "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" + ], + "question": "Can a changed frame itinerary remove a paid transition beyond the already covered scalar A2 contractions?", + "scope_change_triggers": [ + "Submitting only another scalar count as completion of a paid-profile task." + ], + "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" + ] + }, + "outcome": "completed", + "priority_revision": 7, + "schema_version": 1, + "scope_change_reason": "The user assigned helper-basis work and a complete cost improvement. The paid paths change; scalar counts alone do not establish the result.", + "scope_status": "refined", + "stop_rule": "Publish one exact complete gain. Do not change the selected frontier.", + "task_id": "scalar-to-moment" +} diff --git a/research/p104-neutral-helper-cleanup/VALIDATION.md b/research/p104-neutral-helper-cleanup/VALIDATION.md new file mode 100644 index 0000000000..c2c3fc079f --- /dev/null +++ b/research/p104-neutral-helper-cleanup/VALIDATION.md @@ -0,0 +1,91 @@ +# Validation record + +Scientific source: PR5627 `ed4dc88a09a7d201971f6603b8c2074e95dd9c32`. +Frozen task provenance: canonical main +`6cf7a683f447b9f1e2333791907fd92be5009a63`, priority revision 7. +The publication branch was refreshed to canonical main +`df0137efd35e11b4445734bf612bdd4c7ebc330c`. Its selected result is +0.00310045. The priority and task catalogue are unchanged. This package does +not edit the selection or a predecessor package. + +## Completed author checks + +Python 3.12, standard library, macOS arm64. No subagents. + +```sh +python3 -I -W error -B research/p104-neutral-helper-cleanup/verify.py --write +python3 -B scripts/research_package.py --package research/p104-neutral-helper-cleanup --check-only +``` + +Both commands passed. The first reconstructed all three relations, checked +unchanged targets and owned lifetimes, all 565,504 matrix entries, 2,916 +signed native maps, the complete physical caller, both exact moment engines, +compiler costs, 54 strict and four functional outer conditions. It rejected +all declared semantic controls and saved the deterministic word and receipt. +The metadata result is `PASS_PACKAGE_METADATA_AND_PINS`; it is not a +mathematical acceptance check. + +The same three relations first passed full standalone checks on the PR5613 +inventory. They were then reconstructed on the smaller PR5627 inventory and +passed full standalone checks again. Only the latter is the package input. +No source gain or paid/target count is transferred by addition of PR claims. + +The final source export is an uncompressed tar file. Its exact bytes, Git +blob, archive manifest and all 36 payload files are checked before imports. +The export bytes are retained in an ancestor of this branch. + +## Completed publication checks + +The registered normal and optimized replays both passed. They compared the +complete regenerated receipt and word with the saved artifacts. + +```sh +python3 -B scripts/research_package.py --package research/p104-neutral-helper-cleanup +python3 -B scripts/check_research_commit.py --package research/p104-neutral-helper-cleanup +python3 -B scripts/export_research_package.py export --package research/p104-neutral-helper-cleanup --ref 034db9706c0b4b6913a2347351656d52a2cbfe66 --output /tmp/p104-neutral-clean.tar +python3 -B scripts/export_research_package.py check /tmp/p104-neutral-clean.tar +``` + +Expected and observed markers were `PASS_REGISTERED_RESEARCH_PACKAGE`, +`PASS_RESEARCH_COMMIT_BYTES` and `PASS_RESEARCH_EXPORT`. All 15 package files +matched scientific commit `034db9706c0b4b6913a2347351656d52a2cbfe66`. + +A fresh export passed optimized replay without Git and with an empty PATH. +All 16 exported files, including the export manifest, were read-only. Their +hashes and modes stayed unchanged. Replay took 73.01 seconds. It used the +same Python 3.12 standard library and compared the complete receipt and word. + +Three separate source-corruption cases were rejected in normal and optimized +mode: a changed archive byte, a changed payload with rebound outer archive +hashes, and an omitted payload with rebound outer hashes. The last two reach +the payload and inventory checks. No source code from a damaged export is +imported. Controls ran in isolated temporary copies. + +The full-history source-ancestry mode was not run. This checkout is shallow +and the tool requires full history. The task base and retained-export commit +are direct ancestors of the publication commit; their source bytes and the +Git-free replay are checked. Hosted CI and independent scientific acceptance +remain separate. GitHub body rendering and link checks will be retained in +the Discussion handoff after publication. + +## Coordination + +The last full remote snapshot at 2026-10-26 01:42-01:43 UTC covered 334 open +PRs and 4,919 Discussion records with complete pagination. Sparse local note +coverage is incomplete. The current arbitrary-carrier/paid-extension screens +were released by the PR5627 thread; its active scope is MOVE-window scheduling. +Discussion5600 now tests paid history reconstruction. Neither active scope is +part of this package. The three exact helper cleanups remain in the canonical +claim linked from README.md. + +Some local broader screens overlapped newly posted, released negative screens +for arbitrary carriers and single endpoint extensions. No novelty or κ gain is +claimed for them. They are not inputs to this proof. Subsequent work tests +changed scalar contacts with boundary repair, separate from the active claims. + +## Limits + +All checks are author checks by the same assistant. The five inherited +framework assumptions and helper endpoint contract remain. The huge uniform +word and complete rounded multiplier are not materialized. No independent +human acceptance, proof-kernel theorem or global optimum is claimed. diff --git a/research/p104-neutral-helper-cleanup/VERIFY.json b/research/p104-neutral-helper-cleanup/VERIFY.json new file mode 100644 index 0000000000..8773470dc5 --- /dev/null +++ b/research/p104-neutral-helper-cleanup/VERIFY.json @@ -0,0 +1,36 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "checks": "Authenticate all 36 exported source files; reconstruct three relations; check all rows and dense columns, native phases, complete caller, two exact moment engines, compiler costs and 58 outer conditions; reject semantic corruptions and compare saved artifacts.", + "timeout_seconds": 540 + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "checks": "Authenticate all 36 exported source files; reconstruct three relations; check all rows and dense columns, native phases, complete caller, two exact moment engines, compiler costs and 58 outer conditions; reject semantic corruptions and compare saved artifacts.", + "timeout_seconds": 540 + } + ], + "inputs": [ + "research/p104-neutral-helper-cleanup/inputs/pr5627-source.tar" + ], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/p104-neutral-helper-cleanup/WITNESS.json b/research/p104-neutral-helper-cleanup/WITNESS.json new file mode 100644 index 0000000000..8d4f38c5c9 --- /dev/null +++ b/research/p104-neutral-helper-cleanup/WITNESS.json @@ -0,0 +1,80 @@ +[ + { + "anchor": [ + "ADD", + 18, + 291, + "-1/2", + 234 + ], + "cancel": { + "293": "-1" + }, + "cut": 10627, + "frame": 234, + "gain": 0.0, + "helper": 291, + "output": { + "291": "-2", + "293": "-1", + "303": "2", + "39": "2" + }, + "removed": 6, + "reverse": false + }, + { + "anchor": [ + "ADD", + 320, + 321, + "-1", + 237 + ], + "cancel": { + "22": "2", + "320": "-3/2", + "330": "2" + }, + "cut": 11072, + "frame": 237, + "gain": 0.0, + "helper": 321, + "output": { + "320": "-2", + "321": "1", + "330": "2", + "34": "-2" + }, + "removed": 5, + "reverse": false + }, + { + "anchor": [ + "ADD", + 368, + 369, + "-1", + 243 + ], + "cancel": { + "26": "2", + "368": "-3/2", + "378": "-2" + }, + "cut": 11718, + "frame": 243, + "gain": 0.0, + "helper": 369, + "output": { + "3": "-2", + "369": "1", + "372": "-2", + "378": "-2", + "382": "-2", + "383": "2" + }, + "removed": 5, + "reverse": false + } +] diff --git a/research/p104-neutral-helper-cleanup/WORD.json.gz b/research/p104-neutral-helper-cleanup/WORD.json.gz new file mode 100644 index 0000000000..0bd3cff775 Binary files /dev/null and b/research/p104-neutral-helper-cleanup/WORD.json.gz differ diff --git a/research/p104-neutral-helper-cleanup/construct.py b/research/p104-neutral-helper-cleanup/construct.py new file mode 100644 index 0000000000..1d9ff07f57 --- /dev/null +++ b/research/p104-neutral-helper-cleanup/construct.py @@ -0,0 +1,117 @@ +"""Apply three exact neutral helper relations and join unused transports. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The helper boundary identity extends the retained PR5602 construction. +""" +from collections import Counter +from copy import deepcopy +from fractions import Fraction as Q + + +def coalesce(word, L): + out = deepcopy(word) + actual = word['initial'] + [None]*word['owned_fields'] + desired, program = actual[:], [] + + def flush(role): + if actual[role] != desired[role]: + program.append(['MOVE', role, actual[role], desired[role], role >= word['public']]) + actual[role] = desired[role] + + for event in word['program']: + op, role = event[:2] + if op == 'MOVE': + L.need(desired[role] == event[2], 'Chronological transport source') + desired[role] = event[3] + elif op == 'INIT': + L.need(actual[role] is None, 'Fresh owned lifetime') + actual[role] = desired[role] = event[2] + program.append(event[:]) + else: + flush(role) + if op in ('ADD', 'COPY'): + flush(event[2]) + program.append(event[:]) + if op == 'CLEAR': + actual[role] = desired[role] = None + for role in range(word['public']): + flush(role) + out['program'] = program + return out + + +def relation(word, witness, L): + h, cut, frame = (witness[k] for k in ('helper', 'cut', 'frame')) + n, owned = word['public'], word['owned_fields'] + main = set(word['live']) | {r+112 for r in word['live']} + L.need(h < n and h not in main and witness['reverse'] is False, 'Forward public helper') + L.need(word['program'][cut] == witness['anchor'], 'Exact chronological anchor') + L.need(word['final'][h] == frame, 'The target boundary stays fixed') + rows = [{r:Q(1)} if r < n else {} for r in range(n+owned)] + current = word['initial'] + [None]*owned + for event in word['program'][:cut+1]: + op, role = event[:2] + if op == 'MOVE': + current[role] = event[3] + elif op in ('INIT', 'CLEAR'): + rows[role] = {} + current[role] = event[2] if op == 'INIT' else None + elif op == 'SCALE': + rows[role] = {j:Q(event[-2])*a for j,a in rows[role].items()} + elif op == 'COPY': + rows[role] = {j:Q(event[-2])*a for j,a in rows[event[2]].items()} + else: + L.add(rows[role], rows[event[2]], Q(event[-2])) + output = {int(j):Q(a) for j,a in witness['output'].items()} + cancel = {int(j):Q(a) for j,a in witness['cancel'].items()} + initial = word['initial'][h] + L.need(h in output and h not in cancel and all(j < n and word['initial'][j] == initial + for j in output), 'One independent input chart') + L.need(current[h] == frame and all(current[j] == frame for j in cancel), + 'One cancellation chart') + row = rows[h].copy() + for role, coefficient in cancel.items(): + L.add(row, rows[role], -coefficient) + L.need(row == output, 'Exact prefix relation on every input') + scale = output[h] + L.need(scale and abs(scale.numerator) & (abs(scale.numerator)-1) == 0 + and scale.denominator & (scale.denominator-1) == 0, 'Invertible dyadic coefficient') + tail = word['program'][cut+1:] + L.need(not any(e[0] in ('ADD', 'COPY') and e[2] == h for e in tail), 'No later helper read') + removed = [e for e in tail if e[1] == h] + L.need(len(removed) == witness['removed'] and all(e[0] in ('ADD', 'SCALE') for e in removed), + 'Only declared scalar cleanup is removed') + preparation = [['ADD', h, j, str(-a/scale), initial] for j,a in sorted(output.items()) if j != h] + cancellation = [['ADD', h, j, str(-a), frame] for j,a in sorted(cancel.items())] + if scale != 1: + cancellation.append(['SCALE', h, str(1/scale), frame]) + out = deepcopy(word) + out['program'] = preparation + word['program'][:cut+1] + cancellation + [e for e in tail if e[1] != h] + out = coalesce(out, L) + return out, {'helper':h, 'cut':cut, 'frame':frame, 'removed_scalar_events':removed, + 'preparation':preparation, 'cancellation':cancellation} + + +def owned_events(word): + n = word['public'] + return [e for e in word['program'] if e[1] >= n or (e[0] in ('ADD', 'COPY') and e[2] >= n)] + + +def construct(source, witnesses, L): + L.need([c['helper'] for c in witnesses] == [291,321,369], 'Three declared helper relations') + word, receipts = deepcopy(source), [] + before = L.replay(word) + for witness in witnesses: + old = word + word, receipt = relation(word, witness, L) + after = L.replay(word) + delta = Counter(after['paid']) + delta.subtract(before['paid']) + L.need({r:v for r,v in delta.items() if v} == {1:-1,5:-1,6:1}, 'One H1+H5 path becomes H6') + L.need(after['helpers'] == before['helpers'] and word['initial'] == old['initial'] + and word['final'] == old['final'], 'Every target and independent input stays fixed') + L.need(owned_events(word) == owned_events(old), 'Every owned operation is retained in order') + receipt.update(paid=after['paid'], events=len(word['program']), scalar=after['real_scalar_allowance']) + receipts.append(receipt) + before = after + return word, receipts, before diff --git a/research/p104-neutral-helper-cleanup/inputs/pr5627-source.tar b/research/p104-neutral-helper-cleanup/inputs/pr5627-source.tar new file mode 100644 index 0000000000..bc900f0a15 Binary files /dev/null and b/research/p104-neutral-helper-cleanup/inputs/pr5627-source.tar differ diff --git a/research/p104-neutral-helper-cleanup/pricing.py b/research/p104-neutral-helper-cleanup/pricing.py new file mode 100644 index 0000000000..dc7f71a781 --- /dev/null +++ b/research/p104-neutral-helper-cleanup/pricing.py @@ -0,0 +1,174 @@ +"""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. +The source commuting-contact construction is by Pierre-Loic Doulcet (hexapode) in PR5565. +The source coupled-frame change is by Ali Romman with OpenAI Codex in PR5601. +Five fixed boundary relations are from Ali Romman's PR5602. +The shared and delayed relays are from flyingviper's PR5605 and PR5612. The preparation is from +Scratch-net's PR5606. Their costs and target debit are included. +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('.00310626335'), Q('.003106263355') +PREVIOUS = Q('.00310440546') + + +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()) == 12958 and sum(paid.values()) == 66492, '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 the source claim') + 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**12),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':'.00310626335','previous_open_pr5627':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':local['peak_owned_fields'], + '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-neutral-helper-cleanup/sources.py b/research/p104-neutral-helper-cleanup/sources.py new file mode 100644 index 0000000000..ea32e0a120 --- /dev/null +++ b/research/p104-neutral-helper-cleanup/sources.py @@ -0,0 +1,61 @@ +"""Authenticate the retained PR5627 export before any source import. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The archive checks follow the repository exporter and flyingviper's PR5613. +""" +from contextlib import contextmanager +from hashlib import sha1, sha256 +from pathlib import Path, PurePosixPath +import importlib.util +import io +import json +import sys +import tarfile +import tempfile + +HERE = Path(__file__).resolve().parent + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +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 + + +@contextmanager +def sources(): + pin = json.loads((HERE/'SOURCES.json').read_bytes())['source_export'] + raw = (HERE/pin['local_path']).read_bytes() + need(sha256(raw).hexdigest() == pin['sha256'], 'Exact predecessor archive SHA256') + need(sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest() == pin['git_blob'], + 'Exact retained archive Git blob') + with tempfile.TemporaryDirectory(prefix='p104-neutral-source-') as directory: + root, names = Path(directory), set() + with tarfile.open(fileobj=io.BytesIO(raw), mode='r:') as bundle: + for member in bundle.getmembers(): + path = PurePosixPath(member.name) + need(member.isfile() and not path.is_absolute() and '..' not in path.parts + and '\\' not in member.name and ':' not in member.name, + 'Regular relative source path') + need(member.name not in names, 'Unique source path') + names.add(member.name) + target = root.joinpath(*path.parts) + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(bundle.extractfile(member).read()) + manifest = json.loads((root/'.research-export.json').read_bytes()) + need(manifest['commit'] == pin['commit'] and manifest['package'] == pin['package'] + and len(manifest['files']) == pin['files'], 'Exact source commit and inventory') + need(names == {'.research-export.json'} | {r['path'] for r in manifest['files']}, + 'No missing or additional source payload') + for row in manifest['files']: + payload = (root/row['path']).read_bytes() + need(len(payload) == row['size'] and sha256(payload).hexdigest() == row['sha256'], + 'Authenticated payload: '+row['path']) + yield root/pin['package'], root diff --git a/research/p104-neutral-helper-cleanup/verify.py b/research/p104-neutral-helper-cleanup/verify.py new file mode 100644 index 0000000000..b8763f22ea --- /dev/null +++ b/research/p104-neutral-helper-cleanup/verify.py @@ -0,0 +1,114 @@ +"""Verify the three helper relations and the complete conditional kappa. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +""" +import argparse +from copy import deepcopy +import gzip +import json +from pathlib import Path +import sys +import tempfile + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from sources import sources, load, need +import construct + + +def rejected(action): + try: + action() + except ValueError as error: + return str(error) + raise ValueError('An invalid certificate was accepted') + + +def run(): + witnesses = json.loads((HERE/'WITNESS.json').read_bytes()) + with sources() as (parent, root): + L = load(parent/'local.py', 'local') + source = L.read(parent/'WORD.json.gz') + old = L.replay(source) + word, changes, local = construct.construct(source, witnesses, L) + columns = L.reverse_columns(word) + need((local['public_inputs'],local['owned_fields'],local['owned_lifetimes'],local['peak_owned_fields']) == + (743,9,11,2), 'All independent inputs and owned lifetimes') + print('PASS three exact relations, unchanged targets and all 565504 matrix entries', flush=True) + native = L.native(word) + C = load(root/'research/p104-productive-controller/caller.py', 'neutral_caller') + caller = C.construct() + need(caller == L.read(root/'research/p104-productive-controller/CONTROLLER.json'), 'Exact retained controller') + physical = C.physical(caller, word) + print('PASS all native phases and the full physical caller', flush=True) + original_price = (parent/'pricing.py').read_text() + edits = [ + ("Q('.00310440546'), Q('.003104405465')", "Q('.00310626335'), Q('.003106263355')"), + ("PREVIOUS = Q('.00308595')", "PREVIOUS = Q('.00310440546')"), + ('== 66546', '== 66492'), + ("'kappa_decimal':'.00310440546'", "'kappa_decimal':'.00310626335'"), + ('previous_open_pr5601', 'previous_open_pr5627')] + for before, after in edits: + need(original_price.count(before) == 1, 'One declared price substitution') + original_price = original_price.replace(before, after) + need((HERE/'pricing.py').read_text() == original_price, 'Only declared price changes') + P = load(HERE/'pricing.py', 'neutral_price') + costs = P.run(local, native, caller, physical) + controls = C.controls(caller) + bad = deepcopy(witnesses[0]) + key = next(iter(bad['cancel'])) + bad['cancel'][key] = str(L.Q(bad['cancel'][key])+1) + controls['false_cancellation'] = rejected(lambda: construct.relation(source, bad, L)) + bad = deepcopy(witnesses[0]) + bad['cut'] += 1 + controls['wrong_cut'] = rejected(lambda: construct.relation(source, bad, L)) + bad = deepcopy(word) + bad['program'].pop(0) + controls['missing_input_basis'] = rejected(lambda: L.replay(bad)) + bad = deepcopy(word) + bad['program'].pop(max(i for i,e in enumerate(bad['program']) if e[0] == 'CLEAR')) + controls['missing_owned_erasure'] = rejected(lambda: L.replay(bad)) + bad = deepcopy(local) + bad['helpers'][1] += 1 + controls['extra_target_credit'] = rejected(lambda: P.assemble(bad,native,caller,physical)) + bad = deepcopy(local) + bad['paid'][1] -= 1 + controls['unpaid_query'] = rejected(lambda: P.assemble(bad,native,caller,physical)) + result = dict(status='PASS_P104_NEUTRAL_HELPER_KAPPA_00310626335', + source_commit='ed4dc88a09a7d201971f6603b8c2074e95dd9c32', + authenticated_source_files=36, changes=changes, + local_paid_delta={1:-3,5:-3,6:3}, local_helper_delta={}, + source_local=old, local=local, separate_columns=columns, + native=native, physical_caller=physical, complete_cost=costs, + negative_controls=controls, + limits=['The five selected framework assumptions and helper-endpoint contract remain.', + 'The enormous uniform word and complete rounded multiplier are not materialized.', + 'These author checks are not independent scientific review or a proof-kernel theorem.', + 'The improvement is small. No large gain or global optimum is established.']) + return P.encode(result), word + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + with tempfile.TemporaryDirectory(prefix='p104-neutral-bytecode-') as cache: + sys.pycache_prefix = cache + result, word = run() + for name, value in (('RESULT.json', result), ('WORD.json.gz', word)): + path = HERE/name + if args.write: + raw = (json.dumps(value,sort_keys=True,indent=None if name.endswith('.gz') else 2)+'\n').encode() + path.write_bytes(gzip.compress(raw,mtime=0) if name.endswith('.gz') else raw) + else: + raw = path.read_bytes() + need(json.loads(gzip.decompress(raw) if name.endswith('.gz') else raw) == value, + 'Exact saved artifact: '+name) + print(result['status']) + print(json.dumps({k:result['complete_cost'][k] for k in + ('kappa_decimal','gain','raw_root_interval','productive_fields','paid_calls')},sort_keys=True)) + + +if __name__ == '__main__': + main()