diff --git a/research/p104-second-low-rank-block/NOTICE b/research/p104-second-low-rank-block/NOTICE new file mode 100644 index 0000000000..d07f993ba2 --- /dev/null +++ b/research/p104-second-low-rank-block/NOTICE @@ -0,0 +1,63 @@ +Second rank-four contact block on the complete PR5756 word. +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +No subagents. These are author-side checks. + +Joel Pulikkan (GamingPuzzled), with Claude Opus 5.5 assistance, supplied the +R22 reframe mechanism and the different block in PR5739/5756. +This package adds a different 102-operation block; it does not claim that mechanism. + +The source PR5756 notice follows unchanged. + +Paid intermediate meetings and collective helper splits. +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +No subagents. All checks are author-side calculations. + +The complete PR5718 notice follows unchanged. + +Four paid interior public-basis changes. +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +No subagents. + +The following exact notice is retained from PR5660. + +New helper-subspace construction, proof and replay: +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The same assistant performed the construction and author-side checks. + +Retained contributions: +flyingviper: PR5605 shared relay, PR5612 delayed relay, and the PR5608/PR5613 +relay/split compositions. +Scratch-net: PR5606 prepared-helper identities and target debit. +Pierre-Loic Doulcet (hexapode): PR5565 commuting-contact construction, used as the exact source. +Ali Romman: PR5602 fixed boundary relations, PR5601 three-contact frame +change, PR5580 contact step, +and PR5544/5545 complete P104 caller. +Joel Pulikkan (GamingPuzzled): PR5569 priced helper handoff. +DreamingOfClouds: PR5561 free helper endpoints and PR5568 search tools. +thu-nmrc: PR5551 contact improvements. +Gareth Davidson (bitplane): PR2305 source composition. +David Arias: PR2152 coalesced P104 word. +Cinna Davis: PR2219 private reuse and the controller lineage. +Jacob Alan Sussman: productive mixed-target recursion. +zxv and Cao Yifan: exact intervals, compiler and native/pricing lineage. +GamingPuzzled: PR5472 successor handoff, a predecessor to the split concept. +The retained source notices preserve earlier geometry, BIT and analytic credit. + +The elementary rank-one basis identity is not claimed as a new general +linear-algebra theorem. The contribution is its explicit independent-target +use on this P104 word and the complete conditional kappa improvement. + +New contribution: Ali Romman, with substantial OpenAI Codex assistance. +The four-gate source-version rewrite composes zxv PR5643 and Ali Romman PR5644. +The A2 method retains Chris R/Clear1nsight PR3998 and ToikY PR4019 credit. +The compensated triangle method retains Cinna Davis PR4692 credit. +No subagents were used for this contribution. Apache-2.0. + +Concurrent PR5650 by zxv publishes the PR5643/PR5644 composition. PR5651 by +Ali Romman corroborates it. This package credits that released composition +and contributes the further four-gate placement. + +New work: distributed scalar updates on an unobserved public field interval, the exact witness and complete conditional price. Prepared for Ali Romman with substantial OpenAI Codex assistance. No subagents. Apache-2.0. The source archive retains all predecessor notices. + +Two-boundary main-assisted helper split and early cleanup: flyingviper with substantial +OpenAI Codex assistance, including independent AI review agents. Apache-2.0. diff --git a/research/p104-second-low-rank-block/PLAN.json b/research/p104-second-low-rank-block/PLAN.json new file mode 100644 index 0000000000..47fa8c4053 --- /dev/null +++ b/research/p104-second-low-rank-block/PLAN.json @@ -0,0 +1,34 @@ +{ + "basis": [ + 11, + 21, + 38, + 448 + ], + "old_frame": 267, + "roles": [ + 57, + 81, + 92, + 224, + 225, + 227, + 229, + 234, + 742 + ], + "initial_helper": 742, + "final_helper": 225, + "runs": [ + { + "first_scalar": 9858, + "length": 90, + "old_sha256": "2c4d8332eed5d21830748b694d88a830f98f50773e7faddfb65b654800d0e296" + }, + { + "first_scalar": 11957, + "length": 12, + "old_sha256": "bcb7d071dbe4b830053892decd7c8b6aef5a26b06a06e010148882871cf07ee2" + } + ] +} diff --git a/research/p104-second-low-rank-block/PRICING-EDITS.json b/research/p104-second-low-rank-block/PRICING-EDITS.json new file mode 100644 index 0000000000..d5f823e1e2 --- /dev/null +++ b/research/p104-second-low-rank-block/PRICING-EDITS.json @@ -0,0 +1,26 @@ +[ + [ + "KAPPA, TESTED = Q('.00311301600'), Q('.003113016005')", + "KAPPA, TESTED = Q('0.00311325989'), Q('0.003113259895')" + ], + [ + "PREVIOUS = Q('.00311024570')", + "PREVIOUS = Q('.00311313795')" + ], + [ + "sum(paid.values()) == 66834", + "sum(paid.values()) == 66870" + ], + [ + "'kappa_decimal':'0.00311301600'", + "'kappa_decimal':'0.00311325989'" + ], + [ + "'previous_pr5718':PREVIOUS", + "'previous_pr5756':PREVIOUS" + ], + [ + "Paid intermediate meetings: Ali Romman with substantial OpenAI Codex assistance.", + "Paid intermediate meetings: Ali Romman with substantial OpenAI Codex assistance.\nThe source R22 block is by Joel Pulikkan (GamingPuzzled).\nThe second rank-four block is by Ali Romman with OpenAI Codex assistance." + ] +] diff --git a/research/p104-second-low-rank-block/PROOF.md b/research/p104-second-low-rank-block/PROOF.md new file mode 100644 index 0000000000..d8daa51f7d --- /dev/null +++ b/research/p104-second-low-rank-block/PROOF.md @@ -0,0 +1,91 @@ +# Proof and full cost + +## Exact local change + +Let C(F) be the retained native chart map for binary subspace F. A MOVE from F +to G implements `C(G) C(F)^-1`. The source checker factors each map into its +recursive calls and ordinary operations. It checks the signed Pauli action +and the exact global phase. The frame induction then applies at every positive +tensor width. A scalar instruction acts on registers in one common chart. +Changing that chart preserves its abstract scalar action. + +The constructor uses the two exact runs in PLAN.json. It keeps their scalar +instructions unchanged and assigns the rank-four chart. It rebuilds all MOVE +instructions from the complete scalar sequence. The only changed public +boundary charts belong to helpers 742 and 225. The source contract permits +these free helper endpoints and charges their resulting target transforms. +No main endpoint changes. No helper input is assumed to be zero. + +`verify.py` checks every scalar coefficient on all 767 public inputs and nine +owned coordinates. It separately checks every transpose column in reverse +chronological order. The native replay checks all maps and phases, every main +adapter and every helper normalizer. Thus this check includes the boundary +cost, not just the interior rank-four operations. + +The local paid profile is: + +```text +rank: 1 2 3 4 5 6 7 +count: 2221 454 492 94 173 6 15 +``` + +The local productive helper profile is: + +```text +rank: 1 2 4 5 7 8 9 +count: 23 5 93 8 6 36 388 +``` + +Compared with the frozen source, the paid delta is `H1+H4-H5` and the helper +delta is `-H1+H4+H5-H8`. Paid rank mass stays 5,987. The scalar allowance stays +224,138. There are eleven owned lifetimes and at most two live owned fields. + +## Physical caller and complete price + +The unchanged productive controller makes eighteen full local calls. It also +pays fifteen thin queries, each of cost `104 H1`, and fifteen whole idles. +The idle ranks are `8L`: two instances of each L from two through eight and +one instance of L=9. Each instance costs 208 such jobs. + +Its main productive targets are `208 H145` and the fifteen idles with rank +increased by one. The full target profile is this main profile plus eighteen +copies of the local helper profile. The full paid profile is eighteen copies +of the local paid profile plus all thin queries and all whole idles. +The physical replay checks each contact and each central-square column. +The full profiles appear literally in RESULT.json. They contain 13,390 targets +and 66,870 paid calls, with rank-mass surplus 760. + +For a saving k, set `t=1-k`. The raw condition compares the complete moments +`sum(T[r] r^t)` and `sum(P[r] r^t)`. Both exact rational interval engines give +a positive margin at the tested saving `0.003113259895`. They put the raw zero +in `(0.00311325991155, 0.00311325991156)`. The retained derivative bound is +negative throughout `[0,0.0034]`, which gives the fixed-profile ceiling. +The old complete source profile has a strictly negative upper margin at the +new claimed kappa. This proves a new profile gain, not extra decimal places +from the old profile. + +The completion proof uses cutoff 16, floor 17, tail offset 1/7, decay 125/128, +power 1024 and reserve 1e-12. It bounds the whole tail, productive stock and +normalized paid cost. The compiler checks all 54 strict inequalities and +four functional conditions. It includes ordinary scalar operations, +COPY/CLEAR, restoration, native adapters, thin queries, idles and routes. +The inherited BIT saving is 0.0034. The complex cost binds the resulting +conditional multiplication saving `0.00311325989`. + +`PRICING-EDITS.json` declares all edits to the archived PR #5751 pricing code: +the claim and tested value, previous claim, full paid-call count, result label +and attribution. The verifier requires those exact edits. It does not weaken +any mathematical price predicate. + +## Failure controls and limits + +The replay rejects an old helper entry, an old block chart, a missing native +MOVE, a wrong scalar coefficient, an unpaid query, an extra target credit, +a damaged source byte and a missing central translation. The native checker +also rejects the wrong global phase. Explicit exceptions preserve these checks +under Python `-O`. + +The finite receipts and inherited frame induction remain conditional on the +five framework assumptions listed in README.md. They do not materialize a +uniform word or rounded multiplier. These are author checks. Independent +review and any selected-frontier admission are separate obligations. diff --git a/research/p104-second-low-rank-block/README.md b/research/p104-second-low-rank-block/README.md new file mode 100644 index 0000000000..07c606256d --- /dev/null +++ b/research/p104-second-low-rank-block/README.md @@ -0,0 +1,103 @@ +# Second rank-four block: conditional kappa 0.00311325989 + +This package gives a complete conditional kappa of **0.00311325989**. It improves +[PR #5756](https://github.com/CrocSwap/integer-mult-bounds/pull/5756)'s claim by +**0.00000012194**. The exact raw crossing lies in +**(0.00311325991155, 0.00311325991156)**. This is a small gain. It does not meet +the donor's request for a much larger improvement. + +[PROOF.md](PROOF.md) gives the argument. [RESULT.json](RESULT.json) records the +complete bill and checks. [SOURCES.json](SOURCES.json) pins all retained bytes. +The base is canonical main `de5ec2e7a6074068452f45b1a191b5c72832df4a`, priority +revision 8. The selected frontier is unchanged. + +Later [PR #5786](https://github.com/CrocSwap/integer-mult-bounds/pull/5786) +claims the larger bound 0.00312265044 through retained copies and asynchronous +hubs. This package does not supersede that result. Its new block is released +for the separate [source-composition investigation](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19202093); no gain is obtained by adding the published decimal values. + +## Change and scope + +The exact source is PR #5756 at +`a1b338e5d9271b541f2a198f4fc19cefc565feed`. It contains the paid-meeting changes +from [PR #5751](https://github.com/CrocSwap/integer-mult-bounds/pull/5751) and +Joel Pulikkan's R22 block from +[PR #5739](https://github.com/CrocSwap/integer-mult-bounds/pull/5739). +This package changes a different block on roles +57, 81, 92, 224, 225, 227, 229, 234 and 742. + +[PLAN.json](PLAN.json) pins two scalar runs by index, length and SHA256. All 102 +operations move from chart 267 of rank eight to `span[11,21,38,448]` of rank +four. Helper 742 starts there; helper 225 ends there. Every scalar coefficient, +scalar order, owned event, main endpoint and port is unchanged. The constructor +rebuilds every native MOVE, including entry and final routes. + +Per local call, the paid change is `H1 + H4 - H5`. The helper target change is +`-H1 + H4 + H5 - H8`. Here `Hr` denotes a recursive job of rank r, not an +array-volume exponent. The complete caller has 13,390 productive fields, +66,870 paid calls and rank-mass surplus 760. A count reduction alone is not the +source of the gain: the complete signed moment improves. + +The exact raw ceiling applies only to this fixed full target/paid profile. +It leaves between `2.155e-11` and `2.156e-11` above the claim. Further useful +progress must change that profile. No optimum over other words is claimed. + +## Replay + +Python 3.12 and the standard library are sufficient. From a checkout: + +```sh +python3.12 -B scripts/research_package.py --package research/p104-second-low-rank-block +``` + +The registered commands use ordinary Python and `-O`, in sequence. Each ends: + +```text +PASS_P104_SECOND_RANK4_BLOCK_KAPPA_00311325989 +``` + +A source export needs no Git, network or solver. In its package directory: + +```sh +python3.12 -I -B verify.py +python3.12 -I -O -B verify.py +``` + +The source word is frozen, not regenerated from the PR #5756 search. The new +word is regenerated from that frozen word. All 602,176 scalar coefficients and +a separate dense transpose replay are checked. The replay also checks 2,934 +native maps with their absolute phases, 208 main adapters, 1,118 helper +normalizers, 7,488 physical contacts and 53,248 central-square columns. Two +rational moment engines check completion and the full bill. All ordinary +COPY/CLEAR, scalar, restoration and route charges remain in the inherited +compiler proof. See [VALIDATION.md](VALIDATION.md) for the run record. + +## Conditions and limits + +The five inherited framework assumptions remain: `native_all_columns`, +`owned_erasure`, `compiler`, `precision_tape` and `analytic_recovery`. +This is a complete conditional price in that framework. The uniform word and +rounded integer multiplier are not materialized. No independent human review, +proof-kernel acceptance or selected-frontier change is claimed. + +## Open next questions + +[TASK.json](TASK.json) gives the next questions and their first checks. A larger +gain needs a new full profile. Independent review must still assess this exact +source closure, word and price. Check current Discussions before taking a new +scalar, helper or caller scope. + +## Credit + +Ali Romman with substantial OpenAI Codex assistance supplied this second block, +its constructor and this replay package. No subagents were used. Apache-2.0. +Joel Pulikkan (GamingPuzzled), with Claude Opus 5.5 assistance, supplied the R22 +reframe mechanism and the different block retained from PR #5756. We do not +claim that mechanism as new. + +The retained PR #5751 source supplies the exact local, native, caller and price +checks. Its source chain includes flyingviper's distinct-boundary work in +[PR #5718](https://github.com/CrocSwap/integer-mult-bounds/pull/5718), the earlier +P104 helper work, and the controller, compiler and analytic work. +[NOTICE](NOTICE) preserves their notices. Exact source commits, blob IDs and +SHA256 hashes are in SOURCES.json. The nested archives are unchanged. diff --git a/research/p104-second-low-rank-block/RESULT.json b/research/p104-second-low-rank-block/RESULT.json new file mode 100644 index 0000000000..a416f4115c --- /dev/null +++ b/research/p104-second-low-rank-block/RESULT.json @@ -0,0 +1,378 @@ +{ + "complete_cost": { + "compiler": { + "H": 80511200000000000, + "N": "2^80511200000000000", + "eta": { + "lower": "0.000000128307455362952003202129", + "upper": "0.000000128307455362952003202130" + }, + "gap": "1/1400000000000", + "integer_test_exponent": 57508, + "logarithm_power": 1024, + "theta": "63/64", + "uniform_saving": "1089640963/350000000000", + "word_materialized": false + }, + "full_forward_calls": 18, + "gain": "6097/50000000000", + "kappa": "311325989/100000000000", + "kappa_decimal": "0.00311325989", + "margin_at_previous": { + "lower": "0.029574762242411510926776885631", + "upper": "0.029574762242411510926776885632" + }, + "negative_controls": { + "old_BIT": "Rejected by outer inequalities", + "old_cutoff": "Rejected by completion-tail ratio greater than one", + "source_completion": "Rejected at cutoff17, floor18 and decay39/40", + "source_offset": "Rejected at cutoff16 with tail offset1/5" + }, + "nonrecursive": { + "fixed_scalar_growth_bound": "At most 2^(16*26000) before native factors; a declared constant, not an attained norm.", + "local_paid_rank_mass": 5987, + "local_routes": 5241000, + "local_scalar": 224138, + "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": "6101989389995641436151/1960000000000000000000000", + "fused_gaussian": "6101989389986924308453/1960000000000000000000000", + "global_coordinate_router": "87171277/28000000000", + "group_bit_router": "122039787827738486169/39200000000000000000000", + "group_scans": "699999999999/700000000000", + "main_transform": "6101989388595641436151/1960000000000000000000000", + "microbox_face_corrections": "26950000000001/350000000000", + "polynomial_products": "1399999999999/1400000000000", + "sparse_union_movement": "802351989389995641436151/1960000000000000000000000" + }, + "parameters": { + "a": "87171277/28000000000", + "b": "4358563851/1400000000000", + "beta": "1399999999997/1400000000000", + "bit_saving": "17/5000", + "cap_xi": "1782351989388595641436151/1960000000000000000000000", + "complex_uniform_saving": "1089640963/350000000000", + "d": "1/1400000000000", + "epsilon": "1399999999999/1400000000000", + "kappa": "311325989/100000000000", + "lambda_": "398754696043/400000000000", + "lambda_prime": "1395641436151/1400000000000", + "layout": "1/1400000000000", + "q": "4358563849/1400000000000", + "r0": "1/14000000000000", + "stop": "1/1400000000000", + "tested_saving": "622651979/200000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "8028723/28000000000", + "actual_logarithmic_gamma_guard": "1/1400000000000", + "actual_logarithmic_group_guard": "177648010613504358563849/980000000000000000000000", + "alpha_logarithm_absorption": "1/14000000000000", + "boundary_algebraic_matrix_above_kappa": "5595641436151/1960000000000000000000000", + "cap_above_band": "802351989388595641436151/1960000000000000000000000", + "cap_below_cell": "177648010610004358563849/1960000000000000000000000", + "cap_below_phase_cell_power": "2137648010611404358563849/1960000000000000000000000", + "complex_above_effective": "1/1400000000000", + "complex_below_one_over_32": "39391436149/1400000000000", + "complex_endpoint": "1/700000000000", + "epsilon_below_one": "1/1400000000000", + "epsilon_positive": "1399999999999/1400000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "5586924308453/1960000000000000000000000", + "gaussian_above_main": "695641436151/980000000000000000000000", + "global_coordinate_router_above_kappa": "1/350000000000", + "global_gamma_power_slack": "9/14000000000000", + "group_below_dimension": "1/700000000000", + "group_bit_router_above_kappa": "139738486169/39200000000000000000000", + "group_gauge_power_slack": "177648010613434358563849/980000000000000000000000", + "group_key_fits_record": "1/700000000000", + "group_positive": "1399999999997/1400000000000", + "group_scans_above_kappa": "174455179519/175000000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "691144735400418148631/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": "2795641436149/1960000000000000000000000", + "leaf_saving_above_effective": "1395641436149/1960000000000000000000000", + "main_transform_above_kappa": "4195641436151/1960000000000000000000000", + "membership_arithmetic_fits_record": "1/1400000000000", + "microbox_face_corrections_above_kappa": "53897820718079/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": "1395641436153/1400000000000", + "positive_layout_slack": "1/1400000000000", + "q_below_effective": "1/1400000000000", + "q_below_internal": "1/1400000000000", + "q_below_leaf": "2795641436149/1960000000000000000000000", + "q_positive": "4358563849/1400000000000", + "short_record_fallback": "1395641436149/1400000000000", + "source_axis_superpolynomial": "1/1400000000000", + "sparse_union_movement_above_kappa": "796250000005595641436151/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": 41538, + "16": 416, + "2": 8172, + "24": 416, + "3": 8856, + "32": 416, + "4": 1692, + "40": 416, + "48": 416, + "5": 3114, + "56": 416, + "6": 108, + "64": 416, + "7": 270, + "72": 208 + }, + "paid_calls": 66870, + "previous_pr5756": "62262759/20000000000", + "productive_fields": 13390, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_ceiling": { + "derivative_upper": "-369286101616707017169800433482339176863685557920318052135140209/1569275433846670190958947355801916604025588861116008628224", + "interval": [ + "0", + "17/5000" + ] + }, + "raw_headroom": [ + "431/20000000000000", + "539/25000000000000" + ], + "raw_root_interval": [ + "62265198231/20000000000000", + "77831497789/25000000000000" + ], + "relative_gain_percent": "18760/4789443", + "strictification": { + "alpha": { + "lower": "0.999999999983205619361062795738", + "upper": "0.999999999983205619361062795739" + }, + "cutoff": 16, + "delta": { + "lower": "0.944336664072851217592870807642", + "upper": "0.944336664072851217592870807643" + }, + "floor": 17, + "gamma": { + "lower": "0.975463517052302997714459816636", + "upper": "0.975463517052302997714459816637" + }, + "normalized_paid_upper": "1048576000976562501/1048576001073741824", + "power": 1024, + "reserve": "1/1000000000000", + "tail_block": 128, + "tail_decay": "125/128", + "tail_offset": "1/7", + "tested": "622651979/200000000000" + }, + "targets": { + "1": 414, + "145": 208, + "17": 416, + "2": 90, + "25": 416, + "33": 416, + "4": 1674, + "41": 416, + "49": 416, + "5": 144, + "57": 416, + "65": 416, + "7": 108, + "73": 208, + "8": 648, + "9": 6984 + }, + "whole_idle_jobs": 3120 + }, + "controls": { + "damaged_source": "Exact source SHA256: research/p104-block-reframe-r22/WORD.json.gz", + "extra_target_credit": "Every productive helper has a native target", + "missing_central_translation": "Rejected by the complete Laurent endpoint", + "missing_native_move": "Scalar destination and coefficient", + "old_block_chart": "Scalar destination and coefficient", + "old_helper_entry": "Scalar destination and coefficient", + "unpaid_query": "Complete field and call counts", + "wrong_scalar_coefficient": "All public and owned rows" + }, + "limits": [ + "The five inherited framework assumptions remain.", + "This small gain does not meet the requested large improvement.", + "The uniform word and rounded multiplier are not materialized.", + "These author checks are not independent human or formal acceptance.", + "The selected frontier is unchanged." + ], + "local": { + "endpoint_coefficients": 602176, + "helpers": { + "1": 23, + "2": 5, + "4": 93, + "5": 8, + "7": 6, + "8": 36, + "9": 388 + }, + "owned_fields": 9, + "owned_lifetimes": 11, + "paid": { + "1": 2221, + "2": 454, + "3": 492, + "4": 94, + "5": 173, + "6": 6, + "7": 15 + }, + "paid_rank_mass": 5987, + "peak_owned_fields": 2, + "public_inputs": 767, + "real_scalar_allowance": 224138 + }, + "native": { + "distinct_maps": 2934, + "helper_normalizers": 1118, + "helpers": { + "1": 23, + "2": 5, + "4": 93, + "5": 8, + "7": 6, + "8": 36, + "9": 388 + }, + "main_adapters": 208, + "proof": "Every signed Pauli image and exact global phase; frame induction at every positive tensor width", + "recipe_payload_sha256": "05938bc0bbfd2918d46db5250e4667baa51ad208663f67cba49d0161bafe88a2", + "wrong_phase_rejected": true + }, + "paid_delta": { + "1": 1, + "4": 1, + "5": -1 + }, + "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 + ] + }, + "source_commit": "a1b338e5d9271b541f2a198f4fc19cefc565feed", + "source_local": { + "endpoint_coefficients": 602176, + "helpers": { + "1": 24, + "2": 5, + "4": 92, + "5": 7, + "7": 6, + "8": 37, + "9": 388 + }, + "owned_fields": 9, + "owned_lifetimes": 11, + "paid": { + "1": 2220, + "2": 454, + "3": 492, + "4": 93, + "5": 174, + "6": 6, + "7": 15 + }, + "paid_rank_mass": 5987, + "peak_owned_fields": 2, + "public_inputs": 767, + "real_scalar_allowance": 224138 + }, + "source_margin_upper_at_new_claim": "-23197814108776679263309998569985910984431277493016184311/784637716923335095479473677900958302012794430558004314112", + "status": "PASS_P104_SECOND_RANK4_BLOCK_KAPPA_00311325989", + "target_delta": { + "1": -1, + "4": 1, + "5": 1, + "8": -1 + }, + "transpose": { + "arithmetic": "Dense integer rows with binary denominators; reverse chronology", + "coefficients": 602176, + "columns": 776 + } +} diff --git a/research/p104-second-low-rank-block/SOURCES.json b/research/p104-second-low-rank-block/SOURCES.json new file mode 100644 index 0000000000..4cd9204e04 --- /dev/null +++ b/research/p104-second-low-rank-block/SOURCES.json @@ -0,0 +1,192 @@ +{ + "schema_version": 1, + "base_commit": "de5ec2e7a6074068452f45b1a191b5c72832df4a", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "581f8d87008354eb5b869f7ed9de1317ad837ce8", + "sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + ], + "archived_files": [ + { + "path": "research/p104-paid-meeting-splits/LOCAL-EDITS.json", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 60, + "sha256": "3105be46bae1692f887172f38e0adbbe93b935298052f281c7beab6ffe86ab7f", + "git_blob": "600aaf354645f6e938a1a24e74f66fc7d00cf6d4" + }, + { + "path": "research/p104-paid-meeting-splits/NOTICE", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 2843, + "sha256": "0fad3a4a6fe3a273ec8ad0831a5bd8041077f30738fb0108a86a87ad1f68b0e7", + "git_blob": "faf2c1bfc83394f038a077b19710d0c05d865788" + }, + { + "path": "research/p104-paid-meeting-splits/PLAN.json", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 16822, + "sha256": "9bf29e526b25efa0402dc08634b5f97ab5c7b4daaf4a38847d56411ee50838a4", + "git_blob": "84ad2a32d40fa512067767ce1e28b7a122862744" + }, + { + "path": "research/p104-paid-meeting-splits/PRICING-EDITS.json", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 1647, + "sha256": "98ac83c1983efe0dd83559ec6c47805ae2e5915916ccc854d5f5f7aa94ea3eaf", + "git_blob": "a5e6c4ec220b6951490a021d7d667a1dd738f90c" + }, + { + "path": "research/p104-paid-meeting-splits/PROOF.md", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 8391, + "sha256": "954373d136c719a7ef76da4cd4f871c83949bef6c54615625a709ae9f11a3132", + "git_blob": "b98dddcb5bc30f924753e9015280f26897dfcdaf" + }, + { + "path": "research/p104-paid-meeting-splits/README.md", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 4975, + "sha256": "b5a7593b6d614021e1c5601fae8f1a7b7c96f6f2ab7d187540eb9b4704e008ae", + "git_blob": "b4bd9cd66b6d37c397992c1f56d3098d06332bb9" + }, + { + "path": "research/p104-paid-meeting-splits/RESULT.json", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 12752, + "sha256": "81f98f32d4b9bea858d11c91253e95dc1983b718cc3c5781235c6ded1c574b19", + "git_blob": "6c7d00db30625b7ed4b53fb83a2db82178700ee7" + }, + { + "path": "research/p104-paid-meeting-splits/SOURCES.json", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 17576, + "sha256": "4f36521f71edabeb785eaba789fcdaf1d8e6409ae542099c64eb17b5c06b379d", + "git_blob": "54d6e538fc2f77e71778d53cfb40a3737c972f96" + }, + { + "path": "research/p104-paid-meeting-splits/TASK.json", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 5910, + "sha256": "c9fc8e6ef49b1a346038ab1ed63367ae3d140aa6323783bbcfd1ee683f5163ff", + "git_blob": "16d9a33696f1957a6914300b054e6788dd0e5c48" + }, + { + "path": "research/p104-paid-meeting-splits/VALIDATION.md", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 5159, + "sha256": "b8a09e7e2ab78c092cf54cd59ede87a5978a6c8908ea96c48f20bbf03091471e", + "git_blob": "0f1a7eae6a8681f6c2b397ec357b83f9335c959c" + }, + { + "path": "research/p104-paid-meeting-splits/VERIFY.json", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 747, + "sha256": "eee6981e3c3243dd69d19c68042e6087dc97780016a6aa56a74fb438af1f9fd5", + "git_blob": "5550c891e8c17cdefe14b5dd585f4bfeaf887943" + }, + { + "path": "research/p104-paid-meeting-splits/WITNESS.json", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 14861, + "sha256": "092c1cbed4ea349b5704b73ecbcccdd9c8d0fe50818c9bb7d94018c972e2960f", + "git_blob": "55cb6e33f496e6fd2f665d33b04cdc0a2f81bfab" + }, + { + "path": "research/p104-paid-meeting-splits/WORD.json.gz", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 121994, + "sha256": "fb60e34238a57a147f53aadb1af1209a562e2dcd18b05a29557df452cfe83133", + "git_blob": "d0c700d03eebc367ebb4c50d7b3d46355070e231" + }, + { + "path": "research/p104-paid-meeting-splits/checks.py", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 6675, + "sha256": "8606a679843d3806eecb3843805b5547d23e3ffbe4b6cd2328297d3458084cd9", + "git_blob": "978ea2d805a43953a8c792d0399f2ab5866b0c61" + }, + { + "path": "research/p104-paid-meeting-splits/construct.py", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 6552, + "sha256": "fafcd4b56a4dbbcaf4671d3bc9906f7c2d19c93b5ccf7b9bdade79f0dec52077", + "git_blob": "d70a68ea49423a9b6e92504b42c7447f9b6622f5" + }, + { + "path": "research/p104-paid-meeting-splits/inputs/pr5718-source.tar", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 3010560, + "sha256": "2ed859e3cad00ed9ece1bb58792e78a623d49cd37eeca9f6b49c3c7345415f75", + "git_blob": "55423a4a2c22d45e1ec1a8bfd77b65bfcba0e170" + }, + { + "path": "research/p104-paid-meeting-splits/local.py", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 9385, + "sha256": "fc7c7293f7cffb8a9074e65b926e1782f2ebce2991c9ea75d42b94e888052689", + "git_blob": "c181baa903d671744a35f8d7749b74ab548086fe" + }, + { + "path": "research/p104-paid-meeting-splits/pricing.py", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 11022, + "sha256": "c1723babfaacb4ef8ca274e22dbefc499ab92fcd9fda616e29bf9693dc81516a", + "git_blob": "a9e4194e7bb26ceb32bf7aa75a979eea79d3e5cc" + }, + { + "path": "research/p104-paid-meeting-splits/sources.py", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 3418, + "sha256": "2a55921f944c1592a7ec23a593aa4dd1c8eae9ac9e8fb5b95ec7a58421a735d3", + "git_blob": "d49da9f7ae96f7cd151fa37b56766657879ee403" + }, + { + "path": "research/p104-paid-meeting-splits/verify.py", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "size": 4874, + "sha256": "3046d474a6b8bed658efa7928ddf0458ee348c7c583d82d347f8007d47b1d78a", + "git_blob": "e4d661529ba2990590816af0b569d5b0fadaaf63" + } + ], + "source_archive": { + "local_path": "inputs/pr5751-source.tar", + "sha256": "7d0b367e6dd367c3c5a5dced6131f8d462a8fb9cc6542758b6ea4d23f681728d", + "commit": "8483f9a679d06c1e270141dbc686a7e76e7a7522", + "package": "research/p104-paid-meeting-splits" + }, + "direct_sources": [ + { + "path": "research/p104-block-reframe-r22/WORD.json.gz", + "commit": "a1b338e5d9271b541f2a198f4fc19cefc565feed", + "size": 108262, + "sha256": "a767dc298dee729d73389cd9240922e28024452d76442931396fb8307763752c", + "git_blob": "156ff6d62780383467d195dce3728b7a434190b1", + "local_path": "inputs/pr5756-WORD.json.gz" + }, + { + "path": "research/p104-block-reframe-r22/NOTICE", + "commit": "a1b338e5d9271b541f2a198f4fc19cefc565feed", + "size": 2843, + "sha256": "0fad3a4a6fe3a273ec8ad0831a5bd8041077f30738fb0108a86a87ad1f68b0e7", + "git_blob": "faf2c1bfc83394f038a077b19710d0c05d865788", + "local_path": "inputs/pr5756-NOTICE" + }, + { + "path": "research/p104-block-reframe-r22/README.md", + "commit": "a1b338e5d9271b541f2a198f4fc19cefc565feed", + "size": 3727, + "sha256": "52d7ea745e05d5abdff5b98314aefa4e8ebe4487a6674062b89b0d569439a26c", + "git_blob": "0df5d8435e12a1513002d6e988331870248d5a23", + "local_path": "inputs/pr5756-README.md" + } + ] +} diff --git a/research/p104-second-low-rank-block/TASK.json b/research/p104-second-low-rank-block/TASK.json new file mode 100644 index 0000000000..4a1525101f --- /dev/null +++ b/research/p104-second-low-rank-block/TASK.json @@ -0,0 +1,123 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "priority_revision": 8, + "base_commit": "de5ec2e7a6074068452f45b1a191b5c72832df4a", + "original_card": { + "id": "p104-side-correction", + "question": "Can joint helper bases and a legal causal split improve the complete P104 productive/paid invoice?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "research/p104-helper-subspace-splits/README.md", + "research/dyadic-helper-channel-capacity/README.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "An exact arbitrary-input identity, source/target frame availability and restoration at the chosen cut, plus the complete channel+correction+idle/hosting bill or an explicit favorable bound. The native channel alone is not a supplier. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Start with the selected #5599 emitted word and review pending #5718 distinct input/output bases plus #5717/#5719 coverage before claiming work. Pick one uncovered source word, helper group and cut region. Prove the arbitrary-input relation and legal entry/exit corrections, then compare full target and paid profiles. Reject if completion, owned lifetimes or consumer costs repay the gain. A static pairing rank alone is not a physical split.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "P104", + "helper basis", + "helper split", + "5718", + "dyadic capacity" + ], + "existing_checks": [ + { + "scope": "PR #4133: literal-slot defect", + "evidence": "research/p104-literal-slot-defect/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "88666f1dee93fbd85b31fd5d6f91a219e111b5f4", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4136: uniform commutation gap", + "evidence": "research/p104-uniform-commutation-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "281ce601a8be9db470de630759179c23e1dfaa88", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4140: uniform encoding gap", + "evidence": "research/p104-uniform-encoding-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "de25c6525aa866962309df5d107b32d55e6e5628", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4153: source-chart shortcut exhausts its optimistic allowance", + "evidence": "research/p104-source-chart-shortcut/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "9123241fea53df77e51ffe30d9aca1625d4bf3a8", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4154: fiber-tag seam mismatch", + "evidence": "research/p104-fiber-tag-seam/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "4ffcdaee5d6255a9cea1fe53a5424435068089d0", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Reframe the 102-operation block on roles 57,81,92,224,225,227,229,234,742 of the exact PR5756 word; prove its complete conditional cost.", + "scope_change_reason": "The card names an older selected source. The exact public PR5756 word contains the later paid-meeting splits and a different R22 block. This result preserves those changes and uses disjoint roles.", + "bottleneck_link": "The new helper start and final frames improve the full productive moment after all new MOVE jobs and caller costs are paid.", + "budget_minutes": null, + "stop_rule": "Retain the block only if exact endpoint, transpose, native phase, physical caller and complete rational price checks pass.", + "outcome": "completed", + "evidence": "RESULT.json, WORD.json.gz, WITNESS.json and PROOF.md", + "author": "Ali Romman with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance for construction, code, calculations and prose. No subagents. All checks are author-side.", + "open_questions": [ + { + "question": "Can a different scalar factorization make a larger complete gain?", + "why_it_matters": "The current block gives only a small gain and has less than 2.2e-11 raw headroom at its claimed kappa.", + "first_step": "Check live Discussions and pin one unclaimed scalar factorization before changing the word. Replay all native maps and the full caller bill.", + "blocked_by": "No such larger construction is established here." + }, + { + "question": "Does an independent review accept this exact word and complete price?", + "why_it_matters": "Author replay does not transfer selected-frontier admission.", + "first_step": "Run the sealed source export and inspect PROOF.md against RESULT.json.", + "blocked_by": "Independent review and the five inherited framework assumptions remain open." + } + ] +} diff --git a/research/p104-second-low-rank-block/VALIDATION.md b/research/p104-second-low-rank-block/VALIDATION.md new file mode 100644 index 0000000000..dea2a6826d --- /dev/null +++ b/research/p104-second-low-rank-block/VALIDATION.md @@ -0,0 +1,16 @@ +# Validation record + +The author regenerated WORD.json.gz, WITNESS.json and RESULT.json with Python +3.12 and the standard library on macOS. The complete direct replay passed, +including all failure controls. It reported: + +```text +PASS_P104_SECOND_RANK4_BLOCK_KAPPA_00311325989 +``` + +Both registered modes passed through `scripts/research_package.py` on +2026-10-26. The ordinary mode used `-I -B`; the optimized mode used `-I -O -B`. +The runner reported `PASS_REGISTERED_RESEARCH_PACKAGE` with outcome completed. +The committed-byte check and sealed source export are recorded in the public +PR handoff after execution. No hosted CI, independent +human review, Lean proof or materialized rounded multiplier is claimed here. diff --git a/research/p104-second-low-rank-block/VERIFY.json b/research/p104-second-low-rank-block/VERIFY.json new file mode 100644 index 0000000000..c6076d6204 --- /dev/null +++ b/research/p104-second-low-rank-block/VERIFY.json @@ -0,0 +1,30 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Regenerate the word; check exact scalar and transpose endpoints, native maps and phases, caller routes, full cost, rational prices and failure controls." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Repeat the complete proof-relevant checks with Python assertions disabled." + } + ] +} diff --git a/research/p104-second-low-rank-block/WITNESS.json b/research/p104-second-low-rank-block/WITNESS.json new file mode 100644 index 0000000000..0ab417fc07 --- /dev/null +++ b/research/p104-second-low-rank-block/WITNESS.json @@ -0,0 +1,127 @@ +{ + "basis": [ + 11, + 21, + 38, + 448 + ], + "changed_scalar_indices": [ + 9858, + 9859, + 9860, + 9861, + 9862, + 9863, + 9864, + 9865, + 9866, + 9867, + 9868, + 9869, + 9870, + 9871, + 9872, + 9873, + 9874, + 9875, + 9876, + 9877, + 9878, + 9879, + 9880, + 9881, + 9882, + 9883, + 9884, + 9885, + 9886, + 9887, + 9888, + 9889, + 9890, + 9891, + 9892, + 9893, + 9894, + 9895, + 9896, + 9897, + 9898, + 9899, + 9900, + 9901, + 9902, + 9903, + 9904, + 9905, + 9906, + 9907, + 9908, + 9909, + 9910, + 9911, + 9912, + 9913, + 9914, + 9915, + 9916, + 9917, + 9918, + 9919, + 9920, + 9921, + 9922, + 9923, + 9924, + 9925, + 9926, + 9927, + 9928, + 9929, + 9930, + 9931, + 9932, + 9933, + 9934, + 9935, + 9936, + 9937, + 9938, + 9939, + 9940, + 9941, + 9942, + 9943, + 9944, + 9945, + 9946, + 9947, + 11957, + 11958, + 11959, + 11960, + 11961, + 11962, + 11963, + 11964, + 11965, + 11966, + 11967, + 11968 + ], + "final_helper": 225, + "initial_helper": 742, + "new_frame": 1091, + "old_frame": 267, + "roles": [ + 57, + 81, + 92, + 224, + 225, + 227, + 229, + 234, + 742 + ] +} diff --git a/research/p104-second-low-rank-block/WORD.json.gz b/research/p104-second-low-rank-block/WORD.json.gz new file mode 100644 index 0000000000..b2e351e1ab Binary files /dev/null and b/research/p104-second-low-rank-block/WORD.json.gz differ diff --git a/research/p104-second-low-rank-block/construct.py b/research/p104-second-low-rank-block/construct.py new file mode 100644 index 0000000000..a27613d278 --- /dev/null +++ b/research/p104-second-low-rank-block/construct.py @@ -0,0 +1,68 @@ +"""Reframe two exact scalar runs and rebuild every native path. + +The R22 mechanism is by Joel Pulikkan (GamingPuzzled). +This second block is by Ali Romman with OpenAI Codex assistance. Apache-2.0. +""" +from copy import deepcopy +from hashlib import sha256 +import json +from sources import need + + +def construct(source, plan): + word = deepcopy(source) + old = plan['old_frame'] + new = len(word['frames']) + word['frames'].append(plan['basis']) + scalar = [e for e in word['program'] if e[0] != 'MOVE'] + changed, roles = [], set() + for run in plan['runs']: + start, length = run['first_scalar'], run['length'] + block = scalar[start:start+length] + need(len(block) == length, 'Complete scalar run') + raw = json.dumps(block, separators=(',', ':')).encode() + need(sha256(raw).hexdigest() == run['old_sha256'], 'Exact source scalar run') + for i, event in enumerate(block, start): + need(event[0] in ('ADD', 'SCALE') and event[-1] == old, + 'Public scalar operation on the old chart') + need(i not in changed, 'Disjoint scalar runs') + changed.append(i) + roles.update(event[1:3] if event[0] == 'ADD' else event[1:2]) + event[-1] = new + need(len(changed) == 102 and sorted(roles) == plan['roles'], 'Exact changed contact block') + for key, helper in (('initial', plan['initial_helper']), ('final', plan['final_helper'])): + need(word[key][helper] == old, 'Exact old helper boundary') + word[key][helper] = new + + current = word['initial']+[None]*word['owned_fields'] + active, program = set(), [] + + def move(role, frame): + if current[role] != frame: + need(current[role] is not None, 'Transport of a live field') + program.append(['MOVE', role, current[role], frame, role in active]) + current[role] = frame + + for event in scalar: + op, role, frame = event[0], event[1], event[-1] + if op == 'INIT': + need(role not in active, 'New owned lifetime') + active.add(role) + current[role] = frame + elif op == 'CLEAR': + move(role, frame) + active.remove(role) + current[role] = None + else: + move(role, frame) + if op in ('ADD', 'COPY'): + move(event[2], frame) + program.append(event) + for role, frame in enumerate(word['final']): + move(role, frame) + need(not active, 'All owned lifetimes close') + word['program'] = program + word['schema'] = 'p104-second-rank4-block/1' + return word, {'changed_scalar_indices': changed, 'roles': sorted(roles), + 'old_frame': old, 'new_frame': new, 'basis': plan['basis'], + 'initial_helper': plan['initial_helper'], 'final_helper': plan['final_helper']} diff --git a/research/p104-second-low-rank-block/inputs/pr5751-source.tar b/research/p104-second-low-rank-block/inputs/pr5751-source.tar new file mode 100644 index 0000000000..b2890eaeab Binary files /dev/null and b/research/p104-second-low-rank-block/inputs/pr5751-source.tar differ diff --git a/research/p104-second-low-rank-block/inputs/pr5756-NOTICE b/research/p104-second-low-rank-block/inputs/pr5756-NOTICE new file mode 100644 index 0000000000..faf2c1bfc8 --- /dev/null +++ b/research/p104-second-low-rank-block/inputs/pr5756-NOTICE @@ -0,0 +1,53 @@ +Paid intermediate meetings and collective helper splits. +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +No subagents. All checks are author-side calculations. + +The complete PR5718 notice follows unchanged. + +Four paid interior public-basis changes. +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +No subagents. + +The following exact notice is retained from PR5660. + +New helper-subspace construction, proof and replay: +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The same assistant performed the construction and author-side checks. + +Retained contributions: +flyingviper: PR5605 shared relay, PR5612 delayed relay, and the PR5608/PR5613 +relay/split compositions. +Scratch-net: PR5606 prepared-helper identities and target debit. +Pierre-Loic Doulcet (hexapode): PR5565 commuting-contact construction, used as the exact source. +Ali Romman: PR5602 fixed boundary relations, PR5601 three-contact frame +change, PR5580 contact step, +and PR5544/5545 complete P104 caller. +Joel Pulikkan (GamingPuzzled): PR5569 priced helper handoff. +DreamingOfClouds: PR5561 free helper endpoints and PR5568 search tools. +thu-nmrc: PR5551 contact improvements. +Gareth Davidson (bitplane): PR2305 source composition. +David Arias: PR2152 coalesced P104 word. +Cinna Davis: PR2219 private reuse and the controller lineage. +Jacob Alan Sussman: productive mixed-target recursion. +zxv and Cao Yifan: exact intervals, compiler and native/pricing lineage. +GamingPuzzled: PR5472 successor handoff, a predecessor to the split concept. +The retained source notices preserve earlier geometry, BIT and analytic credit. + +The elementary rank-one basis identity is not claimed as a new general +linear-algebra theorem. The contribution is its explicit independent-target +use on this P104 word and the complete conditional kappa improvement. + +New contribution: Ali Romman, with substantial OpenAI Codex assistance. +The four-gate source-version rewrite composes zxv PR5643 and Ali Romman PR5644. +The A2 method retains Chris R/Clear1nsight PR3998 and ToikY PR4019 credit. +The compensated triangle method retains Cinna Davis PR4692 credit. +No subagents were used for this contribution. Apache-2.0. + +Concurrent PR5650 by zxv publishes the PR5643/PR5644 composition. PR5651 by +Ali Romman corroborates it. This package credits that released composition +and contributes the further four-gate placement. + +New work: distributed scalar updates on an unobserved public field interval, the exact witness and complete conditional price. Prepared for Ali Romman with substantial OpenAI Codex assistance. No subagents. Apache-2.0. The source archive retains all predecessor notices. + +Two-boundary main-assisted helper split and early cleanup: flyingviper with substantial +OpenAI Codex assistance, including independent AI review agents. Apache-2.0. diff --git a/research/p104-second-low-rank-block/inputs/pr5756-README.md b/research/p104-second-low-rank-block/inputs/pr5756-README.md new file mode 100644 index 0000000000..0df5d8435e --- /dev/null +++ b/research/p104-second-low-rank-block/inputs/pr5756-README.md @@ -0,0 +1,67 @@ +# One block moved from a dim-8 chart to a new dim-4 chart on PR5751's P104 word: conditional kappa .00311313795 + +Complete conditional kappa **.00311313795** (claim line, tested at .003113137955). The exact raw crossing is in +(0.00311313797336, 0.00311313797337). That is **+1.219e-7** over the raw crossing 0.0031130160445 of +[PR5751](https://github.com/CrocSwap/integer-mult-bounds/pull/5751) (Ali Romman, claim .00311301600), the newest +P104 head when this was written. + +**Conditional on** exactly the assumptions of PR5751 and its inherited P104 line, including free helper endpoints +(PR5561, audited in PR5567). This word changes one helper start and one helper final. The selected record is not changed. +No independent human or proof-kernel acceptance is claimed. + +## What changes + +The change is a large-neighbourhood step of R22's exact reorder+re-frame MIP. All scalar operations outside one +window of about 1,000 consecutive operations are pinned. Inside the window, every chart within dimension gap 4 of +the operation's bounds is allowed. One window of the sweep over PR5684's word found this step. It applies unchanged +to PR5751's word (PR5713 -> PR5718 -> PR5751), whose edits are elsewhere. It was first published on PR5713 as PR5739. + +- 96 scalar operations on registers 41, 42, 106, 400, 401, 403, 405, 410 and 741 used to run on chart 477 + (dim 8). In the new word: + - 88 of them run on a new chart 1090 = span[265, 194, 164, 75] (dim 4); + - 8 of them run on chart 127 (dim 9). +- Helper 741 now starts on 1090 instead of 477. +- Helper 405 now ends on 1090 instead of 477. +- No scalar instruction, coefficient, order, owned lifetime, main endpoint or port changes. + +Per local call: paid MOVE jobs H1 +1, H4 +1, H5 -1 (66834 -> 66852 paid calls in all); helper credits +H1 -1, H4 +1, H5 +1, H8 -1. The moment gain comes from the helper credits. The rank-mass surplus is unchanged at 760, +and there are still 13390 productive fields. + +## Check + +``` +python3 -W error -B research/p104-block-reframe-r22/verify.py # compares with RESULT.json +python3 -W error -B research/p104-block-reframe-r22/verify.py --write # regenerates RESULT.json +``` + +`verify.py` runs these checks: + +1. **Source pin.** It pins PR5751's `WORD.json.gz` and its patched `local.py` (SHA256). +2. **Regeneration.** It regenerates `WORD.json.gz` from that word with `construct.py` and `EDITS.json`. Each hunk + replaces one unique event run, and hunks are disjoint. It also appends one chart and changes two helper endpoints. +3. **Boundary.** Existing charts are unchanged, only free helper endpoints change, and every other word field is + unchanged. +4. **Order.** The scalar order is trace-equivalent: every dependent pair keeps its order. +5. **PR5751's own stack.** It runs PR5751's unmodified stack, its pinned `local.py` and its four-level source chain: + - exact replay; + - every dense transpose column; + - every native map and phase; + - the complete physical caller; + - PR5751's `pricing.py`, where only the four literals in `LITERALS` change: claim/tested kappa, previous claim + and the paid-call total. +6. **Controls.** Six controls are rejected: + - old helper start; + - block op on the old chart; + - missing block MOVE; + - unpaid query; + - extra target credit; + - read swapped after a dependent write. + +## Attribution + +All retained checkers, words and pricing are by the PR5751/PR5718/PR5713 authors and their sources; see `NOTICE`. +PR5713 itself builds on our PR5684. R22 search tools are on branch `r22-p104-reframe-optimum`. The +large-neighbourhood windows are set with `WIN=lo:hi` in `poset104.domains`. + +Joel Pulikkan (GamingPuzzled) with Claude Opus 5.5 (Anthropic) via Claude Code. Apache-2.0. diff --git a/research/p104-second-low-rank-block/inputs/pr5756-WORD.json.gz b/research/p104-second-low-rank-block/inputs/pr5756-WORD.json.gz new file mode 100644 index 0000000000..156ff6d627 Binary files /dev/null and b/research/p104-second-low-rank-block/inputs/pr5756-WORD.json.gz differ diff --git a/research/p104-second-low-rank-block/pricing.py b/research/p104-second-low-rank-block/pricing.py new file mode 100644 index 0000000000..c9e7308d88 --- /dev/null +++ b/research/p104-second-low-rank-block/pricing.py @@ -0,0 +1,186 @@ +"""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. +The paid A2 change is from zxv PR5643. The three helper relations are from +Ali Romman PR5644. The four-gate change is by Ali Romman with Codex assistance. +The four interior basis changes are by Ali Romman with Codex assistance. +Paid intermediate meetings: Ali Romman with substantial OpenAI Codex assistance. +The source R22 block is by Joel Pulikkan (GamingPuzzled). +The second rank-four block is by Ali Romman with OpenAI Codex assistance. +Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('0.00311325989'), Q('0.003113259895') +PREVIOUS = Q('.00311313795') + + +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()) == 13390 and sum(paid.values()) == 66870, '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,7),1024,16,17 + 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(125,128) + 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') + old_completion = E.divide((Q(sum(T.values())*18),)*2,E.mul(E.power(17,TESTED),target)) + L.need(old_completion[0] > Q(39,40), 'PR5718 completion-tail bound fails with the new target count') + old_offset = E.divide(E.moment(P,t+Q(1,5)),E.mul(E.power(16,Q(1,5)),target)) + L.need(old_offset[0] > decay, 'The old tail offset fails at the new cutoff') + 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':'0.00311325989','previous_pr5756':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':{'source_completion':'Rejected at cutoff17, floor18 and decay39/40', + 'source_offset':'Rejected at cutoff16 with tail offset1/5', + 'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-second-low-rank-block/sources.py b/research/p104-second-low-rank-block/sources.py new file mode 100644 index 0000000000..1e6b9548a5 --- /dev/null +++ b/research/p104-second-low-rank-block/sources.py @@ -0,0 +1,64 @@ +"""Authenticate and open the retained source closure. + +Ali Romman with OpenAI Codex assistance. Apache-2.0. +""" +from contextlib import contextmanager +from hashlib import sha1, sha256 +from pathlib import Path, PurePosixPath +import importlib.util +import json +import sys +import tarfile +import tempfile + +HERE = Path(__file__).resolve().parent + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +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 authenticate(raw, pin): + need(len(raw) == pin['size'], 'Exact source size: '+pin['path']) + need(sha256(raw).hexdigest() == pin['sha256'], 'Exact source SHA256: '+pin['path']) + need(sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest() == pin['git_blob'], + 'Exact source Git blob: '+pin['path']) + + +@contextmanager +def sources(): + pins = json.loads((HERE/'SOURCES.json').read_bytes()) + for pin in pins['direct_sources']: + authenticate((HERE/pin['local_path']).read_bytes(), pin) + archive = pins['source_archive'] + path = HERE/archive['local_path'] + need(sha256(path.read_bytes()).hexdigest() == archive['sha256'], 'Exact source archive') + members = {p['path']: p for p in pins['archived_files']} + need(len(members) == len(pins['archived_files']) == 20, 'Exact source inventory') + with tempfile.TemporaryDirectory(prefix='p104-second-block-source-') as directory: + root = Path(directory) + with tarfile.open(path, 'r:') as bundle: + seen = set() + for member in bundle.getmembers(): + name = PurePosixPath(member.name) + need(member.isfile() and not name.is_absolute() and '..' not in name.parts + and '\\' not in member.name and ':' not in member.name, + 'Regular relative source file') + need(member.name in members and member.name not in seen, 'Unique declared source file') + seen.add(member.name) + raw = bundle.extractfile(member).read() + authenticate(raw, members[member.name]) + target = root.joinpath(*name.parts) + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(raw) + need(seen == set(members), 'Complete source archive') + yield root/archive['package'] diff --git a/research/p104-second-low-rank-block/verify.py b/research/p104-second-low-rank-block/verify.py new file mode 100644 index 0000000000..3689dbea8b --- /dev/null +++ b/research/p104-second-low-rank-block/verify.py @@ -0,0 +1,161 @@ +"""Check the second rank-four block and its complete conditional cost. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +Retained source authors are listed in NOTICE and the source archive. +""" +import argparse +from collections import Counter +from contextlib import ExitStack +from copy import deepcopy +from fractions import Fraction as Q +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, authenticate +from construct import construct + +STATUS = 'PASS_P104_SECOND_RANK4_BLOCK_KAPPA_00311325989' + + +def read(path): + raw = path.read_bytes() + return json.loads(gzip.decompress(raw) if path.suffix == '.gz' else raw) + + +def delta(after, before): + value = Counter(after) + value.subtract(before) + return {str(r): c for r, c in sorted(value.items()) if c} + + +def reject(action): + try: + action() + except ValueError as error: + return str(error) + raise ValueError('Invalid candidate accepted') + + +def run(): + with ExitStack() as contexts: + parent = contexts.enter_context(sources()) + source = read(HERE/'inputs/pr5756-WORD.json.gz') + word, witness = construct(source, read(HERE/'PLAN.json')) + old_scalar = [e[:-1] for e in source['program'] if e[0] != 'MOVE'] + new_scalar = [e[:-1] for e in word['program'] if e[0] != 'MOVE'] + need(old_scalar == new_scalar, 'Every scalar coefficient, order and owned event is unchanged') + for key in source: + if key not in ('program', 'frames', 'initial', 'final', 'schema'): + need(source[key] == word[key], 'Unchanged source field: '+key) + need(word['frames'][:-1] == source['frames'], 'All source frames are unchanged') + need([r for r, (a, b) in enumerate(zip(source['initial'], word['initial'])) if a != b] == [742], + 'Only helper 742 changes at entry') + need([r for r, (a, b) in enumerate(zip(source['final'], word['final'])) if a != b] == [225], + 'Only helper 225 changes at exit') + main = set(word['live']) | {r+112 for r in word['live']} + need(225 not in main and 742 not in main, 'Only helper endpoints change') + + cursor = parent + for depth in range(5): + module = load(cursor/'sources.py', 'second_block_source_'+str(depth)) + cursor, framework = contexts.enter_context(module.sources()) + L = load(parent/'local.py', 'local') + L.ROOT = framework + before, local = L.replay(source), L.replay(word) + paid_delta, target_delta = delta(local['paid'], before['paid']), delta(local['helpers'], before['helpers']) + need(paid_delta == {'1': 1, '4': 1, '5': -1}, 'Complete changed paid profile') + need(target_delta == {'1': -1, '4': 1, '5': 1, '8': -1}, 'Complete changed target profile') + need(local['real_scalar_allowance'] == before['real_scalar_allowance'] == 224138, + 'Unchanged ordinary scalar charge') + transpose = L.reverse_columns(word) + print('PASS scalar order, all input columns, separate transpose and full local invoice', flush=True) + native = L.native(word) + C = load(framework/'research/p104-productive-controller/caller.py', 'second_block_caller') + caller = C.construct() + need(caller == read(framework/'research/p104-productive-controller/CONTROLLER.json'), + 'Exact retained caller') + physical = C.physical(caller, word) + print('PASS native maps, absolute phases, helper normalizers and physical caller', flush=True) + + price_text = (parent/'pricing.py').read_text(encoding='utf-8') + for old, new in read(HERE/'PRICING-EDITS.json'): + need(price_text.count(old) == 1, 'Unique declared pricing edit') + price_text = price_text.replace(old, new) + need(price_text == (HERE/'pricing.py').read_text(encoding='utf-8'), 'Only declared pricing edits') + P = load(HERE/'pricing.py', 'second_block_price') + price = P.run(local, native, caller, physical) + E = L.load(framework/'research/higher-moment-strictification/verify.py', 'second_block_source_price') + old_t = {int(r): c for r, c in price['targets'].items()} + old_p = {int(r): c for r, c in price['paid'].items()} + for r, c in target_delta.items(): + old_t[int(r)] -= 18*c + for r, c in paid_delta.items(): + old_p[int(r)] -= 18*c + t = 1-P.KAPPA + old_margin = E.moment(old_t, t)[1]-E.moment(old_p, t)[0] + need(old_margin < 0, 'The source invoice fails at the new claimed exponent') + print('PASS both rational prices, complete completion, stock, compiler and outer costs', flush=True) + + controls = C.controls(caller) + bad = deepcopy(word) + bad['initial'][742] = 267 + controls['old_helper_entry'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + event = next(e for e in bad['program'] if e[0] == 'ADD' and e[-1] == witness['new_frame']) + event[-1] = 267 + controls['old_block_chart'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + index = next(i for i, e in enumerate(bad['program']) if e[0] == 'MOVE' and e[3] == witness['new_frame']) + bad['program'].pop(index) + controls['missing_native_move'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + event = next(e for e in bad['program'] if e[0] == 'ADD' and e[-1] == witness['new_frame']) + event[-2] = str(-Q(event[-2])) + controls['wrong_scalar_coefficient'] = reject(lambda: L.replay(bad)) + bad = deepcopy(local) + bad['paid'][1] -= 1 + controls['unpaid_query'] = reject(lambda: P.assemble(bad, native, caller, physical)) + bad = deepcopy(local) + bad['helpers'][9] += 1 + controls['extra_target_credit'] = reject(lambda: P.assemble(bad, native, caller, physical)) + pin = read(HERE/'SOURCES.json')['direct_sources'][0] + raw = (HERE/pin['local_path']).read_bytes() + controls['damaged_source'] = reject(lambda: authenticate(bytes([raw[0] ^ 1])+raw[1:], pin)) + + result = dict(status=STATUS, source_commit='a1b338e5d9271b541f2a198f4fc19cefc565feed', + local=local, source_local=before, paid_delta=paid_delta, target_delta=target_delta, + transpose=transpose, native=native, physical_caller=physical, complete_cost=price, + source_margin_upper_at_new_claim=old_margin, controls=controls, + limits=['The five inherited framework assumptions remain.', + 'This small gain does not meet the requested large improvement.', + 'The uniform word and rounded multiplier are not materialized.', + 'These author checks are not independent human or formal acceptance.', + 'The selected frontier is unchanged.']) + return P.encode(result), witness, word + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + with tempfile.TemporaryDirectory(prefix='p104-second-block-bytecode-') as cache: + sys.pycache_prefix = cache + result, witness, word = run() + for name, value in (('RESULT.json', result), ('WITNESS.json', witness), ('WORD.json.gz', word)): + path = HERE/name + if args.write: + raw = (json.dumps(value, sort_keys=True, indent=2)+'\n').encode() + path.write_bytes(gzip.compress(raw, mtime=0) if name.endswith('.gz') else raw) + else: + need(read(path) == value, 'Exact complete retained output: '+name) + print(STATUS, flush=True) + + +if __name__ == '__main__': + main()