diff --git a/research/kappa01-target-screen/README.md b/research/kappa01-target-screen/README.md new file mode 100644 index 0000000000..1fbf903f23 --- /dev/null +++ b/research/kappa01-target-screen/README.md @@ -0,0 +1,207 @@ +# The selected suppliers cannot reach κ = 0.1 by repacking + +**Two-sided target-scale screen for the selected local words. No new supplier or κ claim.** + +The user-set target κ > 0.1 is far beyond the selected result. Under the +retained planning transfer κ = a/(1+a), it requires primitive saving +a > 1/9. At the boundary a = 1/9, **both selected local words** already have +normalized moment strictly above one, even after assigning zero cost to every +idle child, hosting operation, centre path and (on bit) surcharge. Therefore +packing or coverage changes alone cannot take either selected word to the +target. Both local suppliers, or the outer transfer, must change. + +The source-bound per-call profile from +[`complex-local-word-ceiling/levers.py`](../complex-local-word-ceiling/levers.py) +is + +```text +H = {1:2412, 2:418, 3:432, 4:142, 5:82, 8:8} +width = 73; live families per call = 896/9 +``` + +The exact lower bound is + +```text +(9/896) * Σ_r H[r] * (r/73)^(8/9) > 1.155558328185663 > 1. +``` + +Each fractional power is enclosed by integer inequalities. For scale +`S = 10^30`, the checker finds integers `l_r, u_r` satisfying + +```text +l_r^9 * 73^8 <= r^8 * S^9 <= u_r^9 * 73^8, +``` + +so `l_r/S <= (r/73)^(8/9) <= u_r/S`. The complete rational lower endpoint, +upper endpoint and per-rank witnesses are in [`RESULT.json`](RESULT.json). +The proof does not use floating point; decimals are only for display. + +The same exact integer-root check is bound to the selected bit word through its +`bit-revision3-levers-seed03` receipt, the PR589 expected record and the pinned +word bytes. Its local histogram is + +```text +H = {1:1323, 2:1342, 3:79, 4:44, 5:102, 6:11, 7:19} +width = 64; live families per call = 296/3 +``` + +The bit-side local-only bill is + +```text +(3/296) * Σ_r H[r] * (r/64)^(8/9) > 1.195679601524970 +``` + +This also omits the positive inherited bad-residue surcharge. As an independent +coverage check, even putting all bit rank mass under the selected law at the +largest permitted idle rank 45 costs more than `1.034037852870777`; thus the +selected bit coverage law fails even with a free local word. The complex side +has the analogous coverage floor `1.035561535760803` from its selected +width-73/rank-51 guard. + +There is also a word-independent screen for the retained width, template and +halving guard. The largest permitted child rank is 51 (`2·51² < 73² ≤ 2·52²`). +For a fixed coverage mass, rank 51 minimizes the moment per unit rank mass, +because the cost per unit mass is proportional to `r^(-1/9)`. Even this +fractional all-at-rank-51 relaxation costs **1.035561535760803** at the +selected coverage law (one unpaid coordinate and centre mass 64). Thus the +current coverage law cannot reach the target with any local word in this +template, even if the local word itself were free. + +The exact relaxation brackets also locate the next structural threshold: + +| Unpaid coordinates | Centre mass | Ideal all-rank-51 bill | Meaning | +|---:|---:|---:|---| +| 1 | 64 | 1.035562 | Selected law fails, even with a free local word | +| 2 | 0 | 1.012142 | Still fails after removing the centre charge | +| 3 | 0 | 0.997886 | Ideal relaxation passes; no construction follows | +| 3 | 64 | 1.007051 | Fails with the selected centre charge | +| 4 | 64 | 0.992795 | Ideal relaxation passes; no construction follows | + +So even the relaxed format requires at least three unpaid coordinates if the +centre is free, or four if the selected centre charge remains. Those are only +necessary budget thresholds: the current word's local-only bill is 1.155558, +so changing coverage alone still cannot work. The two ideal passes have less +than 0.22% and 0.73% headroom before any actual lower-rank work is charged. + +The same exact relaxation gives the minimum maximum-child rank needed for each +coverage choice. With the selected law, even a free local word needs rank cap +70; the selected halving guard allows only 51. Removing the centre charge +lowers the requirement to 65, and allowing two unpaid coordinates with no +centre lowers it to 57. The two relaxed combinations that fit under rank 51 +are three unpaid coordinates with no centre, or four with the selected centre +charge: + +| Unpaid coordinates | Centre mass | Minimum rank cap | Allowed by current guard? | +|---:|---:|---:|:---:| +| 1 | 64 | 70 | no | +| 1 | 0 | 65 | no | +| 2 | 0 | 57 | no | +| 3 | 0 | 51 | yes, at the boundary | +| 3 | 64 | 55 | no | +| 4 | 64 | 48 | yes | + +Every rank-cap threshold has a strict adjacent-integer certificate. A rank cap +above 51 would require a different outer halving argument; the table does not +show that such an argument exists. + +## What a combined word-and-coverage change would still have to do + +As a design budget, reblock **all** 5,586 units of the selected local rank mass +into the most favorable integer blocks allowed by the chosen local block cap, +while leaving the remaining coverage mass at rank 51. The concavity exchange +argument is the one retained in +[`complex-rank-one-block-budget`](../complex-rank-one-block-budget/README.md); +this target-0.1 calculation extends its cost screen to a changed coverage law +and the full local rank mass. It grants every block zero gathering, chronology, +frame, copy, dirty-restoration, hosting and precision overhead. + +| Unpaid coordinates | Centre mass | First local block cap that passes | Ideal local profile | Bill | Extra rank-one calls allowed | +|---:|---:|---:|---|---:|---:| +| 3 | 0 | 50 | 111 rank-50 + 1 rank-36 | 0.999840174348039 | 0 | +| 4 | 64 | 48 | 116 rank-48 + 1 rank-18 | 0.998499914030822 | 6 | + +For each row, every smaller block cap fails. The next added rank-one call also +fails by a strict exact interval. These margins are a demanding target for an +actual mechanism: in the three-unpaid case there is no allowance even for one +extra rank-one call; in the four-unpaid case there are only six. The profiles +are cost-optimal partitions of rank mass, not identities or chronological +decoders. The prior block-budget package's warning about full physical costs +therefore remains central here. + +The selected bit word has its own zero-overhead reblocking screen. With its +current rank cap 45, the selected one-unpaid/centre-63 coverage law still fails +even if all rank mass is moved to rank 45. The first ideal integer reblocking +profiles that pass under two changed coverage choices are: + +| Unpaid coordinates | Centre mass | Rank cap | First local block cap | Ideal local profile | Bill | Extra rank-one charges allowed | +|---:|---:|---:|---:|---|---:|---:| +| 3 | 0 | 45 | 42 | 122 rank-42 + 1 rank-5 | 0.997886898348711 | 8 | +| 4 | 63 | 45 | 39 | 131 rank-39 + 1 rank-20 | 0.999087171501363 | 3 | + +Every smaller block cap fails, and the next extra rank-one charge takes each +bill above one. The source word's 5,129 units of local rank mass are treated as +arbitrarily reblockable, while idle mass is fractional at rank 45. Gathering, +chronology, framing, copies, dirty restoration, the positive surcharge and all +other realization costs are waived. These are necessary budgets for a future +mechanism, not evidence such blocks exist. The complex and bit budget rows are +separate; this screen does not show that one changed coverage contract or one +pair of supplier identities realizes both sides together. + +This is a scoped result about the selected #1094 complex word, the selected +PR589 bit word and their stated coverage/rank relaxations. It does not bound a +redesigned template, a changed operation alphabet or supplier, a different +outer reduction, or the newer unreviewed candidate packages. It does not change +the selected frontier or certify the full multiplication theorem. In +particular, this is not an independent review of open PRs #3051 or #3054. + +## Reproduce + +From the repository root, Python 3.12 and the standard library are enough: + +```sh +python3 -I -B research/kappa01-target-screen/verify.py +python3.12 scripts/research_package.py --package research/kappa01-target-screen --check-only +python3.12 scripts/research_package.py --package research/kappa01-target-screen +``` + +Expected direct marker: + +```text +PASS_KAPPA01_TWO_SIDED_TARGET_SCREEN complex_local_lower=1.155558328185663 bit_local_lower=1.195679601524971 +``` + +The interval source inputs and base commit are pinned in +[`SOURCES.json`](SOURCES.json); the replay command and its 120-second timeout +are registered in [`VERIFY.json`](VERIFY.json). + +## Open next questions + +- What changed complex local identity can bring its paid-word term below one at + `a = 1/9`? This must precede any packing optimization. A feasible first step + is one explicit replacement profile with all new decoder, frame, dirty-state + and restoration costs included. The blocker is a new identity and supplier + contract; the current word is already 15.55% over budget before hosting. +- What selected-bit local identity can bring its paid-word moment below one at + `a = 1/9`, with the bad-residue surcharge and complete PR589 interface costs + included? Start from one exact replacement block and its source/target map. + The blocker is that the current bit word alone is 19.56% over budget, before + surcharge or idle work. +- Can one chronological block decoder realize the ideal 3-unpaid/50-rank or + 4-unpaid/48-rank profile within its zero-to-six-call extra budget? Start with + one block and record the exact input/output map, source lifetime, frame path + and dirty restoration. The blocker is that the present budget relaxes away + all physical realization and gives almost no overhead allowance. +- Can one changed outer transfer make both selected supplier endpoints imply + κ > 0.1? Derive it against the selected assembly and all-size premises, then + bind both supplier budgets. The blocker is that the current conversion is + source-bound and strictly reserved, while both selected words fail locally. + +## Credit + +The selected complex profile retains Rohan Arun's #1094 construction and +Douglas Colkitt's #1240 analysis. The bit profile and word provenance retain +the selected PR589 supplier and the source-bound bit-revision-3 audit. This +package adds target-`0.1` exact floors and ideal budget screens; it does not +modify predecessor sources. Prepared by OpenAI Codex with substantial +assistance in the calculation, verifier and write-up. New material is covered +by the repository's Apache-2.0 license. diff --git a/research/kappa01-target-screen/RESULT.json b/research/kappa01-target-screen/RESULT.json new file mode 100644 index 0000000000..4d4cdd081c --- /dev/null +++ b/research/kappa01-target-screen/RESULT.json @@ -0,0 +1,386 @@ +{ + "bit_model": { + "copy_charge": 63, + "idle_mass_assumed_for_local_floor": 0, + "live_families_per_call": "296/3", + "local_profile": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "local_rank_mass": 5129, + "maximum_child_rank": 45, + "root_scale": "1000000000000000000000000000000", + "stages": 9, + "surcharge_assumed_for_local_floor": 0, + "width": 64 + }, + "certificate": { + "bill_lower": "14791146600776491909563465165489/12800000000000000000000000000000", + "bill_lower_decimal": "1.155558328185663", + "bill_upper": "258845065513588608417360640403919/224000000000000000000000000000000", + "bill_upper_decimal": "1.155558328185663", + "bit_ideal_local_blocking": [ + { + "all_smaller_caps_fail": true, + "bill_lower": "1329185348600482639176155286003559/1332000000000000000000000000000000", + "bill_upper": "276913614291767216495032351251143/277500000000000000000000000000000", + "bill_upper_decimal": "0.997886898348711", + "bill_with_max_extra_lower": "1331864087875678975789798789269763/1332000000000000000000000000000000", + "bill_with_max_extra_upper": "138735842487049893311437373882479/138750000000000000000000000000000", + "bill_with_next_extra_lower": "2664397860570157035733008454356077/2664000000000000000000000000000000", + "centre_mass": "0", + "local_block_profile": { + "42": 122, + "5": 1 + }, + "max_extra_rank1_calls": 8, + "maximum_child_rank": 45, + "scope": "zero-cost idealization: arbitrary integer reblocking of all selected local rank mass; idle mass fractional at the cap; no gathering, chronology, frame, copy, dirty-restoration, surcharge or physical costs", + "smallest_passing_local_block_cap": 42, + "unpaid_coordinates": 3 + }, + { + "all_smaller_caps_fail": true, + "bill_lower": "354875763317283973293233822363/355200000000000000000000000000", + "bill_upper": "739324506911008277694237129924049/740000000000000000000000000000000", + "bill_upper_decimal": "0.999087171501363", + "bill_with_max_extra_lower": "887859093112009017386495431724051/888000000000000000000000000000000", + "bill_with_max_extra_upper": "92485322199167605977759940804733/92500000000000000000000000000000", + "bill_with_next_extra_lower": "27752572543279438919926012197799/27750000000000000000000000000000", + "centre_mass": "63", + "local_block_profile": { + "20": 1, + "39": 131 + }, + "max_extra_rank1_calls": 3, + "maximum_child_rank": 45, + "scope": "zero-cost idealization: arbitrary integer reblocking of all selected local rank mass; idle mass fractional at the cap; no gathering, chronology, frame, copy, dirty-restoration, surcharge or physical costs", + "smallest_passing_local_block_cap": 39, + "unpaid_coordinates": 4 + } + ], + "bit_local_word": { + "bill_lower": "353921162051391396780819320639613/296000000000000000000000000000000", + "bill_lower_decimal": "1.195679601524971", + "bill_upper": "353921162051391396780819320648373/296000000000000000000000000000000", + "bill_upper_decimal": "1.195679601524971", + "margin_lower": "57921162051391396780819320639613/296000000000000000000000000000000", + "positive_control_a_zero_bill": "15387/18944", + "rank_terms": [ + { + "count": "1323", + "exact_root": false, + "rank": 1, + "root_lower_numerator": "24803141437003116792995400613", + "root_upper_numerator": "24803141437003116792995400614" + }, + { + "count": "1342", + "exact_root": false, + "rank": 2, + "root_lower_numerator": "45929202883612464105756521818", + "root_upper_numerator": "45929202883612464105756521819" + }, + { + "count": "79", + "exact_root": false, + "rank": 3, + "root_lower_numerator": "65858899860132454616336921165", + "root_upper_numerator": "65858899860132454616336921166" + }, + { + "count": "44", + "exact_root": false, + "rank": 4, + "root_lower_numerator": "85049375010898560265980023457", + "root_upper_numerator": "85049375010898560265980023458" + }, + { + "count": "102", + "exact_root": false, + "rank": 5, + "root_lower_numerator": "103708262987508923212931804226", + "root_upper_numerator": "103708262987508923212931804227" + }, + { + "count": "11", + "exact_root": false, + "rank": 6, + "root_lower_numerator": "121954179919115216615040463499", + "root_upper_numerator": "121954179919115216615040463500" + }, + { + "count": "19", + "exact_root": false, + "rank": 7, + "root_lower_numerator": "139863678924626515596669087128", + "root_upper_numerator": "139863678924626515596669087129" + } + ], + "strict_rejection": true, + "surcharge_omitted": true + }, + "bit_selected_coverage": { + "all_mass_at_rank_cap": 45, + "bill_lower": "3825940055621875712747406916099/3700000000000000000000000000000", + "bill_upper": "1530376022248750285098962766441693/1480000000000000000000000000000000", + "bill_upper_decimal": "1.034037852870777", + "centre_mass": "63", + "strict_rejection": true, + "unpaid_coordinates": 1 + }, + "coverage_relaxations": [ + { + "all_mass_at_rank_cap": 51, + "bill_lower": "246463645511071030332601471406949/238000000000000000000000000000000", + "bill_upper": "30807955688883878791575183925911/29750000000000000000000000000000", + "bill_upper_decimal": "1.035561535760803", + "centre_mass": "64", + "label": "selected_coverage", + "strictly_below_one": false, + "unpaid_coordinates": 1 + }, + { + "all_mass_at_rank_cap": 51, + "bill_lower": "17206409863604762196277978829787/17000000000000000000000000000000", + "bill_upper": "6452403698851785823604242061179/6375000000000000000000000000000", + "bill_upper_decimal": "1.012141756682633", + "centre_mass": "0", + "label": "two_unpaid_centre_free", + "strictly_below_one": false, + "unpaid_coordinates": 2 + }, + { + "all_mass_at_rank_cap": 51, + "bill_lower": "1696406606270892047520364109979/1700000000000000000000000000000", + "bill_upper": "636152477351584517820136541243/637500000000000000000000000000", + "bill_upper_decimal": "0.997886238982878", + "centre_mass": "0", + "label": "three_unpaid_centre_free", + "strictly_below_one": true, + "unpaid_coordinates": 3 + }, + { + "all_mass_at_rank_cap": 51, + "bill_lower": "239678019085987462142520014967033/238000000000000000000000000000000", + "bill_upper": "89879257157245298303445005612761/89250000000000000000000000000000", + "bill_upper_decimal": "1.007050500361292", + "centre_mass": "64", + "label": "three_unpaid_selected_centre", + "strictly_below_one": false, + "unpaid_coordinates": 3 + }, + { + "all_mass_at_rank_cap": 51, + "bill_lower": "9451408234937827121899171469883/9520000000000000000000000000000", + "bill_upper": "1181426029367228390237396433737/1190000000000000000000000000000", + "bill_upper_decimal": "0.992794982661536", + "centre_mass": "64", + "label": "four_unpaid_selected_centre", + "strictly_below_one": true, + "unpaid_coordinates": 4 + } + ], + "ideal_local_blocking": [ + { + "all_smaller_caps_fail": true, + "bill_lower": "237961961494833170576488012413441/238000000000000000000000000000000", + "bill_upper": "22844348303503984375342849191722263/22848000000000000000000000000000000", + "bill_upper_decimal": "0.999840174348039", + "bill_with_max_extra_lower": "237961961494833170576488012413441/238000000000000000000000000000000", + "bill_with_next_extra_lower": "3808235387815939037489713169800857/3808000000000000000000000000000000", + "centre_mass": "0", + "idle_rank_cap": 51, + "local_block_profile": { + "36": 1, + "50": 111 + }, + "max_extra_rank1_calls": 0, + "scope": "zero-cost idealization: arbitrary reblocking of all current local rank mass; no gathering, chronology, frame, copy, dirty-restoration or physical costs", + "smallest_passing_local_block_cap": 50, + "unpaid_coordinates": 3 + }, + { + "all_smaller_caps_fail": true, + "bill_lower": "15209150690517487191362123491963779/15232000000000000000000000000000000", + "bill_upper": "1086367906465534799383008820856123/1088000000000000000000000000000000", + "bill_upper_decimal": "0.998499914030822", + "bill_with_max_extra_lower": "15229406784084086589743842800423003/15232000000000000000000000000000000", + "bill_with_next_extra_lower": "15232782799678519822807462685166207/15232000000000000000000000000000000", + "centre_mass": "64", + "idle_rank_cap": 51, + "local_block_profile": { + "18": 1, + "48": 116 + }, + "max_extra_rank1_calls": 6, + "scope": "zero-cost idealization: arbitrary reblocking of all current local rank mass; no gathering, chronology, frame, copy, dirty-restoration or physical costs", + "smallest_passing_local_block_cap": 48, + "unpaid_coordinates": 4 + } + ], + "margin_lower": "1991146600776491909563465165489/12800000000000000000000000000000", + "necessary_unpaid_coordinates_at_target": { + "scope": "uniform coverage law, fixed width 73, nine stages, and rank cap 51; idealized rank-mass distribution only", + "with_centre_fully_removed": 3, + "with_selected_centre_charge_64": 4 + }, + "positive_control_a_zero_bill": "3591/4672", + "rank_cap_thresholds": [ + { + "allowed_by_selected_halving_guard": false, + "centre_mass": "64", + "label": "selected_coverage", + "minimum_rank_cap": 70, + "minimum_rank_cap_bill_upper": "9797631764118346442284957340973/9800000000000000000000000000000", + "previous_rank_cap_bill_lower": "1007616471305122569076896236103/1006250000000000000000000000000", + "strict_adjacent_threshold": true, + "unpaid_coordinates": 1 + }, + { + "allowed_by_selected_halving_guard": false, + "centre_mass": "0", + "label": "one_unpaid_centre_free", + "minimum_rank_cap": 65, + "minimum_rank_cap_bill_upper": "624439992152395604538087614451/625000000000000000000000000000", + "previous_rank_cap_bill_lower": "8006612917081945075334347210767/8000000000000000000000000000000", + "strict_adjacent_threshold": true, + "unpaid_coordinates": 1 + }, + { + "allowed_by_selected_halving_guard": false, + "centre_mass": "0", + "label": "two_unpaid_centre_free", + "minimum_rank_cap": 57, + "minimum_rank_cap_bill_upper": "189944952232181576961696754089/190000000000000000000000000000", + "previous_rank_cap_bill_lower": "28046991260652147831368873194003/28000000000000000000000000000000", + "strict_adjacent_threshold": true, + "unpaid_coordinates": 2 + }, + { + "allowed_by_selected_halving_guard": true, + "centre_mass": "0", + "label": "three_unpaid_centre_free", + "minimum_rank_cap": 51, + "minimum_rank_cap_bill_upper": "636152477351584517820136541243/637500000000000000000000000000", + "previous_rank_cap_bill_lower": "500042148655795789002015342167/500000000000000000000000000000", + "strict_adjacent_threshold": true, + "unpaid_coordinates": 3 + }, + { + "allowed_by_selected_halving_guard": false, + "centre_mass": "64", + "label": "three_unpaid_selected_centre", + "minimum_rank_cap": 55, + "minimum_rank_cap_bill_upper": "12014850967323687265887481562951/12031250000000000000000000000000", + "previous_rank_cap_bill_lower": "151302068266237043989696392042049/151200000000000000000000000000000", + "strict_adjacent_threshold": true, + "unpaid_coordinates": 3 + }, + { + "allowed_by_selected_halving_guard": true, + "centre_mass": "64", + "label": "four_unpaid_selected_centre", + "minimum_rank_cap": 48, + "minimum_rank_cap_bill_upper": "1279366518742944333090361454417/1280000000000000000000000000000", + "previous_rank_cap_bill_lower": "6592146282583123607445330144057/6580000000000000000000000000000", + "strict_adjacent_threshold": true, + "unpaid_coordinates": 4 + } + ], + "rank_terms": [ + { + "count": 2412, + "exact_root": false, + "rank": 1, + "root_lower_numerator": "22065461401524399108626697668", + "root_upper_numerator": "22065461401524399108626697669" + }, + { + "count": 418, + "exact_root": false, + "rank": 2, + "root_lower_numerator": "40859705453245430524632573573", + "root_upper_numerator": "40859705453245430524632573574" + }, + { + "count": 432, + "exact_root": false, + "rank": 3, + "root_lower_numerator": "58589635369438090774728361688", + "root_upper_numerator": "58589635369438090774728361689" + }, + { + "count": 142, + "exact_root": false, + "rank": 4, + "root_lower_numerator": "75661936061334089538300649014", + "root_upper_numerator": "75661936061334089538300649015" + }, + { + "count": 82, + "exact_root": false, + "rank": 5, + "root_lower_numerator": "92261324227102259519191848488", + "root_upper_numerator": "92261324227102259519191848489" + }, + { + "count": 8, + "exact_root": false, + "rank": 8, + "root_lower_numerator": "140106946563774129145149763315", + "root_upper_numerator": "140106946563774129145149763316" + } + ], + "strict_rejection": true + }, + "interpretation": "Both selected local words alone cost more than one normalized unit at a=1/9, even with all idle, hosting, centre and surcharge costs omitted. The selected coverage laws also fail under separate ideal rank-cap relaxations. Passing reblocking cases are zero-overhead necessary budgets for each supplier, not decoders or a joint construction.", + "model": { + "centre_charge_assumed": 0, + "idle_mass_assumed": 0, + "live_families_per_call": "896/9", + "live_families_per_replica": 896, + "local_profile": { + "1": 2412, + "2": 418, + "3": 432, + "4": 142, + "5": 82, + "8": 8 + }, + "local_rank_mass": 5586, + "maximum_child_rank": 51, + "root_scale": "1000000000000000000000000000000", + "stages": 9, + "width": 73 + }, + "scope": "selected complex and bit local words plus independent ideal coverage/reblocking relaxations; no realizable replacement supplier", + "selected": { + "assembly_sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045", + "binding": "complex", + "bit_binding": { + "centre_mass": 63, + "expected_sha256": "b9f0e5ca038abe837b0007c8fe006f366a6f02009244ac57705a8a200e2301f4", + "live_families_per_call": "296/3", + "local_mass": 5129, + "maximum_child_rank": 45, + "receipt_sha256": "5cabbf737ed857061ed02b6a49243e656fbe850e5a614a5f94763f32fb16896b", + "selected_word_sha256": "e3e301e62bc2b41dbf1ceac0acf3d35824ebeab1848c5a2142d4577b109da52f", + "stages": 9, + "unpaid_coordinates": 1 + }, + "kappa": "836330098538459/500000000000000000", + "local_word_source_sha256": "24c71fc5dce5e2d8f9fbd34d059fc9a1c8ad635d93b62102ccb41b03a7b38b9e", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + "status": "PASS_KAPPA01_TWO_SIDED_TARGET_SCREEN", + "target": { + "kappa": "1/10", + "primitive_saving": "1/9" + } +} diff --git a/research/kappa01-target-screen/SOURCES.json b/research/kappa01-target-screen/SOURCES.json new file mode 100644 index 0000000000..fff2bbfebf --- /dev/null +++ b/research/kappa01-target-screen/SOURCES.json @@ -0,0 +1,66 @@ +{ + "schema_version": 1, + "base_commit": "d8e0f83f00191df62174b641e9fff055c357f641", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "input", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0" + }, + { + "path": "research/bit-revision3-levers-seed03/README.md", + "usage": "provenance", + "git_blob": "ac65c531ffae358584e49fc9149c313eb5e437c8", + "sha256": "630911d0652f28d38dbce939bbacdb8ceac23d5fc3a20b02ec8180e4193020c2" + }, + { + "path": "research/bit-revision3-levers-seed03/RESULT.json", + "usage": "input", + "git_blob": "5d66784e72095bbcc7926c61cbc4546ddddf754c", + "sha256": "5cabbf737ed857061ed02b6a49243e656fbe850e5a614a5f94763f32fb16896b" + }, + { + "path": "research/bit-revision3-levers-seed03/SOURCES.json", + "usage": "provenance", + "git_blob": "c4390a747b86ecd60e88bd3b9fa4560c65b7a1f6", + "sha256": "86356463d71a301b4832796a401433996036373a7ec7c210a6d826d227426827" + }, + { + "path": "research/bit-revision3-levers-seed03/verify.py", + "usage": "provenance", + "git_blob": "8bf313cd3edc4c52ed4efaa233530a9b19a6143a", + "sha256": "2a6b011d2a0135d4ab1c388c55480e825a9380754e175400d813a0c566f60ee3" + }, + { + "path": "research/community-frontier1094-audit/ASSEMBLY.json", + "usage": "input", + "git_blob": "5fd676df060f3b450782fdf5ff5f6beb63a5eeb0", + "sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045" + }, + { + "path": "research/complex-local-word-ceiling/levers.py", + "usage": "input", + "git_blob": "e6aee6ce1178f5b68b9ce893b2f5b7f80a143b59", + "sha256": "24c71fc5dce5e2d8f9fbd34d059fc9a1c8ad635d93b62102ccb41b03a7b38b9e" + }, + { + "path": "research/e8-bit-p111-tuned/tune/EXPECTED.json", + "usage": "input", + "git_blob": "e293ddc557742637f9f679f083a1a282d87b1b13", + "sha256": "b9f0e5ca038abe837b0007c8fe006f366a6f02009244ac57705a8a200e2301f4" + }, + { + "path": "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz", + "usage": "input", + "git_blob": "85a4499bf9e4911a705d50567a2c2ef6cf23739a", + "sha256": "e3e301e62bc2b41dbf1ceac0acf3d35824ebeab1848c5a2142d4577b109da52f" + } + ] +} diff --git a/research/kappa01-target-screen/TASK.json b/research/kappa01-target-screen/TASK.json new file mode 100644 index 0000000000..3123b6fb61 --- /dev/null +++ b/research/kappa01-target-screen/TASK.json @@ -0,0 +1,83 @@ +{ + "schema_version": 1, + "task_id": "coverage-law-change", + "priority_revision": 6, + "base_commit": "d8e0f83f00191df62174b641e9fff055c357f641", + "original_card": { + "id": "coverage-law-change", + "question": "Can a template or call contract leave two or more unpaid coordinates per live family?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/complex-local-word-ceiling/README.md", + "research/idle-axis-hosting/PROOF.md", + "certificates/selected-result.json" + ], + "methods": [ + "State a replacement for the coverage identity (mass = 72W + 64N) and the contract change that realizes it, with its implementation cost.", + "Find an obstruction: show which data-endpoint obligation forces exactly one unpaid coordinate in the current template." + ], + "acceptance_gate": "An explicit replacement identity, verified on a small complete instance with dirty inputs, priced with ceiling.ceiling(unpaid=...). A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Explain where the single unpaid coordinate per family comes from in the hosted template; propose one change and price it. Ideal budget: two unpaid coordinates per family is 3.77x (levers.py).", + "bottleneck_link": "The deficit is one coordinate per family minus the centre charge; doubling unpaid coordinates per family scales it directly.", + "allowed_variations": [ + "One template change or one endpoint-contract change.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Counting a coordinate as unpaid while leaving it unadvanced in the data endpoint.", + "Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts." + ], + "overlap_terms": [ + "coverage identity", + "unpaid coordinate", + "deficit law", + "W - 64N" + ] + }, + "scope_status": "refined", + "actual_scope": "At the explicit \u03ba > 0.1 target, produce an exact two-sided necessary budget map for the selected complex and bit local words, their coverage/rank guards, and ideal reblocking of each full local rank mass.", + "scope_change_reason": "The target requires primitive a > 1/9 under the retained transfer. Both selected local words already exceed unit moment at a = 1/9 before idle or hosting costs, and both selected coverage laws fail separate ideal rank-cap relaxations. This refines the coverage-law card into a two-sided target-scale screen; passing ideal reblockings provide budgets only, not identities or suppliers.", + "bottleneck_link": "\u03ba > 0.1 requires a > 1/9. The selected complex supplier binds the frontier, but the bit supplier must also reach the same outer target. Each selected local word and coverage law has an independent exact obstruction at this scale.", + "budget_minutes": 60, + "stop_rule": "Stop repacking the selected local words or optimizing only the selected coverage laws for \u03ba > 0.1. Continuation requires changed local identities on both suppliers with full costs, or a source-bound changed outer transfer. The ideal block tables are necessary budget gates only.", + "outcome": "partial", + "evidence": "Exact integer-root certificates give local-only moments >1.155558328185663 (complex) and >1.195679601524970 (bit) at a = 1/9. Selected coverage/rank-cap relaxations cost >1.035561535760803 and >1.034037852870777. Ideal integer reblocking can pass only under changed coverage: complex needs 3 unpaid/centre 0 with cap-50 blocks and zero extra rank-one charges, or 4 unpaid/centre 64 with cap-48 blocks and at most 6; bit examples need 3 unpaid/centre 0/cap 42 with at most 8, or 4 unpaid/centre 63/cap 39 with at most 3. No decoder or joint construction is supplied.", + "author": "OpenAI Codex", + "ai_assistance": "Substantial OpenAI Codex assistance in mathematical analysis, exact arithmetic, verification and writing.", + "open_questions": [ + { + "question": "What changed complex local identity can bring its fully charged paid-word moment below one at a = 1/9?", + "why_it_matters": "The selected complex word alone costs more than 1.1555, so packing and coverage changes cannot reach the target while it stays fixed.", + "first_step": "Give one exact replacement profile with the decoder, frame, dirty-state and restoration costs included.", + "blocked_by": "No replacement identity and complete local cost ledger are available." + }, + { + "question": "What changed bit local identity can bring its fully charged paid-word moment below one at a = 1/9?", + "why_it_matters": "The selected bit word alone costs more than 1.1956 even with its positive surcharge omitted, so coverage changes cannot reach the target while it stays fixed.", + "first_step": "Give one exact replacement block and source/target map, then price its PR589 interface, surcharge and restoration costs.", + "blocked_by": "No replacement bit identity or fully charged block map is available." + }, + { + "question": "Can one chronological construction realize compatible complex and bit block budgets under one proved outer contract?", + "why_it_matters": "The separate ideal screens do not establish that both suppliers can meet the target together. Their passing margins leave little or no physical overhead.", + "first_step": "Construct one block on each side, include frame and restoration schedules, and verify both contracts against the same outer recurrence.", + "blocked_by": "The ideal profiles have no decoder identities, chronology proofs or joint coverage contract." + }, + { + "question": "Can a changed source-bound outer transfer map feasible supplier endpoints to \u03ba > 0.1?", + "why_it_matters": "A new conversion could change the required primitive saving but would replace a central premise of the selected result.", + "first_step": "Derive the conversion from the recurrence and all-size assumptions, then bind it to both supplier budgets.", + "blocked_by": "The current selected reduction and strict reservations are source-bound; no alternative proof is supplied." + } + ] +} diff --git a/research/kappa01-target-screen/VERIFY.json b/research/kappa01-target-screen/VERIFY.json new file mode 100644 index 0000000000..111cea8785 --- /dev/null +++ b/research/kappa01-target-screen/VERIFY.json @@ -0,0 +1,25 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "certificates/selected-result.json", + "research/bit-revision3-levers-seed03/RESULT.json", + "research/community-frontier1094-audit/ASSEMBLY.json", + "research/complex-local-word-ceiling/levers.py", + "research/e8-bit-p111-tuned/tune/EXPECTED.json", + "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Binds the selected complex result and word plus the bit receipt -> PR589 EXPECTED -> selected word bytes; exact integer ninth-root enclosures for both paid local words at a=1/9; positive a=0 controls; strict local and selected-coverage rejections; adjacent complex rank-cap thresholds; concavity-optimal complex and bit integer block budgets with strict adjacent-cap and extra-call boundaries; exact RESULT.json replay." + } + ] +} diff --git a/research/kappa01-target-screen/verify.py b/research/kappa01-target-screen/verify.py new file mode 100644 index 0000000000..70c7619faa --- /dev/null +++ b/research/kappa01-target-screen/verify.py @@ -0,0 +1,620 @@ +#!/usr/bin/env python3 +"""Exact target-scale screen for the selected complex and bit local words. + +At kappa = 1/10 the retained planning transfer requires primitive saving +a = 1/9. This checker lower-bounds both selected local-word moments at that +point using integer ninth-root inequalities only. It also prices ideal +zero-overhead reblockings of the selected bit local rank mass. +""" + +from __future__ import annotations + +import argparse +import ast +import hashlib +import json +from fractions import Fraction as Q +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[2] +PACKAGE = Path(__file__).resolve().parent +SCALE = 10**30 +TARGET_A = Q(1, 9) +EXPECTED_WORD = {1: 2412, 2: 418, 3: 432, 4: 142, 5: 82, 8: 8} +EXPECTED_BIT_WORD = {1: 1323, 2: 1342, 3: 79, 4: 44, 5: 102, 6: 11, 7: 19} + + +def require(ok: bool, label: str) -> None: + if not ok: + raise ValueError(label) + + +def read_json(path: Path): + return json.loads(path.read_text(encoding="utf-8")) + + +def sha256(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def ast_assignments(path: Path) -> dict[str, object]: + tree = ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) + found: dict[str, object] = {} + for node in tree.body: + if not isinstance(node, ast.Assign): + continue + value = ast.literal_eval(node.value) + for target in node.targets: + if isinstance(target, ast.Name): + found[target.id] = value + elif isinstance(target, ast.Tuple): + names = [x.id for x in target.elts if isinstance(x, ast.Name)] + if len(names) == len(target.elts) and isinstance(value, tuple): + found.update(zip(names, value)) + return found + + +def source_profile() -> tuple[int, int, int, dict[int, int]]: + source = ROOT / "research/complex-local-word-ceiling/levers.py" + values = ast_assignments(source) + require((values.get("M"), values.get("FAM"), values.get("ST")) == (73, 896, 9), + "selected local-word dimensions drifted") + word = values.get("WORD") + require(isinstance(word, dict), "selected local word is missing") + word = {int(r): int(n) for r, n in word.items()} + require(word == EXPECTED_WORD, "selected local profile differs from the audited source") + return 73, 896, 9, word + + +def root_enclosure(rank: int, width: int) -> tuple[int, int, bool]: + """Enclose (rank/width)^(8/9) in multiples of 1/SCALE. + + The comparison k/SCALE <= y is equivalent to + k^9 * width^8 <= rank^8 * SCALE^9, so every step is integer arithmetic. + """ + require(0 < rank < width, "rank must lie strictly inside the width") + rhs = rank**8 * SCALE**9 + width_factor = width**8 + lo, hi = 0, SCALE + while lo < hi: + mid = (lo + hi + 1) // 2 + if mid**9 * width_factor <= rhs: + lo = mid + else: + hi = mid - 1 + exact = lo**9 * width_factor == rhs + upper = lo if exact else lo + 1 + require(lo**9 * width_factor <= rhs, "root lower endpoint failed") + require(upper**9 * width_factor >= rhs, "root upper endpoint failed") + return lo, upper, exact + + +def moment_interval(word: dict[int, int | Q], width: int, families: Q): + """Enclose sum_r n_r (r/width)^(8/9) / families exactly.""" + lower = upper = Q(0) + terms = [] + for rank, count in sorted(word.items()): + lo, hi, exact = root_enclosure(rank, width) + lower += count * Q(lo, SCALE) + upper += count * Q(hi, SCALE) + terms.append({ + "rank": rank, + "count": str(count), + "root_lower_numerator": str(lo), + "root_upper_numerator": str(hi), + "exact_root": exact, + }) + return lower / families, upper / families, terms + + +def bit_profile() -> tuple[dict[int, int], dict[str, object]]: + """Bind the selected bit histogram through its audited receipt to the word.""" + selected_path = ROOT / "certificates/selected-result.json" + assembly_path = ROOT / "research/community-frontier1094-audit/ASSEMBLY.json" + receipt_path = ROOT / "research/bit-revision3-levers-seed03/RESULT.json" + expected_path = ROOT / "research/e8-bit-p111-tuned/tune/EXPECTED.json" + word_path = ROOT / "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz" + + selected = read_json(selected_path) + assembly = read_json(assembly_path) + receipt = read_json(receipt_path) + expected = read_json(expected_path) + binding = receipt["binding"] + replay = receipt["replay"] + word_record = expected["word"] + require(receipt["status"] == "PASS_BIT_REVISION3_LEVERS", + "selected bit receipt is not a successful audited replay") + require(selected["kappa"] == assembly["kappa"], + "selected bit and complex records no longer share the selected kappa") + require(assembly["binding"] == "complex", "selected assembly is no longer complex-bound") + require(binding["record"] == "certificates/selected-result.json" + and binding["assembly"] == "research/community-frontier1094-audit/ASSEMBLY.json", + "bit receipt no longer binds the selected record and assembly") + require(binding["expected"] == "research/e8-bit-p111-tuned/tune/EXPECTED.json" + and binding["word"] == "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz", + "bit receipt no longer binds the selected bit word inputs") + require(binding["assembly_sha256"] == sha256(assembly_path), + "bit receipt assembly hash drifted") + require(binding["expected_sha256"] == sha256(expected_path) + and binding["word_sha256"] == sha256(word_path) + and word_record["file_sha256"] == sha256(word_path), + "bit receipt expected-record or selected-word hash drifted") + local = {int(r): int(n) for r, n in replay["local_histogram"].items()} + expected_local = {int(r): int(n) for r, n in word_record["local_histogram"].items()} + require(local == expected_local == EXPECTED_BIT_WORD, + "selected bit local histogram differs from its expected record") + require(replay["local_mass"] == 5129 and replay["w"] == "296/3" + and replay["stages"] == 9 and replay["record_idle_cap"] == 45 + and replay["copy_charge_per_call"] == 63, + "selected bit dimensions or coverage-law inputs drifted") + return local, { + "receipt_sha256": sha256(receipt_path), + "expected_sha256": sha256(expected_path), + "selected_word_sha256": sha256(word_path), + "local_mass": replay["local_mass"], + "live_families_per_call": replay["w"], + "stages": replay["stages"], + "unpaid_coordinates": 1, + "centre_mass": replay["copy_charge_per_call"], + "maximum_child_rank": replay["record_idle_cap"], + } + + +def bit_total_mass_bill_interval(unpaid: int, centre: Q, width: int, + families: Q, rank_cap: int): + """Most favorable bill for fixed coverage mass under a rank cap.""" + total_mass = (width - unpaid) * families + centre + lo, hi, _ = root_enclosure(rank_cap, width) + lower = total_mass * Q(lo, SCALE) / (rank_cap * families) + upper = total_mass * Q(hi, SCALE) / (rank_cap * families) + return lower, upper + + +def bit_block_profile(rank_mass: int, block_cap: int) -> dict[int, int]: + """Cost-minimizing integer partition of rank mass with a maximum block rank.""" + blocks, remainder = divmod(rank_mass, block_cap) + profile = {block_cap: blocks} if blocks else {} + if remainder: + profile[remainder] = profile.get(remainder, 0) + 1 + return profile + + +def bit_reblocked_bill_interval(rank_mass: int, unpaid: int, centre: Q, + width: int, families: Q, rank_cap: int, + block_cap: int, extra_rank1: int = 0): + """Ideal integer reblocking plus fractional idle mass at the rank cap.""" + total_mass = (width - unpaid) * families + centre + idle_mass = total_mass - rank_mass + require(idle_mass >= 0, "bit local word exceeds the proposed coverage budget") + profile = bit_block_profile(rank_mass, block_cap) + lower = upper = Q(0) + for rank, count in profile.items(): + lo, hi, _ = root_enclosure(rank, width) + lower += count * Q(lo, SCALE) + upper += count * Q(hi, SCALE) + idle_lo, idle_hi, _ = root_enclosure(rank_cap, width) + lower += idle_mass / rank_cap * Q(idle_lo, SCALE) + upper += idle_mass / rank_cap * Q(idle_hi, SCALE) + one_lo, one_hi, _ = root_enclosure(1, width) + lower += extra_rank1 * Q(one_lo, SCALE) + upper += extra_rank1 * Q(one_hi, SCALE) + return lower / families, upper / families, profile + + +def ideal_bit_blocking_threshold(rank_mass: int, unpaid: int, centre: Q, + width: int, families: Q, rank_cap: int): + """Find the first strict pass and its adjacent block/extra-call limits.""" + rows = [] + for cap in range(1, rank_cap + 1): + lower, upper, profile = bit_reblocked_bill_interval( + rank_mass, unpaid, centre, width, families, rank_cap, cap + ) + rows.append((cap, lower, upper, profile)) + passing = [row for row in rows if row[2] < 1] + require(bool(passing), "no bit reblocking through the selected rank cap passes") + cap, lower, upper, profile = passing[0] + require(all(row[1] > 1 for row in rows if row[0] < cap), + "a smaller integer bit block cap is not strictly rejected") + max_extra = 0 + while True: + next_lo, next_hi, _ = bit_reblocked_bill_interval( + rank_mass, unpaid, centre, width, families, rank_cap, cap, max_extra + 1 + ) + if next_lo > 1: + break + require(next_hi < 1, "bit extra-call boundary interval is undecided") + max_extra += 1 + accepted_lo, accepted_hi, _ = bit_reblocked_bill_interval( + rank_mass, unpaid, centre, width, families, rank_cap, cap, max_extra + ) + rejected_lo, _, _ = bit_reblocked_bill_interval( + rank_mass, unpaid, centre, width, families, rank_cap, cap, max_extra + 1 + ) + return { + "unpaid_coordinates": unpaid, + "centre_mass": str(centre), + "maximum_child_rank": rank_cap, + "smallest_passing_local_block_cap": cap, + "all_smaller_caps_fail": True, + "local_block_profile": {str(r): n for r, n in sorted(profile.items())}, + "bill_lower": str(lower), + "bill_upper": str(upper), + "bill_upper_decimal": f"{float(upper):.15f}", + "max_extra_rank1_calls": max_extra, + "bill_with_max_extra_lower": str(accepted_lo), + "bill_with_max_extra_upper": str(accepted_hi), + "bill_with_next_extra_lower": str(rejected_lo), + "scope": "zero-cost idealization: arbitrary integer reblocking of all selected local rank mass; idle mass fractional at the cap; no gathering, chronology, frame, copy, dirty-restoration, surcharge or physical costs", + } + + +def local_bill_interval(word: dict[int, int], width: int, families: int, stages: int): + per_call_families = Q(families, stages) + lower = upper = Q(0) + terms = [] + for rank, count in sorted(word.items()): + lo, hi, exact = root_enclosure(rank, width) + lower += count * Q(lo, SCALE) + upper += count * Q(hi, SCALE) + terms.append({ + "rank": rank, + "count": count, + "root_lower_numerator": str(lo), + "root_upper_numerator": str(hi), + "exact_root": exact, + }) + return lower / per_call_families, upper / per_call_families, terms + + +def rank_mass_bill_interval(unpaid: int, centre: Q, width: int, families: int, stages: int, cap: int): + """Most favorable moment for a fixed total rank mass and cap: put all at cap.""" + per_call_families = Q(families, stages) + total_mass = (width - unpaid) * per_call_families + centre + lo, hi, _ = root_enclosure(cap, width) + lower = total_mass * Q(lo, SCALE) / (cap * per_call_families) + upper = total_mass * Q(hi, SCALE) / (cap * per_call_families) + return lower, upper + + +def first_rank_cap_below_one(unpaid: int, centre: Q, width: int, families: int, stages: int): + """Return the first integer rank cap whose ideal rank-mass bill is < 1.""" + for cap in range(1, width): + lower, upper = rank_mass_bill_interval(unpaid, centre, width, families, stages, cap) + if upper < 1: + previous = rank_mass_bill_interval(unpaid, centre, width, families, stages, cap - 1) + require(previous[0] > 1, "rank-cap threshold is not adjacent and strict") + return { + "minimum_rank_cap": cap, + "previous_rank_cap_bill_lower": str(previous[0]), + "minimum_rank_cap_bill_upper": str(upper), + "strict_adjacent_threshold": True, + "allowed_by_selected_halving_guard": cap <= 51, + } + raise ValueError("no rank cap below the width passes the ideal moment") + + +def block_profile(rank_mass: int, block_cap: int) -> dict[int, int]: + """Concavity-optimal integer partition into blocks no larger than block_cap.""" + blocks, remainder = divmod(rank_mass, block_cap) + profile = {block_cap: blocks} if blocks else {} + if remainder: + profile[remainder] = profile.get(remainder, 0) + 1 + return profile + + +def reblocked_bill_interval( + word: dict[int, int], unpaid: int, centre: Q, width: int, + families: int, stages: int, idle_cap: int, block_cap: int, + extra_rank1: int = 0, +): + """Idealize the whole local rank mass as integer blocks plus rank-cap idle.""" + per_call_families = Q(families, stages) + local_mass = sum(rank * count for rank, count in word.items()) + total_mass = (width - unpaid) * per_call_families + centre + idle_mass = total_mass - local_mass + require(idle_mass >= 0, "local word exceeds the selected coverage budget") + profile = block_profile(local_mass, block_cap) + lower = upper = Q(0) + for rank, count in profile.items(): + lo, hi, _ = root_enclosure(rank, width) + lower += count * Q(lo, SCALE) + upper += count * Q(hi, SCALE) + idle_lo, idle_hi, _ = root_enclosure(idle_cap, width) + lower += idle_mass / idle_cap * Q(idle_lo, SCALE) + upper += idle_mass / idle_cap * Q(idle_hi, SCALE) + one_lo, one_hi, _ = root_enclosure(1, width) + lower += extra_rank1 * Q(one_lo, SCALE) + upper += extra_rank1 * Q(one_hi, SCALE) + return lower / per_call_families, upper / per_call_families, profile + + +def ideal_blocking_threshold(word: dict[int, int], unpaid: int, centre: Q, + width: int, families: int, stages: int, idle_cap: int): + """Find the smallest local block cap that passes the fully idealized bill.""" + local_mass = sum(rank * count for rank, count in word.items()) + total_mass = (width - unpaid) * Q(families, stages) + centre + require(total_mass >= local_mass, "coverage budget cannot host the current local rank mass") + rows = [] + passing = [] + for cap in range(1, idle_cap + 1): + lower, upper, profile = reblocked_bill_interval( + word, unpaid, centre, width, families, stages, idle_cap, cap + ) + row = { + "block_cap": cap, + "local_block_profile": {str(r): n for r, n in sorted(profile.items())}, + "bill_lower": str(lower), + "bill_upper": str(upper), + "bill_upper_decimal": f"{float(upper):.15f}", + "strictly_below_one": upper < 1, + } + rows.append(row) + if upper < 1: + passing.append(row) + require(bool(passing), "no local block cap up to the selected rank cap passes") + first = min(passing, key=lambda row: row["block_cap"]) + cap = first["block_cap"] + require(all(not row["strictly_below_one"] for row in rows if row["block_cap"] < cap), + "a smaller block cap unexpectedly passes") + max_extra = 0 + while True: + next_lower, next_upper, _ = reblocked_bill_interval( + word, unpaid, centre, width, families, stages, idle_cap, cap, max_extra + 1 + ) + if next_lower > 1: + break + require(next_upper < 1, "extra rank-one boundary interval is undecided") + max_extra += 1 + extra_lower, _, _ = reblocked_bill_interval( + word, unpaid, centre, width, families, stages, idle_cap, cap, max_extra + ) + next_lower, next_upper, _ = reblocked_bill_interval( + word, unpaid, centre, width, families, stages, idle_cap, cap, max_extra + 1 + ) + require(extra_lower < 1 < next_lower, "extra rank-one budget boundary is not strict") + return { + "unpaid_coordinates": unpaid, + "centre_mass": str(centre), + "idle_rank_cap": idle_cap, + "smallest_passing_local_block_cap": cap, + "all_smaller_caps_fail": True, + "local_block_profile": first["local_block_profile"], + "bill_lower": first["bill_lower"], + "bill_upper": first["bill_upper"], + "bill_upper_decimal": first["bill_upper_decimal"], + "max_extra_rank1_calls": max_extra, + "bill_with_max_extra_lower": str(extra_lower), + "bill_with_next_extra_lower": str(next_lower), + "scope": "zero-cost idealization: arbitrary reblocking of all current local rank mass; no gathering, chronology, frame, copy, dirty-restoration or physical costs", + } + + +def result_record() -> dict[str, object]: + selected_path = ROOT / "certificates/selected-result.json" + assembly_path = ROOT / "research/community-frontier1094-audit/ASSEMBLY.json" + word_path = ROOT / "research/complex-local-word-ceiling/levers.py" + selected = read_json(selected_path) + assembly = read_json(assembly_path) + width, families, stages, word = source_profile() + bit_word, bit_binding = bit_profile() + + selected_kappa = str(selected["kappa"]) + require(selected_kappa == str(assembly["kappa"]), "selected record and assembly kappa differ") + require(assembly["binding"] == "complex", "source assembly is no longer complex-bound") + + local_mass = sum(rank * count for rank, count in word.items()) + lower, upper, terms = local_bill_interval(word, width, families, stages) + rank_cap = 51 + require(2 * rank_cap**2 < width**2 <= 2 * (rank_cap + 1) ** 2, + "rank cap is no longer the largest rank allowed by the selected halving guard") + # Positive control: at a=0 this local bill is exactly rank mass/(m W). + zero_saving_bill = Q(local_mass * stages, width * families) + require(zero_saving_bill < 1, "positive control at a=0 failed") + require(lower > 1, "the selected local word does not exclude a=1/9") + + coverage_cases = [] + for label, unpaid, centre in ( + ("selected_coverage", 1, Q(64)), + ("two_unpaid_centre_free", 2, Q(0)), + ("three_unpaid_centre_free", 3, Q(0)), + ("three_unpaid_selected_centre", 3, Q(64)), + ("four_unpaid_selected_centre", 4, Q(64)), + ): + b_lo, b_hi = rank_mass_bill_interval(unpaid, centre, width, families, stages, rank_cap) + coverage_cases.append({ + "label": label, + "unpaid_coordinates": unpaid, + "centre_mass": str(centre), + "all_mass_at_rank_cap": rank_cap, + "bill_lower": str(b_lo), + "bill_upper": str(b_hi), + "bill_upper_decimal": f"{float(b_hi):.15f}", + "strictly_below_one": b_hi < 1, + }) + rank_cap_cases = [] + for label, unpaid, centre in ( + ("selected_coverage", 1, Q(64)), + ("one_unpaid_centre_free", 1, Q(0)), + ("two_unpaid_centre_free", 2, Q(0)), + ("three_unpaid_centre_free", 3, Q(0)), + ("three_unpaid_selected_centre", 3, Q(64)), + ("four_unpaid_selected_centre", 4, Q(64)), + ): + rank_cap_cases.append({ + "label": label, + "unpaid_coordinates": unpaid, + "centre_mass": str(centre), + **first_rank_cap_below_one(unpaid, centre, width, families, stages), + }) + case = {item["label"]: item for item in coverage_cases} + require(Q(case["selected_coverage"]["bill_lower"]) > 1, + "selected coverage does not fail even under ideal rank-cap repacking") + require(Q(case["two_unpaid_centre_free"]["bill_lower"]) > 1, + "two-unpaid centre-free necessity control failed") + require(case["three_unpaid_centre_free"]["strictly_below_one"], + "three-unpaid centre-free ideal positive control failed") + require(Q(case["three_unpaid_selected_centre"]["bill_lower"]) > 1, + "three-unpaid selected-centre necessity control failed") + require(case["four_unpaid_selected_centre"]["strictly_below_one"], + "four-unpaid selected-centre ideal positive control failed") + cap_case = {item["label"]: item for item in rank_cap_cases} + require(cap_case["selected_coverage"]["minimum_rank_cap"] == 70, + "selected-law rank-cap threshold drifted") + require(cap_case["one_unpaid_centre_free"]["minimum_rank_cap"] == 65, + "centre-free rank-cap threshold drifted") + require(cap_case["two_unpaid_centre_free"]["minimum_rank_cap"] == 57, + "two-unpaid rank-cap threshold drifted") + require(cap_case["three_unpaid_centre_free"]["minimum_rank_cap"] == 51, + "three-unpaid rank-cap threshold drifted") + require(cap_case["three_unpaid_selected_centre"]["minimum_rank_cap"] == 55, + "selected-centre rank-cap threshold drifted") + require(cap_case["four_unpaid_selected_centre"]["minimum_rank_cap"] == 48, + "four-unpaid selected-centre rank-cap threshold drifted") + block_cases = [ + ideal_blocking_threshold(word, 3, Q(0), width, families, stages, rank_cap), + ideal_blocking_threshold(word, 4, Q(64), width, families, stages, rank_cap), + ] + require(block_cases[0]["smallest_passing_local_block_cap"] == 50 + and block_cases[0]["local_block_profile"] == {"36": 1, "50": 111} + and block_cases[0]["max_extra_rank1_calls"] == 0, + "three-unpaid block budget drifted") + require(block_cases[1]["smallest_passing_local_block_cap"] == 48 + and block_cases[1]["local_block_profile"] == {"18": 1, "48": 116} + and block_cases[1]["max_extra_rank1_calls"] == 6, + "four-unpaid block budget drifted") + + bit_width = 64 + bit_families = Q(296, 3) + bit_stages = 9 + bit_rank_cap = 45 + bit_mass = sum(rank * count for rank, count in bit_word.items()) + bit_lower, bit_upper, bit_terms = moment_interval(bit_word, bit_width, bit_families) + bit_zero_saving = Q(bit_mass, 1) / (bit_width * bit_families) + require(bit_mass == 5129 and bit_zero_saving < 1, + "bit local mass or a=0 positive control drifted") + require(bit_lower > 1, "the selected bit local word does not exclude a=1/9") + bit_coverage_lower, bit_coverage_upper = bit_total_mass_bill_interval( + 1, Q(63), bit_width, bit_families, bit_rank_cap + ) + require(bit_coverage_lower > 1, + "selected bit coverage still passes with all mass ideally at rank 45") + bit_blocks = [ + ideal_bit_blocking_threshold(bit_mass, 3, Q(0), bit_width, bit_families, bit_rank_cap), + ideal_bit_blocking_threshold(bit_mass, 4, Q(63), bit_width, bit_families, bit_rank_cap), + ] + require(bit_blocks[0]["smallest_passing_local_block_cap"] == 42 + and bit_blocks[0]["local_block_profile"] == {"5": 1, "42": 122} + and bit_blocks[0]["max_extra_rank1_calls"] == 8, + "three-unpaid bit block budget drifted") + require(bit_blocks[1]["smallest_passing_local_block_cap"] == 39 + and bit_blocks[1]["local_block_profile"] == {"20": 1, "39": 131} + and bit_blocks[1]["max_extra_rank1_calls"] == 3, + "four-unpaid bit block budget drifted") + + # At a=1/9, kappa=a/(1+a)=1/10. The retained outer transfer has strict + # reservations, so any kappa>1/10 needs a primitive a>1/9. + return { + "status": "PASS_KAPPA01_TWO_SIDED_TARGET_SCREEN", + "scope": "selected complex and bit local words plus independent ideal coverage/reblocking relaxations; no realizable replacement supplier", + "target": {"kappa": "1/10", "primitive_saving": "1/9"}, + "selected": { + "kappa": selected_kappa, + "binding": assembly["binding"], + "selected_record_sha256": sha256(selected_path), + "assembly_sha256": sha256(assembly_path), + "local_word_source_sha256": sha256(word_path), + "bit_binding": bit_binding, + }, + "model": { + "width": width, + "live_families_per_replica": families, + "stages": stages, + "live_families_per_call": f"{families}/{stages}", + "local_profile": {str(r): n for r, n in sorted(word.items())}, + "local_rank_mass": local_mass, + "idle_mass_assumed": 0, + "centre_charge_assumed": 0, + "maximum_child_rank": rank_cap, + "root_scale": str(SCALE), + }, + "bit_model": { + "width": bit_width, + "live_families_per_call": str(bit_families), + "stages": bit_stages, + "local_profile": {str(r): n for r, n in sorted(bit_word.items())}, + "local_rank_mass": bit_mass, + "idle_mass_assumed_for_local_floor": 0, + "surcharge_assumed_for_local_floor": 0, + "copy_charge": 63, + "maximum_child_rank": bit_rank_cap, + "root_scale": str(SCALE), + }, + "certificate": { + "rank_terms": terms, + "bill_lower": str(lower), + "bill_upper": str(upper), + "bill_lower_decimal": f"{float(lower):.15f}", + "bill_upper_decimal": f"{float(upper):.15f}", + "margin_lower": str(lower - 1), + "positive_control_a_zero_bill": str(zero_saving_bill), + "strict_rejection": lower > 1, + "coverage_relaxations": coverage_cases, + "rank_cap_thresholds": rank_cap_cases, + "ideal_local_blocking": block_cases, + "necessary_unpaid_coordinates_at_target": { + "with_centre_fully_removed": 3, + "with_selected_centre_charge_64": 4, + "scope": "uniform coverage law, fixed width 73, nine stages, and rank cap 51; idealized rank-mass distribution only", + }, + "bit_local_word": { + "rank_terms": bit_terms, + "bill_lower": str(bit_lower), + "bill_upper": str(bit_upper), + "bill_lower_decimal": f"{float(bit_lower):.15f}", + "bill_upper_decimal": f"{float(bit_upper):.15f}", + "margin_lower": str(bit_lower - 1), + "strict_rejection": bit_lower > 1, + "positive_control_a_zero_bill": str(bit_zero_saving), + "surcharge_omitted": True, + }, + "bit_selected_coverage": { + "unpaid_coordinates": 1, + "centre_mass": "63", + "all_mass_at_rank_cap": bit_rank_cap, + "bill_lower": str(bit_coverage_lower), + "bill_upper": str(bit_coverage_upper), + "bill_upper_decimal": f"{float(bit_coverage_upper):.15f}", + "strict_rejection": bit_coverage_lower > 1, + }, + "bit_ideal_local_blocking": bit_blocks, + }, + "interpretation": ( + "Both selected local words alone cost more than one normalized unit at a=1/9, " + "even with all idle, hosting, centre and surcharge costs omitted. The selected " + "coverage laws also fail under separate ideal rank-cap relaxations. Passing " + "reblocking cases are zero-overhead necessary budgets for each supplier, not " + "decoders or a joint construction." + ), + } + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--write", type=Path) + args = parser.parse_args() + record = result_record() + rendered = json.dumps(record, indent=2, sort_keys=True) + "\n" + if args.write: + args.write.write_text(rendered, encoding="utf-8") + else: + expected = read_json(PACKAGE / "RESULT.json") + require(record == expected, "RESULT.json differs from exact replay") + print("PASS_KAPPA01_TWO_SIDED_TARGET_SCREEN complex_local_lower=" + + record["certificate"]["bill_lower_decimal"] + + " bit_local_lower=" + + record["certificate"]["bit_local_word"]["bill_lower_decimal"]) + + +if __name__ == "__main__": + main()