diff --git a/agents.md b/agents.md index 75a01e4b6..f265286e7 100644 --- a/agents.md +++ b/agents.md @@ -1,7 +1,7 @@ # AGENTS.md — RS–MCA Resolution Protocol -> **Updated:** 2026-07-29 -> **State snapshot:** `main@b13de8113a03f06b6fc22bbd2f289a8abcdf7e95` +> **Updated:** 2026-08-13 +> **State snapshot:** `upstream/main@93fba1be3f3299b0ba4708d88715377bbb656e45` > **Supersedes:** all older priority lists in this file. Edit this workboard in place. Never append another “current focus”, “highest priority”, or competing task list. @@ -80,6 +80,13 @@ At this snapshot: - The cumulative M31 rank-seven compiler now reaches `Q=147594` locally. Its adjacent `Q=147595`, `k=4981` survivor is reduced to a varying proper-`G`, zero-excess cross-cofactor incidence terminal requiring an aggregate cap `2157928`; no v4 atom, higher-rank theorem, or row closure follows. - The KoalaBear equality-wall PR stack proves local normalization, a `Q=6,u=2` geometry reduction, and exclusion of 60 labelled `P3+C3` cases, but retains 405 labelled conic cases and lacks global ownership/add-back. The separate column-far transverse-secant certificate is per fixed union only. No large `U_paid` claimed by an abstract candidate-record compiler is banked; the live active value remains `null`. - The exact adjacent fixed-`G` Hahn relaxation has optimum `20737821.0968...`, above the list target, and its complementarity identity shows the proposed selection-gap hypothesis is target-equivalent. This cuts the ordinary pairwise-distribution route without proving an unsafe list or moving the M31 row. +- The affine-span transverse MCA compiler `thm:affine-span-mca` is refuted even under its printed direction-separation hypothesis. An exact `GF(1009)` rank-one family has 31 pair-noncontained bad slopes against the claimed bound 23, with direction agreement `20` has `d_1(W)=e` and every higher generalized weight MDS-sharp. The punctured Johnson and Gram rungs lead to the exact-layer affine-line theorem, which pays every sparse-direction support `e=ceil((lambda*h-e)/(lambda-1))`; with the capped-core branch, three lines pay every support `e=130226..130236`. At adjacent `e=130237`, the bank forces only size-two shift-pair slots with inside core `807`; first-order packing reaches only `65529=L`. Its arbitrary-rank codeword gauge pays every intrinsic post-near KoalaBear family through affine error rank 9 by `110390969172308040`, with slack `164589758939087047`, conditional only on the separately pinned `2w` near-rational theorem. At error ranks 10, 11, and 12, an over-budget family yields an actual identical support on which the original direction differs from a reconstructed codeword in at most `12`, `387`, or `12049` coordinates. This is a direct distinct-slope route cut with zero active-v4 ledger movement; it does not transport first-match owners or close KoalaBear. +- The rank-ten margin/interleaving split now pays the complete direct post-near KoalaBear affine-error-rank-10 branch. At threshold T=667, the support-transverse high part costs 5143522968716559, the common-support interleaved low part costs 56727790457914040, and the disjoint near add-back costs 134944, for total 61871313426765543 and slack 213109414684629544. The projection-collapse guard uses the actual sextic line field |F|=2130706433^6. The same exact one-threshold formula first fails at error rank 11, whose minimum is 1040506078215897711 at T=876; an exact post-near constant-code star proves the per-pair multiplicity factor n-A is sharp. This moves no active-v4 atom and does not close KoalaBear. +- The rank-eleven successor now sums the record-local support margins before taking a minimum and compiles low-margin records into actual fixed minimizing pairs. Every over-budget post-near error-rank-11 line forces one pair of deficiency at most 8 with weighted load at least 743449148, and independently a possibly different pair of deficiency at most 4 owning at least 200632 distinct slopes. The complete printed-theorem core-deficiency cutoff has minimum 813929118931913384, while the stronger summed-margin relaxation has minimum 811958533186703629; both exceed the row budget. A finite parallel-star control rules out distinct-neighbor promotion and a smaller one-pair multiplier. Thus the next missing theorem couples different pair cores or routes dense parallel groups to a chronology owner. This is a route cut with zero active-v4 ledger movement, not a rank-eleven payment or KoalaBear closure. - Grande Finale v4 explicitly supersedes the old v3 `prob:saturated-bc` status: primitive one-pencil MCA BC is proved; higher-dimensional MCA BC remains jointly governed by spread-component, large-owner, and exception routing; and the list-interior clause is governed by row-sharp list completion. The spread-abundance and `prob:next` statements are intermediate forms, not additional terminal inputs. - `experimental/proximity_prize_results_v4.tex` is the current compact synthesis of proved partial results. It is exposition/status guidance, not a replacement proof source for a live atom or adjacent-row closure. - A schema/hash pass is structural preflight only. The trusted-source registry is empty; parsing a manifest does not prove an atom. diff --git a/experimental/agents-log.md b/experimental/agents-log.md index 7de3cf744..e8bce3427 100644 --- a/experimental/agents-log.md +++ b/experimental/agents-log.md @@ -30,6 +30,538 @@ Keep entries concise and link to the relevant files. ## Entries +### 2026-08-13 - KoalaBear rank-ten margin/interleaving payment + +- **Agent/model:** Codex with two isolated mathematical audits. +- **Files added or changed:** experimental/grande_finale.tex, + experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md, + experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/, + experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py, + its Sage replay, and + experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/. +- **Status:** PROVED DIRECT BRANCH PAYMENT / EXACT METHOD WALL. Zero + active-v4 ledger movement; no KoalaBear closure. +- **What is being added:** A self-contained sub-square-root interleaving + theorem and a uniform high/low margin split. On the actual sextic line + field, error rank ten is paid at T=667 by + 61871313426765543, with slack 213109414684629544. +- **How it is useful:** It removes the first direction-exception terminal + left by the support-local theta router and proves the same scalar family + cannot pay rank eleven. +- **What to do next:** Attack the aggregate common-core/collision structure + among distinct minimizing pairs at rank eleven; the fixed-pair factor is + sharp and cannot be reduced from current hypotheses. + +### 2026-08-13 - Support-local theta and error-rank router + +- **Agent/model:** Codex with isolated mathematics and custody review. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md`, + `experimental/data/certificates/kb-mca-support-local-theta-router-v1/`, + `experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py`, + its Sage, FLINT, and Wolfram replays, + `experimental/campaigns/kb-mca-support-local-theta-post-1165/`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED LOCAL / CONDITIONAL DIRECT PAYMENT / ROUTE CUT. Zero + active-v4 ledger movement; no KoalaBear closure. +- **What is being added:** A strict support-local refinement of PR #1165's + proper-subspace compiler, with exact final factor `theta>=L`, plus an + arbitrary-rank reversible codeword gauge. Conditional on the separately + pinned intrinsic near-rational charge `2w=134944`, every selected + KoalaBear error family of affine rank at most 9 is paid by + `110390969172308040`; ranks 10--12 either pay or emit exact same-support + direction-exception ceilings `12`, `387`, and `12049` on the original + record after inverse gauge. +- **How it is useful:** It strengthens the safe post-#1165 compiler without + duplicating that PR's independent full-lift support-profile branch. It + converts the first unpaid ranks into concrete actual-support terminals. +- **What to do next:** Use the per-slope margin/interleaving split to pay + rank 10; ranks 11 and 12 remain separate terminals. + +### 2026-08-13 - Mersenne base-field component descent + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_common_factor_base_field_descent_v1.md`, + `experimental/verify_mca_full_lift_common_factor_base_field_descent_v1.py`, + `experimental/audit_mca_full_lift_common_factor_base_field_descent_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / STRUCTURAL ROUTER / BASE-FIELD NORMALIZATION. +- **What is being added:** Characteristic-guarded conjugation and Bezout + bound the total selected mass living only on non-base-field geometric + components by `d^2`. +- **How it is useful:** At least 5,079 selected pairs now lie on + `F(X)`-defined components, one such component carries at least 132, and + their union leaves at most 3,974 inside exceptions. +- **What to do next:** Classify the base-field components, retaining the + possibility of a reducible union. + +### 2026-08-13 - Mersenne common-factor weighted-degree bound + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_common_factor_weighted_degree_bound_v1.md`, + `experimental/verify_mca_full_lift_common_factor_weighted_degree_bound_v1.py`, + `experimental/audit_mca_full_lift_common_factor_weighted_degree_bound_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / STRUCTURAL ROUTER / WEIGHTED-DEGREE BOUND. +- **What is being added:** Kernel quotient dimension and the exact + `M(46)<938<=M(47)` threshold force full-gcd weighted degree at most + 217 and `(Y,Z)` degree at most 43. +- **How it is useful:** The higher-degree branch now carries at least 5,083 + sections and 126,266 inside factor points, leaving at most 3,971 + exceptions. +- **What to do next:** Classify the possibly reducible degree-2--43 gcd or + pay the separate MCA projective-star population. + +### 2026-08-13 - Mersenne linear-factor projective-star router + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_linear_factor_projective_star_router_v1.md`, + `experimental/verify_mca_full_lift_linear_factor_projective_star_router_v1.py`, + `experimental/audit_mca_full_lift_linear_factor_projective_star_router_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / STRUCTURAL ROUTER / LINEAR-FACTOR CLASSIFICATION. +- **What is being added:** Polynomial-section parameterization and an exact + ordinary-Johnson cap of 802 exclude every nonconstant-coefficient linear + factor against the 4,982 captured sections. +- **How it is useful:** The only degree-one survivor is an `F`-rational + projective star; the complementary factor branch has degree at least two. +- **What to do next:** Prove the primitive-star population bound or classify + and charge the higher-degree factor branch. + +### 2026-08-13 - Mersenne common-factor mass router + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_common_factor_mass_router_v1.md`, + `experimental/verify_mca_full_lift_common_factor_mass_router_v1.py`, + `experimental/audit_mca_full_lift_common_factor_mass_router_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / STRUCTURAL ROUTER / FACTOR CONCENTRATION. +- **What is being added:** Cofactor Bezout captures at least 4,982 of the + 7,583 selected pairs on the full interpolation factor; core incidence + puts the received pair on it at least 126,188 times. +- **How it is useful:** The first Mersenne residual now has at most 4,049 + inside exceptions to one degree-at-most-52 factor relation. +- **What to do next:** Classify or charge that near-total factor without + assuming irreducibility, rationality, or split-pencil form. + +### 2026-08-13 - Mersenne interpolation common-factor router + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_interpolation_common_factor_router_v1.md`, + `experimental/verify_mca_full_lift_interpolation_common_factor_router_v1.py`, + `experimental/audit_mca_full_lift_interpolation_common_factor_router_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / STRUCTURAL ROUTER / COPRIME BRANCH PAYMENT. +- **What is being added:** A 938-dimensional weight-264 interpolation + kernel and a `2705>52^2` Bezout contradiction pay the coprime branch at + Mersenne support `e=130237`. +- **How it is useful:** Every unsafe survivor now forces a common factor of + positive `(Y,Z)` degree over the algebraic closure of `F(X)`. +- **What to do next:** Classify and charge that factor; do not assume without + proof that it is a split pencil. + +### 2026-08-13 - Mersenne exact-layer slot-core packing + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_exact_layer_slot_core_packing_v1.md`, + `experimental/verify_mca_full_lift_exact_layer_slot_core_packing_v1.py`, + `experimental/audit_mca_full_lift_exact_layer_slot_core_packing_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / ELEVEN-SUPPORT PAYMENT. +- **What is being added:** Exact-layer incidence forces a selected + `lambda`-member affine explanation slot to have inside core at least + `ceil((lambda*h-e)/(lambda-1))`. +- **How it is useful:** Combined with the capped-core dichotomy, three lines + pay every Mersenne support `130226<=e<=130236`. +- **What to do next:** Control the size-two primitive shift-pair bank at + `e=130237`, or bridge to the high-support interval. + +### 2026-08-13 - Mersenne core-dichotomy capped charge + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_core_dichotomy_capped_charge_v1.md`, + `experimental/verify_mca_full_lift_core_dichotomy_capped_charge_v1.py`, + `experimental/audit_mca_full_lift_core_dichotomy_capped_charge_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / FOUR-SUPPORT PAYMENT. +- **What is being added:** A selected line either has enough actual core for + weighted-prefix absorption of the original family or belongs to a + complementary capped convex envelope. +- **How it is useful:** It pays Mersenne supports `130222<=e<=130225`; the + low-core branch closes by 14-line or 70-line inside-core packing. +- **What to do next:** Replace the threshold-14 zero-core wall at `e=130226` + or bridge to the high-support interval. + +### 2026-08-13 - Mersenne lower-aware joint-core charge + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_lower_aware_joint_core_charge_v1.md`, + `experimental/verify_mca_full_lift_lower_aware_joint_core_charge_v1.py`, + `experimental/audit_mca_full_lift_lower_aware_joint_core_charge_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / TWO-SUPPORT PAYMENT. +- **What is being added:** A majorization envelope retains every forced + total-core lower bound when maximizing the convex charge of previously + peeled parameterized lines. +- **How it is useful:** It pays Mersenne supports `e=130220,130221`; both + terminate after 38 lines with packing lower bound `142893`. +- **What to do next:** Add structure beyond first-order pairwise core + intersections at the adjacent residual-base wall `e=130222`, or bridge to + the high-support interval. + +### 2026-08-13 - Mersenne joint-core charge peeling + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_joint_core_charge_peeling_v1.md`, + `experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.py`, + `experimental/audit_mca_full_lift_joint_core_charge_peeling_v1.py`, + `experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.c`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / INTERVAL PAYMENT. +- **What is being added:** Pairwise core geometry bounds the sum of the + actual cores of all peeled parameterized lines. Convex concentration then + gives a joint line charge that replaces the independent worst-case charge. +- **How it is useful:** It pays all 21 Mersenne supports + `130199<=e<=130219`; the endpoint uses 13 lines and packing lower bound + `134835>130219`. +- **What to do next:** Add structure for the zero-core line population at + the adjacent method wall `e=130220` or bridge to the high-support interval. + +### 2026-08-13 - Mersenne recursive line-peeling core-packing interval + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_recursive_line_peeling_core_packing_v1.md`, + `experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.py`, + `experimental/audit_mca_full_lift_recursive_line_peeling_core_packing_v1.py`, + `experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.c`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / INTERVAL PAYMENT. +- **What is being added:** Repeatedly remove a forced parameterized affine + explanation line. The residual either enters the exact weighted prefix or + produces distinct inside cores whose pairwise intersections are at most + `K-1`, contradicting support-size packing. +- **How it is useful:** It pays all `5,393` Mersenne supports + `124806<=e<=130198`; `3,837` terminate by prefix and `1,556` by core + packing, with at most five lines. +- **What to do next:** Replace the residual-base obstruction at the adjacent + method wall `e=130199` or bridge toward the high-support interval. + +### 2026-08-13 - Mersenne boundary-line-bank absorption interval + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_boundary_line_bank_absorption_v1.md`, + `experimental/verify_mca_full_lift_boundary_line_bank_absorption_v1.py`, + `experimental/audit_mca_full_lift_boundary_line_bank_absorption_v1.py`, + `experimental/verify_mca_full_lift_boundary_line_bank_absorption_v1.c`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / INTERVAL PAYMENT. +- **What is being added:** Every exact-layer direction class is retained as + an affine-line slot. Unsafe pigeonhole forces one large line, and + total-core absorption pays the remaining explanations. +- **How it is useful:** It pays all `23,649` Mersenne supports + `101157<=e<=124805`; the endpoint bound is `16706559<16777215`. +- **What to do next:** Sharpen the low-list payment at the adjacent method + wall `e=124806` or bridge toward the high-support interval. + +### 2026-08-13 - Mersenne fixed-cutoff residue-two anchor repair + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.md`, + `experimental/verify_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py`, + `experimental/audit_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / SUPPORT PAYMENT. +- **What is being added:** At the first fixed-cutoff wall, residue two lets + two top anchors absorb both boundary layers. The zero/one-top cases use + an outside-core line cap or pairwise-disjoint missed-set cap. +- **How it is useful:** The largest of five exhaustive bounds is + `16705799<16777215`, paying Mersenne support `e=101156`. +- **What to do next:** Treat the residue-zero support `e=101157`; no unsafe + certificate is claimed there. + +### 2026-08-13 - Mersenne fixed-cutoff boundary-stack interval + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_fixed_cutoff_boundary_stack_v1.md`, + `experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.py`, + `experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.c`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / INTERVAL PAYMENT. +- **What is being added:** A fixed deficit cutoff combines an independently + truncated prefix, normalized-direction class caps for every intermediate + exact layer, and the synchronized top line; unsafe-core absorption handles + the final six supports. +- **How it is useful:** It pays all 2,924 Mersenne full-lift supports + `98232<=e<=101155`; the endpoint bound is `3813469<16777215`. +- **What to do next:** Replace the fixed-cutoff forcing wall at `e=101156`, + where the same charge exceeds budget by `174008`. + +### 2026-08-13 - Mersenne residue-zero common-core absorption + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_residue_zero_core_absorption_v1.md`, + `experimental/verify_mca_full_lift_residue_zero_core_absorption_v1.py`, + `experimental/audit_mca_full_lift_residue_zero_core_absorption_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / SUPPORT PAYMENT. +- **What is being added:** The near-maximal core forced by the residue-zero + router synchronizes every assigned explanation of deficit at least + `30791` onto the same line. One punctured Johnson cap bounds the lower + explanations by `26`. +- **How it is useful:** The contradiction bound + `98232*26+981129=3535161<16777215` pays Mersenne full-lift support + `e=98232` and moves the residual floor to `e=98233`. +- **What to do next:** Test the same unsafe-core absorption compiler at + `e=98233` and locate its exact interval wall. + +### 2026-08-13 - Mersenne residue-zero direction-class router + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_residue_zero_direction_router_v1.md`, + `experimental/verify_mca_full_lift_residue_zero_direction_router_v1.py`, + `experimental/audit_mca_full_lift_residue_zero_direction_router_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION / STRUCTURAL ROUTER. +- **What is being added:** A constant-block Johnson count permits at most + three normalized direction classes in the first residue-zero boundary + layer; outside-core line packing then caps that layer at `1450`. +- **How it is useful:** Any unsafe Mersenne family at `e=98232` must put at + least `343071` slopes on the synchronized top line, forcing its common + core to have size at least `m-2`. +- **What to do next:** Apply the successor common-core absorption theorem. + The router itself makes no safety or unsafety claim at this support. + +### 2026-08-13 - Mersenne residue-two boundary continuation + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_two_boundary_layer_continuation_v1.md`, + `experimental/verify_mca_full_lift_two_boundary_layer_continuation_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** A residue-two case split synchronizes two boundary + layers when two top anchors exist and otherwise prices the first boundary + by an outside-core line or a pairwise-disjoint missed-set cap. +- **How it is useful:** It pays Mersenne-31 at `e=98231` by `16486411`, + leaving slack `290804`, and moves the residual floor to `e=98232`. +- **What to do next:** Treat the residue-zero boundary defect or replace the + KoalaBear mean-centered endpoint chord. + +### 2026-08-13 - Mersenne boundary-anchor continuation + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_boundary_anchor_continuation_v1.md`, + `experimental/verify_mca_full_lift_boundary_anchor_continuation_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** A two-anchor case split absorbs the first exact + boundary layer beyond the synchronized top-third union when + `e-K mod 3` is nonzero. +- **How it is useful:** It pays Mersenne-31 at `e=98230` by `16487313`, + leaving slack `289902`, and moves the residual floor to `e=98231`. +- **What to do next:** Replace the rapidly growing boundary prefix at + `e=98231` or discharge the support-local rank-10 exception forest. + +### 2026-08-13 - Full-lift mean-centered global-line profile + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_mean_centered_global_line_profile_v1.md`, + `experimental/verify_mca_full_lift_mean_centered_global_line_profile_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** The full suffix-minimum Johnson/mean-centered + prefix is composed with the one-time cross-layer global-line charge, + including the explicit `A_H>K-1` full-lift scope guard. +- **How it is useful:** It moves the residual floors to `e=96151` on + KoalaBear and `e=98230` on Mersenne-31. +- **What to do next:** Replace the failed KoalaBear endpoint chord or save + `638658` at the first unpaid Mersenne support. + +### 2026-08-13 - Full-lift cross-layer global-line synchronization + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_top_third_global_line_payment_v1.md`, + `experimental/verify_mca_full_lift_top_third_global_line_payment_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** The top-third triple-overlap argument synchronizes + all exact high-deficit layers onto one affine explanation line, so the + pair-noncontained total-core cap `N-m+1` is charged once rather than once + per layer. +- **How it is useful:** It moves the Mersenne-31 full-lift residual floor + from `e=67453` to `e=97909`; the KoalaBear floor remains `e=95944`, but + its endpoint profile drops to `6336049`. +- **What to do next:** Replace the common low-agreement Johnson prefix at + `H`; both rows now stop at an adjacent nonpositive prefix denominator. + +### 2026-08-13 - Full-lift top-third common-core continuation + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_full_lift_top_third_common_core_payment_v1.md`, + `experimental/verify_mca_full_lift_top_third_common_core_payment_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** A pair-noncontained total-core cap for affine + explanation lines whose outside agreement is at most `K-1`, followed by + the full-lift top-third profile. +- **How it is useful:** It moves the residual floors to `e=95944` on + KoalaBear and `e=67453` on Mersenne-31. +- **What to do next:** Replace the failed low-agreement Johnson prefix on + KoalaBear and save `470852` at the first unpaid Mersenne support. + +### 2026-08-13 - Top-third affine-line sparse-direction branch close + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_sparse_direction_top_third_affine_line_payment_v1.md`, + `experimental/verify_mca_sparse_direction_top_third_affine_line_payment_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** A triple-overlap theorem putting every exact + high-deficit layer on one affine codeword line, plus a top-third + exact-layer/profile compiler. +- **How it is useful:** It pays every sparse-direction support `e=d`. Support-only ordinary-list bounds have now completed their + natural branch. + +### 2026-08-13 - Terminal-deficit affine-line payment + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_sparse_direction_terminal_deficit_line_payment_v1.md`, + `experimental/verify_mca_sparse_direction_terminal_deficit_line_payment_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** An affine-codeword-line theorem for the exact + terminal deficit layer of the sparse-direction compiler, plus a + prefix-plus-terminal slope profile. +- **How it is useful:** It pays one further support in each deployed row, + moving the low-support walls to `e=64048` on KoalaBear and `e=65455` on + Mersenne-31, with profile bounds `181326343` and `16100647`. +- **What to do next:** Control the last several high-deficit layers jointly + or retain the full-lift near-MDS extension structure. KoalaBear + `e=64049` lacks the penultimate cumulative cap; Mersenne `e=65456` remains + valid but over budget by `342292`. + +### 2026-08-13 - Mean-centered Gram profile + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_sparse_direction_mean_centered_gram_profile_v1.md`, + `experimental/verify_mca_sparse_direction_mean_centered_gram_profile_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** A PSD incidence Gram theorem centered at the + block mean, plus the suffix-minimum closure needed to combine its raw + cumulative caps with the positive-Johnson caps. +- **How it is useful:** It strengthens the preceding centered-Gram rung and + extends the low-support walls to `e=64047` on KoalaBear and `e=65454` on + Mersenne-31. The endpoint profiles are `181731868` and `16101127`. +- **What to do next:** KoalaBear `e=64048` lies beyond the positive PSD + chord denominator. Mersenne `e=65455` remains theorem-legal but misses + budget by `342908`. Neither failure is an unsafe certificate. + +### 2026-08-13 - Near-Johnson centered-Gram payment + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_sparse_direction_near_johnson_gram_rank_v1.md`, + `experimental/verify_mca_sparse_direction_near_johnson_gram_rank_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** A centered incidence-Gram rank bound for + equal-size ordinary-list agreement blocks in the first post-Johnson + regime, followed by a two-threshold sparse-direction slope compiler. +- **How it is useful:** It extends the low-support payments from `63908` to + `64037` on KoalaBear and from `65236` to `65418` on Mersenne-31. The + endpoint slope bounds are `198047217` and `16759641`. +- **What to do next:** A stronger post-Johnson list theorem is needed at + KoalaBear `e=64038`; at Mersenne `e=65419`, the Gram theorem remains valid + but misses budget by `1434789`. Neither failure is an unsafe certificate. + +### 2026-08-13 - Sparse-direction punctured Johnson profile + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_sparse_direction_punctured_johnson_profile_v1.md`, + `experimental/verify_mca_sparse_direction_punctured_johnson_profile_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED / EXACT FINITE CALIBRATION. +- **What is being added:** A field-general ordinary-list Johnson incidence + cap after puncturing the codeword-gauged direction support, combined with + the deficit-dependent `floor(e/h)` slope-owner profile. Exact arithmetic + pays `e<=63908` on KoalaBear and `e<=65236` on Mersenne-31, against the + previous top-rank low-support walls `e<=5` and `e<=1`. +- **How it is useful:** It removes over sixty thousand support values from + each top-rank MCA residual without using the refuted affine-incidence + denominator. The full-lift middle intervals are now exactly + `63909<=e<=1044238` and `65237<=e<=1044241`. +- **What to do next:** Attack the adjacent nonpositive-Johnson strip using + the codimension-one near-MDS extension structure or a row-sharp + post-Johnson list theorem. Denominator failure is not an unsafe-row + certificate. + +### 2026-08-13 - Affine-span MCA compiler repair and top-rank split + +- **Agent/model:** Codex. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/mca_affine_span_incidence_counterexample_v1.md`, + `experimental/verify_mca_affine_span_incidence_counterexample_v1.py`, + `experimental/verify_mca_affine_span_incidence_counterexample_v1_independent.py`, + `experimental/verify_mca_proper_subspace_occupancy_compiler_v1.py`, + `experimental/verify_mca_full_explanation_lifted_rank_gauge_dichotomy_v1.py`, + `agents.md`, and `experimental/agents-log.md`. +- **Status:** PROVED COUNTEREXAMPLE / PROVED REPLACEMENT / ROUTE CUT. +- **What is being added:** An exact `GF(1009)` Reed--Solomon received line + with 31 direction-separated MCA-bad slopes against the affine-span + compiler's claimed bound 23. Two independently structured verifiers + reconstruct every maximal support and same-support pair-noncontainment + check. +- **How it is useful:** It retracts `thm:affine-span-mca` and the dependent + active-row MCA rank payments while identifying the precise missing input: + local full incident rank does not bound proper-subspace occupancy of the + incident normals. The corrected `thm:proper-subspace-mca` proves the + valid bound with final factor `max(1,e-(n-m))`, fully paying the first + KoalaBear ranks through nine and Mersenne rank one and printing the exact + remaining support walls. The full-explanation lifted-rank dichotomy then + proves that each top cell has only two branches: lifted rank `K`, where an + affine hyperplane of codeword gauges drops explanation rank to `K-1`, and + lifted rank `K+1`, where no gauge drops rank. This pays the rank-drop + suffixes at `e>=992852` and `e>=1037876` while isolating the full-lift + middle intervals as the true remaining top-rank residuals. The additional + near-MDS extension theorem proves that `W=C+` has first generalized + weight `e` and every higher weight MDS-sharp. Its generic endpoint bound + still exceeds both budgets, ruling out another weight-hierarchy replay as + a closure route. +- **What to do next:** Replace the false ordered-basis denominator by a + sharper aggregate theorem, or route the remaining top-rank K3 cells + through a different slope compiler. The common-core cancellation and + ordinary affine-span LIST results are unaffected. The selector-free + all-LineRay error-affine-core set-pair theorem is also unaffected: it uses + a zero-mask/Bollobas argument, not the rejected incidence denominator. + ### 2026-07-29 - Reviewed PR integration wave 1087--1120 - **Agent/model:** Codex, selectively integrating static-review results from @@ -3682,3 +4214,28 @@ Keep entries concise and link to the relevant files. - **What to do next:** Run verifiers and audits on the integrated material, review mathematical notes before promotion, and close the original PRs as manually integrated once the integration commit is pushed. + +### 2026-08-13 - KoalaBear rank-eleven pair/core route cut + +- **Agent/model:** Codex with isolated exploration, adversarial, upstream, and + review lanes. +- **Exact parent:** PR #1167 head + `491ccdf53d54846f5a013b808960645275c64ed3`. +- **Files added or changed:** `experimental/grande_finale.tex`, + `experimental/notes/thresholds/kb_mca_rank11_pair_core_route_cut_v1.md`, + exact Python/Sage verifiers, canonical certificate packet, research + campaign, `agents.md`, and this log. +- **Status:** PROVED LOCAL ROUTE CUT / ZERO DEPLOYED LEDGER MOVEMENT. +- **What is being added:** A nonuniform support-margin resource theorem, an + actual fixed minimizing-pair compiler, exact rank-eleven terminals + `weight >= 743449148, deficiency <= 8` and + `slopes >= 200632, deficiency <= 4`, and two exact core-deficiency method + ceilings. Neither ceiling fits the KoalaBear budget. +- **Controls:** normal and optimized Python, hostile mutations, exact Sage + parallel-star sharpness, Wolfram integer replay, full TeX compilation, and + a targeted 55-result Exa literature sweep with no imported lemma. +- **Nonclaim:** Error rank eleven remains unpaid; no active-v4 atom moves and + KoalaBear is not closed. +- **What to do next:** Prove a same-line cross-pair collision theorem or a + chronology-correct owner for dense parallel pair cores. Another scalar + threshold or smaller per-pair multiplier is ruled out. diff --git a/experimental/audit_mca_full_lift_boundary_line_bank_absorption_v1.py b/experimental/audit_mca_full_lift_boundary_line_bank_absorption_v1.py new file mode 100644 index 000000000..182af69be --- /dev/null +++ b/experimental/audit_mca_full_lift_boundary_line_bank_absorption_v1.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +"""Independent endpoint audit of the M31 boundary line bank.""" + + +def replay(e: int, prefix: int, layers: int, groups: int, + budget: int = 16777215) -> tuple[int, ...]: + base = prefix + layers - groups + required = budget - base + 1 + threshold = (required + groups - 1) // groups + N, m, c, K = 1048582, 67454, 5, 6 + core = (threshold * m - N + threshold - 2) // (threshold - 1) + inside = core - c + sync = e - inside + K + agreement = m - sync + 1 + n = N - e + low = n * (agreement - c) // (agreement * agreement - n * c) + bound = e * low + (N - m + 1) + return base, threshold, core, inside, sync, agreement, low, bound + + +def main() -> None: + last = replay(124805, 1636955, 2182, 34560) + adjacent = replay(124806, 1636968, 2182, 34564) + assert last == ( + 1604577, 440, 65220, 65215, 59596, 7859, 126, 16706559) + assert adjacent == ( + 1604586, 439, 65214, 65209, 59603, 7852, 127, 16831491) + assert 16777215 - last[-1] == 70656 + assert adjacent[-1] - 16777215 == 54276 + assert 124805 - 101157 + 1 == 23649 + print( + "MCA_FULL_LIFT_BOUNDARY_LINE_BANK_ABSORPTION_V1_AUDIT_PASS " + "last=124805 slack=70656 adjacent_excess=54276" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_common_factor_base_field_descent_v1.py b/experimental/audit_mca_full_lift_common_factor_base_field_descent_v1.py new file mode 100644 index 000000000..ffb10d0b4 --- /dev/null +++ b/experimental/audit_mca_full_lift_common_factor_base_field_descent_v1.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +"""Independent degree-partition audit of base-field descent.""" + + +def partitions(total: int, maximum: int | None = None): + if total == 0: + yield () + return + maximum = total if maximum is None else min(maximum, total) + for first in range(maximum, 0, -1): + for tail in partitions(total - first, first): + yield (first,) + tail + + +def main() -> None: + checks = 0 + records = [] + for degree in range(2, 44): + captured = 7583 - (52 - degree) ** 2 + retained = captured - degree**2 + records.append((degree, retained, (retained + degree - 1) // degree)) + for partition in partitions(degree): + assert sum(partition) == degree + assert sum(part * part for part in partition) <= degree**2 + checks += 2 + assert min(record[1] for record in records) == 5079 + assert min(record[2] for record in records) == 132 + numerator = 5079 * 807**2 + denominator = 807 + 5 * (5079 - 1) + points = (numerator + denominator - 1) // denominator + assert points == 126263 and 130237 - points == 3974 + print("MCA_FULL_LIFT_COMMON_FACTOR_BASE_FIELD_DESCENT_V1_AUDIT_PASS " + f"checks={checks + 7 * len(records) + 17} " + "degree_partitions=2..43") + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_common_factor_mass_router_v1.py b/experimental/audit_mca_full_lift_common_factor_mass_router_v1.py new file mode 100644 index 000000000..2c6f8001f --- /dev/null +++ b/experimental/audit_mca_full_lift_common_factor_mass_router_v1.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +"""Independent audit of the M31 common-factor mass router.""" + +from fractions import Fraction + + +def main() -> None: + n, m, e, c, total = 1048582, 67454, 130237, 5, 16777215 + lines, lower, cap = 7582, 807, 64796 + budget = min(lines * cap, e + lines * (lines + 1) * c // 2) + lower_sum = lines * lower + full, remainder = divmod(budget - lower_sum, cap - lower) + value = full * Fraction(n - cap, m - cap) + value += Fraction(n - lower - remainder, m - lower - remainder) + value += (lines - full - 1) * Fraction(n - lower, m - lower) + charge = value.numerator // value.denominator + assert (budget, lower_sum, full, remainder) == ( + 143866002, 6118674, 2152, 43000) + assert charge == 881897 + target = total - charge + assert target == 15895318 + assert (target - 13961576 + 1933560) // 1933560 == 2 + + records = [] + for factor_degree in range(1, 53): + off = (52 - factor_degree) ** 2 + on = 7583 - off + points = (on * lower * lower + lower + c * (on - 1) - 1) // ( + lower + c * (on - 1)) + records.append((factor_degree, off, on, points)) + assert records[0] == (1, 2601, 4982, 126188) + assert records[-1] == (52, 0, 7583, 127552) + assert all(records[i][2] < records[i + 1][2] + and records[i][3] <= records[i + 1][3] + for i in range(51)) + assert e - records[0][3] == 4049 + print("MCA_FULL_LIFT_COMMON_FACTOR_MASS_ROUTER_V1_AUDIT_PASS " + f"checks={len(records) * 4 + 23} factor_degrees=52") + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_common_factor_weighted_degree_bound_v1.py b/experimental/audit_mca_full_lift_common_factor_weighted_degree_bound_v1.py new file mode 100644 index 000000000..83e481397 --- /dev/null +++ b/experimental/audit_mca_full_lift_common_factor_weighted_degree_bound_v1.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +"""Independent enumeration of the weighted-degree and factor-mass bounds.""" + + +def count(degree: int) -> int: + answer = 0 + for y_degree in range(degree // 5 + 1): + for z_degree in range(degree // 5 - y_degree + 1): + answer += degree - 5 * (y_degree + z_degree) + 1 + return answer + + +def main() -> None: + table = [count(degree) for degree in range(265)] + assert table[46:48] == [935, 990] + assert all(value < 938 for value in table[:47]) + first = next(index for index, value in enumerate(table) if value >= 938) + assert 264 - first == 217 + + records = [] + for degree in range(2, 44): + pairs = 7583 - (52 - degree) ** 2 + numerator = pairs * 807**2 + denominator = 807 + 5 * (pairs - 1) + points = (numerator + denominator - 1) // denominator + records.append((degree, pairs, points, 130237 - points)) + assert records[0] == (2, 5083, 126266, 3971) + assert max(record[3] for record in records) == 3971 + print("MCA_FULL_LIFT_COMMON_FACTOR_WEIGHTED_DEGREE_BOUND_V1_AUDIT_PASS " + f"checks={len(table) + 6 * len(records) + 19} " + "quotient_degrees=0..264 factor_degrees=2..43") + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_core_dichotomy_capped_charge_v1.py b/experimental/audit_mca_full_lift_core_dichotomy_capped_charge_v1.py new file mode 100644 index 000000000..e7af15583 --- /dev/null +++ b/experimental/audit_mca_full_lift_core_dichotomy_capped_charge_v1.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +"""Independent exact audit of the M31 core-dichotomy endpoints.""" + +from __future__ import annotations + +from fractions import Fraction + + +N, M, C, BUDGET = 1048582, 67454, 5, 16777215 +LINE = N - M + 1 + + +def charge(e: int, lower: list[int], cap: int) -> int: + count = len(lower) + if count == 0: + return 0 + budget = min(count * cap, e + count * (count + 1) * C // 2) + values = sorted(lower, reverse=True) + excess = budget - sum(values) + for index, value in enumerate(values): + addition = min(excess, cap - value) + values[index] += addition + excess -= addition + if excess == 0: + break + assert excess == 0 + value = sum((Fraction(N - x, M - x) for x in values), Fraction()) + return value.numerator // value.denominator + + +def core(threshold: int) -> tuple[int, int]: + numerator = threshold * M - N + total = (0 if numerator <= 0 else + (numerator + threshold - 2) // (threshold - 1)) + return total, max(total - C, 0) + + +def paid(e: int, cap: int, base: int, groups: int, + threshold: int, lines: int, expected_packing: int, + absorption_prefix: int) -> int: + assert absorption_prefix + LINE < BUDGET + cores: list[int] = [] + insides: list[int] = [] + for _ in range(lines): + target = BUDGET - charge(e, cores, cap) + assert (target - base + 1 + groups - 1) // groups == threshold + total, inside = core(threshold) + cores.append(total) + insides.append(inside) + packing = sum(insides) - len(insides) * (len(insides) - 1) * C // 2 + assert packing == expected_packing > e + return 7 + 4 * lines + + +def main() -> None: + checks = paid(130222, 64781, 12148280, 260580, 18, 14, 135849, 4180178) + checks += paid(130223, 64782, 12138824, 269480, 18, 14, 135849, 4180156) + checks += paid(130224, 64783, 12702685, 260602, 16, 70, 130795, 4180145) + checks += paid(130225, 64784, 12693152, 269520, 16, 70, 130795, 4180124) + + e, cap, lines = 130226, 64785, 14763 + budget = min(lines * cap, e + lines * (lines + 1) * C // 2) + full, remainder = divmod(budget, cap) + value = full * Fraction(N - cap, M - cap) + value += Fraction(N - remainder, M - remainder) + value += (lines - full - 1) * Fraction(N, M) + wall_charge = value.numerator // value.denominator + assert (budget, full, remainder) == (545032556, 8412, 61136) + assert wall_charge == 3199542 + target = BUDGET - wall_charge + assert target == 13577673 + assert (target - 13317279 + 1 + 260627 - 1) // 260627 == 1 + assert core(14) == (0, 0) + assert 4180114 + LINE == 5161243 < BUDGET + print("MCA_FULL_LIFT_CORE_DICHOTOMY_CAPPED_CHARGE_V1_AUDIT_PASS " + f"checks={checks + 15} exact_rational_replay=1") + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_exact_layer_slot_core_packing_v1.py b/experimental/audit_mca_full_lift_exact_layer_slot_core_packing_v1.py new file mode 100644 index 000000000..c42265780 --- /dev/null +++ b/experimental/audit_mca_full_lift_exact_layer_slot_core_packing_v1.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +"""Independent audit of the M31 exact-layer slot-core payment.""" + +from __future__ import annotations + +from fractions import Fraction + + +N, M, C, BUDGET = 1048582, 67454, 5, 16777215 + +ROWS = ( + (130226, 65516, 342025, 12064635, 64785, 14, 60540, 181605), + (130227, 65516, 1217008, 11189097, 64786, 5, 49340, 148005), + (130228, 65517, 342446, 12618406, 64787, 13, 60126, 180363), + (130229, 65517, 1305245, 11654992, 64788, 4, 43948, 131829), + (130230, 65518, 342865, 13232329, 64789, 11, 59048, 177129), + (130231, 65518, 1412234, 12162277, 64790, 4, 43949, 131832), + (130232, 65519, 343295, 13916749, 64791, 9, 57431, 172278), + (130233, 65520, 301252, 14727874, 64792, 7, 54736, 164193), + (130234, 65520, 343725, 14684553, 64793, 7, 54736, 164193), + (130235, 65521, 301391, 15595686, 64794, 4, 43951, 131838), + (130236, 65521, 344160, 15551952, 64795, 4, 43951, 131838), +) + + +def capped_charge(e: int, lower: list[int], cap: int) -> int: + if not lower: + return 0 + count = len(lower) + budget = min(count * cap, e + count * (count + 1) * C // 2) + values = sorted(lower, reverse=True) + excess = budget - sum(values) + for index, value in enumerate(values): + addition = min(excess, cap - value) + values[index] += addition + excess -= addition + if excess == 0: + break + assert excess == 0 + value = sum((Fraction(N - core, M - core) for core in values), + Fraction()) + return value.numerator // value.denominator + + +def main() -> None: + checks = 0 + for (e, cutoff, groups, base, cap, expected_threshold, + expected_inside, expected_packing) in ROWS: + lower: list[int] = [] + for _ in range(3): + target = BUDGET - capped_charge(e, lower, cap) + threshold = (target - base + groups) // groups + assert threshold == expected_threshold + inside = (threshold * (cutoff + 1) - e + threshold - 2) // (threshold - 1) + assert inside == expected_inside + lower.append(inside) + checks += 4 + packing = sum(lower) - len(lower) * (len(lower) - 1) * C // 2 + assert packing == expected_packing > e + checks += 4 + + e, cutoff, groups, base, cap, lower, lines = ( + 130237, 65521, 1933560, 13961576, 64796, 807, 7583) + assert 2 * (cutoff + 1) - e == lower + maximum = max(s * lower - s * (s - 1) * C // 2 + for s in range(1, 1000)) + assert maximum == 65529 < e + budget = min(lines * cap, e + lines * (lines + 1) * C // 2) + lower_sum = lines * lower + full, remainder = divmod(budget - lower_sum, cap - lower) + value = full * Fraction(N - cap, M - cap) + value += Fraction(N - lower - remainder, M - lower - remainder) + value += (lines - full - 1) * Fraction(N - lower, M - lower) + charge = value.numerator // value.denominator + assert (budget, lower_sum, full, remainder) == ( + 143903917, 6119481, 2153, 16119) + assert charge == 882245 + target = BUDGET - charge + assert target == 15894970 + assert (target - base + groups) // groups == 1 + print("MCA_FULL_LIFT_EXACT_LAYER_SLOT_CORE_PACKING_V1_AUDIT_PASS " + f"checks={checks + 17} exact_rational_replay=1") + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py b/experimental/audit_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py new file mode 100644 index 000000000..8062a2771 --- /dev/null +++ b/experimental/audit_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +"""Independent constant audit of the M31 fixed-cutoff q=2 repair.""" + + +def main() -> None: + budget, forcing, d1, d2 = 16777215, 16895280, 284224, 258385 + lower = forcing - d1 - d2 + threshold = budget - lower + 1 + assert (lower, threshold) == (16352671, 424545) + cases = ( + 3813497, + forcing - d1 + 94742 + 1, + forcing - d1 + 2, + forcing - d1 + 94742, + forcing - d1 + 3, + ) + assert cases == ( + 3813497, 16705799, 16611058, 16705798, 16611059) + assert max(cases) == 16705799 + assert budget - max(cases) == 71416 + assert (101157 - 6) % 3 == 0 + print( + "MCA_FULL_LIFT_FIXED_CUTOFF_Q2_ANCHOR_REPAIR_V1_AUDIT_PASS " + "bound=16705799 slack=71416 adjacent_q=0" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_interpolation_common_factor_router_v1.py b/experimental/audit_mca_full_lift_interpolation_common_factor_router_v1.py new file mode 100644 index 000000000..42882dc2a --- /dev/null +++ b/experimental/audit_mca_full_lift_interpolation_common_factor_router_v1.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 +"""Independent exact audit of the M31 interpolation router.""" + +from fractions import Fraction + + +def main() -> None: + degree, weight, e = 264, 5, 130237 + monomials = 0 + checks = 0 + for j in range(53): + for k in range(53 - j): + monomials += degree - weight * (j + k) + 1 + checks += 1 + assert monomials == 131175 + assert monomials - e == 938 + assert 52**2 == 2704 + assert 807 > degree + + n, m, c, total = 1048582, 67454, 5, 16777215 + lines, lower, cap = 2704, 807, 64796 + budget = min(lines * cap, e + lines * (lines + 1) * c // 2) + lower_sum = lines * lower + full, remainder = divmod(budget - lower_sum, cap - lower) + value = full * Fraction(n - cap, m - cap) + value += Fraction(n - lower - remainder, m - lower - remainder) + value += (lines - full - 1) * Fraction(n - lower, m - lower) + charge = value.numerator // value.denominator + assert (budget, lower_sum, full, remainder) == ( + 18416037, 2182128, 253, 44692) + assert charge == 132203 + target = total - charge + assert target == 16645012 + assert (target - 13961576 + 1933560) // 1933560 == 2 + assert lines + 1 == 2705 > 52**2 + print("MCA_FULL_LIFT_INTERPOLATION_COMMON_FACTOR_ROUTER_V1_AUDIT_PASS " + f"checks={checks + 19} exact_replay=1") + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_joint_core_charge_peeling_v1.py b/experimental/audit_mca_full_lift_joint_core_charge_peeling_v1.py new file mode 100644 index 000000000..e4156ab18 --- /dev/null +++ b/experimental/audit_mca_full_lift_joint_core_charge_peeling_v1.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +"""Independent rational audit of the M31 joint-core charge endpoints.""" + +from __future__ import annotations + +from fractions import Fraction + + +N, M, C = 1048582, 67454, 5 +BUDGET, Q = 16777215, N - M + 1 + + +def charge(e: int, r: int) -> tuple[int, int, int, int]: + if r == 0: + return 0, 0, 0, 0 + budget = min(r * (M - 1), e + r * (r + 1) * C // 2) + full, remainder = divmod(budget, M - 1) + if full == r: + value = Fraction(r * Q, 1) + else: + left = r - full + value = Fraction(full * Q, 1) + value += Fraction(N - remainder, M - remainder) + value += (left - 1) * Fraction(N, M) + return value.numerator // value.denominator, budget, full, remainder + + +def inside(threshold: int) -> int: + numerator = threshold * M - N + core = 0 if numerator <= 0 else ( + numerator + threshold - 2) // (threshold - 1) + return max(core - C, 0) + + +def main() -> None: + assert charge(130199, 3) == (981355, 130229, 1, 62776) + first_inside = [inside(33)] + [inside(29)] * 3 + first_packing = sum(first_inside) - 6 * C + assert first_inside == [36789, 32409, 32409, 32409] + assert first_packing == 133986 > 130199 + + assert charge(130219, 12) == (981513, 130609, 1, 63156) + last_inside = [inside(21)] + [inside(18)] * 12 + last_packing = sum(last_inside) - 78 * C + assert last_inside == [18393] + [9736] * 12 + assert last_packing == 134835 > 130219 + + assert charge(130220, 42) == (987456, 134735, 1, 67282) + assert charge(130220, 43) == (1962895, 134950, 2, 44) + wall_inside = [inside(20)] + [inside(16)] * 42 + wall_packing = sum(wall_inside) - 903 * C + assert wall_inside == [15811] + [2041] * 42 + assert wall_packing == 97018 <= 130220 + assert inside(13) == 0 + assert BUDGET - charge(130220, 43)[0] == 14814320 + + print( + "MCA_FULL_LIFT_JOINT_CORE_CHARGE_PEELING_V1_AUDIT_PASS " + "first=130199 last=130219 wall=130220" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_linear_factor_projective_star_router_v1.py b/experimental/audit_mca_full_lift_linear_factor_projective_star_router_v1.py new file mode 100644 index 000000000..99b6632a2 --- /dev/null +++ b/experimental/audit_mca_full_lift_linear_factor_projective_star_router_v1.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +"""Independent exact audit of the linear-factor Johnson split.""" + + +def main() -> None: + e, agreement, captured = 130237, 807, 4982 + expected = ( + (0, 651249, 161), (1, 521012, 201), (2, 390775, 268), + (3, 260538, 401), (4, 130301, 802), (5, 64, 1632032), + ) + records = [] + checks = 0 + for degree in range(6): + denominator = agreement * agreement - e * degree + numerator = e * (agreement - degree) + cap, remainder = divmod(numerator, denominator) + assert denominator > 0 and remainder >= 0 + assert cap * denominator <= numerator < (cap + 1) * denominator + records.append((degree, denominator, cap)) + checks += 10 + assert tuple(records) == expected + assert max(row[2] for row in records[:5]) == 802 < captured + assert records[5][2] > captured + print("MCA_FULL_LIFT_LINEAR_FACTOR_PROJECTIVE_STAR_ROUTER_V1_AUDIT_PASS " + f"checks={checks + 13} exact_division=1") + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_lower_aware_joint_core_charge_v1.py b/experimental/audit_mca_full_lift_lower_aware_joint_core_charge_v1.py new file mode 100644 index 000000000..f6a892f87 --- /dev/null +++ b/experimental/audit_mca_full_lift_lower_aware_joint_core_charge_v1.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python3 +"""Independent ledger audit for the M31 lower-aware line charge.""" + +from __future__ import annotations + +from fractions import Fraction + + +N, M, C, BUDGET = 1048582, 67454, 5, 16777215 + + +def charge(e: int, lower: list[int]) -> tuple[int, list[int], int]: + count = len(lower) + budget = min(count * (M - 1), e + count * (count + 1) * C // 2) + values = sorted(lower, reverse=True) + excess = budget - sum(values) + assert excess >= 0 + for index, value in enumerate(values): + addition = min(excess, M - 1 - value) + values[index] += addition + excess -= addition + if excess == 0: + break + assert excess == 0 + total = sum((Fraction(N - value, M - value) for value in values), + Fraction()) + return total.numerator // total.denominator, values, budget + + +def core(threshold: int) -> tuple[int, int]: + numerator = threshold * M - N + total = (0 if numerator <= 0 else + (numerator + threshold - 2) // (threshold - 1)) + return total, max(total - C, 0) + + +def audit_paid(e: int, prefix: int, groups: int, allocation_head: int) -> int: + base = prefix + M - 65515 - groups + thresholds = [20] + [16] * 33 + [20] * 4 + cores: list[int] = [] + insides: list[int] = [] + for threshold in thresholds: + old_charge = 0 if not cores else charge(e, cores)[0] + target = BUDGET - old_charge + forced = (target - base + 1 + groups - 1) // groups + assert forced == threshold + total, inside = core(threshold) + cores.append(total) + insides.append(inside) + packing = sum(insides) - len(insides) * (len(insides) - 1) * C // 2 + assert packing == 142893 > e + final_charge, allocation, budget = charge(e, cores[:-1]) + assert final_charge == 609 + assert allocation == [allocation_head] + [15816] * 3 + [2046] * 33 + assert budget == e + 37 * 38 * C // 2 + return len(thresholds) * 4 + 8 + + +def main() -> None: + checks = audit_paid(130220, 11904256, 260559, 18769) + checks += audit_paid(130221, 11903751, 269440, 18770) + + wall_thresholds = [18] + [14] * 42 + [11] * 127 + [7] * 66 + [3] * 52 + wall_cores = [core(value)[0] for value in wall_thresholds] + wall_insides = [core(value)[1] for value in wall_thresholds] + assert wall_cores == [9741] + [0] * 287 + assert wall_insides == [9736] + [0] * 287 + wall_charge, allocation, budget = charge(130222, wall_cores) + assert allocation == [67453] * 5 + [1037] + [0] * 282 + assert budget == 338302 and wall_charge == 4910044 + assert BUDGET - wall_charge == 11867171 < 12148280 + + first_q = sum((Fraction(N - x, M - x) + for x in [18769] + [15816] * 3 + [2046] * 33), + Fraction()) + last_q = sum((Fraction(N - x, M - x) + for x in [18770] + [15816] * 3 + [2046] * 33), + Fraction()) + wall_q = sum((Fraction(N - x, M - x) for x in allocation), Fraction()) + assert (first_q.numerator, first_q.denominator) == ( + 894348212835561, 1468173681520) + assert (last_q.numerator, last_q.denominator) == ( + 1565078288323625, 2569251168624) + assert (wall_q.numerator, wall_q.denominator) == ( + 379266425096056, 77242971) + print("MCA_FULL_LIFT_LOWER_AWARE_JOINT_CORE_CHARGE_V1_AUDIT_PASS " + f"checks={checks + 13} exact_rational_replay=1") + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_recursive_line_peeling_core_packing_v1.py b/experimental/audit_mca_full_lift_recursive_line_peeling_core_packing_v1.py new file mode 100644 index 000000000..59d02e279 --- /dev/null +++ b/experimental/audit_mca_full_lift_recursive_line_peeling_core_packing_v1.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +"""Independent endpoint audit for recursive M31 line peeling.""" + +from __future__ import annotations + + +R, D, K = 1048576, 67448, 6 +N, M, C = R + K, D + K, K - 1 +BUDGET, LINE = 16777215, N - M + 1 + + +def gram_cap(e: int, h: int) -> int: + shortened = N - e + agreement = M - h + assert agreement > C + delta = agreement * agreement - shortened * C + if delta > 0: + return shortened * (agreement - C) // delta + gap = -delta + assert 2 * agreement * agreement >= shortened * C + tangent = ((shortened - agreement) ** 2 + - (shortened - 1) * gap) + assert tangent > 0 + return ((shortened - 1) * shortened * shortened * (agreement - C) + // (agreement * tangent)) + + +def weighted_prefix(e: int, cutoff: int) -> int: + suffix = [0] + [gram_cap(e, h) for h in range(1, cutoff + 1)] + running = suffix[cutoff] + for h in range(cutoff - 1, 0, -1): + running = min(running, suffix[h]) + suffix[h] = running + return sum((suffix[h] - suffix[h - 1]) * (e // h) + for h in range(1, cutoff + 1)) + + +def bank(e: int, cutoff: int, upper: int) -> tuple[int, int]: + groups = 0 + for h in range(cutoff + 1, upper + 1): + overlap = 2 * h - e + denominator = overlap * overlap - e * C + assert 2 * h > e and overlap > C and denominator > 0 + groups += e * (overlap - C) // denominator + base = weighted_prefix(e, cutoff) + upper - cutoff - groups + return groups, base + + +def forced_inside(threshold: int) -> int: + numerator = threshold * M - N + core = 0 if numerator <= 0 else ( + numerator + threshold - 2) // (threshold - 1) + return max(core - C, 0) + + +def thresholds(groups: int, base: int, count: int) -> list[int]: + answer = [] + for r in range(count): + required = BUDGET - r * LINE - base + 1 + assert required > 0 + answer.append((required + groups - 1) // groups) + return answer + + +def main() -> None: + groups, base = bank(124806, 65304, M) + threshold = thresholds(groups, base, 1)[0] + inside = forced_inside(threshold) + sync = 124806 - inside + K + low = weighted_prefix(124806, sync - 1) + assert (groups, base, threshold, inside, sync, low + LINE) == ( + 33873, 2138482, 433, 65178, 59634, 2603990) + + groups, base = bank(128340, 65304, M) + threshold1 = thresholds(groups, base, 1)[0] + inside1 = forced_inside(threshold1) + sync1 = 128340 - inside1 + K + groups2, base2 = bank(128340, 65304, sync1 - 1) + threshold2 = thresholds(groups2, base2, 2)[1] + inside2 = forced_inside(threshold2) + assert (threshold1, inside1, sync1, groups2, base2, + threshold2, inside2) == ( + 213, 62822, 65524, 12523, 1749442, 1122, 66574) + assert inside1 + inside2 - C == 129391 > 128340 + + groups, base = bank(130198, 65504, M) + last_thresholds = thresholds(groups, base, 5) + last_inside = [forced_inside(value) for value in last_thresholds] + last_lhs = sum(last_inside) - 10 * C + assert (groups, base, last_thresholds, last_inside, last_lhs) == ( + 260297, 8163020, [34, 30, 26, 22, 19], + [37718, 33617, 28204, 20729, 12942], 133160) + assert last_lhs > 130198 + + groups, base = bank(130199, 65504, M) + wall_thresholds = thresholds(groups, base, 9) + wall_inside = [forced_inside(value) for value in wall_thresholds] + wall_lhs = sum(wall_inside) - 36 * C + next_target = BUDGET - 9 * LINE + assert (groups, base, wall_thresholds, wall_inside, + wall_lhs, next_target) == ( + 269019, 8154082, [33, 29, 25, 22, 18, 14, 11, 7, 3], + [36789, 32409, 26569, 20729, 9736, 0, 0, 0, 0], + 126052, 7947054) + assert wall_lhs <= 130199 and next_target - base + 1 <= 0 + + print( + "MCA_FULL_LIFT_RECURSIVE_LINE_PEELING_CORE_PACKING_V1_AUDIT_PASS " + "first=124806 packing=128340 last=130198 wall=130199" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_residue_zero_core_absorption_v1.py b/experimental/audit_mca_full_lift_residue_zero_core_absorption_v1.py new file mode 100644 index 000000000..741b80a06 --- /dev/null +++ b/experimental/audit_mca_full_lift_residue_zero_core_absorption_v1.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 +"""Independent arithmetic audit of residue-zero core absorption.""" + +from fractions import Fraction + + +def main() -> None: + e, K, m, N, c = 98232, 6, 67454, 1048582, 5 + inside = (m - 2) - c + sync = e - inside + K + if (inside, sync) != (67447, 30791): + raise ValueError("synchronization") + + agreement = m - (sync - 1) + n = N - e + ratio = Fraction(n * (agreement - c), agreement * agreement - n * c) + cap = ratio.numerator // ratio.denominator + if agreement != 36664 or cap != 26 or not (26 <= ratio < 27): + raise ValueError("Johnson cap") + + low, line = e * cap, N - m + 1 + total, budget = low + line, 16777215 + if (low, line, total, budget - total) != ( + 2554032, 981129, 3535161, 13242054): + raise ValueError("payment") + print( + "MCA_FULL_LIFT_RESIDUE_ZERO_CORE_ABSORPTION_V1_AUDIT_PASS " + "sync=30791 list=26 total=3535161 slack=13242054" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/audit_mca_full_lift_residue_zero_direction_router_v1.py b/experimental/audit_mca_full_lift_residue_zero_direction_router_v1.py new file mode 100644 index 000000000..2fe3a3b76 --- /dev/null +++ b/experimental/audit_mca_full_lift_residue_zero_direction_router_v1.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python3 +"""Independent endpoint audit for the residue-zero direction router.""" + +from fractions import Fraction + + +def ceiling(value: Fraction) -> int: + return -(-value.numerator // value.denominator) + + +def main() -> None: + e, H, c = 98232, 65489, 5 + A = 2 * H - e + denominator = A * A - e * c + if (A, denominator) != (32746, 1071809356): + raise ValueError("direction denominator") + + class_ratio = Fraction(e * (A - c), denominator) + classes = class_ratio.numerator // class_ratio.denominator + if classes != 3 or class_ratio < 3 or class_ratio >= 4: + raise ValueError("direction classes") + + outside_length, outside_agreement = 950350, 1965 + line_ratio = Fraction(outside_length - c, outside_agreement - c) + line_cap = line_ratio.numerator // line_ratio.denominator + boundary = 1 + classes * (line_cap - 1) + if (line_cap, boundary) != (484, 1450): + raise ValueError("boundary") + + prefix, budget = 16432695, 16777215 + top = budget - prefix - boundary + 1 + if top != 343071: + raise ValueError("strict threshold") + + N, m = 1048582, 67454 + core = ceiling(Fraction(top * m - N, top - 1)) + if core != 67452 or core != m - 2: + raise ValueError("forced core") + + print( + "MCA_FULL_LIFT_RESIDUE_ZERO_DIRECTION_ROUTER_V1_AUDIT_PASS " + "classes=3 boundary=1450 top=343071 core=67452" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/00_contract.md b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/00_contract.md new file mode 100644 index 000000000..b9dbdcfbe --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/00_contract.md @@ -0,0 +1,39 @@ +# Epistemic Contract + +## Target + +For one KoalaBear received line, after the intrinsic near-rational deletion +and reversible error-rank gauge of PR #1166, prove the uniform split bound + +\[ +|Z|\le \max_{0\le j\le s}H_j(T)+(n-A)M_s(T), +\] + +for every legal integer threshold (T), in units of distinct affine slopes. +Specialize it at error rank ten ((s=9)) to an exact payment below +(B_*=274980728111395087). Preserve the actual line's slope set, exact +supports, explanations before gauge, and same-support pair noncontainment. + +## Acceptable adjacent outputs + +- a uniform margin/interleaving split theorem; +- an exact rank-ten KoalaBear payment; +- a sharp route cut showing the same one-threshold formula cannot pay rank 11; +- a falsifier proving the per-pair multiplicity factor (n-A) is sharp. + +## Evidence standard + +Candidate requires a source-bound proof and exact big-integer scan. +Provisional verification additionally requires finite-field controls, +hostile mutations, Sage/FLINT/Wolfram arithmetic replay, and source hashes. +Handoff requires isolated mathematics and certificate reviews. + +## Prohibited overclaims + +- Numerical agreement is not proof. +- An adjacent theorem is not evidence for the original conjecture without a proved implication. + +## Stop and handoff conditions + +Stop at a GREEN exact rank-ten packet or at the first false implication with +an actual support-wise MCA record. Do not claim v4 ledger movement. diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/01_frontier_map.md b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/01_frontier_map.md new file mode 100644 index 000000000..fdbb241f2 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/01_frontier_map.md @@ -0,0 +1,39 @@ +# Frontier Map + +## Current record + +PR #1166 exact ready head +`b67078c7c0254ce9e54e5748634de5133fae98ef`, restacked on PR #1165 +exact head `b6d30ef4f5ff966665b7672e1780a637509873a4`. Public-DAG candidate +`c2c37ceb81f2512736f82d619a3a0e63e4156482` supplies the theorem target, +not an imported source theorem. + +## Dependency spine + +1. PR #1165 repaired proper-subspace compiler. +2. PR #1166 support-local transversality and error-rank gauge. +3. Ordinary affine-span list compiler in `grande_finale.tex`. +4. Intrinsic near-rational (2w) deletion from PR #1160. +5. A self-contained projection-collision proof for interleaved lists. + +## Named open joint + +Rank 11: the trivial aggregate low-pair charge +(sum_{(a,b)}(n-|H_{a,b}|)) exceeds the remaining budget. The factor for +one fixed pair is sharp, so the next joint is an aggregate pair/core-incidence +theorem, not a smaller per-pair multiplicity. + +## Nearby stronger and weaker statements + +| statement | result | +|---|---:| +| #1166 direct theta payment | error rank at most 9 | +| this split at (T=667) | error rank 10 paid | +| same split at rank 11 | minimum 1,040,506,078,215,897,711; unpaid | + +## Known barriers + +The sub-square-root collapse requires the actual line field +(|\F|=2130706433^6); it fails its guard over the base prime field. +A constant-code star fixture saturates (n-A) owners of one low pair. +No active-v4 owner chronology is reconstructed here. diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/02_controls.md b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/02_controls.md new file mode 100644 index 000000000..b335a7094 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/02_controls.md @@ -0,0 +1,11 @@ +# Control Zoo + +| Control ID | Object | Preserved structure | Target behavior | Mechanism behavior | Status | +|---|---|---|---|---|---| +| C-001 | Koala exact threshold scan | all legal (T), field guard | (T=16) first pay; (667) unique optimum | pending | planned | +| C-002 | rank-11 scan | identical formula | no payment; optimum (T=876) | pending | planned | +| C-003 | low-pair star over GF(11) | exact/maximal/post-near records | (n-A) multiplicity attained | pending | planned | +| C-004 | base-field guard mutation | replace (p^6) by (p) | reject collapse | pending | planned | +| C-005 | duplicate pair/slope mutation | slope units and canonical pairs | reject double counting | pending | planned | + +Include positive, negative, degenerate, boundary, and adversarial synthetic controls. diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/03_idea_ledger.csv b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/03_idea_ledger.csv new file mode 100644 index 000000000..12717b4f6 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/03_idea_ledger.csv @@ -0,0 +1,4 @@ +idea_id,title,track,status,forecast,first_unjustified_step,control_result,dependency_status,owner,artifact,last_updated +I-001,one-threshold margin/interleaving split,proof,provisionally-verified,0.75,none after audit,C-001 through C-005 pass,dependencies pinned,root,experimental/grande_finale.tex,2026-08-13 +I-002,reduce fixed-pair multiplicity,barrier,refuted,0.10,n-A is sharp,C-003 falsifies,none,adversarial reviewer,rank10 note,2026-08-13 +I-003,aggregate rank-11 pair/core incidence,next-frontier,explored,0.35,missing correlation among distinct minimizing pairs,scalar methods fail,rank10 theorem required,root,frontier map,2026-08-13 diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/04_dependency_ledger.csv b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/04_dependency_ledger.csv new file mode 100644 index 000000000..f5de7459a --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/04_dependency_ledger.csv @@ -0,0 +1,6 @@ +dependency_id,statement,source,version,scope,proof_status,independent_check,notes +D-001,support-local transversality and gauge,PR1166 ready head,b67078c7c0254ce9e54e5748634de5133fae98ef,actual post-near records through error rank nine,proved,replayed,source dependency +D-002,ordinary affine-span list compiler,experimental/grande_finale.tex,b6d30ef4,affine subcode lists at agreement A,proved,source reviewed,self-contained +D-003,intrinsic near stratum at most 2w,PR1160,c5f4ea7a0c78828c901ae5f3428894a8b2e2806b,Koala row,proved,pinned predecessor,external commit dependency +D-004,sub-square-root interleaving collapse,this packet,v1,finite-field linear codes,proved,independent proof audit,self-contained +D-005,public-DAG candidate,AllenGrahamHart/rs-mca-prize-dag,c2c37ceb81f2512736f82d619a3a0e63e4156482,rank-ten target/provenance,proved there,rederived here,not imported as source theorem diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/05_claim_registry.csv b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/05_claim_registry.csv new file mode 100644 index 000000000..c5605d6a8 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/05_claim_registry.csv @@ -0,0 +1,4 @@ +claim_id,statement,status,scope,dependencies,controls,review_joints,rederivation,formalization,owner,artifact,notes +C-001,sub-square interleaving projection theorem,provisionally-verified,all finite-field linear codes,D-004,C-004,projection collision and field guard,manual plus exact controls,none,root,experimental/grande_finale.tex,no external lemma +C-002,uniform margin/interleaving split,provisionally-verified,one gauged actual-record family,D-001;D-002;D-004,C-003;C-005,high/low partition and fixed-pair injection,independent adversarial audit,none,root,experimental/grande_finale.tex,distinct slopes +C-003,Koala error rank ten paid,provisionally-verified,post-near selected family,D-001;D-002;D-003;D-004,C-001;C-002;C-004,exact thresholds and sextic field,Python Sage Wolfram,none,root,certificate,zero v4 movement diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/06_review_registry.csv b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/06_review_registry.csv new file mode 100644 index 000000000..87cfd5fba --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/06_review_registry.csv @@ -0,0 +1,7 @@ +review_id,claim_id,joint,reviewer_isolated,status,artifact,blocking_issue +R-001,C-001,projection-collision proof,true,pass,reviews/independent_math_review.md,none +R-002,C-002,low-pair and multiplicity proof,true,pass,reviews/independent_math_review.md,none +R-003,C-003,exact rank-ten arithmetic and rank-eleven wall,true,pass,reviews/independent_math_review.md,none +R-004,C-001,exact optimizer and sextic field guard,true,pass,reviews/independent_certificate_review.md,none +R-005,C-002,Sage sharpness fixture and distinct-slope multiplicity semantics,true,pass,reviews/independent_certificate_review.md,none +R-006,C-003,rank-eleven method wall and certificate mutation semantics,true,pass,reviews/independent_certificate_review.md,none diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/campaign.json b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/campaign.json new file mode 100644 index 000000000..29ea48a81 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/campaign.json @@ -0,0 +1,15 @@ +{ + "title": "KoalaBear rank-10 margin/interleaving split payment", + "created": "2026-08-13", + "schema_version": 1, + "claim_statuses": [ + "idea", + "explored", + "candidate", + "provisionally-verified", + "handoff", + "refuted", + "blocked", + "known" + ] +} diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/independent_certificate_review.md b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/independent_certificate_review.md new file mode 100644 index 000000000..2a5d016c9 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/independent_certificate_review.md @@ -0,0 +1,222 @@ +# Independent certificate review: rank-ten margin/interleaving packet + +Reviewer: isolated certificate and exact-arithmetic reviewer + +Review date: 2026-08-13 + +Reviewed clean-restack base: +`b67078c7c0254ce9e54e5748634de5133fae98ef` + +Reviewed canonical payload: +`642641809784eba3e4323f331bc28cc3d09192a287bd2708752a179080896f53` + +## Statement audited + +The packet claims that the KoalaBear post-near affine-error-rank-ten branch +is bounded by + +```text +2w + max_(0<=j<=9) H_j(667) + (n-m+666) M_9(667) += 61,871,313,426,765,543 +< 274,980,728,111,395,087, +``` + +with slack `213,109,414,684,629,544`. It also claims that an exact scan +over every legal integer threshold has first paying threshold `T=16`, unique +rank-ten optimum `T=667`, and first higher-rank method wall +`1,040,506,078,215,897,711` at `T=876` for error rank eleven. The +certificate expressly claims zero active-v4 ledger movement and no +KoalaBear closure. + +## Files and sections read + +- `experimental/grande_finale.tex`: + `thm:subsquare-interleaving-collapse`, + `thm:mca-margin-interleaving-split`, and + `prop:kb-affine-error-rank-ten-payment`; +- `experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md`; +- `experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py`; +- `experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage`; +- `experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/README.md`; +- the canonical manifest with the payload printed above; +- `reviews/independent_math_review.md` for the separate proof-joint review. + +Ancestor-chain guidance came from the repository `agents.md` and the +`math-proof-audit` skill. No sibling override was used. + +## Dependencies + +- **PROVEN/IMPORTED:** support-local transversality and its exact rank-ten + gauge specialization from the predecessor packet. +- **PROVEN:** the ordinary affine-span list compiler. +- **PROVEN:** the finite-field projection-collision theorem, with the + `mu=1` case separated before the `q^(mu-2)` count. +- **PROVEN/IMPORTED:** the intrinsic near-rational charge `2w=134944` under + its printed KoalaBear guards. +- **EXACT CERTIFICATE:** complete threshold scans at explanation ranks + `9,10,11,12`, the sextic-field guard, and the GF(11) multiplicity fixture. +- **NOT IMPORTED:** no Exa result or external literature theorem is + load-bearing. The recorded Wolfram calculation is an independent integer + replay, not a logical dependency. + +## Exact optimizer audit + +The primary verifier uses exact integers and `Fraction` arithmetic. It scans +every threshold `2<=T<=w`, retaining only thresholds satisfying the strict +guard `M_s(T)^2= 2130706433. +``` + +Thus the sub-square-root theorem is used over the actual sextic line field, +and would not be licensed over the prime field alone. The strict inequality +and extension degree are present in the manifest rather than inferred from +the row name. + +## Sage fixture and multiplicity semantics + +The independent Sage script reconstructs the decisive rank-ten integers and +the GF(11) constant-code star. The fixture has eight distinct slopes, exact +maximal supports consisting of a two-point core plus one private coordinate, +same-support pair noncontainment, and one common low pair. It attains + +```text +owners = 8 = n-A. +``` + +This validates the certificate's multiplicity semantics: `n-A` counts +distinct affine slopes owning one deduplicated pair. It also blocks any +silent replacement by pair labels, supports, distinct neighboring pairs, or +a smaller universal multiplicity. + +## Mutation and custody audit + +The frozen packet passed: + +```text +python3 verify_kb_mca_rank10_margin_interleaving_v1.py +python3 -O verify_kb_mca_rank10_margin_interleaving_v1.py +python3 verify_kb_mca_rank10_margin_interleaving_v1.py --tamper-selftest +sage verify_kb_mca_rank10_margin_interleaving_v1.sage +git diff --check +``` + +The normal and optimized runs reproduced payload +`642641809784eba3e4323f331bc28cc3d09192a287bd2708752a179080896f53`. +The tamper self-test rejected all `3/3` declared mutations, including a +false KoalaBear-closure flag. The manifest binds the source, note, scripts, +campaign ledgers, literature record, parent commit, row constants, exact +tables, and provenance. Review memos are deliberately outside the hashed +packet, avoiding a self-referential review hash. + +The final clean-restack manifest includes the R-004--R-006 registry rows and +binds all 16 declared packet files. An independent SHA-256 replay found no +file mismatch and reproduced the canonical payload exactly. The campaign +actionability audit reports three provisionally verified claims, six passing +reviews, five dependencies, and no errors. The source delta is confined to +the theorem/status additions and this packet; no unrelated mathematical +source is altered. + +## Parameter dependence + +All numerical conclusions are for the fixed official KoalaBear row + +```text +(p,e,n,K,m,w,B*) +=(2130706433,6,2097152,1048576,1116048,67472, + 274980728111395087). +``` + +The symbolic theorem is finite and uniform in the displayed +`(F,D,K,m,s,T)` parameters subject to `A>K` and `M_s(T)^2<|F|`. There is +no hidden dependence on `T,Y,L,L_barI,lambda,I`, or an asymptotic regime. + +## Layer-cake / dyadic summability + +Not applicable. The high/low split is a single disjoint finite partition, +not a weighted layer-cake argument. + +## Moment / Markov / Chebyshev + +Not applicable. The proof uses exact list bounds, projection collisions, +and a direct slope-coordinate injection; it uses no probabilistic moment or +tail optimization. + +## Edge cases and notation + +- The projection theorem separates `mu=1` before using `q^(mu-2)`. +- The deployed theorem uses `s=9` for explanation-flat dimension and + `a=10` for error rank; these are not conflated. +- The threshold interval enforces `2<=T<=w`, so `A=m-T+1>K`. +- Empty high or low subfamilies satisfy their respective bounds trivially. +- Pair noncontainment supplies a nonzero denominator in the slope-recovery + formula. +- Counts remain distinct finite affine slopes on one actual received line. + +## Numerical evidence + +The KoalaBear arithmetic is an exact official-scale finite computation, not +toy evidence. The GF(11) fixture is toy-scale but is used only as an exact +sharpness/countercontrol for multiplicity. Neither computation proves an +active-v4 owner bridge or the universal four-rate result. + +## Verdict + +**GREEN - proof obligation appears satisfied with dependencies verified.** + +The certificate and independent Sage joints support C-001--C-003 in their +printed scope. The rank-ten direct branch is paid; the active-v4 chronology +and KoalaBear row remain open. + +## Remaining risks + +1. This theorem supplies no first-match S/A/E owner transport and therefore + moves no deployed-v4 atom. +2. The rank-eleven number is a sharp minimum only for this exact + one-threshold formula. New aggregate structure among distinct minimizing + pairs could still improve it. + +## Minimal next action + +Publish the scoped rank-ten payment. Mathematically, the next frontier is +correlation among distinct low-margin minimizing pairs at error rank eleven, +not another scalar multiplicity estimate. + +**Final status: GREEN.** diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/independent_math_review.md b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/independent_math_review.md new file mode 100644 index 000000000..e835b7dae --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/independent_math_review.md @@ -0,0 +1,251 @@ +# Independent mathematics review: rank-ten margin/interleaving packet + +Reviewer: isolated adversarial reviewer (`direction_exception_adversary`) + +Review date: 2026-08-13 + +Reviewed clean-restack base: `b67078c7c0254ce9e54e5748634de5133fae98ef` + +Reviewed canonical payload: +`642641809784eba3e4323f331bc28cc3d09192a287bd2708752a179080896f53` + +## Verdict + +**GREEN.** The mathematical mechanism, exact rank-ten arithmetic, source +statement, and certificate packet pass independent review. The repaired +interleaving proof dispatches the trivial `mu=1` case before using +`q^(mu-2)`, and the deployed rank-ten proposition explicitly binds the sextic +line field required by the sub-square guard. The current source also passes a +clean LaTeX replay. + +## Statement audited + +The implication chain is: + +1. the sub-square-root common-support interleaving collapse; +2. the high/low support-margin split for one actual gauged MCA family; +3. the reversible rank-ten gauge from error rank `a=10` to explanation-flat + dimension `s=9`; +4. the exact KoalaBear specialization at `T=667`, including the disjoint `2w` + near-rational add-back; +5. the claimed method wall at error rank eleven. + +Primary artifacts read: + +- `experimental/grande_finale.tex`, especially + `thm:subsquare-interleaving-collapse`, + `thm:mca-margin-interleaving-split`, and + `prop:kb-affine-error-rank-ten-payment`; +- `experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md`; +- `experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py`; +- `experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage`; +- `experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/README.md`; +- the predecessor support-local transversality theorem, error-rank gauge, + ordinary affine-span list compiler, and intrinsic `2w` near-stratum theorem. + +## Mathematical audit + +### 1. Sub-square-root interleaving collapse + +The projection-collision argument is correct for `mu>=2`. For every linear +projection + +```text +Phi_alpha(c_1,...,c_mu)=c_1+sum_(i=2)^mu alpha_i c_i, +``` + +the image is an ordinary list at the identical common-support agreement +threshold. Cauchy--Schwarz gives the printed lower collision count, while a +fixed distinct tuple pair collides for at most `q^(mu-2)` projections. Double +counting yields + +```text +L_mu <= floor(L(q-1)/(q-L)). +``` + +When `L^2=2` before invoking `q^(mu-2)`. Thus the boundary case is now +closed without changing the statement. + +### 2. High-margin part + +Passing from the complete explanation flat `c_0+C'` to the affine span of the +high-margin subfamily can only shrink its direction space. Minimizing the +support mismatch over that smaller space cannot lower any margin. The +support-transverse theorem therefore gives `H_j(T)` for every positive +subfamily rank `j<=s`. + +At rank zero, every explanation is the same word. Each record supplies at +least `T` incident coordinates with nonzero line direction, and one coordinate +determines at most one finite slope. The incidence cap `floor(n/T)` is valid. + +### 3. Low-margin pair reconstruction + +For a minimizing `b_gamma in C'`, the definition + +```text +a_gamma=h_gamma-gamma b_gamma +``` + +places `a_gamma` in `c_0+C'` and gives simultaneous agreement of +`(a_gamma,b_gamma)` with the identical received pair `(r_0,r_1)` on at least +`A=m-T+1` coordinates. Translating the first component by `c_0` puts the +pairs in the two-fold interleaving of the linear code `C'`. + +The ordinary affine-span compiler bounds every projected ordinary list by + +```text +M_s(T)=floor(binomial(n-K+s,s)/binomial(w-T+1+s,s)). +``` + +The sub-square-root theorem therefore bounds the number of distinct pairs by +`M_s(T)` under the declared field guard. + +For a fixed pair `(a,b)`, its intrinsic common core has size at least `A`. +Pair noncontainment supplies an actual exception coordinate, and + +```text +gamma=-(r_0(x)-a(x))/(r_1(x)-b(x)) +``` + +shows that one chosen exception coordinate cannot own two distinct slopes. +Thus the factor `n-A` is correct in distinct affine-slope units. Duplicate +pair labels are deduplicated before applying this multiplicity; multiple +slopes owned by the same pair are intentionally allowed. + +### 4. Gauge and original-record preservation + +The predecessor gauge changes the line representative but preserves every +slope, error word, selected support, and same-support containment predicate. +For the inverse-gauge version, if `b_0` is the gauge codeword and `b'_gamma` +is a translated minimizing direction, then + +```text +B_gamma=b_0+b'_gamma, +A_gamma=h_gamma-gamma B_gamma + =h'_gamma-gamma b'_gamma. +``` + +Hence `A_gamma` and `B_gamma` lie in the asserted affine flats and reconstruct +the identical original explanation `h_gamma=A_gamma+gamma B_gamma`. No +endpoint label, pair label, or gauge representative is counted as an extra +slope. + +### 5. Exact KoalaBear arithmetic + +Independent exact replay recovered + +```text +(n,K,m,w) = (2097152,1048576,1116048,67472) +T = 667 +A = 1115382 +M_9(T) = 57781140652 +max_j H_j(T) = 5143522968716559 +(n-A)M_9(T) = 56727790457914040 +2w = 134944 +total = 61871313426765543 +B_* - total = 213109414684629544 +``` + +The sub-square condition is true over the deployed line field + +```text +|F|=2130706433^6, +``` + +and false over the base field `F_2130706433`. The abstract theorem states the +right guard, and the repaired deployed proposition now explicitly assumes the +sextic line field rather than relying on “KoalaBear” as an implicit field +convention. + +The exact scan also confirms: + +- `T=16` is the first paying threshold at `s=9`; +- `T=667` is the unique minimizer at `s=9`; +- at `s=10` (error rank eleven), the minimum is + `1040506078215897711` at `T=876`, above budget; +- the `s=11` and `s=12` minima are larger. + +Thus this theorem closes error rank ten and no higher rank. + +## Adversarial sharpness control + +The fixed-pair factor cannot be improved from the stated hypotheses. Over +`RS[F_11,D,1]` with `(n,m,w)=(10,3,2)`, put `(r_0,r_1)=(0,0)` on a +two-coordinate core and put + +```text +(r_0,r_1)=(-gamma,1), gamma=0,...,7, +``` + +on the eight remaining coordinates. For each displayed slope, zero is the +unique maximal constant explanation on exactly the core plus its own +coordinate. The support is pair-noncontained and its word has distance +`7>w` from the constant code, so it survives the near deletion. All eight +slopes choose the same low pair `(0,0)`, attaining exactly + +```text +8=n-A. +``` + +Therefore the rank-eleven frontier requires aggregate structure among +different minimizing pairs or their common cores. Another scalar reduction +of the per-pair multiplicity cannot close it. + +## Source and certificate findings + +The Python verifier passes in normal and optimized modes, rejects all three +declared hostile mutations, and the independent Sage replay passes when Sage +is given a writable temporary home. The verifier checks both sides of the +field-of-definition guard and the complete exact threshold scan. + +The current TeX source compiles cleanly with `latexmk`; the earlier transient +delimiter damage was repaired before this review was finalized. Re-review +confirmed both requested boundary repairs in the source: `mu=1` is dispatched +before the projection count, and the proposition explicitly assumes +`|F|=2130706433^6`. + +After those repairs, the Python verifier passes in normal and optimized modes, +the hostile-mutation replay rejects all `3/3` mutations, the independent Sage +replay passes, and `git diff --check` passes. + +## Final clean-restack preservation audit + +The final packet was re-read as a clean delta on the exact parent +`b67078c7c0254ce9e54e5748634de5133fae98ef`. The delta preserves the three +reviewed theorem statements and proofs without mathematical change. In +particular: + +- the `mu=1` boundary dispatch remains before the `q^(mu-2)` collision count; +- both the proposition and certificate bind the actual sextic line field; +- the exact rank-ten total remains `61871313426765543`, with slack + `213109414684629544`; +- the rank-eleven value remains a method wall for this formula, not an + impossibility theorem; +- the manifest continues to say `active_v4_ledger_movement=0` and + `KoalaBear_closed=false`. + +The canonical manifest binds the exact parent and the complete packet at +payload `642641809784eba3e4323f331bc28cc3d09192a287bd2708752a179080896f53`. +On the clean restack, normal and optimized Python verification, all `3/3` +hostile mutations, the independent Sage replay, a clean 120-page LaTeX build, +and `git diff --check` all pass. The external review memos are deliberately +outside the hashed packet, so this preservation note does not perturb that +canonical payload. + +## Scope and nonclaims + +- This is a direct maximum-over-lines distinct-slope payment conditional on + the already proved intrinsic `2w` near deletion. +- It moves no active-v4 first-match atom and proves no S/A/E chronology. +- It does not close KoalaBear. +- Error rank eleven remains unpaid by this formula. +- The exact toy is a finite falsifier for a multiplicity improvement, not an + asymptotic counterexample to MCA. +- Layer-cake/dyadic summability: not applicable. +- Moment/Markov/Chebyshev optimization: not applicable. + +**Final status: GREEN.** diff --git a/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/literature_sweep.md b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/literature_sweep.md new file mode 100644 index 000000000..d86712b43 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/literature_sweep.md @@ -0,0 +1,24 @@ +# Targeted interleaving literature sweep + +Date: 2026-08-13 + +Exa reviewed 20 search results across two targeted workstreams and fetched +the two most relevant primary papers. + +1. Gopalan, Guruswami, and Raghavendra, *List decoding tensor products and + interleaved codes*, STOC 2009, + . This proves broad + combinatorial/radius results for interleaving. It does not state the + exact finite-field projection bound used here. +2. Guo, Li, Shangguan, Tamo, and Wootters, *Improved List-Decodability of + Reed--Solomon Codes via Tree Packings*, arXiv:2011.04453, + . This develops intersection-matrix and + tree-packing methods for RS list decoding/list recovery. It is relevant + to the next aggregate pair/core-incidence problem, but is not an input to + the present theorem. + +The present sub-square-root collapse is proved self-contained by averaging +linear projections and counting pair collisions. No external theorem is +load-bearing. The literature search mainly confirms that the next rank-11 +joint belongs to aggregate intersection/list-recovery structure, not to the +one-pair multiplicity already shown sharp by the GF(11) control. diff --git a/experimental/campaigns/kb-mca-rank11-fixed-endpoint-post-1171/00_contract.md b/experimental/campaigns/kb-mca-rank11-fixed-endpoint-post-1171/00_contract.md new file mode 100644 index 000000000..9cc9918e5 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-fixed-endpoint-post-1171/00_contract.md @@ -0,0 +1,72 @@ +--- +workboard_item: K4 +row: KoalaBear MCA +object: MCA +target_epsilon: 2^-128 +agreement: 1116048 +B_star: 274980728111395087 +unit: distinct bad affine slopes per received line +parent_pr: 1171 +parent_commit: a3fc2d5aea86577cd50d8b95b6eb2155d4d940f6 +status: PROVED_DIRECT_BRANCH_PAYMENT_AND_ROUTE_CUT +active_v4_ledger_movement: 0 +--- + +# Contract + +This packet is a stacked successor to PR #1171 at exact parent +`a3fc2d5aea86577cd50d8b95b6eb2155d4d940f6`. It completes the rank-one +minimizing-pair anticode branch left partially routed there. + +At the fixed cutoff `tau=439`, split the post-near affine-error-rank-eleven +family into support margins `theta<=439` and `theta>=440`. If the coefficient +matrices of all low-margin minimizing pair types have pairwise rank distance at +most one, PR #1171 puts them in one of two geometries. + +1. The fixed-right-factor geometry is paid by #1171's common-core-aware ray + cap `8,147,918`. +2. The fixed-left-factor geometry has one nonzero linear combination of the + two endpoints fixed. On its complete agreement set `G`, the varying + endpoint is one ordinary affine Reed--Solomon list. Same-support pair + noncontainment forces every nonexceptional owning slope to use a coordinate + outside `G`, which injects the pair's slopes into `D\\G`. + +The exact fixed-left bound at `tau=439` is + +```text +low rank-one branch 32,215,263,489,919,749 +high-margin tail 242,314,927,584,173,240 +near-rational add-back 134,944 +------------------------------------------------ +total 274,530,191,074,227,933 +slack 450,537,037,167,154 +``` + +Thus every over-budget line contains two low-margin minimizing pair types with +coefficient-matrix difference of rank two. Their complete pair cores each +have size at least `1,115,609`, hence meet in at least `134,066` coordinates. +The two independent endpoint-difference polynomials therefore have a common +evaluation-root factor of degree at least `134,066`. + +## Quantifier + +Uniform over the deployed sextic KoalaBear line field, every received pair, +every gauged post-near explanation flat of affine dimension at most ten, and +every actual minimizing-pair selection used by the parent support-margin +compiler. + +## Projection + +All counts are distinct finite affine slopes. The endpoint row operation +induces an injective projective map on the original affine challenge set. At +most one slope maps to the fixed-endpoint projective direction and is reserved +explicitly. Every other slope is injected, for its fixed pair type, into one +coordinate outside the common endpoint agreement set. + +## Exact impact + +- pays the complete low-margin rank-one anticode branch at `tau=439`; +- sharpens the successor terminal to a rank-two pair difference with a common + factor of degree at least `134,066`; +- makes no active-v4 ledger movement and does not close rank eleven or + KoalaBear. diff --git a/experimental/campaigns/kb-mca-rank11-fixed-endpoint-post-1171/proofs/fixed_endpoint_owner_router.md b/experimental/campaigns/kb-mca-rank11-fixed-endpoint-post-1171/proofs/fixed_endpoint_owner_router.md new file mode 100644 index 000000000..9f789c3cc --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-fixed-endpoint-post-1171/proofs/fixed_endpoint_owner_router.md @@ -0,0 +1,271 @@ +# Fixed-endpoint owner router for rank-eleven pair anticodes + +## 1. Setup + +Use the KoalaBear row + +```text +n=2097152, K=1048576, m=1116048, w=m-K=67472, +B*=274980728111395087, 2w=134944. +``` + +After the parent gauge, let the explanation direction code `C'` have +dimension `s<=10`. For each low-margin selected slope, fix the actual +minimizing pair from #1168. In an affine basis of `C'`, write its pair +coefficient matrix as `M_e in F^(2 x s)`. + +The parent nonuniform resource is + +```text +sum_gamma theta_gamma <= C_10 +C_10=106618568137036225644. +``` + +Fix an integer cutoff `1<=tau=tau+1}. +``` + +Then + +```text +|H| <= floor(C_10/(tau+1)). (1) +``` + +For a low record assigned to pair `e=(a_e,b_e)`, its complete pair core + +```text +H_e={x:r_0(x)=a_e(x), r_1(x)=b_e(x)} +``` + +has size at least `m-theta_gamma>=A`. + +## 2. Fixed-left geometry produces a fixed endpoint + +Assume the low pair types form the fixed-left branch of #1171: + +```text +M_e=M_0+u v_e^T, u=(alpha,beta)!=0. (2) +``` + +Choose row functionals `ell,t in (F^2)^*` with + +```text +ell(u)=0, t(u)=1. +``` + +Apply the invertible row operation `(ell,t)` simultaneously to the received +pair and every codeword pair. Write + +```text +(R,S)=(ell(r_0,r_1),t(r_0,r_1)), +(c,d_e)=(ell(a_e,b_e),t(a_e,b_e)). +``` + +Equation (2) gives + +```text +c independent of e, +d_e=d_0+P_e, +``` + +where the distinct `P_e` lie in an affine Reed--Solomon direction space of +dimension `r<=s`. + +Put + +```text +G={x in D:R(x)=c(x)}, g=|G|. (3) +``` + +Since `H_e subset G`, every low pair gives `g>=A` and `d_e` agrees with `S` +on at least `A` coordinates of `G`. + +## 3. Ordinary affine-list count on G + +Restriction to `G` is injective because `g>=A>K`. Apply the ordinary +affine-span Reed--Solomon list theorem on the punctured evaluation domain +`G`. The number `N_g` of distinct varying endpoints satisfies + +```text +N_g <= floor( C(g-K+r,r) / C(A-K+r,r) ) + <= floor( C(g-K+s,s) / C(A-K+s,s) ). (4) +``` + +The second inequality follows from + +```text +C(x+r,r)/C(d+r,r)=prod_(j=1)^r (x+j)/(d+j), x>=d, +``` + +which is nondecreasing in `r`. + +## 4. Outside-G owner injection + +The original finite affine slopes map injectively under the row operation to +a subset of the projective line. At most one image has zero coefficient on +the varying endpoint `S`; reserve that slope. + +Consider every other selected slope assigned to pair `e`, and let `T_gamma` +be its exact size-`m` bad support. If `T_gamma subset G`, then on all of +`T_gamma` the fixed endpoint satisfies `R=c`. The transformed affine +combination and its explanation by `(c,d_e)` then force `S=d_e` on the same +support. This is simultaneous pair containment, contrary to the actual +same-support badness. Hence + +```text +T_gamma meets D\\G. (5) +``` + +At `x notin G`, the fixed-endpoint error `R(x)-c(x)` is nonzero. For fixed +pair type `e`, the transformed two-endpoint affine equation at `x` determines +one projective slope. Choosing one outside coordinate in (5) therefore +injects the slopes owned by `e` into `D\\G`. Thus + +```text +one pair type owns at most n-g nonexceptional slopes. (6) +``` + +Combining (4)--(6), + +```text +|L| <= 1+(n-g) floor(C(g-K+s,s)/C(A-K+s,s)). (7) +``` + +## 5. Closed deployed envelope + +Write `x=g-K` and `d=A-K=w-tau`. Since `n=2K`, equation (7) gives + +```text +|L| <= 1+ floor( + max_(d<=x<=K) (K-x) C(x+s,s)/C(d+s,s) +). (8) +``` + +For fixed `x>=d`, the ratio is largest at `s=10`. Put + +```text +F(x)=(K-x) C(x+10,10). +``` + +Its successive ratio satisfies + +```text +F(x+1)>F(x) +iff (K-x-1)(x+11)>(K-x)(x+1) +iff x<(10K-11)/11. +``` + +Therefore the unique integer maximizer is + +```text +x*=953250, +g*=K+x*=2001826, +n-g*=95326. (9) +``` + +The theorem-level low envelope is + +```text +L_left(tau)=1+floor( + 95326 C(953260,10)/C(67472-tau+10,10) +). (10) +``` + +No numerical maximization over `g` is load-bearing. + +## 6. First payment and exact optimum + +At the first paying cutoff `tau=439`, + +```text +A=1115609, +d=67033, +L_left(439)=32215263489919749, +floor(C_10/440)=242314927584173240. +``` + +Adding the disjoint near charge gives + +```text +134944 ++242314927584173240 ++32215263489919749 +=274530191074227933 +B* +``` + +by `96628092421444`; hence `439` is the first paying cutoff of the declared +envelope. The complete exact scan has unique minimum at `tau=3608`: + +```text +81826485385525648, +``` + +with slack `193154242725869439`. The minimum is calibration only; (11) is +the stronger structural cutoff. + +The exact floor scan beneath the analytic envelope at `tau=439` is + +```text +max_x (K-x) floor(C(x+10,10)/C(67043,10)) +=32215263489916276 +``` + +at the same `x*=953250`. The theorem deliberately uses the larger analytic +envelope in (10). + +## 7. Complete rank-one anticode payment + +If the low pair types are pairwise rank one, #1171 gives fixed-right or +fixed-left geometry. + +- Fixed right: #1171 gives `|L|<=8147918`, so at `tau=439` the full total is + `242314927592456102`, with slack `32665800518938985`. +- Fixed left: equation (11) pays the branch. + +Thus an over-budget rank-eleven line has two low pair types `e,f` with + +```text +rank(M_e-M_f)=2. (12) +``` + +## 8. Rank-two large-common-factor terminal + +Both complete cores have size at least `A=1115609`, so + +```text +|H_e intersect H_f| +>=|H_e|+|H_f|-n +>=2A-n +=134066. (13) +``` + +At every coordinate in this intersection, both degree-` w + +common_pair_core = [ + coordinate + for coordinate in range(n) + if r0[coordinate] == 0 and r1[coordinate] == 0 +] +assert common_pair_core == list(range(core_size)) + +# At cutoff tau=1, A=m-tau=2 and all four records select the same pair. +agreement = m - 1 +assert len(slopes) == n - agreement == 4 + +print( + "KB_MCA_RANK11_GF7_PARALLEL_STAR_PASS " + "field=7 n=6 post_near=1 parallel=4 n_minus_A=4" +) diff --git a/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/experiments/verify_nonuniform_theta_pair_route_cut.py b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/experiments/verify_nonuniform_theta_pair_route_cut.py new file mode 100644 index 000000000..9e52602b3 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/experiments/verify_nonuniform_theta_pair_route_cut.py @@ -0,0 +1,389 @@ +#!/usr/bin/env python3 +"""Exact replay of the rank-eleven nonuniform-theta fixed-pair route cut.""" + +from __future__ import annotations + +import argparse +import copy +import json +from fractions import Fraction +from math import comb, prod + + +ROW = { + "p": 2130706433, + "extension_degree": 6, + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "near": 134944, + "budget": 274980728111395087, +} + + +class Reject(ValueError): + pass + + +def require(value: bool, message: str) -> None: + if not value: + raise Reject(message) + + +def falling(x: int, length: int) -> int: + return prod(x - index for index in range(length)) + + +def rising(x: int, length: int) -> int: + return prod(x + index for index in range(length)) + + +def ceil_fraction(value: Fraction) -> int: + return -(-value.numerator // value.denominator) + + +def theta_resource(s: int) -> int: + n, K, m, w = (ROW[key] for key in ("n", "K", "m", "w")) + values = [Fraction(n)] + for rank in range(1, s + 1): + values.extend( + [ + Fraction( + falling(n, rank + 1), + m * rising(w + 1, rank - 1), + ), + Fraction( + falling(n - K + rank, rank + 1), + rising(w + 1, rank), + ), + ] + ) + return max(values).numerator // max(values).denominator + + +def pair_cap(s: int, tau: int) -> int: + n, K, w = (ROW[key] for key in ("n", "K", "w")) + require(1 <= tau < w, "legal cutoff") + return comb(n - K + s, s) // comb(w - tau + s, s) + + +def forced_pair_weight(s: int, tau: int) -> int: + excess_line = ROW["budget"] - ROW["near"] + 1 + mass = max(0, (tau + 1) * excess_line - theta_resource(s)) + return (mass + pair_cap(s, tau) - 1) // pair_cap(s, tau) + + +def parallel_capacity(tau: int, deficiency: int) -> int: + outside = ROW["n"] - ROW["m"] + deficiency + return (outside // deficiency) * (tau + 1 - deficiency) + + +def max_compatible_deficiency(tau: int, forced_weight: int) -> int: + # The capacity is nonincreasing in the deficiency. Binary search keeps + # the all-threshold certificate linear-logarithmic rather than quadratic. + low, high = 1, tau + 1 + while low < high: + middle = (low + high) // 2 + if parallel_capacity(tau, middle) >= forced_weight: + low = middle + 1 + else: + high = middle + return low - 1 + + +def star_fixture() -> dict[str, int]: + p, n, K, core_size = 11, 11, 1, 2 + m = core_size + 1 + slopes = list(range(n - core_size)) + r0 = [0] * core_size + [(-gamma) % p for gamma in slopes] + r1 = [0] * core_size + [1] * len(slopes) + for gamma in slopes: + support = [ + index + for index in range(n) + if (r0[index] + gamma * r1[index]) % p == 0 + ] + require(len(support) == m, "star exact support") + require(len({r1[index] for index in support}) == 2, + "star pair noncontainment") + word = [(r0[index] + gamma * r1[index]) % p for index in range(n)] + max_constant_agreement = max(word.count(value) for value in range(p)) + require(n - max_constant_agreement > m - K, "star post-near") + agreement = m - 2 + 1 + require(len(slopes) == n - agreement == 9, "star sharp multiplicity") + return {"field": p, "parallel_records": len(slopes), "n_minus_A": n - agreement} + + +def coupled_core_ceiling(s: int) -> dict[str, int]: + """Optimize all current theta, cumulative-pair, and core resources. + + Pair types of deficiency delta have cumulative count at most Q(delta) + and each type owns at most floor((n-m+delta)/delta) records. Records of + smaller deficiency use less of the global theta resource, so the exact + integral LP is greedy in increasing delta. Any unused theta resource + can pay high records at cost J+1 each. + """ + + resource = theta_resource(s) + line_field_size = ROW["p"] ** ROW["extension_degree"] + previous_pairs = 0 + low_records = 0 + theta_used = 0 + best: dict[str, int] | None = None + for cutoff in range(1, ROW["w"]): + current_pairs = pair_cap(s, cutoff) + new_pair_types = current_pairs - previous_pairs + records_per_type = (ROW["n"] - ROW["m"] + cutoff) // cutoff + available_records = new_pair_types * records_per_type + selected_records = min( + available_records, + (resource - theta_used) // cutoff, + ) + low_records += selected_records + theta_used += cutoff * selected_records + high_records = (resource - theta_used) // (cutoff + 1) + total = ROW["near"] + low_records + high_records + if current_pairs * current_pairs < line_field_size: + candidate = { + "cutoff": cutoff, + "pair_cap": current_pairs, + "low_records": low_records, + "low_theta_used": theta_used, + "high_records": high_records, + "total": total, + "signed_slack": ROW["budget"] - total, + } + if best is None or (candidate["total"], candidate["cutoff"]) < ( + best["total"], + best["cutoff"], + ): + best = candidate + previous_pairs = current_pairs + require(best is not None, "nonempty coupled scan") + return best + + +def printed_core_ceiling(s: int) -> dict[str, int]: + """Complete cutoff bound using only printed threshold tails.""" + + line_field_size = ROW["p"] ** ROW["extension_degree"] + previous_pairs = 0 + low_records = 0 + best: dict[str, int] | None = None + for cutoff in range(1, ROW["w"]): + current_pairs = pair_cap(s, cutoff) + new_pair_types = current_pairs - previous_pairs + records_per_type = (ROW["n"] - ROW["m"] + cutoff) // cutoff + low_records += new_pair_types * records_per_type + high_caps = [ROW["n"] // (cutoff + 1)] + for rank in range(1, s + 1): + value = max( + Fraction( + falling(ROW["n"], rank + 1), + ROW["m"] * (cutoff + 1) * rising(ROW["w"] + 1, rank - 1), + ), + Fraction( + falling(ROW["n"] - ROW["K"] + rank, rank + 1), + (cutoff + 1) * rising(ROW["w"] + 1, rank), + ), + ) + high_caps.append(value.numerator // value.denominator) + high_records = max(high_caps) + total = ROW["near"] + low_records + high_records + if current_pairs * current_pairs < line_field_size: + candidate = { + "cutoff": cutoff, + "pair_cap": current_pairs, + "low_records": low_records, + "high_records": high_records, + "total": total, + "signed_slack": ROW["budget"] - total, + } + if best is None or (candidate["total"], candidate["cutoff"]) < ( + best["total"], best["cutoff"] + ): + best = candidate + previous_pairs = current_pairs + require(best is not None, "nonempty printed cutoff scan") + return best + + +def abstract_ceiling_witness(s: int) -> dict[str, int | bool]: + cap = pair_cap(s, 1) + multiplicity = ROW["n"] - ROW["m"] + 1 + records = cap * multiplicity + total = ROW["near"] + records + return { + "tau": 1, + "pair_types": cap, + "multiplicity_per_type": multiplicity, + "records": records, + "total": total, + "over_budget": total - ROW["budget"], + "theta_resource_satisfied": records <= theta_resource(s), + "field_supply_satisfied": records < ROW["p"] ** ROW["extension_degree"], + } + + +def build() -> dict[str, object]: + s = 10 + legal: list[dict[str, int]] = [] + line_field_size = ROW["p"] ** ROW["extension_degree"] + for tau in range(1, ROW["w"]): + cap = pair_cap(s, tau) + if cap * cap >= line_field_size: + continue + weight = forced_pair_weight(s, tau) + records = (weight + tau - 1) // tau + legal.append( + { + "tau": tau, + "pair_cap": cap, + "forced_pair_weight": weight, + "forced_records": records, + "max_compatible_deficiency": max_compatible_deficiency(tau, weight), + } + ) + by_weight = max(legal, key=lambda item: (item["forced_pair_weight"], -item["tau"])) + by_records = max(legal, key=lambda item: (item["forced_records"], -item["tau"])) + require( + by_weight + == { + "tau": 6486, + "pair_cap": 2255946383610, + "forced_pair_weight": 743449148, + "forced_records": 114624, + "max_compatible_deficiency": 8, + }, + "weight optimum", + ) + require( + by_records + == { + "tau": 1795, + "pair_cap": 1075288922022, + "forced_pair_weight": 360132809, + "forced_records": 200632, + "max_compatible_deficiency": 4, + }, + "record optimum", + ) + require(theta_resource(s) == 106618568137036225644, "theta resource") + require(legal[-1]["tau"] == 65810, "last sub-square cutoff") + coupled = coupled_core_ceiling(s) + require( + coupled + == { + "cutoff": 26033, + "pair_cap": 107486241601454, + "low_records": 811957734614064312, + "low_theta_used": 106597778100457375003, + "high_records": 798572504373, + "total": 811958533186703629, + "signed_slack": -536977805075308542, + }, + "coupled core ceiling optimum", + ) + printed = printed_core_ceiling(s) + require( + printed + == { + "cutoff": 19737, + "pair_cap": 26130774875308, + "low_records": 808527428378681053, + "high_records": 5401690553097387, + "total": 813929118931913384, + "signed_slack": -538948390820518297, + }, + "printed core ceiling optimum", + ) + abstract = abstract_ceiling_witness(s) + require( + abstract + == { + "tau": 1, + "pair_types": 821289819491, + "multiplicity_per_type": 981105, + "records": 805771548351717555, + "total": 805771548351852499, + "over_budget": 530790820240457412, + "theta_resource_satisfied": True, + "field_supply_satisfied": True, + }, + "abstract certificate ceiling witness", + ) + return { + "schema": "kb-mca-rank11-nonuniform-theta-fixed-pair-route-cut-v1", + "parent": "491ccdf53d54846f5a013b808960645275c64ed3", + "row": ROW, + "explanation_dimension": s, + "theta_resource": theta_resource(s), + "last_subsquare_tau": legal[-1]["tau"], + "weight_optimum": by_weight, + "record_optimum": by_records, + "printed_core_ceiling": printed, + "coupled_core_ceiling": coupled, + "abstract_ceiling_witness": abstract, + "parallel_star": star_fixture(), + "claims": { + "rank11_paid": False, + "active_v4_movement": 0, + "fixed_pair_terminal_proved": True, + }, + } + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--json", action="store_true") + parser.add_argument("--tamper-selftest", action="store_true") + args = parser.parse_args() + expected = build() + if args.tamper_selftest: + mutations = [ + ("forced_pair_weight", 743449147), + ("forced_records", 114623), + ("max_compatible_deficiency", 9), + ] + caught = 0 + for key, value in mutations: + changed = copy.deepcopy(expected) + changed["weight_optimum"][key] = value + try: + require(changed == expected, "canonical result") + except Reject: + caught += 1 + require(caught == len(mutations), "all mutations caught") + changed = copy.deepcopy(expected) + changed["coupled_core_ceiling"]["total"] -= 1 + try: + require(changed == expected, "coupled ceiling canonical result") + except Reject: + caught += 1 + require(caught == len(mutations) + 1, "coupled mutation caught") + changed = copy.deepcopy(expected) + changed["printed_core_ceiling"]["cutoff"] += 1 + try: + require(changed == expected, "printed ceiling canonical result") + except Reject: + caught += 1 + require(caught == len(mutations) + 2, "printed mutation caught") + print(f"KB_MCA_RANK11_PAIR_ROUTE_CUT_TAMPER_PASS mutations={caught}/5") + return + if args.json: + print(json.dumps(expected, sort_keys=True)) + return + print( + "KB_MCA_RANK11_PAIR_ROUTE_CUT_PASS " + f"weight_tau={expected['weight_optimum']['tau']} " + f"weight={expected['weight_optimum']['forced_pair_weight']} " + f"record_tau={expected['record_optimum']['tau']} " + f"records={expected['record_optimum']['forced_records']} " + f"printed_total={expected['printed_core_ceiling']['total']} " + f"coupled_total={expected['coupled_core_ceiling']['total']}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/proofs/nonuniform_theta_pair_route_cut.md b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/proofs/nonuniform_theta_pair_route_cut.md new file mode 100644 index 000000000..9b9bef862 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/proofs/nonuniform_theta_pair_route_cut.md @@ -0,0 +1,273 @@ +# Nonuniform-theta and fixed-pair route cut + +Status: candidate local theorem. This proves a stronger structural terminal +for post-near error rank eleven, but it does not pay that rank or move an +active-v4 atom. + +## 1. Pointwise resource inequality + +Retain the notation of the support-transverse affine-span MCA compiler. For +each selected slope define its own margin + +\[ + \theta_\gamma=\min\left\{w+1, + \min_{b\in C'}|\{x\in S_\gamma:r_1(x)\ne b(x)\}|\right\}. +\] + +Then + +\[ + \sum_{\gamma\in Z}\theta_\gamma\le C_s, + \qquad + C_s=\left\lfloor\max\left\{ + \frac{n^{\underline{s+1}}}{m(w+1)^{\overline{s-1}}}, + \frac{(n-K+s)^{\underline{s+1}}}{(w+1)^{\overline s}} + \right\}\right\rfloor. \tag{1} +\] + +This is not obtained by summing the printed minimum-margin theorem. It is a +pointwise strengthening of its ordered-basis proof. With the proof's global +zero-normal parameters `z` and `g`, each individual parameter point owns at +least + +\[ + (m-g)\theta_\gamma(w+1)^{\overline{s-1}} +\] + +ordered full-rank coordinate tuples. A tuple determines at most one +parameter point. Summing before taking a minimum gives + +\[ + \sum_\gamma\theta_\gamma\le + \left\lfloor + \frac{(n-z)^{\underline{s+1}}} + {(m-g)(w+1)^{\overline{s-1}}} + \right\rfloor. +\] + +For fixed `z` the right side is largest at `g=z`; the same successive-ratio +calculation as in the source proof puts its maximum over +`0<=z<=K-s` at `z=0` or `z=K-s`. These are exactly the two terms in (1). +No uniformity of the extension count is assumed. + +## 2. Low-pair weighted incidence + +Fix `tau` with `1<=tau<=w-1`. For every record with +`theta_gamma<=tau`, choose a minimizing `b_gamma` and set + +\[ + a_\gamma=h_\gamma-\gamma b_\gamma, + \qquad \lambda_\gamma=\tau+1-\theta_\gamma. +\] + +Every `(a_gamma,b_gamma)` agrees with the received pair on at least +`m-tau` coordinates. If + +\[ + Q_s(\tau)=\left\lfloor + \frac{\binom{n-K+s}{s}}{\binom{w-\tau+s}{s}} + \right\rfloor, + \qquad Q_s(\tau)^2<|\mathbb F|, +\] + +the ordinary affine-span theorem and sub-square interleaving collapse imply +that at most `Q_s(tau)` distinct ordered pairs occur. + +Put `E=B_*-2w+1`. If the original line has more than `B_*` bad slopes, +then its post-near family has at least `E` slopes. By (1), the total weight +of the low records satisfies + +\[ + W_\tau=\sum_{\theta_\gamma\le\tau} + (\tau+1-\theta_\gamma) + \ge (\tau+1)E-C_s. \tag{2} +\] + +Indeed, add the nonnegative quantities +`tau+1-theta_gamma` for the low records and use +`sum theta_gamma<=C_s`; discarding the high-record cardinality only weakens +the result. Pigeonholing (2) over the at most `Q_s(tau)` **ordered pairs** +gives one fixed pair with weight at least, whenever the numerator is +positive, + +\[ + L_s(\tau)=\left\lceil + \frac{\max\{0,(\tau+1)E-C_s\}}{Q_s(\tau)} + \right\rceil. \tag{3} +\] + +There is no factor two in (3). Representing pairs as a bipartite graph has +at most `2Q_s` vertices but total endpoint degree `2W_tau`; equivalently, +the direct edge pigeonhole already gives (3). + +## 3. Exact fixed-pair core terminal + +For the fixed pair `(a,b)`, put + +\[ + H=\{x:r_0(x)=a(x),\ r_1(x)=b(x)\}, + \qquad \delta=\max\{1,m-|H|\}. +\] + +For every record assigned to this pair, its minimizing margin satisfies + +\[ + \theta_\gamma=|S_\gamma\setminus H|\ge \delta. +\] + +The sets `S_gamma\setminus H` are pairwise disjoint: outside `H`, the +equation + +\[ + r_0(x)-a(x)+\gamma(r_1(x)-b(x))=0 +\] + +has at most one finite solution. Hence one such pair has at most + +\[ + \left\lfloor\frac{n-|H|}{\delta}\right\rfloor + \leq\left\lfloor\frac{n-m+\delta}{\delta}\right\rfloor +\] + +records and total weight at most + +\[ + P_\tau(\delta)= + \left\lfloor\frac{n-m+\delta}{\delta}\right\rfloor + (\tau+1-\delta). + \tag{4} +\] + +Here the equality uses the fixed chosen minimizer: on the support, +`r_1-b` vanishes exactly at the points of `H`. Notice that `H` need not be +contained in every support; only `S_gamma intersect H` is used. + +For KoalaBear explanation dimension `s=10`, exact optimization of (3) gives + +\[ + \tau=6486,qquad L_{10}(6486)=743449148. +\] + +Comparison with (4) forces `delta<=8`, and the pair owns at least + +\[ + \left\lceil\frac{743449148}{6486}\right\rceil=114624 +\] + +distinct slopes. A second optimization maximizes the forced record count: + +\[ + \tau=1795,qquad L_{10}(1795)=360132809,qquad + \left\lceil\frac{L_{10}(1795)}{1795}\right\rceil=200632, +\] + +and (4) then forces `delta<=4`. + +Thus every over-budget error-rank-eleven line produces, separately for each +optimized cutoff, an actual fixed minimizing pair in the corresponding +certified terminal above. The two supplied pairs need not coincide. This is a +genuine common-core/global-code-line concentration, not distinct-neighbor +expansion. It remains unpaid: the sharp parallel-star control permits +parallel records, and the direct bound +`floor((n-m+j)/j)` is still compatible with both terminals. + +## 4. Complete coupled resource/core ceiling + +The same pointwise resource inequality can be coupled to every cumulative +pair-list cap, instead of using only one cutoff. For a distinct selected +low pair `e=(a,b)`, let + +\[ + H_e=\{x:r_0(x)=a(x),\ r_1(x)=b(x)\},\qquad + \delta_e=\max\{1,m-|H_e|\}. +\] + +The identity in Section 3 gives `theta_gamma>=delta_e` for every record +owned by `e`. Its disjoint exception sets give the multiplicity + +\[ + c_\delta=\left\lfloor\frac{n-m+\delta}{\delta}\right\rfloor. \tag{5} +\] + +Fix one minimizing direction, and hence one pair type, for every selected +record once and before scanning `t` or `J`. If `G(t)` is the number of +distinct selected pair types with +`delta_e<=t`, then each such pair agrees with the received pair on at least +`m-t` coordinates. Consequently the same sub-square interleaving theorem +gives + +\[ + G(t)\le Q_s(t). \tag{6} +\] + +For a cutoff `J` satisfying `Q_s(J)^2<|F|`, monotonicity makes the field +guard valid at every `t<=J`. Since `c_delta` decreases, Abel summation (or +the greedy integral LP) gives the uncoupled low ceiling + +\[ + Q_s(1)c_1+\sum_{\delta=2}^J + \bigl(Q_s(\delta)-Q_s(\delta-1)\bigr)c_\delta. \tag{7} +\] + +There is a small but rigorous improvement over adding an independent high +cap to (7). A low record of type `delta` consumes at least `delta` units of +the global resource (1), while a high record consumes at least `J+1`. +Thus the exact integral relaxation first fills the available record slots in +increasing `delta`; every low record is strictly more resource-efficient than +a high record. If `R_J` and `L_J` are the resource and record totals from +that greedy fill, its exact ceiling is + +\[ + U(J)=2w+L_J+ + \left\lfloor\frac{C_s-R_J}{J+1}\right\rfloor. \tag{8} +\] + +The exchange proof is immediate: replacing a selected lower-cost record by +a high record cannot increase cardinality, and all cumulative pair-type +constraints are prefixes, so selecting the cheapest available types first +is integral-optimal. Partial use of the final pair-type layer is allowed; +all statements are upper bounds on records, not existence assertions. + +The exact KoalaBear scan of every legal cutoff has minimum + +\[ +\begin{aligned} + J&=26033,\\ + Q_{10}(J)&=107486241601454,\\ + L_J&=811957734614064312,\\ + R_J&=106597778100457375003,\\ + \left\lfloor\frac{C_{10}-R_J}{J+1}\right\rfloor + &=798572504373,\\ + U(J)&=811958533186703629. +\end{aligned} +\] + +This remains above the target by + +\[ + 811958533186703629-274980728111395087 + =536977805075308542. +\] + +Therefore even the **coupled** use of the nonuniform theta resource, every +cumulative interleaved pair-list cap, complete core deficiency, and the +sharp per-pair exception packing fails by a factor greater than `2.95`. +This is a certificate-class route cut, not a construction of a Reed--Solomon +extremizer. + +## 5. Boundary and next theorem + +The weakest useful next statement is now source-specific: + +> Route every actual fixed minimizing pair with either `(delta<=8, weighted +> load>=743449148)` or `(delta<=4, record load>=200632)` to an existing +> chronology owner, or prove an additional collision bound across its +> disjoint exception sets. + +The GF(11) constant-code star remains a mandatory negative control. It +shows that (4), pair parallelism, and the absence of distinct-neighbor +expansion are real. The next useful theorem must therefore couple +**different fixed pairs** (for example, by a chronology-correct owner for +overlapping dense cores) rather than re-price the same marginal resources. +No rank-eleven payment, active-v4 movement, KoalaBear closure, layer-cake +summability, or asymptotic inference is claimed. diff --git a/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/independent_certificate_review.md b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/independent_certificate_review.md new file mode 100644 index 000000000..dc1116a81 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/independent_certificate_review.md @@ -0,0 +1,227 @@ +# Independent certificate and custody review + +Date: 2026-08-13 + +Reviewer role: isolated certificate, provenance, build, mutation, and public-wording auditor + +Artifact reviewed: payload +`ca624392d1842a69ca9212533af672e4325fa984dad11952443e247db80cb6c3` + +Status: **GREEN** + +## Scope + +I reviewed the frozen KoalaBear rank-eleven pair/core route-cut packet as a +certificate and custody artifact. I did not generate or edit its theorem, +note, release verifier, Sage verifier, campaign ledgers, or packet manifest. +This review file is deliberately excluded from `PACKET_FILES`. + +The review covers exact file custody, canonical serialization, arithmetic +replay, hostile mutations, finite-field controls, dependency pins, units, +signs, result boundaries, public wording, parent diff, campaign hygiene, and +the full TeX build. The separate mathematics review is the authority for the +informal proof joints; I independently checked that the certificate encodes +the reviewed theorem and does not strengthen its conclusion. + +## Frozen payload and file custody + +The manifest contains exactly 21 packet paths, and its path list agrees +exactly with the keys of `packet_file_sha256`. I independently read every +file as bytes and recomputed every SHA-256. All 21 hashes match. + +I then removed only the top-level `payload_sha256`, serialized the remaining +object with sorted keys and compact separators, and independently obtained + +```text +ca624392d1842a69ca9212533af672e4325fa984dad11952443e247db80cb6c3 +``` + +which equals the sealed payload. The manifest file itself has SHA-256 + +```text +f4b573b7a55474da707076d5b9ddd8d87304246ac0bfe0e57fba5d7fda30a509. +``` + +During the provisional review, one README clarification had been added after +the older `de47a1ce...` seal. The old verifier correctly failed closed. The +coordinator then froze and resealed the current bytes. The final candidate +has no hash mismatch; the pre-freeze failure is evidence that the custody +gate detects drift, not a defect in the final packet. + +## Provenance and parent boundary + +The exact parent commit exists locally as a commit: + +```text +491ccdf53d54846f5a013b808960645275c64ed3 +``` + +and equals the locally tracked PR #1167 head. Its ancestry contains the +restacked #1166 dependency `b67078c7c0254ce9e54e5748634de5133fae98ef`. +The recorded upstream-main refresh +`93fba1be3f3299b0ba4708d88715377bbb656e45` agrees with the local upstream +reference used for this packet. + +The tracked parent diff is narrow and additive: `agents.md` changes by +`+2/-1`, `experimental/agents-log.md` by `+25`, and +`experimental/grande_finale.tex` by `+187`. `git diff --check` passes. No +parent theorem or prior result is deleted. The new note, verifiers, +certificate, and campaign are separately added packet artifacts. + +The README explicitly classifies +`scratch/scan_weighted_pair_core.py` as a superseded discovery artifact with +the weaker factor-two endpoint normalization. It is excluded from the +packet. The release verifier is unambiguously authoritative, so the +preserved scratch file cannot silently redefine the certified result. + +## Exact verifier and hostile mutations + +The release verifier passed in normal and optimized Python modes: + +```text +KB_MCA_RANK11_PAIR_CORE_ROUTE_CUT_PASS +unconditional=813929118931913384 +conditional=811958533186703629 +conditional_over=536977805075308542 +``` + +Its mutation mode rejected all `6/6` hostile changes, covering: + +1. the unconditional total; +2. the resource-coupled total; +3. the fixed-pair deficiency wall; +4. false promotion of the abstract packing to RS realizability; +5. false rank-eleven payment; and +6. substitution of the base field for the deployed sextic field. + +The campaign experiment independently reproduced both pair terminals and +both ceilings in normal and optimized modes, and rejected all `5/5` of its +own mutations. An independently written exact optimizer also reproduced: + +- fixed-pair weight `743449148` at cutoff `6486`; +- fixed-pair record load `200632` at cutoff `1795`; +- the unconditional core-deficiency minimum + `813929118931913384` at `J=19737`; and +- signed excess `538948390820518297` over the budget. + +These independent scripts were used only for review and are not imported by +the release packet. + +## Finite-field controls + +Both exact Sage controls pass: + +```text +KB_MCA_RANK11_PAIR_CORE_ROUTE_CUT_SAGE_PASS +parallel_records=9 deficiency=1 sharp_capacity=9 + +KB_MCA_RANK11_GF7_PARALLEL_STAR_PASS +field=7 n=6 post_near=1 parallel=4 n_minus_A=4 +``` + +They verify exact support, strict post-near behavior, same-support pair +noncontainment, common-pair core, parallel records, and the sharp local +multiplier. The packet consistently says that neither toy realizes +KoalaBear affine error rank eleven. They therefore falsify only the +distinct-neighbor or reduced one-pair-multiplier shortcut and do not +over-certify the official row. + +## Units, normalization, guards, and signs + +An independent standard-library reconstruction confirmed + +```text +m = K+w = 1116048 +2w = 134944 +E = B_*-2w+1 = 274980728111260144 +C_10 = 106618568137036225644 +|F| = 2130706433^6 +``` + +At the two official cutoffs it independently reproduced: + +| cutoff | pair cap | forced pair weight | forced records | +|---:|---:|---:|---:| +| 6486 | 2255946383610 | 743449148 | 114624 | +| 1795 | 1075288922022 | 360132809 | 200632 | + +The sub-square checks pass over the actual sextic line field and fail to +justify replacing it by the base prime; the field mutation is explicitly +tested. Counts remain distinct finite affine slopes per actual received +line. Supports, pair labels, minimizers, endpoint vertices, and graph +incidences are not substituted for slopes. + +The signs are correct: + +```text +B_* - 813929118931913384 = -538948390820518297 +B_* - 811958533186703629 = -536977805075308542 +``` + +Both method ceilings remain over budget. The first is derived from the +printed threshold theorem plus cumulative pair/core bounds. The second +uses the new nonuniform sum-of-margins theorem. The manifest, note, source, +and reviews consistently preserve that dependency distinction. + +The two optimized pair rows are separately quantified existentials; the +packet does not claim that one pair simultaneously attains both. The direct +ordered-pair pigeonhole has no factor two. Parallel owned slopes are not +called distinct neighbors. + +## Campaign and build gates + +The actionable campaign audit passes: + +```text +ok=true +ideas=4 +claims=3 (all candidate) +reviews=3 +review_status_rows=15 +dependencies=5 +``` + +The multi-axis table correctly leaves public wording open until this custody +review; it does not use the campaign audit as proof of the theorem. + +A fresh TeX Live build from a new output directory completed successfully: + +```text +exitCode=0 +pages=122 +pdf size=1119632 bytes +``` + +The log has no undefined citations or references, multiply defined labels, +or overfull boxes. The reported underfull boxes are pre-existing layout +warnings and do not affect the new theorem or cross-references. + +## Public wording and result boundary + +The workboard, agents log, theorem source, threshold note, README, campaign +contract, proof memo, and barrier audit consistently describe this as a +local route cut. They expressly state: + +- error rank eleven remains unpaid; +- active-v4 ledger movement is zero; +- KoalaBear is not closed; +- the abstract singleton packing is not asserted RS-realizable; +- the finite stars are local negative controls; and +- the missing result must couple different actual fixed pairs or provide a + chronology-correct owner for dense parallel cores. + +I found no wording that promotes the route cut to a deployed payment, +complete KoalaBear proof, universal four-rate result, or prize closure. + +## Verdict + +**GREEN.** Exact payload +`ca624392d1842a69ca9212533af672e4325fa984dad11952443e247db80cb6c3` +passes certificate, custody, provenance, mutation, control, campaign, diff, +unit, sign, public-boundary, and fresh-build review. + +No packet repair is required. The packet is suitable for scoped +publication as a rank-eleven route cut, subject to retaining the exact +parent dependency and current nonclaims. The next mathematical obligation +is the named same-line cross-pair compatibility/owner theorem; this review +does not supply or approve that missing payment. diff --git a/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/independent_math_review.md b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/independent_math_review.md new file mode 100644 index 000000000..efaafb157 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/independent_math_review.md @@ -0,0 +1,258 @@ +# Independent mathematics review + +Date: 2026-08-13 + +Reviewer role: isolated statement, quantifier, algebra, and boundary auditor + +Review type: proof audit / implication-chain audit + +Status: **GREEN** + +## Statement audited + +I audited the three new statements in `experimental/grande_finale.tex`: + +1. `thm:mca-nonuniform-support-margin`, asserting the pointwise resource + bound + \[ + \sum_{\gamma\in Z}\theta_\gamma\le C_s; + \] +2. `thm:mca-weighted-pair-core-route-cut`, converting that resource into a + weighted fixed-minimizing-pair terminal and proving the exact + core-deficiency multiplicity + \[ + c_\delta=\left\lfloor\frac{n-m+\delta}{\delta}\right\rfloor; + \] +3. `prop:kb-rank-eleven-pair-core-terminal`, specializing the result to the + KoalaBear error-rank-eleven slice and proving both the two row-wise + concentration terminals and the complete printed-theorem/core-deficiency + certificate-class wall. + +This is a local route-cut audit. It does not audit or authorize an active-v4 +payment, KoalaBear closure, or the universal four-rate statement. + +## Files/sections read + +- `/Users/scott/math_code/AGENTS.md` (ancestor-chain guidance; no closer + `AGENTS.md` or `AGENTS.override.md` exists in the target worktree); +- `experimental/grande_finale.tex`, especially + `thm:affine-span-list`, `thm:proper-subspace-mca`, + `thm:support-transverse-affine-span-mca`, `thm:mca-error-rank-gauge`, + `prop:kb-post-deletion-affine-error-router`, + `thm:subsquare-interleaving-collapse`, and the three new statements; +- `experimental/notes/thresholds/kb_mca_rank11_pair_core_route_cut_v1.md`; +- `experimental/campaigns/kb-mca-rank11-pair-core-post-1167/00_contract.md`; +- `experimental/campaigns/kb-mca-rank11-pair-core-post-1167/proofs/nonuniform_theta_pair_route_cut.md`; +- `experimental/campaigns/kb-mca-rank11-pair-core-post-1167/threads/barrier_adversary.md`; +- the dependency and claim registries; +- the primary Python verifier, Sage replays, GF(7) control, and existing + Wolfram arithmetic-replay memo. + +During review I identified three statement-level blockers: a false common-pair +quantifier across two independently optimized cutoffs, a vacuous existential +when the forced load is zero, and an unstated globally fixed minimizer needed +for the cumulative deficiency distribution. The generator repaired all three +in the current source, note, and campaign proof before this verdict. I +re-audited the repaired bytes. + +## Dependencies + +- **PROVEN / IMPORTED:** exact post-near record selection and reversible + error-rank gauge from PR #1166 at + `b67078c7c0254ce9e54e5748634de5133fae98ef`. +- **PROVEN / IMPORTED:** recursive affine-span list bound, + support-transverse affine-span theorem, and sub-square common-support + interleaving collapse as pinned by PR #1167 at + `491ccdf53d54846f5a013b808960645275c64ed3`. +- **PROVEN HERE:** the nonuniform sum-of-margins strengthening. It is not + inferred by summing the old minimum-margin statement; it follows by + summing the disjoint ordered-normal-basis ownership counts before taking + the endpoint maximum. +- **PROVEN HERE:** fixed-pair exception-set disjointness and the resulting + multiplicity/weight bound. +- **EXACT FINITE CERTIFICATE:** the two KoalaBear optimizations, field guards, + adjacent cutoff values, unconditional Abel ceiling, and conditional + resource-coupled ceiling. +- **EMPIRICAL ONLY IN ITS DECLARED SCOPE:** the GF(7)/GF(11) constant-code + stars. They show that parallel records and the local fixed-pair multiplier + are genuine; they are not rank-eleven KoalaBear counterexamples. +- **NOT USED:** the literature sweep and Wolfram replay are corroboration, + not load-bearing proof inputs. + +## Parameter dependence + +The abstract statements track `n`, `K`, `m=K+w`, affine explanation +dimension `s`, cutoff `tau` (or `J`), field size `|F|`, record threshold `E`, +individual margins `theta_gamma`, fixed-pair core `H`, and deficiency +`delta`. There is no hidden dependence on `T`, `Y`, `L`, +`L_{\bar I}`, `lambda`, `I`, or an asymptotic regime. + +The KoalaBear proposition explicitly fixes + +\[ +(n,K,m,w,B_*)=(2097152,1048576,1116048,67472, +274980728111395087) +\] + +and the actual sextic line field `|F|=2130706433^6`. The latter matters: +the sub-square guards are checked in the sextic field, not over the base +prime. The near add-back is exactly `2w=134944`, so an integer line with +more than `B_*` bad slopes leaves at least `E=B_*-2w+1` post-near slopes. + +## Proof verification + +### Nonuniform resource + +For the one fixed affine explanation flat, the zero-normal data `(z,g)` are +global. A zero normal makes its affine incidence equation either identically +true on the flat or identically false. For each parameter point, the first +`s-1` independent extensions retain the common factor +`(w+1)^(overline{s-1})`, while the last extension has its individual lower +bound `theta_gamma`. An ordered independent `(s+1)`-tuple determines at +most one parameter point. Summing therefore gives + +\[ +(m-g)(w+1)^{\overline{s-1}}\sum_\gamma\theta_\gamma +\le (n-z)^{\underline{s+1}}. +\] + +The inherited constraints `0<=g<=z<=K-s`, maximization first at `g=z`, and +the cited successive-ratio sign put the maximum at `z=0` or `z=K-s`. The +second endpoint denominator is indeed +`(w+s)(w+1)^(overline{s-1})=(w+1)^(overline s)`. + +### Exact-record pair reconstruction + +For a low record `theta_gamma<=tauK` coordinates. Translation of the first component by `c_0` +preserves the common support, so the ordinary affine-span bound and the +two-column interleaving collapse apply without changing the received line, +slope, support, or explaining data. + +For a fixed pair `(a,b)`, on the actual exact `m`-support, + +\[ +S_\gamma\cap H_{a,b} +=\{x\in S_\gamma:r_1(x)=b(x)\}. +\] + +Thus `theta_gamma=|S_gamma\H|>=delta`. Outside `H`, the affine equation +determines at most one finite slope, so exception sets belonging to distinct +slopes are disjoint. If `|H|=m`, setting `delta=1` and using `n-|H|<=n-m` makes the +printed `n-m+1` numerator a safe one-unit overestimate. Hence both the +multiplicity and cutoff-weight inequalities are valid. + +The theorem now assumes `(tau+1)E>C_s`, so its existential fixed-pair +conclusion is never invoked with an empty low family or zero forced weight. + +### High subranks, cumulative cores, and quantifiers + +The high family may span any affine subrank `0<=j<=s`. For `j>=1`, its +direction space is a subspace of `C'`, so minimizing over it cannot reduce +the inherited margins; the support-transverse theorem applies. Rank zero is +separately bounded by `floor(n/(J+1))`. Taking the maximum over all subranks +is therefore necessary and sufficient. + +For the cumulative core calculation, one minimizing direction and pair type +is now fixed once for every selected record before any `t` or `J` scan. The +sets counted by `G(t)` are consequently nested. A pair of deficiency at most +`t` agrees with the received pair on at least `m-t`, and monotonicity of +`Q_s(t)` makes the single guard `Q_s(J)^2<|F|` valid for every `t<=J`. +Since `c_delta` decreases, Abel summation gives the stated greedy upper +envelope. Low records and `theta>=J+1` records form a disjoint exhaustive +partition. + +The proposition now correctly has a row-wise existential: each cutoff +supplies a fixed pair, but the pairs for `tau=6486` and `tau=1795` need not +coincide. + +## Exact arithmetic and controls + +Independent exact-integer reconstruction confirmed: + +- `C_10=106618568137036225644`; +- at `tau=6486`, `Q=2255946383610`, forced weight `743449148`, at least + `114624` records, and maximal compatible deficiency `8`; +- at `tau=1795`, `Q=1075288922022`, forced weight `360132809`, at least + `200632` records, and maximal compatible deficiency `4`; +- the field guard holds at both cutoffs and through the final legal cutoff + `65810`; +- the unconditional ceiling has unique minimum + `813929118931913384` at `J=19737`; the adjacent values at `19736` and + `19738` are strictly larger; +- the resource-coupled ceiling is + `811958533186703629`, first attained at `J=26033` and constant through + `J=65810`. The note does not incorrectly claim uniqueness for this + coupled minimum. + +The primary Python verifier passed in normal and optimized modes and rejected +all `6/6` hostile mutations. Both shipped Sage star controls passed. These +calculations are exact official-scale finite arithmetic for the displayed +integers; the small-field stars are only local sharpness controls. + +## Layer-cake / dyadic summability + +Not applicable. The cutoff partition and Abel summation are finite exact +combinatorial sums, with no dyadic weights or additive asymptotic errors. + +## Moment / Markov / Chebyshev + +Not applicable. No moment inequality, probability tail, or optimization in +a moment parameter is used. + +## Edge cases / notation + +- `s>=1` is inherited from the support-transverse theorem; the deployed + application uses `s=10`. +- `1<=tau,J<=w-1` ensures `m-tau>K` and keeps the margin cap inactive. +- The new positive-load condition handles the empty-low-family boundary. +- Empty high or low portions satisfy their respective upper bounds. +- `delta=1` safely covers both a one-point deficient core and cores of size + at least `m`. +- Only distinct finite affine slopes are counted. Pair labels, supports, + minimizers, endpoints, and parallel graph incidences are not substituted + for slopes. +- The two table rows are independent existential alternatives, not one + simultaneously satisfying pair. +- Agreement `m`, cutoff `tau`, affine dimension `s`, and error rank eleven + are not conflated. + +## Numerical evidence + +The official-row scans cover every legal integer cutoff, using exact big +integers. They certify the displayed finite maxima/minima conditional only +on the proved symbolic inequalities. The GF(7) and GF(11) stars are +toy-scale exact controls and prove no official-rank realization or +asymptotic statement. The abstract certificate-class packing is explicitly +not asserted to be simultaneously Reed--Solomon realizable. + +## Verdict + +**GREEN - proof obligation appears satisfied with dependencies verified.** + +The corrected source proves a genuine local rank-eleven concentration and a +sharp route cut for the declared margin/pair/core certificate class. It does +not pay rank eleven or move the deployed chronology. + +## Remaining risks + +1. A chronology-correct owner or cross-pair collision theorem for the dense + `delta<=4`, `>=200632` parallel terminal remains wholly unproved. +2. The cumulative ceiling is a method ceiling, not an actual RS extremizer. +3. Publication still requires the independent certificate/custody review + and source-build gates specified by the campaign; this mathematics + review does not substitute for them. + +## Minimal next action + +Complete the separate certificate/custody review on the repaired bytes. If +that remains GREEN, publish the scoped route cut. The next mathematical +attack must couple different actual minimizing pairs or route dense common +cores to an earlier chronology owner; another scalar cutoff or smaller +fixed-pair multiplier is ruled out by the exact local star control. + +**Final status: GREEN.** diff --git a/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/literature_sweep.md b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/literature_sweep.md new file mode 100644 index 000000000..1a15026a8 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/literature_sweep.md @@ -0,0 +1,33 @@ +# Targeted literature sweep + +Date: 2026-08-13 + +Tool: Exa deep search, 55 returned sources across four queries plus targeted +primary-source fetches. + +Frozen question: does the literature supply a worst-case theorem coupling +many distinct minimizing codeword pairs on one special Reed--Solomon received +line, strong enough to improve the cumulative pair/core count at explanation +dimension ten? + +Primary sources inspected: + +- Brakensiek, Gopi, and Makam, *Generic Reed--Solomon Codes Achieve + List-Decoding Capacity* (arXiv:2206.05256v4). +- Yu and Loeliger, *Simultaneous Partial Inverses and Decoding Interleaved + Reed--Solomon Codes* (arXiv:1612.07854). +- Shangguan and Tamo, *Combinatorial List-Decoding of Reed--Solomon Codes + beyond the Johnson Radius* (arXiv:1911.01502). + +The generic-RS result controls higher-order intersections for generic +evaluation sets; the deployed KoalaBear domain is special, so the genericity +hypothesis cannot be imported. Simultaneous partial inverses concern +algorithmic locator reconstruction under structured error hypotheses, not a +worst-case upper bound for these actual minimizing-pair cores. The +cycle-space method of Shangguan--Tamo is the closest conceptual neighbor, but +its list-ball dependency does not directly give the required same-line, +chronology-preserving cross-pair collision bound. + +Verdict: no external theorem is load-bearing. The search sharpens the missing +statement to an actual-record cross-pair compatibility/owner lemma; it does +not justify one. The packet's theorems remain self-contained. diff --git a/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/wolfram_replay.md b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/wolfram_replay.md new file mode 100644 index 000000000..28746c04c --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/wolfram_replay.md @@ -0,0 +1,20 @@ +# Wolfram exact replay + +Date: 2026-08-13 + +The Wolfram plugin independently evaluated the KoalaBear rank-eleven resource, +pair loads, slope floors, deficiency walls, and adjacent budget arithmetic. +It returned + +```text +{106618568137036225644, + {{6486,743449148,114624,8}, + {1795,360132809,200632,4}}, + 84494997} +``` + +The entries are respectively `C_10`; the two tuples +`{tau, fixed-pair weight, forced slope count, maximal compatible deficiency}`; +and the slack obtained if every pair at `tau=6486` has weight at most one +below the forced terminal. This is an independent arithmetic replay, not a +proof of the source-bound incidence theorem. diff --git a/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/scratch/scan_weighted_pair_core.py b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/scratch/scan_weighted_pair_core.py new file mode 100644 index 000000000..1378866bf --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/scratch/scan_weighted_pair_core.py @@ -0,0 +1,172 @@ +#!/usr/bin/env python3 +"""Superseded exploratory scan for the rank-11 pair/core route cut. + +This discovery script models a bipartite endpoint-degree bound and therefore +contains the weaker factor-two normalization. It is preserved as research +history, is excluded from the release packet, and must not be used for the +fixed ordered-pair theorem or its certified constants. The authoritative +replay is ``experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py``. +""" + +from __future__ import annotations + +from fractions import Fraction +from math import comb, prod + + +ROW = { + "p": 2130706433, + "extension_degree": 6, + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "near": 134944, + "budget": 274980728111395087, +} + + +def falling(x: int, length: int) -> int: + return prod(x - i for i in range(length)) + + +def rising(x: int, length: int) -> int: + return prod(x + i for i in range(length)) + + +def theta_resource(s: int) -> int: + n, K, m, w = (ROW[key] for key in ("n", "K", "m", "w")) + raw = max( + Fraction(falling(n, s + 1), m * rising(w + 1, s - 1)), + Fraction(falling(n - K + s, s + 1), rising(w + 1, s)), + ) + return raw.numerator // raw.denominator + + +def ordinary_cap(s: int, tau: int) -> int: + n, K, m, w = (ROW[key] for key in ("n", "K", "m", "w")) + agreement = m - tau + assert agreement > K + return comb(n - K + s, s) // comb(agreement - K + s, s) + + +def profile(s: int, tau: int) -> dict[str, int | bool]: + M = theta_resource(s) + Q = ordinary_cap(s, tau) + available = ROW["budget"] - ROW["near"] + numerator = (available + 1) * (tau + 1) - 1 - M + p = numerator // (2 * Q) + if p < 0: + p = -1 + paid = ROW["near"] + (M + 2 * p * Q) // (tau + 1) + next_paid = ROW["near"] + (M + 2 * (p + 1) * Q) // (tau + 1) + edge_degree = (p + tau) // tau if p >= 0 else 0 + parallel_weight_cap = tau * (ROW["n"] - ROW["m"] + tau) + distinct_neighbors = ((p + 1) + parallel_weight_cap - 1) // parallel_weight_cap if p >= 0 else 0 + return { + "s": s, + "tau": tau, + "theta_resource": M, + "ordinary_cap": Q, + "p": p, + "forced_min_weighted_degree": p + 1, + "forced_min_edge_record_degree": edge_degree, + "parallel_weight_cap": parallel_weight_cap, + "forced_distinct_neighbors": distinct_neighbors, + "paid_if_p_degenerate": paid, + "slack": ROW["budget"] - paid, + "next_p_total": next_paid, + "next_p_fails": next_paid > ROW["budget"], + "subsquare": Q * Q < ROW["p"] ** ROW["extension_degree"], + } + + +def max_parallel_weight(tau: int) -> tuple[int, int]: + """Max of floor((n-m+j)/j)*(tau+1-j), 1<=j<=tau.""" + # Both nonnegative integer factors are nonincreasing in j, so j=1. + return (ROW["n"] - ROW["m"] + 1) * tau, 1 + + +def collapsed_pair_bound(s: int, tau: int) -> dict[str, int | bool]: + M = theta_resource(s) + Q = ordinary_cap(s, tau) + load, deficiency = max_parallel_weight(tau) + total = ROW["near"] + (M + Q * load) // (tau + 1) + return { + "s": s, + "tau": tau, + "theta_resource": M, + "pair_cap": Q, + "max_parallel_weight": load, + "maximizing_deficiency": deficiency, + "total": total, + "slack": ROW["budget"] - total, + "subsquare": Q * Q < ROW["p"] ** ROW["extension_degree"], + } + + +def forced_heavy_pair(s: int, tau: int) -> dict[str, int | bool]: + M = theta_resource(s) + Q = ordinary_cap(s, tau) + available = ROW["budget"] - ROW["near"] + p = ((available + 1) * (tau + 1) - 1 - M) // Q + paid = ROW["near"] + (M + p * Q) // (tau + 1) + next_paid = ROW["near"] + (M + (p + 1) * Q) // (tau + 1) + parallel, _ = max_parallel_weight(tau) + forced_weight = p + 1 + def load(j: int) -> int: + return ((ROW["n"] - ROW["m"] + j) // j) * (tau + 1 - j) + + lo, hi = 1, tau + 1 + while lo < hi: + mid = (lo + hi) // 2 + if load(mid) >= forced_weight: + lo = mid + 1 + else: + hi = mid + max_deficiency = lo - 1 + return { + "s": s, + "tau": tau, + "theta_resource": M, + "pair_cap": Q, + "forced_pair_weight": forced_weight, + "forced_pair_edges": (forced_weight + tau - 1) // tau, + "forced_max_core_deficiency": max_deficiency, + "parallel_weight_cap": parallel, + "fraction_of_parallel_cap_ppm": ((p + 1) * 1_000_000) // parallel, + "paid_if_each_pair_at_most_p": paid, + "slack": ROW["budget"] - paid, + "next_total": next_paid, + "next_fails": next_paid > ROW["budget"], + "subsquare": Q * Q < ROW["p"] ** ROW["extension_degree"], + } + + +def main() -> None: + for s in (9, 10, 11): + legal = [profile(s, tau) for tau in range(1, ROW["w"])] + legal = [item for item in legal if item["p"] >= 0 and item["subsquare"]] + by_weight = max(legal, key=lambda x: (x["forced_min_weighted_degree"], -x["tau"])) + by_edges = max(legal, key=lambda x: (x["forced_min_edge_record_degree"], -x["tau"])) + print("RANK", s + 1) + print("WEIGHT", by_weight) + print("EDGES", by_edges) + collapsed = [collapsed_pair_bound(s, tau) for tau in range(1, ROW["w"])] + collapsed = [item for item in collapsed if item["subsquare"]] + best_collapsed = min(collapsed, key=lambda x: (x["total"], x["tau"])) + print("COLLAPSED", best_collapsed) + heavy = [forced_heavy_pair(s, tau) for tau in range(1, ROW["w"])] + heavy = [item for item in heavy if item["subsquare"] and item["forced_pair_weight"] > 0] + best_heavy = max(heavy, key=lambda x: (x["forced_pair_weight"], -x["tau"])) + best_fraction = max(heavy, key=lambda x: (x["fraction_of_parallel_cap_ppm"], -x["tau"])) + best_core = min(heavy, key=lambda x: (x["forced_max_core_deficiency"], -x["forced_pair_edges"], x["tau"])) + best_pair_edges = max(heavy, key=lambda x: (x["forced_pair_edges"], -x["tau"])) + print("HEAVY_WEIGHT", best_heavy) + print("HEAVY_FRACTION", best_fraction) + print("HEAVY_CORE", best_core) + print("HEAVY_EDGES", best_pair_edges) + + +if __name__ == "__main__": + main() diff --git a/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/threads/barrier_adversary.md b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/threads/barrier_adversary.md new file mode 100644 index 000000000..0f6e8256a --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-pair-core-post-1167/threads/barrier_adversary.md @@ -0,0 +1,276 @@ +# Barrier adversary: rank-eleven pair/core certificate ceiling + +Date: 2026-08-13 + +Role: independent barrier checker / computational adversary + +Status: **PASS as a route cut; FAIL as a rank-eleven payment** + +## Scope and dependencies + +The audited objects are actual post-near, same-support-pair-noncontained +records after the #1166/#1167 gauge. There is one fixed complete record per +distinct affine slope, and its explanation lies in the fixed affine +ten-flat. Counts below are slopes, never witnesses, pair labels, graph +vertices, or passports. + +The audit uses: + +1. the printed support-local threshold theorem from #1166; +2. the ordinary affine-span pair cap and the #1167 sub-square interleaving + theorem; +3. exact fixed-pair core identities proved below; +4. for the stronger weighted conclusions only, the new nonuniform resource + lemma + \(\sum_\gamma\theta_\gamma\le C_s\). + +Items 1--3 already give an unconditional certificate-class no-go. Item 4 +has a direct ordered-basis proof, but it is a new theorem and must pass an +independent statement/quantifier review before it is banked. + +## Nonuniform theta resource + +For explanation dimension \(s\), define + +\[ +C_s=\left\lfloor\max\left\{ + \frac{n^{\underline{s+1}}}{m(w+1)^{\overline{s-1}}}, + \frac{(n-K+s)^{\underline{s+1}}}{(w+1)^{\overline s}} +\right\}\right\rfloor. +\] + +The printed minimum-margin theorem does not by itself imply a sum bound. +Instead rerun its ordered-normal-basis proof recordwise. With the proof's +global zero-normal parameters \(z,g\), record \(\gamma\) owns at least + +\[ + (m-g)\theta_\gamma (w+1)^{\overline{s-1}} +\] + +ordered independent normal tuples. One tuple determines at most one +parameter point, because its \(s+1\) independent normals determine that +point uniquely. Summing before minimizing therefore gives + +\[ + (m-g)(w+1)^{\overline{s-1}} + \sum_\gamma\theta_\gamma + \le (n-z)^{\underline{s+1}}. +\] + +The source proof's same maximization over \(g\le z\) and +\(0\le z\le K-s\) has its maximum at \(g=z\) and an endpoint +\(z\in\{0,K-s\}\). Hence + +\[ + \sum_\gamma\theta_\gamma\le C_s. \tag{R} +\] + +This proof uses one fixed affine flat and basis. It does not sum bounds +obtained from separately re-gauged subfamilies. + +## Correct fixed-pair and endpoint terminals + +Put \(E=B_*-2w+1\). At a legal cutoff +\(1\le\tau On the same actual received line and chronology slice, route every fixed +> minimizing pair with either deficiency at most eight and weighted load at +> least 743,449,148, or deficiency at most four and at least 200,632 records, +> to a named paid owner; alternatively prove an aggregate overlap/collision +> inequality across different dense cores that makes iterative removal fit +> the budget. + +For the secondary ray lane, the corresponding common-endpoint terminal is +100,316 records. Any owner must be chronology-disjoint under iteration. +A one-pair multiplier improvement, an ordinary distinct-neighbor theorem, +or another scalar threshold optimization is ruled out. + +No rank-eleven payment, active-v4 ledger movement, or KoalaBear closure is +authorized. + +## Reproducibility + +- Main campaign replay: + `experiments/verify_nonuniform_theta_pair_route_cut.py`. +- Independent adversarial arithmetic: + `/private/tmp/rank11_weighted_barrier_fast.py` and + `/private/tmp/rank11_core_deficiency_lp.py`. +- Finite-field control shipped with this campaign: + `controls/gf7_parallel_star.sage`. diff --git a/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/00_contract.md b/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/00_contract.md new file mode 100644 index 000000000..fdcffb47f --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/00_contract.md @@ -0,0 +1,60 @@ +--- +workboard_item: K4 +row: KoalaBear MCA +object: MCA +target_epsilon: 2^-128 +agreement: 1116048 +B_star: 274980728111395087 +unit: distinct bad affine slopes per received line +parent_commit: 6a5dcdae1591fc7f044eda6a942bfe178521a48c +status: PROVED_STRUCTURAL_ROUTER +active_v4_ledger_movement: 0 +--- + +# Contract + +This packet is a stacked successor to PR #1168 at exact parent +`6a5dcdae1591fc7f044eda6a942bfe178521a48c`. It attacks the first cross-pair joint left by that PR: +simultaneous compatibility of distinct minimizing-pair cores in the +post-near affine-error-rank-eleven branch. + +The direct theorem classifies every family of actual minimizing pairs whose +coefficient matrices have pairwise rank distance at most one. Such a family +is forced into one of two geometries: + +1. a fixed polynomial correction ray, paid by a new common-core-aware + affine-ray count; or +2. a fixed two-vector multiplier times a correction space of dimension at + most ten. Its affine-linear arrangement is paid by an exact `1031`-slope + bound when proper, and otherwise emits a concrete positive-dimensional + linear correction component. + +A pair-core clique with pairwise intersection `K-1` is automatically in this +rank-one class by the Reed--Solomon two-dimensional common-zero bound. +Therefore maximal-overlap pair cliques are no longer an untyped rank-eleven +terminal. + +## Quantifier + +Uniform over the actual KoalaBear line field, every received pair, every +gauged post-near explanation flat of affine dimension at most ten, and every +selected family of distinct actual minimizing pairs satisfying the stated +pairwise rank-one condition. + +## Projection + +All counts remain counts of distinct affine slopes. A selected slope maps +injectively to its correction parameter because the slope is retained as the +first parameter coordinate. + +## Exact impact + +- fixed correction-ray branch: at most `8,147,918` slopes; +- proper rank-`r<=10` affine correction-space branch: at most + `floor(C(n,r+1)/C(m,r+1)) <= 1,031` slopes; +- nonproper branch: an explicit nonempty positive-dimensional affine-linear + intersection of `r+1` coordinate hyperplanes, source-bound to the existing + positive-dimensional correction-component lane. + +This is a structural router, not a rank-eleven payment and not a KoalaBear +closure. diff --git a/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/01_frontier_map.md b/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/01_frontier_map.md new file mode 100644 index 000000000..2034c842c --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/01_frontier_map.md @@ -0,0 +1,56 @@ +# Frontier map + +## Exact parent + +PR #1168 head `6a5dcdae1591fc7f044eda6a942bfe178521a48c`. + +## Imported frontier + +PR #1168 proves that any over-budget post-near affine-error-rank-eleven line +forces: + +- one actual minimizing pair of core deficiency at most `8` and weighted load + at least `743449148`; and +- independently, a possibly different pair of core deficiency at most `4` + owning at least `200632` slopes. + +The fixed-pair multiplier is sharp. Its declared pair/core certificate class +still has minimum `811958533186703629 > B_*`, so the missing input must couple +different pair types or route them to an owner. + +## New cut + +Write a minimizing pair in a basis of the ten-dimensional direction code as +a `2 x s` coefficient matrix `M_e`, `s<=10`. + +This packet removes the complete rank-one anticode branch: + +- if `rank(M_e-M_f)<=1` for every two pair types, the family is a translate + of one of the two maximal-clique geometries of the bilinear-forms graph; +- a fixed right factor is one affine correction ray, paid uniformly over + its possible universal core by `8147918`; +- a fixed left factor is one affine correction space of dimension at most + ten; +- pairwise core overlap `K-1` implies the rank-one hypothesis. + +Thus the genuine successor residual contains rank-two pair differences, or +else enters the already named positive-dimensional linear correction +component. + +## What remains + +The packet does **not** prove that an unsafe rank-eleven family contains one +large rank-one pair anticode. The next aggregate theorem must do at least one +of the following: + +1. force substantial mass into one rank-one anticode and preserve first-match + ownership; +2. control collections containing rank-two pair differences by a new + intersection/cycle theorem; or +3. pay the emitted degree-one positive-dimensional correction component. + +## Non-overlap + +This is not another fixed-pair multiplicity improvement, threshold scan, +ordinary distinct-neighbor claim, or per-clique summation. No sum over +different anticodes is banked. diff --git a/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/02_controls.md b/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/02_controls.md new file mode 100644 index 000000000..93cec19c8 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/02_controls.md @@ -0,0 +1,41 @@ +# Controls + +## Positive controls + +1. **Fixed-right-factor family.** Matrices `M_i=M_0+u_i v^T` have every + pairwise difference of rank at most one and map to one fixed polynomial + correction ray. The verifier scans every possible universal-core size + `0<=u<=K-1`; the exact worst case is `8147918` at `u=K-1`. +2. **Fixed-left-factor family.** Matrices `M_i=M_0+u v_i^T` have every + pairwise difference of rank at most one and map to one correction space. +3. **Maximal-overlap implication.** Two independent degree-`K-1\), remove every clone class of size at least \(K\). There +are at most + +\[ + L_u=\left\lfloor\frac{n_u}{K}\right\rfloor +\] + +such classes, and each associated global affine codeword line owns at most +\(n-m+1\) slopes. When \(m_u\le K-1\), put \(L_u=0\); all clone classes +already have size at most \(m_u-1=q_u\). + +Coordinates with \(P(x)=0\) outside \(U\) have a nonzero affine error and +therefore one root slope. At any selected slope they form one additional +part of size at most \(K-1-u\le q_u\). Thus, after the large clone classes +are removed, the \(m_u\) nonuniversal coordinates of a selected exact +support split into parts of size at most \(q_u\). Since \(m_u\le2q_u\), +the number of unordered pairs drawn from different parts is at least + +\[ + q_u(m_u-q_u). +\] + +A pair from two different graph clone classes determines at most one slope, +because two distinct affine functions agree at most once. A vertical/graph +pair also determines at most one slope. Double counting gives + +\[ + R(u)=L_u(n-m+1)+ + \left\lfloor + \frac{\binom{n-u}{2}}{q_u(m-u-q_u)} + \right\rfloor . +\] + +The exact integer scan over \(0\le u\le K-1\) gives + +\[ + \max_u R(u)=R(K-1)=8\,147\,918. +\] + +The endpoint has +\(m_{K-1}=67473\), \(q_{K-1}=67472\), and \(L_{K-1}=0\). +Therefore the entire fixed-right-factor anticode owns at most +\(8\,147\,918\) distinct selected slopes. + +### Fixed-left-factor branch: one affine correction space + +Put `P_e=sum_j(v_e)_jP_j` and +`W=span{P_e:e in E}`, of dimension `r<=s<=10`. Then + +\[ + h_{e,\gamma} + =H_0(X,\gamma)+(\alpha+\gamma\beta)P_e(X) + \in H_0(X,\gamma)+W. +\] + +Use the actual correction +`Q_{e,gamma}=(alpha+gamma beta)P_e in W` as parameter. Relative to a basis +`Q_1,...,Q_r` of `W`, every coordinate agreement equation is affine linear +in the `r+1` variables `(gamma,c_1,...,c_r)`: + +\[ + F_x(\gamma,\mathbf c) + =r_0(x)+\gamma r_1(x)-H_0(x,\gamma) + -\sum_{j=1}^r c_jQ_j(x)=0. +\] + +Call the arrangement **proper** when every `r+1` coordinate hyperplanes +have empty intersection or a single affine point. If it is proper, double +counting pairs `(selected point,J)`, where `J` is an `(r+1)`-subset of its +agreement support, gives + +\[ + |Z|\binom m{r+1}\le\binom n{r+1}. +\] + +For the KoalaBear row the right quotient is increasing for `0<=r<=10` and + +\[ + |Z|\le + \left\lfloor\frac{\binom n{11}}{\binom m{11}}\right\rfloor + =1031. +\] + +If properness fails, one obtains an explicit `(r+1)`-tuple of coordinates +whose affine agreement hyperplanes have a nonempty positive-dimensional +intersection. This is a degree-one, dimension-at-most-ten correction +component, not an untyped pair-core terminal. + +The factor `alpha+gamma beta` may vanish at one slope. At that slope all +pair labels map to the single correction parameter `Q=0`; because slopes +are counted once, injectivity at the record level is unchanged. + +## Exact KoalaBear arithmetic + +\[ +\begin{aligned} +n&=2097152,&K&=1048576,&m&=1116048,\\ +B_*&=274980728111395087. +\end{aligned} +\] + +The two paid branch caps are + +\[ +8\,147\,918K-1,\\ + 0,&m_u\le K-1. + \end{cases} +\] +After the at most \(L_u\) large affine clone classes are charged by +\(n-m+1\) slopes each, every exact support has at least +\(q_u(m_u-q_u)\) heterogeneous coordinate pairs. Each such pair +determines at most one selected affine-ray point. Hence +\[ + |Z|\le + L_u(n-m+1)+ + \left\lfloor + \frac{\binom{n-u}{2}}{q_u(m-u-q_u)} + \right\rfloor. +\] +The exact scan for \(0\le u\le K-1\) has maximum \(8{,}147{,}918\) at +\(u=K-1\). + +In case \textup{(ii)}, parameterize by the actual correction +\(Q=(\alpha+\gamma\beta)P_e\in W\). The coordinate equations are affine +linear in \((\gamma,Q)\). Under properness, each \((r+1)\)-coordinate +subset owns at most one parameter point, so +\[ + |Z|\binom m{r+1}\le\binom n{r+1}. +\] +The exact KoalaBear scan for \(0\le r\le10\) has maximum \(1031\). +Failure of properness is precisely a nonempty positive-dimensional affine +intersection. +\end{proof} diff --git a/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/00_contract.md b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/00_contract.md new file mode 100644 index 000000000..307cee1bc --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/00_contract.md @@ -0,0 +1,71 @@ +--- +workboard_item: K4 +row: KoalaBear MCA +object: MCA +target_epsilon: 2^-128 +agreement: 1116048 +B_star: 274980728111395087 +unit: distinct bad affine slopes per received line +parent_pr: 1172 +parent_commit: 193b7bf99a5cc7ccea042f25677e698d9f988eee +status: PROVED_DIRECT_BRANCH_PAYMENT_AND_ROUTE_CUT +active_v4_ledger_movement: 0 +--- + +# Contract + +This packet is a stacked successor to PR #1172 at exact parent +`193b7bf99a5cc7ccea042f25677e698d9f988eee`. + +It anchors one actual low-margin record and partitions every other represented +minimizing pair by the rank-one or rank-two row space of its coefficient-matrix +difference from the anchor. A row space with no heavy proper annihilator flat +owns many disjoint ordered coordinate bases; this bounds the number of such row +spaces. Rank-one groups are paid by PR #1171's common-core-aware ray theorem, +and rank-two groups are paid by a dimension-two sub-square interleaved-list +cap. + +At the optimized cutoff `tau=1547`, every `h=42452`-transverse family is paid: + +```text +low branch 206,103,676,872,450,147 +high tail 68,875,044,016,173,272 +near add-back 134,944 +------------------------------------------------ +total 274,978,720,888,758,363 +slack 2,007,222,636,724 +``` + +Therefore every over-budget line emits an actual represented row space `U` of +rank one or two and a strictly larger direction subspace `W` such that: + +- `U=dim U+1`; +- every polynomial in `W` vanishes on at least `42,453` common actual + coordinates contained in the anchor's good support. + +In the rank-two case the original plane still has the stronger anchor-overlap +floor `131,850`, while its extension has dimension at least three and common +factor degree at least `42,453`. + +## Quantifier + +Uniform over the deployed sextic KoalaBear line field, every received pair, +every selected post-near affine-error-rank-eleven family, every explanation +direction space of dimension at most ten, and the fixed actual minimizing-pair +selection inherited from the predecessor compiler. + +## Projection + +All quantities count distinct finite affine slopes. Pair types are grouped by +the unique row space of their coefficient-matrix difference from one actual +anchor pair. These groups are disjoint; no uncontrolled sum of overlapping +local certificates is used. + +## Exact impact + +- pays the complete anchored `42,452`-transverse row-space branch; +- replaces the generic rank-two edge terminal by a dimension/core tradeoff: + larger direction dimension and at least `42,453` common factor coordinates; +- makes zero active-v4 ledger movement; +- does not pay rank eleven or close KoalaBear. diff --git a/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/01_frontier_map.md b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/01_frontier_map.md new file mode 100644 index 000000000..0b22a5fe7 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/01_frontier_map.md @@ -0,0 +1,54 @@ +# Frontier map + +## Exact parent + +PR #1172 head `193b7bf99a5cc7ccea042f25677e698d9f988eee`. + +## Imported frontier + +PR #1172 pays the complete low-margin rank-one anticode branch at cutoff +`tau=439`. An over-budget line must contain a rank-two pair difference whose +two independent endpoint-difference polynomials have at least `134,066` +common deployed evaluation roots. + +That conclusion concerns one edge. It does not yet control the population of +all pair types or synchronize their common factors. + +## New attack + +Choose one actual low record as an anchor. On its size-`m` support, at least +`A=m-tau` positions are also in the anchor pair core. Every other low pair +core meets this good anchor set in at least `c=2A-n` positions. Thus every +rank-one or rank-two difference row space has a rich annihilator flat among at +most `m` labeled evaluation columns. + +The new ordered-basis router has two outcomes: + +1. **Transverse.** Every proper flat of the annihilator contains at most + `42,452` rich columns. The number of row spaces is then bounded by exact + falling-factorial quotients, and the whole branch fits the row budget. +2. **Concentrated.** A proper flat contains at least `42,453` rich columns. + Orthogonal complementation gives a strictly larger direction subspace with + a common locator factor of degree at least `42,453`. + +## Exact successor terminal + +An unsafe line must provide one of: + +- `dim U=1`, `dim W>=2`, `U=3`, `U`, all pair differences have + the same right factor and fall under PR #1171's `8,147,918` ray cap. +3. **Rank-two partition.** For fixed two-plane `U`, both endpoints lie in + affine translates of `U`; the exact dimension-two pair cap is `252`. +4. **Labeled columns.** Repeated or zero evaluation vectors count with their + coordinate multiplicities. Concentration is therefore detected rather + than silently quotiented away. +5. **Finite matroid audit.** The primary verifier exhausts `2,077` small + multiset configurations, and the independently written audit checks `1,286` + rank-at-most-two configurations. + +## Hostile controls + +1. A pair core may be much larger than `m`; replacing the actual anchor-good + set by the complete core invalidates the row-space count. +2. Different fixed-right row spaces are not one anticode. They are summed only + after the anchor gives a disjoint row-space partition. +3. A rank-two group is not charged as one ray. It uses the full dimension-two + interleaved pair cap and the per-pair slope multiplier. +4. The ordered-basis denominator is not `binomial(c,t)`. It is only + `(c-h)^t`, which remains valid with arbitrary dependencies and clones. +5. Failure of transversality is not called a payment. It emits a strictly + larger common-factor subspace with exact actual-coordinate provenance. +6. No external subspace-design theorem is imported for the special deployed + evaluation set. + +## Exact boundary controls + +- `h=42,452` at `tau=1,547` leaves slack `2,007,222,636,724`. +- `h=42,453` at the same cutoff is over budget by `17,108,854,816,460`. +- Exhaustive cutoff scan finds global maximum `h=42,452`, attained at + `tau=1,547,1,548,1,549`. diff --git a/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/03_idea_ledger.csv b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/03_idea_ledger.csv new file mode 100644 index 000000000..f744e09e7 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/03_idea_ledger.csv @@ -0,0 +1,5 @@ +idea_id,title,track,status,forecast,first_unjustified_step,control_result,dependency_status,artifact,last_updated +I-001,anchored rich annihilator flats,structural,proved,transverse branch paid,none,passed,parent exact,proofs/anchored_rich_flat_router.md,2026-08-15 +I-002,ordered-basis flat count,combinatorial,proved,exact row-space census,none,2077+1286 finite controls,self-contained,proofs/anchored_rich_flat_router.md,2026-08-15 +I-003,common-factor flag synchronization,structural,open,strong next attack,route many emitted W spaces to one owner,pending,requires I-001 terminal,pending,2026-08-15 +I-004,Wronskian multiplicity collision,algebraic,open,possible bypass,prove special-domain strong subspace-design inequality,pending,no external theorem directly applies,pending,2026-08-15 diff --git a/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/campaign.json b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/campaign.json new file mode 100644 index 000000000..6c084773a --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/campaign.json @@ -0,0 +1,18 @@ +{ + "schema": "rs-mca-campaign-v1", + "campaign": "kb-mca-rank11-rich-flat-post-1172", + "parent_pr": 1172, + "parent_commit": "193b7bf99a5cc7ccea042f25677e698d9f988eee", + "workboard_item": "K4", + "row": "KoalaBear MCA", + "status": "PROVED_DIRECT_BRANCH_PAYMENT_AND_ROUTE_CUT", + "claims": { + "transverse_branch_paid": true, + "rank11_paid": false, + "koalabear_closed": false, + "active_v4_ledger_movement": 0 + }, + "selected_cutoff": 1547, + "transverse_threshold": 42452, + "emitted_core_size": 42453 +} diff --git a/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/proofs/anchored_rich_flat_router.md b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/proofs/anchored_rich_flat_router.md new file mode 100644 index 000000000..23264c583 --- /dev/null +++ b/experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/proofs/anchored_rich_flat_router.md @@ -0,0 +1,353 @@ +# Anchored rich-flat router for KoalaBear error rank eleven + +## 1. Exact inherited interface + +Work in the deployed KoalaBear row + +```text +n = 2,097,152 +K = 1,048,576 +m = 1,116,048 +w = m-K = 67,472 +B* = 274,980,728,111,395,087 +2w = 134,944. +``` + +After the reversible gauge from the predecessor stack, the selected post-near +explanations lie in an affine flat `c_0+C'`, where `C'` is a subspace of the +degree-`=A`, and therefore + +\[ + |H_e\cap G_0| + \ge |H_e|+|G_0|-n + \ge 2A-n=c. \tag{3} +\] + +This is the reason for anchoring an actual record rather than using the +complete anchor pair core, which can be much larger than `m`. + +## 3. Pair-difference row spaces and rich annihilator flats + +Choose a basis `P_1,...,P_s` of `C'`. Write the coefficient matrix of a pair +as `M_e in F^(2 x s)`. For `e!=e_0`, put + +\[ + X_e=M_e-M_{e_0},\qquad U_e=\operatorname{rowspan}(X_e). +\] + +Its rank `r` is one or two. For a coordinate `x`, let + +\[ + v_x=(P_1(x),\ldots,P_s(x))\in\mathbb F^s. +\] + +At every `x in H_e cap G_0`, the two pair types both equal the received pair, +so + +\[ + X_ev_x=0. +\] + +Consequently, if a row space `U` is represented by at least one pair type, +then its canonical anchor-zero set + +\[ + Z_U=\{x\in G_0:v_x\in U^\perp\} +\] + +satisfies + +\[ + |Z_U|\ge c. \tag{4} +\] + +### Definition: `h`-transverse row space + +A represented row space `U` is `h`-transverse when every proper linear +subspace `Fh` labels. + +Choose an ordered basis greedily. After `j1` for every `0<=t<=9`. The right side +is therefore nondecreasing in `s-r`. Uniformly over `s<=10`, + +\[ + N_1(\tau,h) + \le\left\lfloor\frac{m^{\underline9}}{(c-h)^9}\right\rfloor, + \qquad + N_2(\tau,h) + \le\left\lfloor\frac{m^{\underline8}}{(c-h)^8}\right\rfloor. \tag{7} +\] + +This lemma is elementary and does not import a generic-position or subspace- +design hypothesis. + +## 5. Paying each transverse row-space group + +The anchor pair type itself owns at most + +\[ + n-A \tag{8} +\] + +selected slopes. Indeed every owning support has a nonempty exception set +outside its complete pair core, and the fixed-pair ratio map is injective. + +### Rank one + +For one fixed rank-one row space `U=

`, every pair difference has the form + +\[ + M_e-M_{e_0}=u_e v^T, +\] + +where `v` is the coefficient vector of `P`. The complete group is therefore +one fixed-right-factor anticode. PR #1171's common-core-aware affine-ray +theorem gives the uniform group cap + +\[ + R_1=8147918. \tag{9} +\] + +The groups are disjoint by their row space; summing (9) here does not sum an +uncontrolled collection of overlapping local certificates. + +### Rank two + +For one fixed two-dimensional row space `U`, all represented pairs lie in + +\[ + (a_{e_0}+U)\times(b_{e_0}+U). +\] + +At cutoff `tau`, the ordinary affine list cap in each projection is + +\[ + M_2(\tau)= + \left\lfloor + \frac{\binom{n-K+2}{2}}{\binom{w-\tau+2}{2}} + \right\rfloor. \tag{10} +\] + +The actual sextic field satisfies `M_2(tau)^2<|F|` at the selected cutoff, so +the sub-square interleaving collapse bounds the number of distinct ordered +pair types in this group by `M_2(tau)`. Each pair type owns at most `n-A` +slopes. Hence one rank-two row-space group costs at most + +\[ + R_2(\tau)=(n-A)M_2(\tau). \tag{11} +\] + +## 6. The complete transverse envelope + +By (1), the number of records with `theta_gamma>=tau+1` is at most + +\[ + H(\tau)=\left\lfloor\frac{C_{10}}{\tau+1}\right\rfloor. \tag{12} +\] + +If every represented rank-one and rank-two row space is `h`-transverse, then +(7)--(12) give + +\[ +\begin{aligned} + |Z_{\rm bad}| + \le{}&2w+H(\tau)+(n-A)\\ + &+R_1\left\lfloor\frac{m^{\underline9}}{(c-h)^9}\right\rfloor\\ + &+R_2(\tau)\left\lfloor\frac{m^{\underline8}}{(c-h)^8}\right\rfloor. + \tag{13} +\end{aligned} +\] + +At + +\[ + \tau=1547,\qquad h=42452, +\] + +exact arithmetic gives + +```text +A 1,114,501 +c = 2A-n 131,850 +d = A-K 65,925 +n-A 982,651 +M_2 252 +R_2 247,628,052 +N_1 7,365,150,514 +N_2 589,969,647 +rank-one groups 60,010,642,445,729,852 +rank-two groups 146,093,034,425,737,644 +anchor pair 982,651 +low total 206,103,676,872,450,147 +high tail 68,875,044,016,173,272 +near add-back 134,944 +------------------------------------------------ +total 274,978,720,888,758,363 +slack 2,007,222,636,724 +``` + +The adjacent value `h=42453` is over budget by +`17,108,854,816,460`. An exhaustive exact scan of every legal cutoff finds +that `42452` is the largest threshold payable by (13), attained at cutoffs +`1547,1548,1549`; the earliest cutoff is selected because it retains the +largest anchor-overlap floor. + +Thus the entire `h`-transverse low-margin branch is paid. + +## 7. Exact survivor terminal + +If the line is over budget, some represented row space `U`, of rank +`r in {1,2}`, is not `42452`-transverse. Hence there is a proper subspace + +\[ + F=L` to PR #1165's global factor, +and compose it with a reversible codeword gauge. On KoalaBear, conditional +only on the separately pinned intrinsic near-rational charge `|N|<=2w`, +classify every selected post-near family as paid through affine error rank +nine, an exact rank-10/11/12 direction-exception terminal, or rank at least +13. Units are distinct finite affine slopes on one actual received line. + +## Acceptable adjacent outputs + +- A sharp support-local strengthening of PR #1165 without ledger insertion. +- A conditional exact KoalaBear slope payment after the intrinsic `2w` deletion. +- A route cut isolating the exact direction-exception support at ranks 10--12. +- An independent smooth-domain regression for the refuted old compiler. + +## Evidence standard + +Candidate requires complete source proof, exact certificate, hostile +mutations, and pinned dependencies. Provisional verification requires an +isolated source/math review, a separate custody/certificate review, exact +Python/Sage/FLINT/Wolfram replay, and LaTeX compilation. Handoff additionally +requires current upstream overlap review and an honest zero-ledger statement. + +## Prohibited overclaims + +- Numerical agreement is not proof. +- An adjacent theorem is not evidence for the original conjecture without a proved implication. +- The gauge is not an identical-received-line map and cannot transport v4 owners. +- The conditional direct slope count is not a deployed S/A/E ledger payment. +- This packet does not claim KoalaBear or universal prize closure. + +## Stop and handoff conditions + +Stop after two independent review joints and four exact arithmetic trust +bases agree, unless a reviewer finds a new logical failure. Hand off the +sealed theorem/certificate to upstream review. Lean is deferred until the +source-level active chronology is stable. diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/01_frontier_map.md b/experimental/campaigns/kb-mca-support-local-theta-post-1165/01_frontier_map.md new file mode 100644 index 000000000..52d6a0605 --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/01_frontier_map.md @@ -0,0 +1,43 @@ +# Frontier Map + +## Current record + +PR #1165 exact head `b6d30ef4f5ff966665b7672e1780a637509873a4` +refutes the former MCA affine-span compiler and proves the global +proper-subspace replacement with `L=max(1,e-(n-m))`, a full-explanation +lifted-rank split, a punctured-Johnson sparse-direction profile, and its +centered-Gram and mean-centered-Gram continuations. This +campaign is a strict post-#1165 local refinement, dated 2026-08-13. + +## Dependency spine + +1. PR #1165: counterexample, proper-subspace theorem, parent source. +2. PR #1160 commit `c5f4ea7...`: intrinsic near-rational `2w` theorem. +3. Reed--Solomon MDS generalized weights: lower-dimensional normal flats. +4. Exact KoalaBear parameters and frozen budget from `grande_finale.tex`. +5. Independent Python/Sage/FLINT/Wolfram arithmetic replays. + +## Named open joint + +Classify the rank-10/11/12 selected supports on which the line direction is +within 12, 387, or 12,049 exceptions of a codeword, while preserving actual +record ownership and chronology. Rank at least 13 is a separate terminal. + +## Nearby stronger and weaker statements + +| Statement | Strength | Status | +|---|---|---| +| old final factor `w` | strongest, false | refuted by #1165 and GF(257) | +| PR #1165 global `L` factor | uniform | proved parent input | +| local `theta` factor | sharper on supplied supports | candidate here | +| direct Koala rank-nine route | conditional on intrinsic `2w` deletion | candidate here | +| active S/A/E insertion | stronger semantic claim | open | + +## Known barriers + +The GF(257) family has 87 slopes against the old cap 8 despite global +direction separation. Pair noncontainment alone gives only `theta>=1`. +This pays explanation rank eight/error rank nine, and cannot pay the next +rank without quantitative local direction exceptions. Gauge translation +changes the literal received-line representative, so owner chronology does +not transport automatically. diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/02_controls.md b/experimental/campaigns/kb-mca-support-local-theta-post-1165/02_controls.md new file mode 100644 index 000000000..eeabb8d64 --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/02_controls.md @@ -0,0 +1,12 @@ +# Control Zoo + +| Control ID | Object | Preserved structure | Target behavior | Mechanism behavior | Status | +|---|---|---|---|---|---| +| C-001 | PR #1165 GF(1009) fixture | exact supports, global separation | old compiler fails | 31 > 23 | passed parent | +| C-002 | smooth GF(257) fixture | full multiplicative domain, exact supports | old fails; repaired accepts | 87 > 8 and 87 <= 759 | passed Python/Sage/Wolfram | +| C-003 | endpoint profiles | 10,716 legal small integer rows | closed formula equals profile maximum | exact equality | passed | +| C-004 | Koala theta boundary | exact big integers | theta and theta-1 straddle budget | 1/13/388/12050 | passed | +| C-005 | shortened-code boundary | ranks 1--14 | rank 9 fits, rank 10 fails at theta 1 | exact floors | passed | +| C-006 | M31 stress row | ranks 1--4 | thresholds exact and predecessors fail | 1/16/237/7118 | passed | +| C-007 | gauge inverse | GF(257) exact errors/supports | rank drops one and inverse restores record | exact | passed Sage | +| C-008 | hostile manifest mutations | units, hashes, owners, bounds | every mutation rejected | 32/32 caught | passed | diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/03_idea_ledger.csv b/experimental/campaigns/kb-mca-support-local-theta-post-1165/03_idea_ledger.csv new file mode 100644 index 000000000..742185211 --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/03_idea_ledger.csv @@ -0,0 +1,5 @@ +idea_id,title,track,status,forecast,first_unjustified_step,control_result,dependency_status,owner,artifact,last_updated +I-001,Old affine-span rank-eleven closure,barrier,refuted,likely no-go at final normal flat,claimed r=s occupancy bound,GF257 gives 87>8,old theorem refuted,explorer,notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md,2026-08-13 +I-002,Support-local theta compiler,proof,candidate,likely proof by repairing final basis factor,endpoint optimization,10716 profiles pass,PR1165 parent proved,generator,experimental/grande_finale.tex,2026-08-13 +I-003,Error-to-explanation gauge,algebra,candidate,likely exact reversible shear,literal received line changes,GF257 inverse passes,linear-code input proved,generator,experimental/grande_finale.tex,2026-08-13 +I-004,Rank-ten direction-exception forest,frontier,explored,uncertain structural classification,chronology-preserving owner transport,exact thresholds pass,depends I-002/I-003,coordinator,notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md,2026-08-13 diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/04_dependency_ledger.csv b/experimental/campaigns/kb-mca-support-local-theta-post-1165/04_dependency_ledger.csv new file mode 100644 index 000000000..8270351fd --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/04_dependency_ledger.csv @@ -0,0 +1,6 @@ +dependency_id,statement,source,version,scope,proof_status,independent_check,notes +D-001,PR1165 global repair and top-rank/full-lift continuations,przchojecki/rs-mca PR1165,b6d30ef4f5ff966665b7672e1780a637509873a4,proper-subspace full-rank gauge punctured/Gram routes and later full-lift common-factor descent,proved,replayed,local theta proves theta>=L and arbitrary-rank gauge is distinct; later full-lift lane is disjoint +D-002,intrinsic near-rational bad slopes at most 2w,PR1160 note,c5f4ea7a0c78828c901ae5f3428894a8b2e2806b,w>=1 and 3w<=n-K,proved,pinned verifier,external dependency +D-003,RS MDS generalized weights,active grande_finale source,blob df10d48605336f73e111aca620a1ec696aab6906,lower-dimensional proper normal flats,proved,parent proof checked,no external numerical input +D-004,Koala parameters and B*,active grande_finale source,blob df10d48605336f73e111aca620a1ec696aab6906,distinct slopes per actual line,proved,exact replays,n=2097152 K=1048576 m=1116048 +D-005,old 3a13 support-wise affine-span formula,public DAG,3a13f2dcdcab95f57fdda8a3a8beea024b0dd1de,former final factor,refuted,GF257 and PR1165,not imported diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/05_claim_registry.csv b/experimental/campaigns/kb-mca-support-local-theta-post-1165/05_claim_registry.csv new file mode 100644 index 000000000..76484e1cd --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/05_claim_registry.csv @@ -0,0 +1,5 @@ +claim_id,statement,status,scope,dependencies,controls,review_joints,rederivation,formalization,owner,artifact,notes +C-001,support-local theta compiler,handoff,exact supplied m-supports,D-001;D-003,C-002;C-003,final source/math and preliminary custody GREEN,independent proof review,none,generator,experimental/grande_finale.tex,strict refinement theta>=L; final payload custody recheck pending +C-002,reversible gauge lowers explanation rank by one,handoff,at least two finite slopes,D-003,C-002;C-007,final source/math and preliminary custody GREEN,Sage exact control and independent proof review,none,generator,experimental/grande_finale.tex,changes line representative; final payload custody recheck pending +C-003,conditional Koala error-rank-nine payment,handoff,intrinsic post-near slope set,D-001;D-002;D-003;D-004,C-004;C-006,final source/math and preliminary custody GREEN,Python Sage FLINT Wolfram-plugin and independent exact arithmetic review,none,generator,experimental/grande_finale.tex,zero active ledger movement; local Wolfram wrapper fail-closed; final custody recheck pending +C-004,old affine-span compiler false,refuted,even global separation,D-005,C-001;C-002,independent replay RED,Sage reconstruction,none,barrier checker,notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md,preserved failure diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/06_review_registry.csv b/experimental/campaigns/kb-mca-support-local-theta-post-1165/06_review_registry.csv new file mode 100644 index 000000000..9fb7c2a29 --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/06_review_registry.csv @@ -0,0 +1,9 @@ +review_id,claim_id,joint,reviewer_isolated,status,artifact,blocking_issue +R-001,C-004,counterexample and proof-gap replay,true,pass,prior campaign counterexample_independent_replay.md,none +R-002,C-001,abstract repaired theorem and constants,true,pass,prior campaign repaired_theorem_math_review.md,port review pending +R-003A,C-001,final source and theorem proof,true,pass,reviews/final_source_math_review.md,none; GREEN on parent b6d30ef4 after 22-commit restack audit +R-003B,C-002,final gauge and inverse proof,true,pass,reviews/final_source_math_review.md,none; GREEN on parent b6d30ef4; no full-lift overlap +R-003C,C-003,final composition and arithmetic proof,true,pass,reviews/final_source_math_review.md,none; GREEN on parent b6d30ef4; units and zero movement unchanged +R-004A,C-001,certificate custody and source provenance,true,pass,reviews/packet_custody_review.md,preliminary GREEN; durable final-payload memo external to packet hash +R-004B,C-002,gauge certificate and finite-field replay,true,pass,reviews/packet_custody_review.md,preliminary GREEN; durable final-payload memo external to packet hash +R-004C,C-003,ledger units totals and hostile mutations,true,pass,reviews/packet_custody_review.md,preliminary GREEN; durable final-payload memo external to packet hash diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/campaign.json b/experimental/campaigns/kb-mca-support-local-theta-post-1165/campaign.json new file mode 100644 index 000000000..c6d8b6376 --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/campaign.json @@ -0,0 +1,15 @@ +{ + "title": "KoalaBear support-local theta router after PR 1165", + "created": "2026-08-13", + "schema_version": 1, + "claim_statuses": [ + "idea", + "explored", + "candidate", + "provisionally-verified", + "handoff", + "refuted", + "blocked", + "known" + ] +} diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/final_source_math_review.md b/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/final_source_math_review.md new file mode 100644 index 000000000..f50a27564 --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/final_source_math_review.md @@ -0,0 +1,367 @@ +# Final independent source and mathematics review + +Date: 2026-08-13 +Reviewer role: isolated source/mathematics reviewer; not the generator +Exact parent: `b6d30ef4f5ff966665b7672e1780a637509873a4` (current PR #1165 head) +Restacked successor source audited: `experimental/grande_finale.tex` Git blob +`a7de93eedf0288bf81912658a299555aab0c3f46` (SHA-256 +`56ef3acaccf6ff45da2fde5c921d914b91b748214f19ac1c263d3638a9fa4b14`). +This memo is intentionally external to the canonical packet hash. It does +not embed a manifest payload and thereby avoids a circular self-attestation. + +## Statement audited + +I audited the post-#1165 successor consisting of: + +1. `thm:support-transverse-affine-span-mca`, which replaces the final + global occupancy factor in the proper-subspace MCA count by the exact + selected-support factor + \[ + \theta=\min\!\left\{w+1, + \min_{\gamma\in Z,\,b\in C'} + |\{x\in S_\gamma:r_1(x)\ne b(x)\}|\right\}; + \] +2. `thm:mca-error-rank-gauge`, the reversible arbitrary-rank codeword + gauge sending error affine rank `a` to explanation affine rank `a-1`; +3. `prop:kb-post-deletion-affine-error-router`, the conditional direct + KoalaBear slope bound through selected error rank nine and the exact + rank-10/11/12 direction-exception terminals. + +The proposition is in units of distinct finite affine bad slopes on one +actual received line. It is conditional on the separately pinned intrinsic +near-rational theorem `|N|<=2w`; it is not an active-v4 atom or a KoalaBear +closure. + +## Files/sections read + +- `agents.md`, including the current workboard and exact nonbankability rules. +- `experimental/grande_finale.tex`, especially + `thm:proper-subspace-mca`, + `thm:support-transverse-affine-span-mca`, + `thm:mca-error-rank-gauge`, + `thm:sparse-direction-punctured-johnson-mca`, + `thm:near-johnson-centered-gram`, + `thm:mean-centered-gram-list`, + `thm:full-explanation-lifted-rank-dichotomy`, and + `prop:kb-post-deletion-affine-error-router`. +- `experimental/notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md`. +- `experimental/data/certificates/kb-mca-support-local-theta-router-v1/{README.md,manifest.json}`. +- The Python, Sage, FLINT, and Wolfram replay sources for this packet. +- The PR #1165 proper-subspace, full-rank-gauge, punctured-Johnson, and + centered-Gram verifier sources. +- Every theorem, corollary, verifier, and independent auditor added in the + 22-commit parent delta `d4d653723..b6d30ef4`, from the terminal-deficit + affine-line cap through the common-factor base-field descent. +- PR #1160 commit `c5f4ea7a0c78828c901ae5f3428894a8b2e2806b`, especially the + two-anchor near-rational proof and its exact `2w` scope. +- Campaign contract, frontier map, controls, dependency ledger, claim + registry, and review registry. + +Ancestor guidance was `math_code/AGENTS.md` plus this worktree's +`agents.md`. No sibling override was used as authority. + +## Dependencies + +| Dependency | Classification | Audit result | +|---|---|---| +| PR #1165 proper-subspace compiler | IMPORTED / PROVEN | Replayed; its lower-dimensional normal-flat count and endpoint optimization are the correct base for the local refinement. | +| Reed--Solomon root bound and MDS generalized weights | PROVEN | Used with exactly the stated dimensions; no hidden field-size or asymptotic hypothesis. | +| PR #1165 full-explanation lifted-rank dichotomy | IMPORTED / PROVEN | Compatible and sharper at explanation rank `K`; the new gauge is a genuine arbitrary-rank existence theorem rather than a conflicting classification. | +| PR #1165 punctured-Johnson, near-Johnson Gram, and mean-centered Gram continuations | IMPORTED / PROVEN | Separate sparse-direction routes. They neither imply nor conflict with the support-local `theta` theorem. Their exact verifiers passed. | +| PR #1165 later full-lift line/core/interpolation chain | IMPORTED / PROVEN | The 22-commit restack delta was audited separately. It extends the Koala full-lift low wall through `e=96150`, pays Mersenne through `e=130236`, and routes—not pays—`e=130237` to a common-factor branch. It does not consume or alter the local-`theta`, arbitrary-rank-gauge, exact-`m`, or intrinsic-`2w` interfaces. | +| PR #1160 intrinsic near-rational theorem | IMPORTED / PROVEN | The source proof gives at most `2w` near-rational support-wise bad slopes when `w>=1` and `3w<=n-k`. KoalaBear satisfies these guards: `3w=202416<=1048576`. | +| Exact integer thresholds and ceilings | CERTIFIED EXACT | Independently replayed in Python/Sage/FLINT; details below. | + +## Mathematical audit + +### 1. Support-local normal count + +The proof repairs exactly the failed last-normal step and does not reuse the +refuted factor `w`. + +- For an incident normal span of dimension `j=1`: equality `r_1=b` on the identical + support would make `(c_gamma-gamma b,b)` a simultaneous explanation. +- With `z` zero normals and `g<=z` identically incident zero normals, each + selected parameter owns at least + \[ + (m-g)\theta(w+1)^{\overline{s-1}} + \] + ordered full-rank tuples. A full-rank tuple determines at most one + parameter point. +- For fixed `z`, the worst case is `g=z`. The consecutive-ratio sign is + `n-(s+1)m+sz`, which is increasing in `z`; hence the maximum is at + `z=0` or `z=K-s`. These endpoints are exactly the two printed terms. + +This argument covers `s=1` (empty rising product), `s=K` (the zero-normal +interval has only `z=0`), and nonempty finite `Z`. I found no hidden +maximal-support or genericity assumption. + +### 2. Exact comparison `theta>=L` + +For every selected exact `m`-support and every `b in C' subset C`, +\[ + |\{x\in S_\gamma:r_1(x)\ne b(x)\}| + \ge \operatorname{wt}(r_1-b)-(n-m) + \ge e-(n-m). +\] +Together with pair noncontainment this gives +`theta_0>=max(1,e-(n-m))=L`. Interpolation on `K` coordinates gives +`e<=n-K`, so `e-(n-m)<=m-K=w`; consequently the cap at `w+1` cannot lower +`theta` below `L`. The statement `theta>=L` is therefore correct, including +the boundary `e-(n-m)<=1`. + +### 3. Arbitrary-rank gauge and the parent full-rank theorem + +Same-support noncontainment implies `r_1 notin C`. Therefore +\[ + (\delta,c)\longmapsto \delta r_1-c +\] +is injective on the lifted difference space `E`. Its image is exactly the +error-difference span, so `dim E=a`. The slope projection is nonzero; after +choosing `(1,b) in E`, the map `(delta,c) -> c-delta b` has image equal to +the kernel of that projection and dimension `a-1`. The displayed error +identity proves preservation of the finite slope, error word, exact support, +and same-support containment predicate in both directions. + +At full explanation rank `K`, projection of `E` onto `C` is surjective, so +`dim E` is `K` or `K+1`. The new theorem then reproduces the existence +outcomes `K-1` and `K`; PR #1165's theorem remains strictly sharper because +it classifies every gauge. There is no duplicated or contradictory full-rank +claim. + +The gauge changes the literal received-line representative. The packet uses +it only under a direct maximum over all received lines and explicitly refuses +to transport Q/BC/S/A/E ownership. That use is legitimate. + +### 4. Intrinsic `2w` composition and exact-record coverage + +The partition +\[ + N=\{\gamma\in Z_{\rm bad}:d(r_\gamma,C)\le w\},\qquad + Z=Z_{\rm bad}\setminus N +\] +is intrinsic, disjoint, and in the same distinct-slope units as the direct +numerator. Thus `|Z_bad|=|N|+|Z|`; no first-match chronology or imported +multiplicity is needed for this direct statement. + +The source now also closes the exact-record selection joint. Starting from +a support-wise bad witness `(S,c)` with `|S|>=m`, if every `m`-subset were +pair-contained, adjacent `m`-subsets would share `m-1>=K` coordinates. +Reed--Solomon uniqueness would make their explaining pairs identical, and +connectivity of the `m`-subset Johnson graph would glue one pair over all of +`S`, contradicting badness. Hence every bad slope supplies an exact +same-support-noncontained `m`-subwitness. + +The low-rank edge cases are sound: + +- with at least two slopes, error rank zero is impossible by injectivity; +- at error rank one, the gauged explanations coincide, and each + noncontained support has a coordinate with nonzero translated direction; + the agreement equation makes the slope-to-coordinate selection injective, + giving `|Z|<=n`; +- for ranks `2` through `9`, the local theorem applies with explanation rank + `s=a-1<=8` and `theta>=1`. + +At ranks `10`, `11`, and `12`, failure of the paying margin is attained on +an actual selected support. If `b_0` is the gauge codeword and `b_1` the +translated direction-space codeword, the inverse terminal is correctly +stated on the original record as +\[ + r_1=b_0+b_1 +\] +outside the identical exception set. The exception ceilings are therefore +`12`, `387`, and `12049`, not properties of an untransported gauge +representative. + +### 5. Exact constants and floors + +The exact computations agree across the replay implementations: + +- the `GF(257)` negative control has `87` slopes, old cap `8`, repaired cap + `759`, full incident normal rank `2`, direction maximum agreement `85`, + and minimum near-code distance `170`; +- endpoint optimization matches the closed form on `10716` legal small + profiles; +- KoalaBear explanation rank `s=8`, `theta=1` has cap + `110390969172173096`; +- adding `2w=134944` gives `110390969172308040`, with signed slack + `164589758939087047` against + `B_*=274980728111395087`; +- the least paying margins at `s=9,10,11` are `13`, `388`, `12050`; +- the predecessor totals are respectively + `285894151677963688`, `275500176064828033`, and + `274992929018868606`, all strictly over budget; +- the shortened-row automatic wall is rank `9/10`, with subsequent least + margins `4,49,757,11748`, and rank `14` remains infeasible even at the + maximum allowed margin. + +The verifier's `minimum_margin` uses the correct strict rational condition +for `floor(raw/theta)<=B`; I found no ceiling/floor or off-by-one defect. + +### 6. Retractions, scope, and nonclaims + +The source retracts only the former payments derived from the false +ordered-basis denominator. It then labels the new result as a distinct, +conditional post-deletion wall. It does not revive the stale unconditional +rank wall. + +The note, manifest, README, workboard, and source agree that: + +- active-v4 ledger movement is exactly zero; +- the conditional `2w` composition is a direct slope theorem, not a + chronology-correct deployed atom; +- the 31-slope reserve is not used; +- ranks at least `13` remain unpaid; +- KoalaBear is not closed; +- no universal Prize result is claimed. + +These nonclaims are honest. The parent centered-Gram continuations extend a +different sparse-direction support interval and create no overlap conflict. + +### 7. Focused 22-commit parent-restack audit + +The parent delta `d4d653723..b6d30ef4` contains 22 additive commits and adds +1727 lines to `experimental/grande_finale.tex` without deleting or editing +the proper-subspace theorem or any successor interface. I checked the +following dependency groups rather than treating the delta as mere status +prose. + +- The terminal and top-third affine-line arguments use the exact-layer owner + weight and the degree-`52^2` comparison + correctly forces a positive-`(Y,Z)`-degree common factor. Cofactor Bezout, + core-incidence Cauchy, weighted-degree dimension counting, base-field + descent, and the degree-one projective-star split preserve their units and + guards. They do **not** pay the projective-star population or classify the + higher-degree component. + +The exact current status is therefore: + +- Koala full lift is paid through `e=96150`, leaving + `96151<=e<=1044238`; +- Mersenne full lift is paid through `e=130236`, leaving + `130237<=e<=1044241`, with the first support only routed to the common-factor + branch. + +The repaired routing-table prose now distinguishes the proper-subspace/gauge +improvement from these separate full-lift continuations. None of the 22 +commits references the local `theta`, the arbitrary-rank gauge, the exact-`m` +subwitness bridge, the near-rational `2w` add-back, or the Koala conditional +router. The parent and successor are adjacent but nonoverlapping proof lanes. + +## Parameter dependence + +The abstract local theorem is finite and exact in `(n,K,m,w,s,theta)` with +`m=K+w`, `w>0`, and `1<=s<=K`. The KoalaBear proposition specializes to +the printed exact row. There is no dependence on `T`, `Y`, layer index `h`, +asymptotic constants, or an undeclared field-size limit. The only external +conditional input is the explicitly pinned `2w` theorem with its checked +guards. + +## Layer-cake / dyadic summability + +Not applicable. There is no level-set integration or additive dyadic error. + +## Moment / Markov / Chebyshev + +Not applicable. There is no moment inequality or probabilistic tail +optimization. + +## Edge cases / notation + +Checked: `s=1`, `s=K`, `|Z|=1`, error ranks `0` and `1`, exact versus +at-least-`m` witness supports, the `theta=w+1` cap, the boundary +`e-(n-m)<=1`, and maximum feasible shortened-row margins. Agreement +`m=1116048` is not confused with an error rank or slice parameter. The +proposition consistently uses code dimension `k=1048576` in the external +`3w<=n-k` guard. + +## Numerical evidence and replay + +The finite proof does not rely on numerical extrapolation. The `GF(257)` +fixture is a toy-scale falsification/regression control only. Exact deployed +integer arithmetic is certificate evidence, not a substitute for the +symbolic proof. + +Checks run against the final parent included: + +- normal and `python3 -O` canonical verification: PASS; +- hostile mutation suite: PASS, `32/32`; +- independent Sage replay: PASS; +- independent FLINT replay: PASS; +- parent proper-subspace verifier: PASS; +- parent full-rank gauge verifier: PASS; +- parent punctured-Johnson verifier: PASS; +- parent near-Johnson centered-Gram verifier: PASS; +- parent mean-centered Gram verifier: PASS (`109` checks and `2/2` + mutations); +- all 36 Python verifiers/independent auditors added in the 22-commit parent + delta: PASS; +- all four compiled constant-memory C interval replays added in that delta: + PASS; +- the final Koala/Mersenne full-lift mean-centered global-line replay: PASS + (`548` checks and `4/4` mutations); +- campaign actionable audit: PASS; +- `git diff --check`: PASS; +- TeX Live compilation to `/tmp`: PASS, 118 pages. + +The configured Wolfram Cloud replay could not be rerun by this reviewer +because the account returned `Insufficient credits`. Its script is +non-load-bearing for the proof, and the exact arithmetic was independently +reproduced by Sage and FLINT. Custody review should record this unavailable +trust base rather than infer a fresh Wolfram pass. + +## Verdict + +**GREEN - the source-level mathematical obligations audited here are +satisfied.** + +The support-local theorem, `theta>=L`, arbitrary-rank gauge, intrinsic `2w` +composition, inverse-gauge exception terminals, exact ranks/ceilings, and +scope/nonclaims are all correct on exact parent `b6d30ef4`. The 22 new +parent commits neither duplicate nor invalidate them. The corrected parent +ranges and the external-attestation custody design are sound. No further +mathematical repair is required before final packet reseal and upstream +handoff. + +## Remaining risks + +- This theorem does not identify or preserve v4 first-match owners; zero + deployed ledger movement is essential. +- The rank-10/11/12 direction-exception families and rank-at-least-13 family + remain genuine open terminals. +- The separate Mersenne `e=130237` common-factor branch remains unpaid: the + projective-star population and higher-degree component classification are + open and confer no Koala ledger credit. +- Any later in-packet change must trigger a fresh canonical reseal; the + external review memo itself is deliberately outside that hash boundary. +- A fresh Wolfram execution remains unavailable until cloud credits are + restored; this is an evidence-redundancy issue, not a proof gap. + +## Recommended next action + +The in-packet registry is resealed and the final normal, optimized, and +`32/32` hostile-mutation checks pass on a clean worktree. Hand the GREEN +packet to upstream. The maximal successor attack remains the actual-record +Koala direction-exception forest at error ranks `10--12`, with rank `>=13` +retained as a separate terminal. The Mersenne common-factor classification +is an independent frontier lane, not a substitute for that attack. + +**GREEN** diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/literature_sweep.md b/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/literature_sweep.md new file mode 100644 index 000000000..f524cc9f4 --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/literature_sweep.md @@ -0,0 +1,38 @@ +# Targeted external literature sweep + +Date: 2026-08-12 + +After the final normal-flat gap was isolated, Exa was used for three +targeted searches covering 24 returned sources: finite-field +point--hyperplane incidence bounds, design-matrix/rich-flat rank bounds, and +affine-subspace structure in Reed--Solomon list decoding. The purpose was +to find an existing theorem forcing the support-local quantity + +```text +min_{gamma,b in C'} |{x in S_gamma : r1(x) != b(x)}| +``` + +to be large. No such theorem is imported by this packet. + +Representative primary sources screened: + +- Phuong--Pham--Sang--Valculescu--Vinh, *Incidence bounds and applications + over finite fields*, [arXiv:1601.00290](https://arxiv.org/abs/1601.00290). +- *A Point-Line Incidence Identity in Finite Fields, and Applications*, + [arXiv:1601.03981](https://arxiv.org/abs/1601.03981). +- Dvir--Lovett, *Subspace Evasive Sets*, + [author PDF](https://www.cs.princeton.edu/~zdvir/papers/DL12.pdf). +- Guruswami--Xing, *List decoding Reed--Solomon, Algebraic-Geometric, and + Gabidulin subcodes up to the Singleton bound*, + [ECCC TR12-146](https://eccc.weizmann.ac.il/report/2012/146/). + +The incidence theorems control global incidence totals under field-size or +bipartite-subgraph hypotheses; they do not supply a uniform lower bound on +the last transverse support choice for each selected record. Design-matrix +methods require overlap or regularity inputs absent from the active record +predicate. Subspace-evasive constructions alter the code or message set +and do not constrain an arbitrary received-line support family. + +Verdict: useful context, no load-bearing external lemma. The exact local +margin `theta` remains the honest repaired invariant. A new search should +begin only after the rank-10--12 direction-exception equations are frozen. diff --git a/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/packet_custody_review.md b/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/packet_custody_review.md new file mode 100644 index 000000000..c79468a7e --- /dev/null +++ b/experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/packet_custody_review.md @@ -0,0 +1,240 @@ +# Final independent packet custody and certificate review + +Date: 2026-08-13 +Reviewer role: isolated custody/certificate reviewer; not the generator +Exact parent: `b6d30ef4f5ff966665b7672e1780a637509873a4` (PR #1165 head audited) +Sealed packet tree before this external attestation: +`a1194581e37c6ce28911b6458328788ac3ca7249` +Canonical payload: `31ab611e5623641fcda5d786b3fd1a14b7e4400ed69a8bcf4e8716c95e68696b` + +## Statement audited + +I audited the release custody, exact certificates, source pins, replay +contract, and publication scope of the post-#1165 support-local theta and +error-rank router. The mathematical packet claims: + +1. the selected-support refinement `theta>=L` of the parent + proper-subspace MCA compiler; +2. a reversible arbitrary-rank codeword gauge lowering explanation rank + from error rank `a` to `a-1`; and +3. conditional on the separately pinned intrinsic near-rational bound + `|N|<=2w`, a direct KoalaBear distinct-slope payment through affine + error rank nine and exact direction-exception terminals at ranks + 10--12. + +The packet declares zero active-v4 ledger movement and does not claim +KoalaBear closure. + +## Files and sections read + +- `agents.md` and `experimental/agents-log.md`; +- the complete post-parent diff in `experimental/grande_finale.tex`, in + particular `thm:support-transverse-affine-span-mca`, + `thm:mca-error-rank-gauge`, and + `prop:kb-post-deletion-affine-error-router`; +- `experimental/notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md`; +- the canonical manifest and README under + `experimental/data/certificates/kb-mca-support-local-theta-router-v1/`; +- the packet's Python, Sage, FLINT, and Wolfram replay sources; +- all campaign contract, frontier, control, idea, dependency, claim, and + review ledgers; +- the external independent source/mathematics review and the bound + literature memo; +- the pinned PR #1165 parent source and its counterexample, + proper-subspace, full-rank-gauge, punctured-Johnson, centered-Gram, and + mean-centered-Gram verifier sources; +- the pinned PR #1160 two-anchor note and verifier at + `c5f4ea7a0c78828c901ae5f3428894a8b2e2806b`. + +Ancestor guidance was the `math_code/AGENTS.md` chain plus this worktree's +`agents.md`. No sibling override was treated as authority. + +## Dependencies and custody + +| Dependency or custody joint | Classification | Result | +|---|---|---| +| Exact PR #1165 parent | IMPORTED / PINNED | Parent commit, eleven parent paths, Git blob IDs, and SHA-256 values independently reproduced. | +| PR #1160 `2w` theorem | IMPORTED / PINNED | Both external paths, Git blob IDs, and SHA-256 values independently reproduced; normal, optimized, and 34-mutation replay passed on an exact checkout. | +| Final source/mathematics review | INDEPENDENT REVIEW / EXTERNAL ATTESTATION | GREEN memo binds the exact final source blob and parent but is deliberately external to the canonical payload. | +| Canonical manifest | EXACT CERTIFICATE | Strict JSON loaded; duplicate keys and floats are rejected; the payload hash was independently recomputed and matched. | +| Packet file custody | EXACT CERTIFICATE | All 18 declared packet-file SHA-256 values independently recomputed and matched. The manifest and both review attestations are intentionally outside its file-hash set. | +| Campaign evidence trail | EXACT METADATA | Actionable campaign audit passed with four claims, eight review rows, five dependencies, and no errors. | + +The PR #1165 parent ultimately advanced to `b6d30ef4...`. The final +restack regenerated all parent pins and separately audited the complete +22-commit delta from `d4d653723...`. That delta adds terminal-deficit, +top-third-line, global-line, boundary-layer, recursive-core, interpolation, +and common-factor continuations. It extends the KoalaBear full-lift low +wall through `e=96150`, pays Mersenne-31 through `e=130236`, and routes but +does not pay `e=130237`. Those are separate full-lift routes; they neither +duplicate nor invalidate the KoalaBear support-local theta/error-rank lane. + +The focused delta from `07546f903...` to `d4d653723...` is independently +sound. For the new mean-centered Gram matrix (H=BPB^{\mathsf T}), the +endpoint-chord inequality has nonpositive slope under the printed +`2A^2>=nc` guard; positive semidefiniteness supplies the required lower +bound on the off-diagonal sum; and the trace-rank inequality yields the +stated cap. The suffix-minimum closure is monotone and therefore valid for +the deficit owner sum. This parent theorem changes only the sparse-direction +support walls, not the support-local theta or error-rank gauge proof. + +The final source-status repair was also checked directly. Its routing table +now prints the exact full-lift intervals `96151..1044238` for KoalaBear and +`130237..1044241` for Mersenne-31 while retaining the distinct lower-rank +walls. The source compiles without undefined or duplicate-reference +warnings. + +## Certificate and replay audit + +The following passed on the final payload: + +- normal canonical Python verification; +- optimized (`python3 -O`) canonical verification; +- hostile mutation suite, `32/32` rejected; +- independent Sage reconstruction over `GF(257)`; +- independent FLINT rational/integer replay; +- all seven pinned PR #1165 predecessor verifiers, including the new + mean-centered-Gram profile (`109` checks, `2/2` mutations); +- all 36 Python verifiers and independent auditors added in the 22-commit + parent delta; +- all four independently compiled constant-memory C interval replays from + that delta; +- PR #1160 normal, optimized, and 34-mutation replays; +- independent big-integer recomputation of every displayed KoalaBear, + Mersenne-31, and shortened-row threshold used by this packet; +- `git diff --check`; +- actionable frontier-campaign audit; +- TeX Live compilation of `experimental/grande_finale.tex` to an isolated + `/tmp` output directory. + +The exact Wolfram `.wl` bytes (SHA-256 +`e887d72596b21f493063b42c48c73c044830e6b98129d3f1dc801a34d9b93264`) +are unchanged from the earlier successful independent evaluation that +returned `KB_MCA_SUPPORT_LOCAL_THETA_WOLFRAM_PASS`. A fresh cloud replay +was unavailable during this restack review, so it is not counted as fresh +evidence. The release command pipes through the exact sentinel and fails +closed when transport or credit errors return status zero. The final proof +and arithmetic were freshly replayed by Python, Sage, and FLINT. + +## Exact formulas and totals + +Independent arithmetic reproduced: + +- KoalaBear `theta=1` caps through explanation rank nine: + `16295594`, `253241283`, `3935435218`, `118319201475`, + `3677348367069`, `114289853114503`, `3552007973114420`, + `110390969172173096`, `3430729820133944932`; +- least paying margins at explanation ranks `8,9,10,11`: + `1,13,388,12050`; +- the rank-eight cap plus `2w=134944`: + `110390969172308040`; +- signed slack against `B*=274980728111395087`: + `164589758939087047`; +- predecessor totals at margins `12,387,12049`: + `285894151677963688`, `275500176064828033`, and + `274992929018868606`, all over budget; +- Mersenne-31 thresholds `1,16,237,7118`; +- shortened-row thresholds `4,49,757,11748`, with rank 14 infeasible at + the maximum allowed margin. + +For the earlier mean-centered parent rung, an independent BigInt +implementation also reproduced: + +- KoalaBear endpoint `e=64047`: `T=5257459620`, terminal cap + `180835154`, and exact profile `181731868`; at `e=64048`, + `T=-1499457466`, so the theorem is inapplicable; +- Mersenne-31 endpoint `e=65454`: `T=62421746104`, terminal cap + `15184718`, and exact profile `16101127`; at `e=65455`, the legal + profile is `17120123>16777215`; +- ten new KoalaBear supports and thirty-six new Mersenne supports, exactly + the `46` supports claimed by that verifier. + +For the final 22-commit parent delta, the fresh verifier/auditor/C suite +reproduced the complete paid Mersenne interval through `e=130236`, the +adjacent `e=130237` common-factor route cut, and the KoalaBear full-lift wall +through `e=96150`. These values are parent compatibility checks, not +credits imported into this packet's zero-movement v4 ledger. + +These values were recomputed from the formulas rather than accepted because +the manifest and generator agreed. + +## Parameter dependence + +The certificate is finite and exact in `(n,K,m,w,s,theta)`, specialized to +the printed KoalaBear and control rows. The conditional payment depends on +the external PR #1160 guard `w>=1` and `3w<=n-k`; both are printed and +checked. There is no hidden dependence on `T`, `Y`, `L_barI`, `lambda`, a +dyadic layer, or an asymptotic regime. + +## Layer-cake / dyadic summability + +Not applicable. No level-set integration or dyadic additive error occurs. + +## Moment / Markov / Chebyshev + +Not applicable. No moment or probabilistic tail optimization is used. + +## Edge cases and notation + +The source/math review and certificate jointly cover `s=1`, `s=K`, one or +zero post-deletion slopes, error ranks zero and one, exact versus +at-least-`m` supports, the `theta=w+1` cap, predecessor margins, and the +infeasible shortened rank-14 boundary. Agreement `m=1116048` is not +confused with a slice or rank parameter. The gauge is explicitly not an +identical received-line representative and transports no active owner. + +## Numerical evidence + +The `GF(257)` fixture is a toy-scale exact counterexample/regression: it +falsifies the former cap (`87>8`) and lies below the repaired cap (`87<=759`). +It is not used to extrapolate to KoalaBear. Deployed totals are exact +integer evaluations of a symbolic finite theorem, freshly replayed across +Python, Sage, FLINT, and a separate arithmetic derivation; the unchanged +Wolfram source retains only its previously recorded independent replay. + +## Scope and publication custody + +The diff is scoped to the support-local theorem/router, its workboard/log +updates, one note, one certificate packet, four replay implementations, and +the artifact-first research campaign. Generated TeX, Sage-preparser, and +Python cache files were removed before this final attestation. No commit, +push, or PR mutation was performed by this reviewer. + +The final manifest binds the exact parent, external dependency, formulas, +tables, 18 packet files, zero-ledger statement, and nonclosure statement. +It records the independent-review status but does not cryptographically +contain either review memo. The source/mathematics memo instead binds the +exact final source blob, and this custody memo binds the exact payload +printed at the top. Both are deliberately external attestations and must +travel in the same outer Git commit; canonical-manifest equality alone is +not treated as proof of either review. + +## Verdict + +**GREEN - the packet custody, source provenance, exact certificate, +independent replay contract, campaign evidence trail, and publication scope +are consistent and ready for upstream handoff.** + +## Remaining risks + +- The `2w` composition remains an explicit external dependency until PR + #1160 is integrated or carried in the publication stack. +- The theorem moves no active-v4 ledger atom and does not close KoalaBear. +- Rank-10/11/12 direction-exception families and the rank-at-least-13 + family remain open mathematics. +- A fresh Wolfram Cloud execution was unavailable; the unchanged script's + prior replay is redundant evidence only, not a dependency of the verdict. +- A final upstream overlap query should still be repeated immediately before + push because the last redundant GitHub query encountered a transient + network error; the exact audited parent object and hashes are unaffected. + +## Minimal next action + +Commit both external review attestations with the already sealed packet, +verify that the staged packet still produces payload +`31ab611e5623641fcda5d786b3fd1a14b7e4400ed69a8bcf4e8716c95e68696b`, +then use the normal push/ready-PR workflow. The next mathematical attack is +the actual-record direction-exception forest at error ranks 10--12, +retaining rank at least 13 as a separate unpaid terminal. + +**GREEN** diff --git a/experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/README.md b/experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/README.md new file mode 100644 index 000000000..44af1be42 --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/README.md @@ -0,0 +1,21 @@ +# Rank-ten margin/interleaving certificate + +Replay from the repository root: + +```bash +python3 experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py +python3 -O experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py +python3 experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py --tamper-selftest +sage experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage +``` + +The primary verifier scans all (67{,}471) legal thresholds for explanation +ranks 9--12 with exact integers/rationals. It checks the sextic field guard, +the first paying threshold, the unique optimum, adjacent totals, rank-11 +nonpayment, and the exact GF(11) multiplicity fixture. + +Wolfram Cloud independently replayed the (T=667) components and slack on +2026-08-13. Exa reviewed 20 research results across two targeted searches; +the relevant literature concerns broader interleaved/list-recovery bounds, +not this elementary finite-field projection identity, so no external lemma is +load-bearing. diff --git a/experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/manifest.json b/experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/manifest.json new file mode 100644 index 000000000..b020add95 --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/manifest.json @@ -0,0 +1,142 @@ +{ + "schema": "kb-mca-rank10-margin-interleaving-v1", + "parent": "b67078c7c0254ce9e54e5748634de5133fae98ef", + "row": { + "p": 2130706433, + "extension_degree": 6, + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "near": 134944, + "budget": 274980728111395087 + }, + "formula": "2w+max_{0<=j<=s}H_j(T)+(n-m+T-1)M_s(T)", + "first_paying_threshold_rank9": 16, + "optima": { + "9": { + "threshold": 667, + "agreement": 1115382, + "ordinary_list_cap": 57781140652, + "high_cap": 5143522968716559, + "high_rank": 9, + "low_cap": 56727790457914040, + "total": 61871313426765543, + "slack": 213109414684629544, + "subsquare_over_line_field": true, + "subsquare_over_base_field": false + }, + "10": { + "threshold": 876, + "agreement": 1115173, + "ordinary_list_cap": 935656856201, + "high_cap": 121710694220360988, + "high_rank": 10, + "low_cap": 918795383995401779, + "total": 1040506078215897711, + "slack": -765525350104502624, + "subsquare_over_line_field": true, + "subsquare_over_base_field": false + }, + "11": { + "threshold": 1146, + "agreement": 1114903, + "ordinary_list_cap": 15402824060064, + "high_cap": 2891265097510228534, + "high_rank": 11, + "low_cap": 15129408530173803936, + "total": 18020673627684167414, + "slack": -17745692899572772327, + "subsquare_over_line_field": true, + "subsquare_over_base_field": false + }, + "12": { + "threshold": 1487, + "agreement": 1114562, + "ordinary_list_cap": 258997933505221, + "high_cap": 69245986282321862866, + "high_rank": 12, + "low_cap": 254488779482895102390, + "total": 323734765765217100200, + "slack": -323459785037105705113, + "subsquare_over_line_field": true, + "subsquare_over_base_field": false + } + }, + "neighbor_totals_rank9": { + "666": 61871337525323046, + "668": 61871313610314122 + }, + "star_multiplicity_control": { + "field": 11, + "n": 10, + "K": 1, + "m": 3, + "threshold": 2, + "common_pair": [ + 0, + 0 + ], + "common_core_size": 2, + "owners": 8, + "n_minus_A": 8, + "support_digest": "034404ef77f61613515f414f775fafc9b8e344b03ba2172540f5544e1c062f08" + }, + "claims": { + "error_rank_10": "PAID", + "error_rank_11_or_more": "UNPAID_BY_THIS_FORMULA", + "active_v4_ledger_movement": 0, + "KoalaBear_closed": false + }, + "scan_counts": { + "9": 66662, + "10": 65810, + "11": 64482, + "12": 62597 + }, + "provenance": { + "repository": "przchojecki/rs-mca", + "exact_pr1166_parent": "b67078c7c0254ce9e54e5748634de5133fae98ef", + "public_dag_candidate": "c2c37ceb81f2512736f82d619a3a0e63e4156482", + "exa_sources_reviewed": 20, + "load_bearing_external_lemma": false, + "wolfram_exact_T667_replay": true + }, + "packet_files": [ + "agents.md", + "experimental/agents-log.md", + "experimental/grande_finale.tex", + "experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md", + "experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/README.md", + "experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py", + "experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/campaign.json", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/00_contract.md", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/01_frontier_map.md", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/02_controls.md", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/03_idea_ledger.csv", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/04_dependency_ledger.csv", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/05_claim_registry.csv", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/06_review_registry.csv", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/literature_sweep.md" + ], + "packet_file_sha256": { + "agents.md": "25ac3abd1f7797787dc0145f3a6ff96ff4a889e0d1cfb7b5d90f5719ed61a5d6", + "experimental/agents-log.md": "94742632e67c08d4d700dfa86085c84082bb13fdaf800d4ef10688fd91697d38", + "experimental/grande_finale.tex": "ec6e3ab75e75f89bd411802bfbb98013b5c79e260ef52674c499d95563f70f24", + "experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md": "a2830eb5261976dbd34699abdf276f126096b59253bc4977b7ac6f8096ae7918", + "experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/README.md": "a98d7751fd9ab8af3572ef1efeab24a00328288d9749e125270c20ad730cd190", + "experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py": "ea85bb8e7050d2f1087c3f390e3547b1c07d69ac74736fe272b034ef19822572", + "experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage": "f14b10c19631d378769fedac9cc39d36eba02417be99c41d96ca4d9374782d17", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/campaign.json": "622681c1918f973db059479415df9cbf8b3c85a68b4b224fe461e860fbcfa620", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/00_contract.md": "4678286daafcd77bd762784e291f5fad527cba0f063c4c50c9a93408114b2d85", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/01_frontier_map.md": "290cc16218db9f4db2aebfd700283c761b15b3f6e5d7d55f014af698bfbaa2c5", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/02_controls.md": "d4975f25338ff72d8f88cc50c8601c658cfb6cada3b1922c448df9fcb6c41ef2", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/03_idea_ledger.csv": "dd369df2d90c0180b7b9f6839b44d143d6e18bf452b5863907aa26a4c478cd4a", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/04_dependency_ledger.csv": "40d9d42300acdf1011e6332e0ece33163c8b844bdc9bb22d60abb6b83f2af4e1", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/05_claim_registry.csv": "aa869f79640e4c1e09a7f38626bf71da12db65a061d46f0c56c33b5e660752e3", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/06_review_registry.csv": "4369c82d0532f1e4c1c7cd7da39a7ea97f7e2f78a57e1f4e69a4aa6fce26e753", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/literature_sweep.md": "e1c0e41a73fad00210a4c178228d4d3ff5bc220c2c87e256b3e99f5325a77855" + }, + "payload_sha256": "642641809784eba3e4323f331bc28cc3d09192a287bd2708752a179080896f53" +} diff --git a/experimental/data/certificates/kb-mca-rank11-fixed-endpoint-router-v1/manifest.json b/experimental/data/certificates/kb-mca-rank11-fixed-endpoint-router-v1/manifest.json new file mode 100644 index 000000000..2bc8681be --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-fixed-endpoint-router-v1/manifest.json @@ -0,0 +1,44 @@ +{ + "canonical_payload_sha256": "675b02624c17373e435000dcbdc87746e7b4c9b2b0f0e1ccc5081c479b621fa6", + "claims": { + "active_v4_ledger_movement": 0, + "koalabear_closed": false, + "rank11_paid": false, + "rank_one_low_pair_anticode_paid": true + }, + "files": [ + { + "bytes": 2917, + "path": "experimental/campaigns/kb-mca-rank11-fixed-endpoint-post-1171/00_contract.md", + "sha256": "f971cd3b53320f20e466373bf2ae9f0f8c54c6df7a2a761b2df1503560b741fe" + }, + { + "bytes": 6326, + "path": "experimental/campaigns/kb-mca-rank11-fixed-endpoint-post-1171/proofs/fixed_endpoint_owner_router.md", + "sha256": "a6e71eb3a85f93dfcf3d993e25940e619633a92b744c74be399e555ca06e65ae" + }, + { + "bytes": 1983, + "path": "experimental/notes/thresholds/kb_mca_rank11_fixed_endpoint_owner_router_v1.md", + "sha256": "cfed95753ab705caae817fe96743848f05837efa3c3f3ce2134e5a78a4dd9bc2" + }, + { + "bytes": 12633, + "path": "experimental/scripts/verify_kb_mca_rank11_fixed_endpoint_router_v1.py", + "sha256": "203b6da846187cf3c0d7d0cd8433666c9c9ae7b69f72e1c72fea4c83b1f14cf9" + }, + { + "bytes": 4521, + "path": "experimental/scripts/audit_kb_mca_rank11_fixed_endpoint_router_v1.py", + "sha256": "aa56bf6bce1317841dbd6c4112ba7c0fc79cdfb2c06f3bcfe2e17e56c2b97f72" + }, + { + "bytes": 2682, + "path": "experimental/data/certificates/kb-mca-rank11-fixed-endpoint-router-v1/result.json", + "sha256": "5350e2748a796f975917b776409969a94713ca0bfb15411f9fd052b31d760e79" + } + ], + "parent": "a3fc2d5aea86577cd50d8b95b6eb2155d4d940f6", + "result_sha256": "5350e2748a796f975917b776409969a94713ca0bfb15411f9fd052b31d760e79", + "schema": "kb-mca-rank11-fixed-endpoint-router-manifest-v2" +} diff --git a/experimental/data/certificates/kb-mca-rank11-fixed-endpoint-router-v1/result.json b/experimental/data/certificates/kb-mca-rank11-fixed-endpoint-router-v1/result.json new file mode 100644 index 000000000..38c5c932b --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-fixed-endpoint-router-v1/result.json @@ -0,0 +1,109 @@ +{ + "claims": { + "active_v4_ledger_movement": 0, + "koalabear_closed": false, + "rank11_paid": false, + "rank_one_low_pair_anticode_paid": true + }, + "continuous_maximizer": { + "g": 2001826, + "outside": 95326, + "x": 953250 + }, + "cutoff_scan": { + "after_minimum": { + "A": 1112439, + "d": 63863, + "forced_common_core": 127726, + "high": 29534229400841059, + "low": 52292259273914047, + "near": 134944, + "signed_slack": 193154239436505037, + "tau": 3609, + "total": 81826488674890050 + }, + "first_paying": { + "A": 1115609, + "d": 67033, + "forced_common_core": 134066, + "high": 242314927584173240, + "low": 32215263489919749, + "near": 134944, + "signed_slack": 450537037167154, + "tau": 439, + "total": 274530191074227933 + }, + "minimum": { + "A": 1112440, + "d": 63864, + "forced_common_core": 127728, + "high": 29542412894717712, + "low": 52284072490672992, + "near": 134944, + "signed_slack": 193154242725869439, + "tau": 3608, + "total": 81826485385525648 + }, + "minimum_unique": true, + "preceding": { + "A": 1115610, + "d": 67034, + "forced_common_core": 134068, + "high": 242866897806460650, + "low": 32210458397220937, + "near": 134944, + "signed_slack": -96628092421444, + "tau": 438, + "total": 275077356203816531 + } + }, + "exact_low_calibrations": { + "tau_3608": { + "pair_cap": 548476517326, + "value": 52284072490618276, + "with_exception": 52284072490618277, + "x": 953250 + }, + "tau_439": { + "pair_cap": 337948340326, + "value": 32215263489916276, + "with_exception": 32215263489916277, + "x": 953250 + } + }, + "fixed_right_at_first_cutoff": { + "high": 242314927584173240, + "near": 134944, + "ray_cap": 8147918, + "signed_slack": 32665800518938985, + "tau": 439, + "total": 242314927592456102 + }, + "max_affine_dimension": 10, + "parent": "a3fc2d5aea86577cd50d8b95b6eb2155d4d940f6", + "projective_control": { + "gl2_matrices": 480, + "max_projective_exceptional_slopes": 1, + "max_roots": 1, + "outside_vector_cases": 9600, + "prime": 5 + }, + "rank_two_terminal": { + "minimum_common_evaluation_factor_degree": 134066, + "minimum_pair_core_size": 1115609, + "minimum_shared_core_size": 134066, + "tau": 439 + }, + "row": { + "K": 1048576, + "budget": 274980728111395087, + "extension_degree": 6, + "m": 1116048, + "n": 2097152, + "near": 134944, + "p": 2130706433, + "w": 67472 + }, + "schema": "kb-mca-rank11-fixed-endpoint-router-v1", + "theta_resource": 106618568137036225644 +} diff --git a/experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/README.md b/experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/README.md new file mode 100644 index 000000000..96b1c6136 --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/README.md @@ -0,0 +1,45 @@ +# KoalaBear rank-eleven pair/core route-cut certificate + +Exact dependency: PR #1167 head +`491ccdf53d54846f5a013b808960645275c64ed3`. + +This certificate binds the nonuniform support-margin theorem, the exact +fixed-pair concentration terminals, and the two core-deficiency method +ceilings. It explicitly records that rank eleven is unpaid and that active +v4 ledger movement is zero. + +Replay from the repository root: + +```bash +python3 experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py +python3 -O experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py +python3 experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py --tamper-selftest +HOME=/tmp /usr/local/bin/sage experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.sage +python3 /Users/scott/.codex/skills/pursue-frontier-math/scripts/audit_campaign.py \ + experimental/campaigns/kb-mca-rank11-pair-core-post-1167 --require-actionable +``` + +The source document must also compile: + +```bash +python3 /Users/scott/.codex/plugins/cache/openai-bundled/latex/0.2.4/scripts/compile_latex.py \ + experimental/grande_finale.tex --compiler texlive \ + --output-directory /tmp/kb-rank11-pair-core-tex --json +``` + +The canonical manifest is generated only after packet files freeze: + +```bash +python3 experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py --write +``` + +The GF(11) Sage control proves sharp fixed-pair parallelism. The smaller +GF(7) campaign control independently falsifies distinct-neighbor promotion +at the smallest legal local parameters. Neither toy is asserted to realize +KoalaBear affine error rank eleven. + +The campaign's `scratch/scan_weighted_pair_core.py` is preserved as a +superseded discovery artifact. It uses the weaker bipartite endpoint +factor-two normalization and is deliberately excluded from the packet. The +release Python verifier is authoritative. The campaign experiment is an +unsealed duplicate replay retained for research provenance. diff --git a/experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/manifest.json b/experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/manifest.json new file mode 100644 index 000000000..3fc02a1e1 --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/manifest.json @@ -0,0 +1,137 @@ +{ + "schema": "kb-mca-rank11-pair-core-route-cut-v1", + "parent": "491ccdf53d54846f5a013b808960645275c64ed3", + "row": { + "p": 2130706433, + "extension_degree": 6, + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "near": 134944, + "budget": 274980728111395087 + }, + "explanation_dimension": 10, + "theta_resource": 106618568137036225644, + "fixed_pair_concentration": { + "legal_cutoffs": 65810, + "last_legal_cutoff": 65810, + "maximum_forced_weight": { + "cutoff": 6486, + "pair_cap": 2255946383610, + "forced_pair_weight": 743449148, + "forced_records": 114624, + "max_compatible_deficiency": 8 + }, + "maximum_forced_records": { + "cutoff": 1795, + "pair_cap": 1075288922022, + "forced_pair_weight": 360132809, + "forced_records": 200632, + "max_compatible_deficiency": 4 + } + }, + "core_deficiency_lp": { + "unconditional_current_theorems": { + "cutoff": 19737, + "pair_cap": 26130774875308, + "high_records": 5401690553097387, + "low_records": 808527428378681053, + "total": 813929118931913384, + "signed_slack": -538948390820518297, + "optimum_multiplicity": 1 + }, + "conditional_on_pointwise_theta_sum": { + "cutoff": 26033, + "pair_cap": 107486241601454, + "low_records": 811957734614064312, + "low_theta_used": 106597778100457375003, + "high_records": 798572504373, + "total": 811958533186703629, + "signed_slack": -536977805075308542, + "first_optimal_cutoff": 26033, + "last_optimal_cutoff": 65810, + "optimum_multiplicity": 39778 + } + }, + "abstract_singleton_packing": { + "status": "ABSTRACT_CERTIFICATE_CLASS_PACKING_NOT_RS_REALIZABILITY", + "deficiency": 1, + "local_margin": 1, + "pair_types": 821289819491, + "records_per_pair": 981105, + "post_near_records": 805771548351717555, + "total_with_near": 805771548351852499, + "excess_over_budget": 530790820240457412, + "theta_resource_used": 805771548351717555 + }, + "dependency_boundary": { + "unconditional_current_theorems": [ + "support-local high-margin cap", + "sub-square common-support interleaving collapse", + "fixed-pair disjoint exception sets" + ], + "conditional_new_corollary": "sum_gamma theta_gamma <= C_10" + }, + "claims": { + "rank11_paid": false, + "active_v4_ledger_movement": 0, + "KoalaBear_closed": false, + "route_cut": "NEEDS_CROSS_PAIR_COLLISION_OR_OWNER_THEOREM" + }, + "provenance": { + "repository": "przchojecki/rs-mca", + "upstream_main_at_refresh": "93fba1be3f3299b0ba4708d88715377bbb656e45", + "exact_pr1167_parent": "491ccdf53d54846f5a013b808960645275c64ed3", + "exa_sources_reviewed": 55, + "load_bearing_external_lemma": false, + "wolfram_exact_replay": true + }, + "packet_files": [ + "agents.md", + "experimental/agents-log.md", + "experimental/grande_finale.tex", + "experimental/notes/thresholds/kb_mca_rank11_pair_core_route_cut_v1.md", + "experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/README.md", + "experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py", + "experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.sage", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/campaign.json", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/00_contract.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/01_frontier_map.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/02_controls.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/03_idea_ledger.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/04_dependency_ledger.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/05_claim_registry.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/06_review_registry.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/07_review_status.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/proofs/nonuniform_theta_pair_route_cut.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/threads/barrier_adversary.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/controls/gf7_parallel_star.sage", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/literature_sweep.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/wolfram_replay.md" + ], + "packet_file_sha256": { + "agents.md": "c7b189207291d701b6437282bea2d54887ce537066008d0125fd2acfdcdaa606", + "experimental/agents-log.md": "586d7e26af0622aeccafe2e2fb81a59fe91f7812eb325ea0e8060d6acc3ecb90", + "experimental/grande_finale.tex": "3c90bc82f38176b252b595a64e0831b026c30d4ac23a608a0643d22e6c0b4c8a", + "experimental/notes/thresholds/kb_mca_rank11_pair_core_route_cut_v1.md": "b0de5261b63f7682cb756d81d4bb602467a24244c809ab7422e5f0e692d2eaa8", + "experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/README.md": "5398cb0f68196b98b0be7145e133869cfacd17bef5f08a21e76bce1477f6de4d", + "experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py": "d7f97d12873967eafc8645e844ed0c89dcbac9c1b851330c49ad6054425ec668", + "experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.sage": "f82aa9d85a51528abf05a31020dc8ebefa8a4e236af10b852cdc54efb31ed35e", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/campaign.json": "3719614e65c9bd408de2fa96bbb2088aa61aa4f41bff2beb166f763eb34e06d4", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/00_contract.md": "a2ef1f3fa22f279ff271891dfd1384b1807f9a1f0a2b60447ba68d30e0863138", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/01_frontier_map.md": "268cd2020aa60181ed9c17dd558da5b9287bed7c79e1523b73a60a202529ce7c", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/02_controls.md": "bc96e3681180fd25233cdadbbce9a75929572f70189839b55b4ee0f2b52cbd60", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/03_idea_ledger.csv": "4a4d4165ad9ed7a0a23b71c54b309fb0370fe9815c56522eed6a34c6f156820d", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/04_dependency_ledger.csv": "9f536c9f2960f0e3a3d0937503f42fa8480364600eb69e5b8a0ea17f64c129ef", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/05_claim_registry.csv": "17cb4a9963bbb116f513801409b360fee7867d60d778fdb4ceb6deae3725e789", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/06_review_registry.csv": "d0b041444d05ad09651cda722e53e3d5883fca4b3113f6c819cf895af43aa454", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/07_review_status.csv": "b7d8a1153405da8ffb4b17db4034d83b6a89392036fb0746935825b9c640e310", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/proofs/nonuniform_theta_pair_route_cut.md": "c11bc0943432776f917258e0e8e80b0fe19e042c1f65c5f1826079de7d747105", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/threads/barrier_adversary.md": "27c74dde4de9c4039decf1381def3e83c121ec7c66d3258d7147b033dcb5cd03", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/controls/gf7_parallel_star.sage": "e220e18fba70a9f4d39a722a7c20888546889750f8b1331afb0a3cbd9faf539b", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/literature_sweep.md": "977ca6cf6fb6d6f753bd035fda75d7e851086a29f3263cccb7bcae1c0c2dfd4f", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/wolfram_replay.md": "ccfa7f3707106838027be1bf1b52c05de1ef924f75805b91922faa4a08b24bd2" + }, + "payload_sha256": "ca624392d1842a69ca9212533af672e4325fa984dad11952443e247db80cb6c3" +} diff --git a/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/README.md b/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/README.md new file mode 100644 index 000000000..2b5b7db44 --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/README.md @@ -0,0 +1,27 @@ +# KoalaBear rank-eleven rank-one pair-anticode certificate + +Schema: `kb-mca-rank11-rank-one-pair-anticode-router-v1` + +Exact parent: `6a5dcdae1591fc7f044eda6a942bfe178521a48c` + +The canonical payload records: + +- the full `GF(3)` maximal-clique control for `2 x 2` rank-one matrix + anticodes; +- the full `GF(5)` degree-`<3` common-root control; +- the common-core-aware affine-ray scan over all `0<=u<=K-1`; +- the proper affine-space caps for dimensions `0` through `10`; +- explicit nonclaims and zero active-v4 movement. + +Canonical payload SHA-256: +`7190997f4e6e464ce41aa3c8389968985686604ad81e9b272ca7c07130d323a5`. + +Replay: + +```bash +python experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.py +python experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.py --json +python experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.py --tamper-selftest +python experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1_independent.py +wolframscript -file experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.wl +``` diff --git a/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/canonical_payload.json b/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/canonical_payload.json new file mode 100644 index 000000000..39bbc66f2 --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/canonical_payload.json @@ -0,0 +1 @@ +{"canonical_payload_sha256":"7190997f4e6e464ce41aa3c8389968985686604ad81e9b272ca7c07130d323a5","payload":{"arithmetic":{"affine_ray_maximum":8147918,"affine_ray_slack":274980728103247169,"common_core_aware_affine_ray":{"checkpoints":{"0":{"affine_line_charge":1962210,"heterogeneous_pair_charge":31,"large_clone_classes":2,"m_u":1116048,"n_u":2097152,"q_u":1048575,"total":1962241,"universal_core":0},"1048575":{"affine_line_charge":0,"heterogeneous_pair_charge":8147918,"large_clone_classes":0,"m_u":67473,"n_u":1048577,"q_u":67472,"total":8147918,"universal_core":1048575},"67472":{"affine_line_charge":981105,"heterogeneous_pair_charge":1964379,"large_clone_classes":1,"m_u":1048576,"n_u":2029680,"q_u":1048575,"total":2945484,"universal_core":67472},"67473":{"affine_line_charge":0,"heterogeneous_pair_charge":1964379,"large_clone_classes":0,"m_u":1048575,"n_u":2029679,"q_u":1048574,"total":1964379,"universal_core":67473}},"number_of_core_sizes":1048576,"optimum":{"affine_line_charge":0,"heterogeneous_pair_charge":8147918,"large_clone_classes":0,"m_u":67473,"n_u":1048577,"q_u":67472,"total":8147918,"universal_core":1048575},"scanned_core_max":1048575,"scanned_core_min":0},"proper_affine_caps_dimensions_0_to_10":[1,3,6,12,23,44,82,155,292,548,1031],"proper_affine_dimension_10_bound":1031,"proper_affine_dimension_10_slack":274980728111394056},"claims":{"active_v4_ledger_movement":0,"koalabear_closed":false,"maximal_core_overlap_router_proved":true,"open_terminal":"rank-two pair differences or positive-dimensional affine-linear correction component","rank11_paid":false,"rank_one_anticode_router_proved":true},"core_overlap_control":{"degree_bound":3,"distribution":{"0":12480,"1":2400},"expected_K_minus_2":1,"field":5,"maximum_common_roots":1,"ordered_independent_pairs":14880,"witness":{"common_roots":[0],"f":[0,0,1],"g":[0,1,0]}},"matrix_anticode_control":{"ambient_matrices":81,"cliques":[{"nonzero_size":8,"type":"fixed_left","with_zero_size":9},{"nonzero_size":8,"type":"fixed_right","with_zero_size":9},{"nonzero_size":8,"type":"fixed_right","with_zero_size":9},{"nonzero_size":8,"type":"fixed_right","with_zero_size":9},{"nonzero_size":8,"type":"fixed_right","with_zero_size":9},{"nonzero_size":8,"type":"fixed_left","with_zero_size":9},{"nonzero_size":8,"type":"fixed_left","with_zero_size":9},{"nonzero_size":8,"type":"fixed_left","with_zero_size":9}],"field":3,"fixed_left_cliques":4,"fixed_right_cliques":4,"maximal_clique_size_with_zero":9,"maximal_cliques_through_zero":8,"mixed_strict_difference_rank":2,"rank_one_neighbors_of_zero":32},"parent":"6a5dcdae1591fc7f044eda6a942bfe178521a48c","row":{"K":1048576,"budget":274980728111395087,"extension_degree":6,"field_prime":2130706433,"m":1116048,"n":2097152},"schema":"kb-mca-rank11-rank-one-pair-anticode-router-v1"}} diff --git a/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/manifest.json b/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/manifest.json new file mode 100644 index 000000000..8bac02bae --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/manifest.json @@ -0,0 +1,117 @@ +{ + "canonical_payload_sha256": "7190997f4e6e464ce41aa3c8389968985686604ad81e9b272ca7c07130d323a5", + "claims": { + "active_v4_ledger_movement": 0, + "rank11_paid": false, + "rank_one_router_proved": true + }, + "files": [ + { + "bytes": 2296, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/00_contract.md", + "sha256": "df321f14f70607548897e06849a169cb28bfa9436a41110dd09a396cc414995c" + }, + { + "bytes": 2035, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/01_frontier_map.md", + "sha256": "6c4bd5a1d7d460ab7208c057ac19e99413d4cc0a64fe9ffe86c93727acbdccf1" + }, + { + "bytes": 1940, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/02_controls.md", + "sha256": "dc6e0da8d661bfe33df8d2e89ed95554c15dafdf39d28624ffcbe74e458572da" + }, + { + "bytes": 1194, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/03_idea_ledger.csv", + "sha256": "bb8bd8e757623e5bebbccbd798c3b771a0f2b669072b787bdb35ee1cab105f15" + }, + { + "bytes": 780, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/04_dependency_ledger.csv", + "sha256": "069333de1a3cd2e32b5f4d770747f1f1b37998c86c4a98d3c3a8f625a82676fb" + }, + { + "bytes": 862, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/05_claim_registry.csv", + "sha256": "d8e9c3ff92049b35e026d608c7400f691e3772f89abb069683a7349d9734e7e2" + }, + { + "bytes": 721, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/06_review_registry.csv", + "sha256": "8837c60c1a6f50f5a1252d719f460f225ccfde41c5066400037916b26597d499" + }, + { + "bytes": 991, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/README.md", + "sha256": "95d81950ae0f77b8ee07075bfa7cfeb47a7588c3807db79ee5adabadff5130d2" + }, + { + "bytes": 2119, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/campaign.json", + "sha256": "e2db12718cda5a6e0ef9b55183971caa440bb05d40c435deb60c8e3d137d9449" + }, + { + "bytes": 7217, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/proofs/rank_one_pair_anticode_router.md", + "sha256": "413bfa4184883939d12e13b019b6724bb0e6377dc1ae07a745671b90dd3b42e0" + }, + { + "bytes": 942, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/reviews/independent_certificate_review.md", + "sha256": "dc4686136b7e817a46de43e201646de54b788fd964c7fcb65cf0a69f06735222" + }, + { + "bytes": 3180, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/reviews/independent_math_review.md", + "sha256": "225753d3b3634bf278b1473cb5d72cfea055e60a4fb2a5b7b0d28ade7607abe0" + }, + { + "bytes": 1005, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/reviews/literature_sweep.md", + "sha256": "cc0cff2a5c2f1427f8d002d21bfe3c804c0c2f2008477106992f8c60b77f9fdc" + }, + { + "bytes": 1021, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/reviews/source_scope_review.md", + "sha256": "fd592ddf48affbe2a09cf92a54e9bd3aa39fb6bf252ad8479032e3e41c7a2571" + }, + { + "bytes": 3526, + "path": "experimental/campaigns/kb-mca-rank11-rank-one-anticode-post-1168/source_integration_fragment.tex", + "sha256": "bccb279fc812167910e124264100ca01234235e9c777c95ca7ec1462d14d2b36" + }, + { + "bytes": 1112, + "path": "experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/README.md", + "sha256": "6e26fd2720c695164f5f59714abccd998e2b6ca6c838c9fd59703dac3ab927f3" + }, + { + "bytes": 2799, + "path": "experimental/data/certificates/kb-mca-rank11-rank-one-pair-anticode-router-v1/canonical_payload.json", + "sha256": "cf971ef376ab208896ced4295d2d3f77d90f89a64d2cf7350420205a89a91118" + }, + { + "bytes": 1769, + "path": "experimental/notes/thresholds/kb_mca_rank11_rank_one_pair_anticode_router_v1.md", + "sha256": "3857f940310c9a18091f6f4a55b69e3412fff18f1898f96d9dae585788f263de" + }, + { + "bytes": 13098, + "path": "experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.py", + "sha256": "e0237b7c2aaa636f8b889aca6749cadc287ea431451390b1cda37c2a1a956639" + }, + { + "bytes": 1102, + "path": "experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.wl", + "sha256": "2e9186951e5b2131dbe0ffda49e4a65bb2961892f0f25898b282ef3483ad6816" + }, + { + "bytes": 4885, + "path": "experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1_independent.py", + "sha256": "27575ecbcf8560861d833c29193541d7a7c8afc16393d429ee69e96a087a4a6d" + } + ], + "parent": "6a5dcdae1591fc7f044eda6a942bfe178521a48c", + "schema": "kb-mca-rank11-rank-one-pair-anticode-router-manifest-v1" +} diff --git a/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/README.md b/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/README.md new file mode 100644 index 000000000..65f423d47 --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/README.md @@ -0,0 +1,25 @@ +# KoalaBear rank-eleven rich-flat router certificate + +This directory freezes the exact output of +`experimental/scripts/verify_kb_mca_rank11_rich_flat_router_v1.py` for the +one-commit successor to PR #1172. + +Canonical theorem cell: + +```text +tau 1547 +h 42452 +emitted core 42453 +total 274978720888758363 +slack 2007222636724 +``` + +Run from the repository root: + +```sh +python3 experimental/scripts/verify_kb_mca_rank11_rich_flat_router_v1.py +python3 -O experimental/scripts/verify_kb_mca_rank11_rich_flat_router_v1.py +python3 experimental/scripts/verify_kb_mca_rank11_rich_flat_router_v1.py --tamper-selftest +python3 experimental/scripts/audit_kb_mca_rank11_rich_flat_router_v1.py +python3 experimental/scripts/verify_kb_mca_rank11_rich_flat_manifest_v1.py +``` diff --git a/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/manifest.json b/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/manifest.json new file mode 100644 index 000000000..d831641cc --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/manifest.json @@ -0,0 +1,94 @@ +{ + "canonical_payload_sha256": "f08059cdb1593c8b22355e8f512da326d882106e2c1cd7c75a02263bf59351cc", + "claims": { + "active_v4_ledger_movement": 0, + "koalabear_closed": false, + "rank11_paid": false, + "transverse_branch_paid": true + }, + "files": [ + { + "bytes": 2673, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/00_contract.md", + "sha256": "3003039baf413675b1fd164f03ec010a9ad6e9dcc04ab81532c459e81c76e22d" + }, + { + "bytes": 2181, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/01_frontier_map.md", + "sha256": "a841753ac327c6cc74bfc7b9aa613723df7672d4b85f82476a53b8cf37130935" + }, + { + "bytes": 2001, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/02_controls.md", + "sha256": "d931596298c8862c3988a71b054f14270fa13b7e718ad9b22e42085853500f85" + }, + { + "bytes": 790, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/03_idea_ledger.csv", + "sha256": "17fb27fe6537b96548a36841d8b7bd04052dd6afb319ae7bab7e6ec8850454aa" + }, + { + "bytes": 519, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/campaign.json", + "sha256": "96f9a0460a526345b10d0b53b1ac63fb40361bbfc7011c3b3f00a3ab6afaaa52" + }, + { + "bytes": 8687, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/proofs/anchored_rich_flat_router.md", + "sha256": "61c163ba4503891c36a1281c06ca618a67bab92bf9c167ac7e05a82cb2b8ecf1" + }, + { + "bytes": 1188, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/reviews/literature_sweep.md", + "sha256": "ead59f1bb59ae7d885b1ff8f38bcbb80a0b5f27217f7b2ab3e735ccc92659834" + }, + { + "bytes": 835, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/reviews/wolfram_replay.md", + "sha256": "9ac02c368972aeeeca8ada2b31e831756c39cd3de4f3d80bb9437e6465f19693" + }, + { + "bytes": 2218, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/reviews/mathematics_audit.md", + "sha256": "c7d0a94c8a4ad6a3887a3838c2365a4736055a9cb48ae97339669da9f65c8b53" + }, + { + "bytes": 766, + "path": "experimental/campaigns/kb-mca-rank11-rich-flat-post-1172/reviews/certificate_review.md", + "sha256": "306f366f23802df0b27f27378b3e895358bbc59576ea539270f2bd088179fb7c" + }, + { + "bytes": 1828, + "path": "experimental/notes/thresholds/kb_mca_rank11_anchored_rich_flat_router_v1.md", + "sha256": "e1ee802537cf63b98cfc504d0523054fe398421f278cf76d4c098485952cdad1" + }, + { + "bytes": 11998, + "path": "experimental/scripts/verify_kb_mca_rank11_rich_flat_router_v1.py", + "sha256": "0faf56a768deab721d29b627782851940ac0396a205107e4936feada9c7fa047" + }, + { + "bytes": 4624, + "path": "experimental/scripts/audit_kb_mca_rank11_rich_flat_router_v1.py", + "sha256": "8cb75497a16efb8ab482c05bc5869fbd83a80f52ea34291dff49095888f71433" + }, + { + "bytes": 1357, + "path": "experimental/scripts/verify_kb_mca_rank11_rich_flat_manifest_v1.py", + "sha256": "398c35e27b41e892867f96ad49d9ee480783836bc5b653060e8082e97bd4ae60" + }, + { + "bytes": 823, + "path": "experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/README.md", + "sha256": "1ab4eb82984eeb5d878ebc621a246486c4631a2529abc3d97109b63f782d9b4f" + }, + { + "bytes": 1396, + "path": "experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/result.json", + "sha256": "11f352f6d1efe5508ad97ce7f3444f0ad9145c621040f619ee82b992c360cd12" + } + ], + "parent": "193b7bf99a5cc7ccea042f25677e698d9f988eee", + "result_sha256": "11f352f6d1efe5508ad97ce7f3444f0ad9145c621040f619ee82b992c360cd12", + "schema": "kb-mca-rank11-rich-flat-router-manifest-v1" +} diff --git a/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/result.json b/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/result.json new file mode 100644 index 000000000..cfb348eec --- /dev/null +++ b/experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/result.json @@ -0,0 +1 @@ +{"adjacent_h_over_budget":17108854816460,"claims":{"active_v4_ledger_movement":0,"koalabear_closed":false,"rank11_paid":false,"transverse_branch_paid":true},"finite_matroid_control":{"configurations_checked":2077},"parent":"193b7bf99a5cc7ccea042f25677e698d9f988eee","row":{"K":1048576,"budget":274980728111395087,"extension_degree":6,"m":1116048,"n":2097152,"near":134944,"p":2130706433,"rank1_group_cap":8147918,"theta_resource_s10":106618568137036225644,"w":67472},"scan":{"first_paying":[397,101],"global_max_entries":[[1547,42452],[1548,42452],[1549,42452]],"global_max_h":42452,"last_paying":[21132,4]},"schema":"kb-mca-rank11-anchored-rich-flat-router-v1","selected":{"A":1114501,"anchor_overlap_floor":131850,"anchor_pair_total":982651,"d":65925,"emitted_core_size":42453,"field_guard":true,"high_tail":68875044016173272,"low_total":206103676872450147,"near_addback":134944,"pair_cap_dim2":252,"pair_multiplicity":982651,"rank1_space_count":7365150514,"rank1_total":60010642445729852,"rank2_group_cap":247628052,"rank2_space_count":589969647,"rank2_total":146093034425737644,"signed_slack":2007222636724,"tau":1547,"total":274978720888758363,"transverse_threshold":42452},"terminal":{"common_zero_coordinates_at_least":42453,"locator_division_degree_ceiling":1006123,"rank1_extension_dimension_at_least":2,"rank2_extension_dimension_at_least":3,"rank2_original_common_zero_floor":131850}} diff --git a/experimental/data/certificates/kb-mca-support-local-theta-router-v1/README.md b/experimental/data/certificates/kb-mca-support-local-theta-router-v1/README.md new file mode 100644 index 000000000..73405686d --- /dev/null +++ b/experimental/data/certificates/kb-mca-support-local-theta-router-v1/README.md @@ -0,0 +1,43 @@ +# KoalaBear support-local theta router v1 + +Stacked on exact PR #1165 head +`b6d30ef4f5ff966665b7672e1780a637509873a4`, this packet sharpens its +global proper-subspace compiler with an exact selected-support margin and a +reversible error-rank gauge. + +Its conditional direct KoalaBear result is: + +- if a disjoint earlier stratum has size at most `2w=134944`, post-deletion + affine error rank at most 9 is paid by `110390969172308040`, leaving slack + `164589758939087047`; +- ranks 10, 11, and 12 either pay or emit an actual selected support with at + most 12, 387, or 12049 direction exceptions; +- rank at least 13 remains explicit. + +PR #1160 supplies the required `2w` deletion on its own stack. This packet +does not insert either result into the still-open v4 S/A/E chronology and +moves no deployed ledger atom. + +Replay: + +```bash +# The packet pins PR #1160 as an external dependency. Fetch its exact head +# explicitly because it is not an ancestor of the PR #1165 stack. +git fetch upstream pull/1160/head:refs/remotes/upstream/pr-1160 +python3 experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py --check +python3 -O experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py --check +python3 experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py --tamper-selftest +HOME=/tmp DOT_SAGE=/tmp TMPDIR=/tmp /usr/local/bin/sage experimental/scripts/verify_kb_mca_support_local_theta_router_v1.sage +/Users/scott/math_code/.venv/bin/python experimental/scripts/verify_kb_mca_support_local_theta_router_v1_flint.py +/Users/scott/math_code/scripts/wm.sh -file experimental/scripts/verify_kb_mca_support_local_theta_router_v1.wl | grep -F 'KB_MCA_SUPPORT_LOCAL_THETA_WOLFRAM_PASS' +``` + +The final pipe is intentional: the cloud wrapper can report a transport or +credit error with status zero, so absence of the exact PASS sentinel must +fail the replay. + +Regenerate the canonical manifest only after intentional packet changes: + +```bash +python3 experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py --write +``` diff --git a/experimental/data/certificates/kb-mca-support-local-theta-router-v1/manifest.json b/experimental/data/certificates/kb-mca-support-local-theta-router-v1/manifest.json new file mode 100644 index 000000000..90da58f88 --- /dev/null +++ b/experimental/data/certificates/kb-mca-support-local-theta-router-v1/manifest.json @@ -0,0 +1,446 @@ +{ + "schema": "rs-mca-kb-support-local-theta-router-v1", + "artifact_kind": "POST_1165_SUPPORT_LOCAL_REFINEMENT_GAUGE_AND_ROUTE_CUT", + "base": { + "repository": "przchojecki/rs-mca", + "exact_pr1165_head": "b6d30ef4f5ff966665b7672e1780a637509873a4", + "official_upstream_main_at_refresh": "93fba1be3f3299b0ba4708d88715377bbb656e45" + }, + "source_bindings_at_parent": [ + { + "id": "ACTIVE_V4_AFTER_PR1165_REPAIR", + "path": "experimental/grande_finale.tex", + "git_blob_sha1": "df10d48605336f73e111aca620a1ec696aab6906", + "sha256": "0020079d6fcb2016fca37cf2b01252ba5ed5128c47c6b293b00f17f7b3435d9d", + "role": "GLOBAL_REPAIR_FULL_RANK_SPLIT_GRAM_AND_FULL_LIFT_CONTINUATIONS" + }, + { + "id": "PR1165_COUNTEREXAMPLE_NOTE", + "path": "experimental/notes/thresholds/mca_affine_span_incidence_counterexample_v1.md", + "git_blob_sha1": "984fe1fa4ff4ff34ed8a78499937243169ef9ffe", + "sha256": "83446a16a91f401ee76bbd89da888fa98638272eadfcc784cc3b1c7e94419883", + "role": "PARENT_COUNTEREXAMPLE_GLOBAL_REPAIR_AND_TOP_RANK_SCOPE" + }, + { + "id": "PR1165_GLOBAL_REPAIR_VERIFIER", + "path": "experimental/verify_mca_proper_subspace_occupancy_compiler_v1.py", + "git_blob_sha1": "ee46de85140dc3e79a120f28fe447475d3303844", + "sha256": "9e319700ddfe6378a9cadbc902723db2a56726d26e34aa84dda3dfb5f8046f96", + "role": "PARENT_GLOBAL_L_FACTOR_AND_WALLS" + }, + { + "id": "PR1165_COUNTEREXAMPLE_VERIFIER", + "path": "experimental/verify_mca_affine_span_incidence_counterexample_v1.py", + "git_blob_sha1": "3355975c6661551e78611083ebce343d3c540fda", + "sha256": "26c07a19f94007cca71cfcfabf1a4e053e27abfd3196c33f805971f2ecde939b", + "role": "PARENT_GF1009_REGRESSION" + }, + { + "id": "PR1165_INDEPENDENT_COUNTEREXAMPLE_VERIFIER", + "path": "experimental/verify_mca_affine_span_incidence_counterexample_v1_independent.py", + "git_blob_sha1": "a447210884b2d3b9f7707f0af7913f7e9654c718", + "sha256": "bf48d7d533863b7b953e8080e5cd82f5159be4a3453e0d2391afc8f5437fff15", + "role": "PARENT_INDEPENDENT_GF1009_REPLAY" + }, + { + "id": "PR1165_FULL_RANK_GAUGE_VERIFIER", + "path": "experimental/verify_mca_full_explanation_lifted_rank_gauge_dichotomy_v1.py", + "git_blob_sha1": "1ebd91022c7231354e5684be0dd0c61edd8d156e", + "sha256": "92abd35176f143a1fa9fb09b5a8b6641715d425300011f1031547286d359f567", + "role": "PARENT_FULL_EXPLANATION_GAUGE_OVERLAP_BOUNDARY" + }, + { + "id": "PR1165_PUNCTURED_JOHNSON_VERIFIER", + "path": "experimental/verify_mca_sparse_direction_punctured_johnson_profile_v1.py", + "git_blob_sha1": "806738813012ff4aeda97db6b0c02473f4d0ea45", + "sha256": "b4fee5a75fcc716dee3c8ce02e129ad51e15bd537dc7404451d0bb58faf07c86", + "role": "PARENT_SPARSE_DIRECTION_ROUTE_OVERLAP_BOUNDARY" + }, + { + "id": "PR1165_NEAR_JOHNSON_GRAM_NOTE", + "path": "experimental/notes/thresholds/mca_sparse_direction_near_johnson_gram_rank_v1.md", + "git_blob_sha1": "d303cb19770a258c1c8f2dfc0cd53401658b3ea1", + "sha256": "e155d107a5dc31c6de9ad8fbb3395cee70937467fb798633c50e0e34e94272b6", + "role": "PARENT_CENTERED_GRAM_CONTINUATION_SCOPE" + }, + { + "id": "PR1165_NEAR_JOHNSON_GRAM_VERIFIER", + "path": "experimental/verify_mca_sparse_direction_near_johnson_gram_rank_v1.py", + "git_blob_sha1": "0e013330a0cba9aa985b73a856bcbae6dcc0673b", + "sha256": "5dd10235bb005ddfaeb0481952fae344886261bf5b62be66d8aa588bfe4cb4b6", + "role": "PARENT_CENTERED_GRAM_EXACT_WALLS" + }, + { + "id": "PR1165_MEAN_CENTERED_GRAM_NOTE", + "path": "experimental/notes/thresholds/mca_sparse_direction_mean_centered_gram_profile_v1.md", + "git_blob_sha1": "aebf91a811eaeace0266a1a051219b240e0ec40f", + "sha256": "f8d7bbbfcf2cd20a72e30d6e06cdac1489204369d62b485ab6ea11685f7d8d94", + "role": "PARENT_MEAN_CENTERED_GRAM_CONTINUATION_SCOPE" + }, + { + "id": "PR1165_MEAN_CENTERED_GRAM_VERIFIER", + "path": "experimental/verify_mca_sparse_direction_mean_centered_gram_profile_v1.py", + "git_blob_sha1": "5e55d792a38d7285979df7b2f867c3d6cbd46a1f", + "sha256": "f9b8ef1b5b3f4a64876f5eb19f7cf535c4780086f0d97e1bf9af96c29aa6c152", + "role": "PARENT_MEAN_CENTERED_GRAM_EXACT_WALLS" + } + ], + "external_source_bindings": [ + { + "id": "PR1160_NEAR_RATIONAL_2W_THEOREM", + "path": "experimental/notes/thresholds/kb_mca_supportwise_near_rational_two_anchor_repair_v1.md", + "git_blob_sha1": "12bc4a0f06189829a9490928e4855d1aa958f940", + "sha256": "7e75d67420f4ed37add3b4f6ea3aa45e043a782a6396f328b1e34ce659938989", + "role": "INTRINSIC_NEAR_RATIONAL_STRATUM_BOUND_LE_2W", + "commit": "c5f4ea7a0c78828c901ae5f3428894a8b2e2806b" + }, + { + "id": "PR1160_NEAR_RATIONAL_2W_VERIFIER", + "path": "experimental/scripts/verify_kb_mca_supportwise_near_rational_two_anchor_repair_v1.py", + "git_blob_sha1": "3b4533b53e947466de55262e3577108f125738c0", + "sha256": "5d284cb0f857f2ff7c0797e911a2047009d6883d54f9d0df0a682627c09b5a35", + "role": "INTRINSIC_NEAR_RATIONAL_STRATUM_EXACT_REPLAY", + "commit": "c5f4ea7a0c78828c901ae5f3428894a8b2e2806b" + } + ], + "external_provenance": [ + { + "commit": "3a13f2dcdcab95f57fdda8a3a8beea024b0dd1de", + "repository": "AllenGrahamHart/rs-mca-prize-dag", + "status": "REFUTED_AT_FINAL_NORMAL_FLAT_STEP" + }, + { + "commit": "60db12dc5e741e24acaca032382bbbfa721ce499", + "repository": "AllenGrahamHart/rs-mca-prize-dag", + "status": "RANK_WALL_CONSEQUENCE_SUPERSEDED" + }, + { + "commit": "fc74e16cd3f3acfa1030317e8d1636f492aca11f", + "repository": "AllenGrahamHart/rs-mca-prize-dag", + "status": "COMPOSITION_REQUIRES_REAUDIT_WHERE_IT_USES_3A13" + }, + { + "commit": "c5f4ea7a0c78828c901ae5f3428894a8b2e2806b", + "repository": "przchojecki/rs-mca", + "status": "PR1160_EXTERNAL_2W_DELETION_DEPENDENCY_NOT_IN_PARENT" + }, + { + "search": "Exa targeted primary-source incidence/design-matrix sweep", + "sources_reviewed": 24, + "load_bearing_external_lemma_imported": false + } + ], + "counterexample": { + "field": 257, + "domain": "GF(257)^*", + "n": 256, + "K": 1, + "m": 86, + "w": 85, + "slopes": 87, + "support_sizes": [ + 86 + ], + "incident_normal_ranks": [ + 2 + ], + "explanation_affine_rank": 1, + "error_affine_rank": 2, + "global_core_size": 0, + "direction_max_agreement": 85, + "minimum_near_distance": 170, + "old_printed_cap": 8, + "repaired_theta1_cap": 759, + "fixture_sha256": "74974b9062986c5e2afb08fb2a9dd2745409bca21bde790a3c73da31ad4a559b" + }, + "support_local_refinement": { + "name": "SUPPORT_LOCAL_REFINEMENT_OF_PROPER_SUBSPACE_COMPILER", + "theta_definition": "MIN(w+1,MIN_{gamma,b_in_Cprime}|{x_in_Sgamma:r1(x)!=b(x)}|)", + "theta_codeword_space": "DIRECTION_SPACE_CPRIME_NOT_AFFINE_TRANSLATE", + "bound": "FLOOR_MAX(n_(s+1)/(m*theta*(w+1)^(rise s-1)),(n-K+s)_(s+1)/(theta*(w+1)^(rise s)))", + "empty_rising_product_at_s1": 1, + "endpoint_profile_checks": 10716, + "relation_to_pr1165_global_factor": "THETA_GE_L", + "theta_recomputed_after_gauge": true, + "independent_math_review": "GREEN_FINAL_SOURCE_MATH_REVIEW" + }, + "gauge": { + "kind": "REVERSIBLE_CODEWORD_TRANSLATION", + "relation_to_pr1165": "ARBITRARY_RANK_EXTENSION_OF_FULL_EXPLANATION_EXISTENCE_BRANCH", + "preserves": [ + "SLOPE_SET", + "ERROR_WORDS", + "EXACT_AGREEMENT_SUPPORTS", + "SAME_SUPPORT_PAIR_NONCONTAINMENT" + ], + "does_not_preserve_literal_received_line_representative": true, + "explanation_rank_from_error_rank": "s=a-1_FOR_AT_LEAST_TWO_SLOPES", + "owner_chronology_recomputed_after_gauge": false + }, + "wolfram_replay": { + "required_stdout_sentinel": "KB_MCA_SUPPORT_LOCAL_THETA_WOLFRAM_PASS", + "wrapper_exit_status_alone_is_accepted": false + }, + "exact_tables": { + "KoalaBear": { + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "budget": 274980728111395087, + "near_charge_2w": 134944, + "theta1_caps_s1_through_s9": [ + 16295594, + 253241283, + 3935435218, + 118319201475, + 3677348367069, + 114289853114503, + 3552007973114420, + 110390969172173096, + 3430729820133944932 + ], + "transitions_s8_through_s11": [ + { + "explanation_rank": 8, + "minimum_theta": 1, + "exception_ceiling_if_unpaid": 0, + "cap": 110390969172173096, + "cap_plus_2w": 110390969172308040, + "slack": 164589758939087047, + "previous_total": null + }, + { + "explanation_rank": 9, + "minimum_theta": 13, + "exception_ceiling_if_unpaid": 12, + "cap": 263902293856457302, + "cap_plus_2w": 263902293856592246, + "slack": 11078434254802841, + "previous_total": 285894151677963688 + }, + { + "explanation_rank": 10, + "minimum_theta": 388, + "exception_ceiling_if_unpaid": 387, + "cap": 274790124064526354, + "cap_plus_2w": 274790124064661298, + "slack": 190604046733789, + "previous_total": 275500176064828033 + }, + { + "explanation_rank": 11, + "minimum_theta": 12050, + "exception_ceiling_if_unpaid": 12049, + "cap": 274970108028773601, + "cap_plus_2w": 274970108028908545, + "slack": 10620082486542, + "previous_total": 274992929018868606 + } + ], + "paid_error_rank_at_most": 9, + "paid_total": 110390969172308040, + "paid_slack": 164589758939087047, + "error_rank_10_11_12_exception_ceilings": [ + 12, + 387, + 12049 + ] + }, + "Mersenne31_stress_control": { + "n": 2097152, + "K": 1048576, + "m": 1116024, + "w": 67448, + "budget": 16777215, + "transitions_s1_through_s4": [ + { + "explanation_rank": 1, + "minimum_theta": 1, + "cap": 16301393, + "cap_plus_2w": 16436289, + "slack": 340926 + }, + { + "explanation_rank": 2, + "minimum_theta": 16, + "cap": 15838845, + "cap_plus_2w": 15973741, + "slack": 803474 + }, + { + "explanation_rank": 3, + "minimum_theta": 237, + "cap": 16622943, + "cap_plus_2w": 16757839, + "slack": 19376 + }, + { + "explanation_rank": 4, + "minimum_theta": 7118, + "cap": 16640642, + "cap_plus_2w": 16775538, + "slack": 1677 + } + ] + }, + "shortened_complete_code": { + "R": 1048576, + "d": 67472, + "rows_s1_through_s14": [ + { + "rank": 1, + "theta1_cap": 16295594, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 2, + "theta1_cap": 253241283, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 3, + "theta1_cap": 3935435218, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 4, + "theta1_cap": 61156835934, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 5, + "theta1_cap": 950366735057, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 6, + "theta1_cap": 14768331186162, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 7, + "theta1_cap": 229490967859328, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 8, + "theta1_cap": 3566101912297072, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 9, + "theta1_cap": 55413538236037195, + "minimum_theta": 1, + "theta_is_feasible": true + }, + { + "rank": 10, + "theta1_cap": 861057176799343503, + "minimum_theta": 4, + "theta_is_feasible": true + }, + { + "rank": 11, + "theta1_cap": 13379567622193637007, + "minimum_theta": 49, + "theta_is_feasible": true + }, + { + "rank": 12, + "theta1_cap": 207896005776491930567, + "minimum_theta": 757, + "theta_is_feasible": true + }, + { + "rank": 13, + "theta1_cap": 3230309917776778498663, + "minimum_theta": 11748, + "theta_is_feasible": true + }, + { + "rank": 14, + "theta1_cap": 50192198036356461575939, + "minimum_theta": 182530, + "theta_is_feasible": false + } + ], + "automatic_theta_paid_through_rank": 9, + "rank_10_11_12_13_exception_ceilings": [ + 3, + 48, + 756, + 11747 + ], + "first_unpaid_even_at_maximum_theta": 14 + } + }, + "route_cut": { + "conditional_partition": "Z_BAD=N_DISJOINT_UNION_Z_WITH_|N|_LE_2w", + "pr1160_supplies_partition_when_integrated": true, + "exception_reserve_31_used": false, + "post_deletion_error_rank_at_most_9": "PAID", + "post_deletion_error_rank_10": "DIRECTION_EXCEPTIONS_LE_12", + "post_deletion_error_rank_11": "DIRECTION_EXCEPTIONS_LE_387", + "post_deletion_error_rank_12": "DIRECTION_EXCEPTIONS_LE_12049", + "post_deletion_error_rank_at_least_13": "UNPAID_HIGH_RANK", + "active_v4_ledger_movement": 0, + "KoalaBear_closed": false + }, + "nonduplicate_scope": [ + "SUPPORT_LOCAL_THETA_REFINES_PR1165_GLOBAL_L", + "REVERSIBLE_ERROR_TO_EXPLANATION_RANK_GAUGE", + "CONDITIONAL_DIRECT_KOALA_ERROR_RANK_NINE_PAYMENT", + "EXACT_RANK_10_11_12_DIRECTION_EXCEPTION_TERMINALS", + "GF257_SMOOTH_DOMAIN_INDEPENDENT_REGRESSION" + ], + "packet_files": [ + "agents.md", + "experimental/agents-log.md", + "experimental/grande_finale.tex", + "experimental/notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md", + "experimental/data/certificates/kb-mca-support-local-theta-router-v1/README.md", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.sage", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1_flint.py", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.wl", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/campaign.json", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/00_contract.md", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/01_frontier_map.md", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/02_controls.md", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/03_idea_ledger.csv", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/04_dependency_ledger.csv", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/05_claim_registry.csv", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/06_review_registry.csv", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/literature_sweep.md" + ], + "packet_file_sha256": { + "agents.md": "67d30170bba1ef50d1ffa6d09ee25d1d90441be1a2f37a73e1efe123226b6155", + "experimental/agents-log.md": "fdb5020fbfc4d534f9b344b94564236cb155153522be7a7608e1c52ca40b8261", + "experimental/grande_finale.tex": "56ef3acaccf6ff45da2fde5c921d914b91b748214f19ac1c263d3638a9fa4b14", + "experimental/notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md": "5d2da358edee72853057c8d6a68bddaae2e134baba932941ef56b6258abd1f85", + "experimental/data/certificates/kb-mca-support-local-theta-router-v1/README.md": "82921042a774a2f9856c1d7a36a6bc7f37d3c12c4b2c13ea2b97838bec37540c", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py": "03285c10fb02c8b53b064d7b9dfcada4b9d0a9ed0aa18a8755ef84ddefcf7f55", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.sage": "8e40b791c99514ba0437102769f67d7a0537b6de9d2546338e16526ab16f7696", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1_flint.py": "f6e9e88258d57edf9169fd44d8c59b4f4d6f20df317260766470add16e616e1c", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.wl": "e887d72596b21f493063b42c48c73c044830e6b98129d3f1dc801a34d9b93264", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/campaign.json": "7ae847329f905bcc9d684ee3b16569679c0f06cb0d050f65912fd836c897a5f7", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/00_contract.md": "b44034686d589020bb4d9feaab7635ba1ba5ce272c9762abe03780882bc1da7e", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/01_frontier_map.md": "cbc1bf91c17b68dfc1d1f291d16c303265104e6594fcf6136ceaa8ff67ceecf7", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/02_controls.md": "cb468b478d50f026288edb8543d100d0d9457ce9f0d7eb7f07420a96a3aa70fc", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/03_idea_ledger.csv": "27f5e2c6ed44519a452e6fe212314a0a5532679ce93adce8afc0a8f63e25e805", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/04_dependency_ledger.csv": "c86253d3337269d0da295402f10d22df8ed5d167c3e285dea02e211f84d4b230", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/05_claim_registry.csv": "871fe3d833684dc642a38337b3cd6b7e9e38f40baaa0158c3a340a665affacdb", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/06_review_registry.csv": "d4d05aad1d8b87742794c0420279450713e0ca7b1ec468bf8b2dd085e2eb7679", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/literature_sweep.md": "e6a3381e90eb7979ea617a13175f1764dfdd48c5b402e82c416a080fcf2288aa" + }, + "payload_sha256": "31ab611e5623641fcda5d786b3fd1a14b7e4400ed69a8bcf4e8716c95e68696b" +} diff --git a/experimental/grande_finale.pdf b/experimental/grande_finale.pdf index 67113d2fe..c3f465d2d 100644 Binary files a/experimental/grande_finale.pdf and b/experimental/grande_finale.pdf differ diff --git a/experimental/grande_finale.tex b/experimental/grande_finale.tex index 6b21d6ea9..30a3393b7 100644 --- a/experimental/grande_finale.tex +++ b/experimental/grande_finale.tex @@ -1392,93 +1392,2503 @@ \section{Higher-codimension support-flag recursion} -\begin{theorem}[Affine-span transverse MCA compiler] -\label{thm:affine-span-mca} +\begin{proposition}[Counterexample to the affine-span transverse MCA compiler] +\label{prop:affine-span-mca-counterexample} +The affine-span MCA bound formerly printed here is false even under the +direction-separation hypothesis. There is a received line for +\[ + C=\RS[\F_{1009},\{0,\ldots,99\},1], + \qquad (n,K,m,w,s)=(100,1,21,20,1), +\] +with \(31\) distinct selected slopes and explanations in the +one-dimensional constant code, while +\[ + \max_{c\in C}\operatorname{agr}(r_1,c)=20<21=m +\] +and the claimed bound was +\[ + \left\lfloor + \max\left\{ + \frac{100^{\underline2}}{21\cdot20}, + \frac{100^{\underline2}}{20^{\overline2}} + \right\} + \right\rfloor=23<31. +\] +Every selected maximal agreement support has size exactly \(21\) and is +same-support pair-noncontained. +\end{proposition} + +\begin{proof} +Partition the domain into sets \(C_0,E,T,W\) of sizes \(20,30,21,29\). +Put \((r_0,r_1)=(0,0)\) on \(C_0\). Index \(E\) by +\(1\le i\le30\) and put \((r_0,r_1)=(-i^2,i)\) at its \(i\)-th point. +For slope \(i\), the zero codeword then agrees exactly on \(C_0\) and +that point of \(E\). + +On \(T\), put \(r_0=1\) and choose \(21\) distinct fresh nonzero direction +values avoiding \(1+i r_1=0\) for every \(1\le i\le30\). At slope zero, +the constant-one codeword agrees exactly on \(T\). On \(W\), choose fresh +direction values and choose each base value outside +\(\{0,1\}\cup\{-i r_1:1\le i\le30\}\). All choices exist in +\(\F_{1009}\), and they remove every unintended selected agreement. + +The direction is zero on \(C_0\) and takes distinct nonzero values elsewhere, +so its maximum agreement with a constant is exactly \(20\). The selected +explanations are zero and one, hence have affine span one. On a +zero-explanation support, the core forces a simultaneous constant pair to be +\((0,0)\), but the remaining direction value is nonzero. On \(T\), the +direction values are distinct. Thus every support is pair-noncontained. + +The proof failure is the asserted proper-subspace occupancy bound for the +incident normals. On each zero-explanation support, \(20\) normals lie on +one line and one is transverse. There are only \(40\) ordered bases, not the +claimed lower count \(m w=420\). The complete deterministic reconstruction +is in +\texttt{experimental/verify\_mca\_affine\_span\_incidence\_counterexample\_v1.py}. +\end{proof} + +\begin{remark}[Scope of the route cut] +The counterexample retracts only the MCA incidence compiler and statements +that use its ordered-basis denominator. It does not refute the ordinary +affine-span list theorem, common-core cancellation, the directional Johnson +compiler, codeword-direction gauge equivalence, or the selector-free +all-LineRay error-affine-core set-pair theorem, whose proof uses zero-mask +restriction and the Bollobas set-pair inequality instead. +\end{remark} + +\begin{theorem}[Pair-noncontained proper-subspace MCA compiler] +\label{thm:proper-subspace-mca} Let \(C=\RS[\F,D,K]\) have length \(n\), let -\(r_\gamma=r_0+\gamma r_1\), and put \(m=K+w\). Let -\(\mathcal A=c_0+C'\subseteq C\) be an affine codeword subspace with -\(\dim C'=s\ge1\). Suppose the line direction is separated from the -agreement ball, +\(r_\gamma=r_0+\gamma r_1\), put \(w=m-K>0\), and let +\(\mathcal A=c_0+C'\subseteq C\) have \(\dim C'=s\), where +\(1\le s\le K\). Let \(Z\subseteq\F\) be a set of distinct slopes such +that for every \(\gamma\in Z\), some \(c_\gamma\in\mathcal A\) has +agreement at least \(m\), and its maximal agreement support is +same-support pair-noncontained. Define +\[ + e=\min_{b\in C}\wt(r_1-b),\qquad + L=\max\{1,e-(n-m)\}. +\] +Then +\begin{equation} + |Z|\le\left\lfloor\frac1L\max\left\{ + \frac{n^{\underline{s+1}}} + {m(w+1)^{\overline{s-1}}}, + \frac{(n-K+s)^{\underline{s+1}}} + {(w+1)^{\overline s}} + \right\}\right\rfloor . + \label{eq:proper-subspace-mca} +\end{equation} +For \(s=1\), the empty rising product in the first denominator is one. +\end{theorem} + +\begin{proof} +Choose a basis \(c_1,\ldots,c_s\) of \(C'\). As in the rejected proof, +the agreement hyperplane at coordinate \(x\) has normal +\[ + v_x=(r_1(x),-c_1(x),\ldots,-c_s(x))\in\F^{s+1}. +\] +The normals incident with every selected parameter point span +\(\F^{s+1}\). Indeed, an annihilator with zero slope coordinate would +give a nonzero codeword with at least \(m>K-1\) roots. An annihilator with +nonzero slope coordinate would give simultaneous codeword explanations for +\(r_0\) and \(r_1\) on the same maximal support, contrary to +pair noncontainment. + +Let \(W<\F^{s+1}\) have dimension \(j0\), and +\(1\le s\le K\). Let \(\varnothing\ne Z\subseteq\F\) be a set of +distinct slopes. Suppose that for every \(\gamma\in Z\) there are a +codeword \(c_\gamma\in\mathcal A\) and an exact \(m\)-set +\(S_\gamma\subseteq D\) such that \(r_\gamma=c_\gamma\) on +\(S_\gamma\), while no pair in \(C^2\) explains \((r_0,r_1)\) +simultaneously on that same set. Define \begin{equation} - \max_{c\in C}\operatorname{agr}(r_1,c)d=67472\) and +\(882143>d=67448\), respectively, so this compiler does not pay those +cells. The exact replay is in +\texttt{experimental/verify\_mca\_proper\_subspace\_occupancy\_compiler\_v1.py}. +\end{remark} + +\begin{theorem}[Sparse-direction punctured Johnson MCA profile] +\label{thm:sparse-direction-punctured-johnson-mca} +Let \(C=\RS[\F,D,K]\) have +\[ + N=R+K,\qquad m=d+K, +\] +and let \(r_\gamma=r_0+\gamma r_1\). Suppose +\[ + r_1=b+q,\qquad b\in C,\qquad + E=\operatorname{supp}(q),\qquad |E|=e0. + \label{eq:punctured-johnson-positive} +\end{equation} +Put \(J_0=0\) and, for \(1\le h\le e\), +\begin{equation} + J_h=\left\lfloor + \frac{(N-e)(m-h-K+1)}{(m-h)^2-(N-e)(K-1)} + \right\rfloor . + \label{eq:punctured-johnson-cap} +\end{equation} +The selected slope set \(Z\) satisfies +\begin{equation} + |Z|\le \sum_{h=1}^e(J_h-J_{h-1})\left\lfloor\frac eh\right\rfloor + \le (e-1)J_{\lfloor e/2\rfloor}+J_e. + \label{eq:punctured-johnson-profile} +\end{equation} +For \(e=1\), the term indexed by zero in the last expression is zero. +\end{theorem} + +\begin{proof} +Outside \(E\), the direction equals \(b\). If \(a\) agreed with \(r_0\) +on at least \(m\) outside coordinates, an \(m\)-subset there would be +simultaneously explained by \((a,b)\), contrary to same-support +pair noncontainment. Hence \(h_a\ge1\). A size-\(m\) witness can use at +most \(e\) coordinates of \(E\), so \(h_a\le e\). + +For \(x\in E\), agreement at slope \(\gamma\) is equivalent to +\[ + \frac{a(x)-r_0(x)}{q(x)}=\gamma. +\] +These ratio fibers are disjoint. A deficit-\(h\) explanation needs at +least \(h\) inside agreements, and therefore owns at most +\(\lfloor e/h\rfloor\) slopes. + +Puncture \(E\) and fix \(h\). Each explanation of deficit at most \(h\) +has an agreement set of size at least \(A=m-h\) in length \(n'=N-e\). +Agreement sets of two distinct degree-\(n'(K-1)\), comparison yields \(L\le J_h\). Condition +\eqref{eq:punctured-johnson-positive} is the weakest, \(h=e\), denominator and hence makes +every \(J_h\) legal. The Johnson fractions are nondecreasing in \(h\). +Applying their cumulative caps to the nonincreasing owner weights proves +the first inequality in \eqref{eq:punctured-johnson-profile}. + +Finally put \(u=\lfloor e/2\rfloor\). Bound all weights with \(h\le u\) +by \(e\); every weight with \(h>u\) equals one. The two telescoping blocks +give +\[ + eJ_u+(J_e-J_u)=(e-1)J_u+J_e. +\] +\end{proof} + +\begin{remark}[Exact sparse-direction support walls] +At the first shortened KoalaBear and Mersenne-31 rows, exact integer +evaluation gives +\[ +\begin{array}{c|c|c|c|c} +\text{row}&K&\text{last paid }e&\Delta_e& + (e-1)J_{\lfloor e/2\rfloor}+J_e\\ \hline +\text{KoalaBear}&14&63908&1218&4607583\\ +\text{Mersenne-31}&6&65236&2794&2605443 +\end{array} +\] +against budgets \(274980728111395087\) and \(16777215\). At the adjacent +supports the denominators are \(-5924\) and \(-1636\), so this theorem +makes no claim there. The exact scan is in +\texttt{experimental/verify\_mca\_sparse\_direction\_punctured\_johnson\_profile\_v1.py}. +\end{remark} + +\begin{theorem}[Near-Johnson centered-Gram list compiler] +\label{thm:near-johnson-centered-gram} +Let \(S_1,\ldots,S_L\) be distinct \(A\)-subsets of an \(n\)-set such +that \(|S_i\cap S_j|\le c\) for \(i\ne j\), where \(A>c\). Put +\[ + g=nc-A^2\ge0, + \qquad + G=(A-c)^2-cg. +\] +If \(G>0\), then +\begin{equation} + L\le\left\lfloor\frac{nA(A-c)}{G}\right\rfloor. + \label{eq:near-johnson-centered-gram} +\end{equation} +\end{theorem} + +\begin{proof} +Let \(B\) be the \(L\)-by-\(n\) incidence matrix and put +\[ + H=BB^{\mathsf T}-c\mathbf1\mathbf1^{\mathsf T}. +\] +Every row of \(B\) has sum \(A\), so +\(\mathbf1=A^{-1}B\mathbf1_n\). The images of both summands defining +\(H\) therefore lie in \(\operatorname{col}(B)\), and +\begin{equation} + \operatorname{rank}(H)\le\operatorname{rank}(B)\le n. + \label{eq:centered-gram-rank} +\end{equation} + +Write \(\delta_{ij}=c-|S_i\cap S_j|\). Then +\(0\le\delta_{ij}\le c\) is integral and +\[ + \operatorname{tr}(H)=L(A-c),\qquad + \operatorname{tr}(H^2)=L(A-c)^2+2\sum_{i0,qquad + g=nc-A^2\ge0,qquad + G=(A-c)^2-cg>0. +\] +Define +\[ + J_u=\left\lfloor\frac{n(m-u-K+1)}{(m-u)^2-nc}\right\rfloor, + \qquad + Q_e=\left\lfloor\frac{nA(A-c)}G\right\rfloor. +\] +Then +\begin{equation} + |Z|\le(e-1)J_u+Q_e. \label{eq:near-johnson-mca} \end{equation} -The second term is -\(\binom{n-K+s}{s+1}/\binom{w+s}{s+1}\). Failure of -\eqref{eq:direction-list-separated} is an explicit direction-list cell: -the direction word itself agrees with a codeword on at least \(m\) +\end{corollary} + +\begin{proof} +Let \(N_u\) be the number of transformed explanations with outside deficit +at most \(u\), and let \(N_e\) be their total number. The deficit-owner +bound gives +\[ + |Z|\le eN_u+(N_e-N_u)=(e-1)N_u+N_e. +\] +The ordinary Johnson argument on the punctured row gives \(N_u\le J_u\). +For each explanation counted by \(N_e\), choose exactly \(A=m-e\) outside +agreement coordinates. Distinct degree-\(c\). Put +\[ + g=nc-A^2, + \qquad + T=(n-A)^2-(n-1)g. +\] +If +\[ + g\ge0, + \qquad + 2A^2\ge nc, + \qquad + T>0, +\] +then +\begin{equation} + L\le\left\lfloor + \frac{(n-1)n^2(A-c)}{AT} + \right\rfloor. + \label{eq:mean-centered-gram-list} +\end{equation} +\end{theorem} + +\begin{proof} +Let \(B\) be the incidence matrix and put +\[ + P=I_n-\frac1nJ_n, + \qquad + H=BPB^{\mathsf T}. +\] +Then \(H\) is positive semidefinite and has rank at most \(n-1\). Set +\(p=A^2/n\). The diagonal entries are \(A-p\), while an off-diagonal +entry is +\[ + x_{ij}=|S_i\cap S_j|-p\in[-p,c-p]. +\] +Convexity gives the endpoint-chord inequality +\[ + x_{ij}^2\le(c-2p)x_{ij}+p(c-p). +\] +The assumption \(2A^2\ge nc\) makes the chord slope nonpositive. Since +\(H\) is positive semidefinite, +\[ + 2\sum_{i(N-e)(K-1)\), and otherwise the cap in +\cref{thm:mean-centered-gram-list} whenever its three hypotheses hold. +Assume every \(C_h\) is defined, and put +\[ + B_0=0, + \qquad + B_h=\min_{h\le v\le e}C_v. +\] +Then +\begin{equation} + |Z|\le\sum_{h=1}^e(B_h-B_{h-1}) + \left\lfloor\frac eh\right\rfloor. + \label{eq:mean-centered-sparse-direction-profile} +\end{equation} +\end{corollary} + +\begin{proof} +Let \(N_h\) count distinct transformed explanations with outside deficit at +most \(h\). Puncturing the direction support and applying the appropriate +ordinary-list theorem gives \(N_h\le C_h\). For every \(v\ge h\), also +\(N_h\le N_v\le C_v\), hence \(N_h\le B_h\). The suffix minima are +nondecreasing. Apply the deficit owner weight \(\lfloor e/h\rfloor\) and +sum by parts. +\end{proof} + +\begin{remark}[Exact mean-centered support walls] +The complete exact profile in +\eqref{eq:mean-centered-sparse-direction-profile} expands the walls to +\[ +\begin{array}{c|c|c|c} +\text{row}&K&\text{last paid }e&\text{endpoint profile}\\ \hline +\text{KoalaBear}&14&64047&181731868\\ +\text{Mersenne-31}&6&65454&16101127 +\end{array} +\] +At KoalaBear \(e=64048\), the endpoint denominator is +\(T=-1499457466\). At Mersenne \(e=65455\), every cap remains defined, +but the exact profile is \(17120123>16777215\). The replay is in +\path{experimental/verify_mca_sparse_direction_mean_centered_gram_profile_v1.py}. +\end{remark} + +\begin{theorem}[Terminal-deficit affine-line cap] +\label{thm:terminal-deficit-affine-line} +Retain the sparse-direction notation of +\cref{thm:sparse-direction-punctured-johnson-mca}, assume \(e\ge K\), and +put +\[ + n=N-e, + \qquad A=m-e, + \qquad c=K-1. +\] +If \(A>c\), then the number \(L_e\) of transformed explanations that own a +selected slope and have exact outside deficit \(e\) satisfies +\begin{equation} + L_e\le\left\lfloor\frac{n-c}{A-c}\right\rfloor. + \label{eq:terminal-deficit-affine-line} +\end{equation} +\end{theorem} + +\begin{proof} +An exact-deficit-\(e\) explanation has exactly \(A=m-e\) outside +agreements. To own a selected slope it must therefore agree at all \(e\) +coordinates of the direction support \(E\). If two such explanations have +slopes \(\gamma\ne\delta\), their normalized difference is a nonzero +degree-\(16777215\). The remaining full-lift intervals are therefore +\(64049\le e\le1044238\) and \(65456\le e\le1044241\). This is a +support-wall refinement, not a proof of either deployed row. The exact +replay is in +\path{experimental/verify_mca_sparse_direction_terminal_deficit_line_payment_v1.py}. +\end{remark} + +\begin{theorem}[Top-third exact-layer affine-line cap] +\label{thm:top-third-affine-line} +Retain the sparse-direction notation of +\cref{thm:sparse-direction-punctured-johnson-mca}. Assume \(e\ge K\), put +\[ + s=\left\lfloor\frac{e-K}{3}\right\rfloor, + \qquad H=e-s-1, +\] +and assume \(N-m>s\). For \(0\le r\le s\), let \(L_r\) be the number of +selected explanations with exact outside deficit \(h=e-r\). Then +\begin{equation} + L_r\le + \left\lfloor\frac{N-e-(K-1)}{m-e+r-(K-1)}\right\rfloor. + \label{eq:top-third-affine-line} +\end{equation} +Every explanation counted by \(L_r\) owns at most one selected slope. +\end{theorem} + +\begin{proof} +For an explanation \(a_i\) in this layer, let \(S_i\subseteq E\) be its +inside agreement set with its assigned slope. Then +\[ + |E\setminus S_i|\le r. +\] +For explanations at distinct slopes \(\gamma_i,\gamma_j\), the normalized +difference +\[ + p_{ij}=\frac{a_i-a_j}{\gamma_i-\gamma_j} +\] +is a degree-\(s\) gives \(N-e>A_r\), so the ratio increases with +\(g\); substituting \(g\le K-1\) proves +\eqref{eq:top-third-affine-line}. Finally \(rK-1. + \end{cases} + \label{eq:full-lift-total-core-line} +\end{equation} +\end{theorem} + +\begin{proof} +The triple-overlap proof of \cref{thm:top-third-affine-line} still puts the +exact layer on an affine explanation line +\(a_\gamma=A+\gamma p\). A coordinate agrees for every line parameter +exactly when \(A=r_0\) and \(p=q\) there. If this total common agreement +core had at least \(m\) coordinates, the codeword pair \((A,b+p)\) would +explain the received pair on an \(m\)-set, contradicting pair +noncontainment. Thus its size \(g\) is at most \(m-1\). Away from the +core, each coordinate agrees for at most one parameter, and therefore +\[ + L_r(m-g)\le N-g, + \qquad L_r\le N-m+1=t+1. +\] +When \(A_r>K-1\), outside-coordinate packing gives the second branch as in +\cref{thm:top-third-affine-line}. That branch is no larger than \(t+1\): +after clearing its positive denominator, the difference is +\(t(A_r-K)+r\ge0\). +\end{proof} + +\begin{corollary}[Full-lift common-core profile] +\label{cor:full-lift-common-core-profile} +If the positive punctured-Johnson caps exist through \(H=e-s-1\), then +\begin{equation} + |Z|\le + (e-1)J_{\lfloor e/2\rfloor}+J_H + +\sum_{r=r_{\min}}^{s}Q_r. + \label{eq:full-lift-common-core-profile} +\end{equation} +\end{corollary} + +\begin{proof} +Deficits through \(H\) use the two-threshold Johnson prefix. Deficits +above \(H\) and at most \(m\) are exactly the layers +\(r_{\min}\le r\le s\); apply \cref{thm:full-lift-total-core-line}. +\end{proof} + +\begin{remark}[Exact full-lift common-core walls] +Exact integer evaluation of +\eqref{eq:full-lift-common-core-profile} extends the complete walls to +\[ +\begin{array}{c|r|r|r} +\text{row}&\text{last paid }e&\text{endpoint bound}&\text{next bound}\\ \hline +\text{KoalaBear}&95943&27414298&\text{undefined}\\ +\text{Mersenne-31}&67452&16266965&17248067 +\end{array} +\] +At KoalaBear \(e=95944\), the prefix Johnson denominator at \(H\) is +\(-1037\). The adjacent Mersenne bound exceeds budget by \(470852\). +The remaining full-lift intervals are +\[ + 95944\le e\le1044238 + \quad\text{and}\quad + 67453\le e\le1044241. +\] +Neither adjacent failure is an unsafe certificate. The replay is in +\path{experimental/verify_mca_full_lift_top_third_common_core_payment_v1.py}. +\end{remark} + +\begin{theorem}[Cross-layer top-third global-line cap] +\label{thm:full-lift-top-third-global-line} +Retain the full-lift notation above and put +\[ + s=\left\lfloor\frac{e-K}{3}\right\rfloor, + \qquad r_{\min}=\max\{0,e-m\}. +\] +All selected explanations in the union of exact layers +\[ + r_{\min}\le r\le s, + \qquad h=e-r, +\] +lie on one common affine codeword line. The number $L_{\mathrm{high}}$ +of explanations in this entire union satisfies +\begin{equation} + L_{\mathrm{high}}\le N-m+1. + \label{eq:full-lift-top-third-global-line} +\end{equation} +Each explanation in the union owns at most one selected slope. +\end{theorem} + +\begin{proof} +For an explanation $a_i$, let $r_i\le s$ be its missed-coordinate +allowance on the direction support $E$, and let $S_i\subseteq E$ be +its inside agreement set. For any three explanations, +\[ + |S_i\cap S_j\cap S_k| + \ge e-(r_i+r_j+r_k) + \ge e-3s + \ge K. +\] +For distinct slopes, the normalized pair difference +\[ + p_{ij}=\frac{a_i-a_j}{\gamma_i-\gamma_j} +\] +is a degree-$c$. For every $1\le h\le H$, put +$A_h=m-h$, and let $C_h$ be the punctured ordinary-Johnson cap when +$A_h^2>(N-e)c$, and otherwise the cap in +\cref{thm:mean-centered-gram-list} whenever its three hypotheses hold. +Assume every $C_h$ is defined, and put +\[ + B_0=0, + \qquad B_h=\min_{h\le v\le H}C_v. +\] +Then +\begin{equation} + |Z|\le + \sum_{h=1}^{H}(B_h-B_{h-1}) + \left\lfloor\frac eh\right\rfloor + +(N-m+1). + \label{eq:full-lift-mean-centered-global-line-profile} +\end{equation} +\end{corollary} + +\begin{proof} +Let $N_h$ count transformed explanations with outside deficit at most +$h$. The earlier sparse-direction corollary was calibrated for $ec$ gives $A_h>c$ +throughout the prefix, and distinct degree-$c, +\] +and put +\[ + Q_H=\left\lfloor\frac{N-e-c}{m-H-c}\right\rfloor, + \qquad + \Delta_H=\left\lfloor\frac{e}{s+1}\right\rfloor. +\] +Then +\begin{equation} + |Z|\le\max\left\{ + \begin{array}{l} + P_{H-2}+N-m+1,\\ + P_{H-1}+Q_H+1,\\ + P_{H-1}+2,\\ + P_{H-1}+Q_H,\\ + P_{H-1}+\Delta_H + \end{array}\right\}. + \label{eq:full-lift-two-boundary-layer-continuation} +\end{equation} +\end{corollary} + +\begin{proof} +Let $\mathcal A$ be the top-third union, and let +$\mathcal D_1,\mathcal D_2$ be the exact layers of deficits $H,H-1$. +Choose inside agreement sets at their layer sizes, so their missed sets +have sizes $s+1,s+2$. The guard $2(s+2)0,\qquad A^2>ec,\qquad N-e>m-H>c, +\] +then +\begin{equation} + |\mathcal D|\le 1+J(Q-1). + \label{eq:full-lift-boundary-direction-cap} +\end{equation} +If $\mathcal T$ is the synchronized union of deficits greater than $H$, +then consequently +\begin{equation} + |Z|\le P_{H-1}+1+J(Q-1)+|\mathcal T|. + \label{eq:full-lift-boundary-direction-router} +\end{equation} +\end{corollary} + +\begin{proof} +The claim is immediate when $\mathcal D$ is empty. Otherwise fix an anchor +$(\gamma_0,c_0)\in\mathcal D$. For every other member put +\[ + p_\gamma=\frac{c_\gamma-c_0}{\gamma-\gamma_0}. +\] +The chosen size-$H$ inside agreement sets meet in at least $A=2H-e$ +coordinates, and on this intersection $p_\gamma=q_{\rm dir}$. Thus the +intrinsic set +\[ + U_p=\{x\in E:q_{\rm dir}(x)=p(x)\} +\] +has size at least $A$ for every represented direction $p$. Such a $p$ is +nonzero: otherwise the two explanations would be the same codeword, while +on their nonempty inside intersection that codeword would equal received +words whose difference is $(\gamma-\gamma_0)q_{\rm dir}\ne0$. + +For distinct represented directions $p,p'$, the intersection +$U_p\cap U_{p'}$ lies in the zero set of the nonzero degree-$m-H>c$, outside-core packing bounds the line by +$Q$. The anchor is repeated in each line closure, so each of the at most +$J$ classes contributes at most $Q-1$ nonanchors. This proves +\eqref{eq:full-lift-boundary-direction-cap}. The boundary and top layers +have one-slope ownership; the independently truncated prefix charges all +lower deficits, proving \eqref{eq:full-lift-boundary-direction-router}. +\end{proof} + +\begin{remark}[First residue-zero Mersenne router] +At Mersenne-31 $e=98232$, +\[ + (s,H,A)=(32742,65489,32746),\qquad J=3,\qquad Q=484, +\] +so $|\mathcal D|\le1450$. The exact prefix is +$P_{H-1}=16432695$, and therefore +\[ + |Z|\le16434145+|\mathcal T|. +\] +An unsafe family would need $|\mathcal T|\ge343071$. If $g$ is the total +common core of this affine line, line packing gives +\[ + g\ge + \left\lceil\frac{|\mathcal T|m-N}{|\mathcal T|-1}\right\rceil + \ge67452=m-2. +\] +Thus the first residue-zero obstruction is reduced to a near-maximal-core +line. The router alone is not a safety or unsafety certificate at +$e=98232$; the following corollary absorbs the remaining layers into this +line. The exact router replay is in +\path{experimental/verify_mca_full_lift_residue_zero_direction_router_v1.py}, +with an independent endpoint audit in +\path{experimental/audit_mca_full_lift_residue_zero_direction_router_v1.py}. +\end{remark} + +\begin{corollary}[First residue-zero Mersenne payment] +\label{cor:full-lift-residue-zero-core-absorption} +Under the pair-noncontained full-lift hypotheses, the Mersenne-31 support +$e=98232$ is safe: +\[ + |Z|\le16777215. +\] +Consequently its full-lift residual interval starts at $e=98233$. +\end{corollary} + +\begin{proof} +Suppose instead that $|Z|>16777215$. By the preceding router, the +synchronized top line $\mathcal T$ has at least $343071$ members and total +common agreement core $G$ of size at least $67452=m-2$. Write the line as +$c_\gamma=A_0+\gamma p$. Its direction $p$ is nonzero. Outside the +gauged direction support $E$, a coordinate common to two line members must +be a zero of $p$, so +\[ + |G\cap E|\ge67452-(K-1)=67447=:u. \tag{1} +\] + +Take any selected slope $\delta$ whose assigned explanation has outside +deficit $h\ge e-u+K=30791$. Ownership supplies an inside agreement set +$S_\delta$ of size $h$. Choose two distinct top anchors. By (1), +\[ + |G\cap E\cap S_\delta|\ge u+h-e\ge K. +\] +On these coordinates, both normalized differences from $c_\delta$ to the +two anchors equal the gauged direction. Restriction injectivity makes the +two degree-$e,\qquad A_h^2>ec,\qquad N-e>m-h>c +\] +throughout this range. Define +\[ + F_e=P_{h_0}(e)+\sum_{h=h_0+1}^{H}\{1+J_h(Q_h-1)\}. + \tag{BS1} +\] +Then +\[ + |Z|\le F_e+|\mathcal T|. \tag{BS2} +\] +In particular, $F_e+N-m+1\le B$ implies safety. Otherwise suppose +$F_ee,\qquad A_h>c,\qquad A_h^2>ec +\] +throughout this range. Define +\[ + G_e=\mathbf 1_{\{He\). Relative to the +anchor, each nonzero normalized codeword direction agrees with the gauged +direction on at least \(A_h\) inside coordinates. Distinct directions +have agreement blocks meeting in at most \(c\), so the constant-block +Johnson count permits at most \(J_h\) direction classes. + +Each class together with the anchor is one affine explanation line. Pad +to exactly \(J_h\) classes with anchor-only slots. The exact layer then +satisfies +\[ + |\mathcal D_h| + =1-J_h+\sum_{j=1}^{J_h}|\mathcal L_{h,j}|. +\] +If \(H0\) and +\(T_r-C_r+1>0\), an unsafe residual forces an affine line of size at least +\[ + \lambda_r=\left\lceil\frac{T_r-C_r+1}{G_r}\right\rceil. \tag{RP1} +\] +For \(\lambda_r\ge2\), define +\[ + g_r=\max\left(0, + \left\lceil\frac{\lambda_rm-N}{\lambda_r-1}\right\rceil\right), + \qquad u_r=\max(g_r-c,0), + \qquad U_{r+1}=\min(U_r,e-u_r+K-1). \tag{RP2} +\] +Remove the whole selected line and repeat. The selected lines are distinct, +and their inside-core sets \(I_i\) satisfy +\[ + |I_i|\ge u_i,\qquad |I_i\cap I_j|\le c. +\] +Consequently, if at any stage +\[ + \sum_{i=0}^{r}u_i-\binom{r+1}{2}c>e, \tag{RP3} +\] +the assumed unsafe family is impossible. Thus termination either at the +weighted prefix or at (RP3) certifies safety. +\end{corollary} + +\begin{proof} +Apply the exact-layer line-bank identity to the residual assigned family. +Empty layers only improve the resulting inequality, so +\[ + |\mathcal Z_r|\le C_r+\sum_{i=1}^{G_r}|\mathcal L_i|. +\] +If the original family is unsafe after \(r\) line charges, then +\(|\mathcal Z_r|>T_r\), and pigeonhole gives (RP1). The guard +\(\lambda_r\ge2\) makes the selected slot an actual affine line rather than +a padded singleton. Total-core line packing gives \(g_r\). At most \(c\) +core coordinates lie outside the gauged direction support, and the +common-core absorption argument places every residual explanation of +deficit at least \(e-u_r+K\) on the same line. Removing the whole line costs +at most \(Q\) and gives (RP2). Even when (RP2) does not lower the deficit +ceiling, the selected line is absent from the next residual. + +Write a selected line as \(c_\gamma=a_i+\gamma b_i\). Its total common +core consists of coordinates where +\((r_0,r_1)=(a_i,b_i)\). Distinct selected lines have distinct codeword +pairs. At least one of \(a_i-a_j\) and \(b_i-b_j\) is therefore a nonzero +degree-\(128340\). At the last support, the five inside-core +lower bounds give +\[ + 37718+33617+28204+20729+12942-10\cdot5 + =133160>130198. +\] +At adjacent \(e=130199\), nine legal peels give packing lower bound +\(126052\le130199\); the next residual target is \(7947054\), while the +certified base charge is \(8154082\), so (RP1) no longer forces a line. This +is a method wall, not an unsafe certificate. The Mersenne residual interval +is now \(130199\le e\le1044241\). + +The endpoint replay, independent audit, and full constant-memory interval +replay are +\path{experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.py}, +\path{experimental/audit_mca_full_lift_recursive_line_peeling_core_packing_v1.py}, +and +\path{experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.c}. +\end{remark} + +\begin{corollary}[Joint-core charge for peeled explanation lines] +\label{cor:full-lift-joint-core-charge} +In the setting of +Corollary~\ref{cor:full-lift-recursive-line-peeling}, suppose \(r\) +distinct parameterized affine explanation lines have been removed, and let +\(g_i\) be their actual total common-core sizes. Put +\[ + S_r=\min\left\{r(m-1),e+\binom{r+1}{2}c\right\}, + \quad q_r=\left\lfloor\frac{S_r}{m-1}\right\rfloor, + \quad z_r=S_r-q_r(m-1), +\] +and \(f(g)=(N-g)/(m-g)\), \(Q=N-m+1\). Their total number of assigned +slopes is at most +\[ + L_r= + \begin{cases} + rQ,&q_r=r,\\ + \left\lfloor + q_rQ+f(z_r)+(r-q_r-1)f(0) + \right\rfloor,&q_r130219. +\] +At adjacent \(e=130220\), the first threshold is \(20\) and the next 42 are +\(16\). Their packing lower bound is only +\[ + 15811+42\cdot2041-\binom{43}{2}\cdot5 + =97018. +\] +For \(r=43\), the joint core allowance is +\(134950=2(m-1)+44\), the exact joint charge is \(1962895\), and the next +threshold drops to \(13\), whose forced-core lower bound is zero. Later +thresholds cannot increase. This is a method wall, not an unsafe +certificate; the Mersenne residual is now +\(130220\le e\le1044241\). + +The endpoint replay, independent rational audit, and full interval replay +are +\path{experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.py}, +\path{experimental/audit_mca_full_lift_joint_core_charge_peeling_v1.py}, +and +\path{experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.c}. +\end{remark} + +\begin{corollary}[Lower-aware joint-core charge] +\label{cor:full-lift-lower-aware-joint-core-charge} +In the setting of +Corollary~\ref{cor:full-lift-joint-core-charge}, suppose the actual total +cores also have certified lower bounds +\(0\le\ell_i\le g_i\). Sort the \(\ell_i\) decreasingly, start with +\(x_i=\ell_i\), and distribute +\[ + S_r-\sum_i\ell_i +\] +units by filling \(x_1\) to \(m-1\), then \(x_2\), and so on. Whenever +the lower bounds are feasible, the removed lines contain at most +\[ + L_r^{\rm low}=\left\lfloor\sum_{i=1}^r + \frac{N-x_i}{m-x_i}\right\rfloor \tag{LA1} +\] +assigned slopes. Consequently the residual peeling target may be +strengthened to \(B-L_r^{\rm low}\). +\end{corollary} + +\begin{proof} +Since line labels do not occur in the objective, sort both the lower bounds +and a feasible core vector decreasingly. This preserves the constraints: +if \(\ell_i\ge\ell_j\) but \(g_ie. +\] +Thus both supports are safe. + +At adjacent \(e=130222\), the compiler reaches 288 removed lines. The +maximizing vector is \(67453\cdot5,1037,0\cdot282\), its charge is +\(4910044\), and the residual target \(11867171\) lies below the certified +base \(12148280\). This is a method wall, not an unsafe certificate; the +Mersenne residual is now \(130222\le e\le1044241\). + +The endpoint replay and independent rational audit are +\path{experimental/verify_mca_full_lift_lower_aware_joint_core_charge_v1.py} +and +\path{experimental/audit_mca_full_lift_lower_aware_joint_core_charge_v1.py}. +\end{remark} + +\begin{corollary}[Core-dichotomy capped charge] +\label{cor:full-lift-core-dichotomy-capped-charge} +Fix an integer absorption cutoff $b$. At every line selected by the +recursive bank, split on its actual total core $g$. + +If $g\ge e+10-b$, every explanation of deficit at least $b+1$ lies on +that line, and the original family has size at most +\[ + P_e(b)+(N-m+1), \tag{CD1} +\] +where $P_e(b)$ is the exact weighted prefix through $b$. + +In the complementary branch, every peeled core has the individual cap +\[ + g_i\le G_e:=e+9-b. \tag{CD2} +\] +The lower-aware convex envelope remains valid after replacing its fill +ceiling by $G_e$ and its common budget by +\[ + S_r=\min\left\{rG_e,e+\binom{r+1}{2}c\right\}. \tag{CD3} +\] +\end{corollary} + +\begin{proof} +A selected line has at least $g-c$ core coordinates inside the gauged +direction support. An explanation with inside agreement size $h$ and +two line anchors shares at least $(g-c)+h-e$ of those coordinates. +Restriction injectivity therefore puts it on the line whenever +\[ + h\ge e-g+c+K=e-g+11. +\] +The high-core threshold in the statement makes this at most $b+1$, +proving (CD1). + +The integer complement of the high-core branch is (CD2). Under that cap, +sort the forced core lower bounds and greedily spend (CD3), filling each +coordinate only to $G_e$. The convex exchange in +Corollary~\ref{cor:full-lift-lower-aware-joint-core-charge} applies +unchanged and proves the capped joint charge. +\end{proof} + +\begin{remark}[Exact Mersenne core-dichotomy payment] +Take $b=65450$. On $130222\le e\le130226$, the high-core bound (CD1) +is at most $5161307<16777215$. In the complementary branch, +$e=130222,130223$ force fourteen threshold-18 lines and +\[ + 14\cdot9736-\binom{14}{2}\cdot5=135849>e. +\] +The next two supports force seventy threshold-16 lines and +\[ + 70\cdot2041-\binom{70}{2}\cdot5=130795>e. +\] +Thus every support $130222\le e\le130225$ is safe. + +At adjacent $e=130226$, the first threshold is 14 and has zero forced +core. After 14763 zero-lower-bound peels, the capped budget is +$545032556=8412\cdot64785+61136$, the charge is $3199542$, and the +next pigeonhole threshold is one. This is a method wall, not an unsafe +certificate; the Mersenne residual is now +$130226\le e\le1044241$. + +The endpoint replay and independent rational audit are +\path{experimental/verify_mca_full_lift_core_dichotomy_capped_charge_v1.py} +and +\path{experimental/audit_mca_full_lift_core_dichotomy_capped_charge_v1.py}. +\end{remark} + +\begin{corollary}[Exact-layer slot-core incidence] +\label{cor:full-lift-exact-layer-slot-core} +Suppose a line slot selected by the recursive bank belongs to exact layer +$h$ and contains $\lambda\ge2$ explanations. If $u$ is their common core +inside the gauged $e$-coordinate direction support, then +\[ + u\ge\left\lceil\frac{\lambda h-e}{\lambda-1}\right\rceil. \tag{EL1} +\] +Consequently, in the low-core branch of +Corollary~\ref{cor:full-lift-core-dichotomy-capped-charge}, (EL1) may be used +as the forced lower bound in the capped convex charge. +\end{corollary} + +\begin{proof} +Write the parameterized affine explanation line as +$c_\gamma=a+\gamma b$. At an inside coordinate outside the common core, +the equation +\[ + r_0+\gamma r_1=a+\gamma b +\] +holds for at most one line parameter $\gamma$. Every one of the $\lambda$ +members has at least $h$ inside agreements, whereas a core coordinate is +counted $\lambda$ times. Incidence counting in the fixed inside support +therefore gives +\[ + \lambda h\le e+(\lambda-1)u, +\] +which is equivalent to (EL1). This is already an inside-core bound and +does not spend the outside zero allowance. In the calibrated support +interval the parent ceiling has $H\ge m$, so the optional cross-layer top +slot is absent and every recursive-bank slot has one exact-layer owner. +\end{proof} + +\begin{remark}[Exact Mersenne layer-aware payment] +Retain absorption cutoff $65450$. In the complementary capped-core branch, +legal cutoffs $65516,\ldots,65521$ and (EL1) force three line cores of the +following sizes: +\[ +\begin{array}{c|c|c|c} +e&b&\lambda&u\\ \hline +130226&65516&14&60540\\ +130227&65516&5&49340\\ +130228&65517&13&60126\\ +130229&65517&4&43948\\ +130230&65518&11&59048\\ +130231&65518&4&43949\\ +130232&65519&9&57431\\ +130233,130234&65520&7&54736\\ +130235,130236&65521&4&43951 +\end{array} +\] +The displayed $\lambda$ is the forced minimum slot size and $h=b+1$ is the +minimum possible exact layer. In this range the right side of (EL1) is +nondecreasing in both variables, so these substitutions are conservative. +Distinct selected lines have pairwise inside-core intersection at most +$c=5$. Exact capped-charge replay therefore makes three lines violate +inside-core packing on every support $130226\le e\le130236$; the smallest +printed lower bound is +\[ + 3\cdot43948-\binom32\cdot5=131829>130229. +\] + +At adjacent $e=130237$, cutoff $65521$ forces only size-two affine +explanation slots. Equation (EL1) gives $u=807$, and the first-order +packing expression has maximum +\[ + \max_s\left\{807s-5\binom{s}{2}\right\}=65529d$, a component field of definition cannot have nontrivial purely +inseparable degree. If $R_i$ is not defined over $\F(X)$, it therefore +has a distinct conjugate $R_i^\sigma$. Every $\F(X)$-rational point of +$R_i$ also lies on $R_i^\sigma$, so Bezout bounds their number by +$\delta_i^2$. + +Assign each selected pair outside the base-field component union to one +non-base-field component containing it. At most +\[ + \sum_{R_i\ { m not\ over}\ \F(X)}\delta_i^2\le d^2 +\] +pairs are assigned. Hence the retained number is at least +\[ + 7583-(52-d)^2-d^2=4879+104d-2d^2. +\] +This concave expression has endpoint values $5079$ and $5653$ on +$2\le d\le43$, proving the uniform $5079$ bound. There are at most $d$ +components, and exact integer minimization gives +\[ + \min_{2\le d\le43} + \left\lceil\frac{7583-(52-d)^2-d^2}{d}\right\rceil=132. +\] +Finally, the core-incidence bound at $t=5079$ gives +\[ + \left\lceil + \frac{5079\cdot807^2}{807+5(5079-1)} + \right\rceil=126263, +\] +which proves (FD1). +\end{proof} + +\begin{remark} +This is a base-field normalization, not an irreducibility or split-pencil +theorem. The exact degree scan and independent degree-partition audit are +\path{experimental/verify_mca_full_lift_common_factor_base_field_descent_v1.py} +and +\path{experimental/audit_mca_full_lift_common_factor_base_field_descent_v1.py}. +\end{remark} + +\begin{corollary}[Linear factor gives a projective star] +\label{cor:full-lift-linear-factor-projective-star} +In the setting of Corollary~\ref{cor:full-lift-common-factor-mass}, suppose +the full common interpolation factor has total $(Y,Z)$-degree one. Then, +after projective rescaling, it has a primitive equation +\[ + P(X,Y,Z)=AY+BZ+C(X), + \qquad A,B\in\F,\quad (A,B)\ne(0,0),\quad \deg C\le5. \tag{LS1} +\] +All captured affine explanation lines share one $\F$-rational projective +slope--codeword center. If $A\ne0$, the center is finite: +\[ + \gamma_*=B/A,qquad c_*=-C/A. +\] +If $A=0$, every captured line has the same direction codeword $-C/B$, the +center at projective slope infinity. +\end{corollary} + +\begin{proof} +Initially work over the algebraic closure and write +$P=A(X)Y+B(X)Z+C(X)$ primitively. The factor-mass corollary supplies at +least $4982$ distinct sections $(a_i,b_i)\in\F[X]_{<6}^2$. Subtracting two +section equations and removing $\gcd(A,B)$ gives +\[ + (a_i,b_i)=(a_0+Bt_i,b_0-At_i), + \qquad + \deg t_i\le s:=5-\max(\deg A,\deg B). \tag{LS2} +\] +Indeed, one section shows that $\gcd(A,B)$ also divides $C$, so primitivity +makes it a unit. In particular $\deg A,\deg B\le5$. + +Since $A$ and $B$ are coprime, the received pair induces a scalar word +$\tau$ on every inside coordinate: use +$(r_0-a_0)/B$ where $B\ne0$, and $-(r_1-b_0)/A$ otherwise. Each $t_i$ +agrees with $\tau$ on its core of at least $807$ coordinates. The ordinary +constant-block Johnson cap for degree $s$ is +\[ + J_s=\left\lfloor + \frac{130237(807-s)}{807^2-130237s}\right\rfloor. +\] +For $s=0,1,2,3,4$ its exact values are +$161,201,268,401,802$. If either $A$ or $B$ were nonconstant, then +$s\le4$, contradicting $4982>802$. Hence $A,B$ are constants and +$\deg C\le5$. + +If $A\ne0$, two distinct captured $\F$-rational pairs give +$B/A=-(a_i-a_j)/(b_i-b_j)\in\F$, and then +$-C/A=a_i+(B/A)b_i\in\F[X]_{<6}$. Every captured line passes through that +finite center. If $A=0$, the common direction $-C/B$ lies in +$\F[X]_{<6}$, proving the projective-infinity case. +\end{proof} + +\begin{remark} +This identifies the degree-one branch with the primitive projective-star +shape; it does not prove the star population bound. The complementary +common-factor branch has $(Y,Z)$-degree at least two. + +The exact Johnson replay and independent audit are +\path{experimental/verify_mca_full_lift_linear_factor_projective_star_router_v1.py} +and +\path{experimental/audit_mca_full_lift_linear_factor_projective_star_router_v1.py}. +\end{remark} + +\begin{theorem}[Full-explanation lifted-rank gauge dichotomy] +\label{thm:full-explanation-lifted-rank-dichotomy} +Let \(C\leq\F^D\) have dimension \(K\), let +\(r_\gamma=r_0+\gamma r_1\), and let \(Z\subseteq\F\) contain distinct +slopes. For every \(\gamma\in Z\), choose \(c_\gamma\in C\), and assume +that the \(c_\gamma\) have full affine rank \(K\). Fix +\(\gamma_0\in Z\) and put +\[ + V=\operatorname{span}\{(\gamma-\gamma_0, + c_\gamma-c_{\gamma_0}):\gamma\in Z\} + \leq \F\oplus C. +\] +Then \(\dim V\in\{K,K+1\}\), and exactly one of the following holds. +\begin{enumerate} +\item If \(\dim V=K\), there is a unique nonzero linear functional + \(\ell:C\to\F\) such that + \(V=\{(\ell(u),u):u\in C\}\). The gauge + \[ + r_1\longmapsto r_1-b, + \qquad c_\gamma\longmapsto c_\gamma-\gamma b + \] + drops the explanation affine rank to exactly \(K-1\) precisely for + \(b\in C\) satisfying \(\ell(b)=1\). Thus the rank-dropping gauges form + an affine hyperplane in \(C\). +\item If \(\dim V=K+1\), then \(V=\F\oplus C\), and every \(b\in C\) + leaves the explanation affine rank equal to \(K\). +\end{enumerate} +If, in addition, every chosen maximal agreement support is same-support +pair-noncontained, then \(r_1\notin C\), and the selected error vectors +\(r_\gamma-c_\gamma\) have affine rank exactly \(\dim V\). \end{theorem} \begin{proof} -Choose a basis \(c_1,\ldots,c_s\) of \(C'\), write -\(c_\gamma=c_0+\sum_i\lambda_{\gamma,i}c_i\), and associate the parameter -point -\(p_\gamma=(\gamma,\lambda_{\gamma,1},\ldots,\lambda_{\gamma,s})\in -\F^{s+1}\). Agreement at coordinate \(x\) is an affine hyperplane with -normal +Projection of \(V\) to \(C\) is onto because the explanations have full +affine rank. Hence \(K\leq\dim V\leq K+1\). If \(\dim V=K\), projection +is an isomorphism and \(V\) is the graph of a unique functional \(\ell\). +It is nonzero because the slopes are not all equal. On anchored +differences, the gauge is the map \[ - v_x=(r_1(x),-c_1(x),\ldots,-c_s(x)). + T_b:V\longrightarrow C,\qquad T_b(a,u)=u-ab. \] -Let \(z\) be the number of zero normals and let \(g\le z\) of them agree -identically. Since every \(c_i\) vanishes at those \(z\) coordinates, -the polynomial-space argument of \cref{thm:affine-span-list} gives -\(z\le K-s\). +For \(V=\{(\ell(u),u):u\in C\}\), this map is +\(u\mapsto u-\ell(u)b\). It has rank \(K-1\) exactly when +\(\ell(b)=1\), in which case its image is \(\ker\ell\); otherwise it is +invertible. If \(\dim V=K+1\), then \(V=\F\oplus C\), and \(T_b\) is +surjective for every \(b\). -The normals incident with any \(p_\gamma\) span \(\F^{s+1}\). Otherwise -a nonzero relation \((\delta,\mu)\) gives a word -\(\delta r_1-\sum_i\mu_i c_i\) vanishing on at least \(m\) agreement -coordinates. If \(\delta=0\), a nonzero degree-\(274980728111395087 + \quad\text{and}\quad + 219426634>16777215 +\] +on KoalaBear and Mersenne-31, respectively. Closing these cells therefore +requires structure of the codimension-one RS extension beyond its weight +hierarchy, or a sharper row-specific affine-list theorem. A +finite-field audit and the exact adjacent arithmetic are in +\texttt{experimental/verify\_mca\_full\_explanation\_lifted\_rank\_gauge\_dichotomy\_v1.py}. +\end{remark} + \begin{theorem}[Directional Johnson ray compiler] \label{thm:directional-johnson-ray} Retain the hypotheses and notation of \cref{thm:fixed-union-ray}, but allow @@ -5185,35 +7595,454 @@ \section{Finite max-fiber calibration}\label{sec:finite-calibration} mark the limit of the recursive compiler. \end{proof} -\begin{proposition}[Exact affine-span MCA payments at the active rows] -\label{prop:active-affine-span-mca} -Assume \eqref{eq:direction-list-separated}. If the codeword explanations -of an MCA chart lie in one affine subspace of the actual -\(\RS[\F,D,k]\) code of dimension \(s\), then -\cref{thm:affine-span-mca} gives +\begin{remark}[Retraction of the former active affine-span MCA payments] +The former KoalaBear and Mersenne-31 MCA affine-span payments used the +refuted ordered-basis denominator of +\cref{prop:affine-span-mca-counterexample}. Their falling- and +rising-product evaluations were arithmetically correct evaluations of that +expression, but they are not upper bounds for MCA slope families. They +therefore imply no affine-rank lower wall for a surviving MCA chart. The +ordinary affine-span list payments immediately above are unaffected. The +next proposition gives a distinct conditional wall from the repaired +support-transverse theorem, with its deleted stratum and local margin stated +explicitly. +\end{remark} + +\begin{proposition}[Conditional post-deletion affine-error router on KoalaBear] +\label{prop:kb-post-deletion-affine-error-router} +Use the KoalaBear parameters +\[ + (n,k,m,w,B_*)= + (2097152,1048576,1116048,67472,274980728111395087). +\] +On one received line, let \(Z_{\rm bad}\) be the finite support-wise +MCA-bad slopes and define the intrinsic near-rational stratum +\[ + N=\{\gamma\in Z_{\rm bad}:\min_{c\in C}\wt(r_\gamma-c)\le w\}, + \qquad Z=Z_{\rm bad}\setminus N. +\] +Suppose \(|N|\le2w=134944\), as supplied under the printed KoalaBear +hypotheses by the separately pinned two-anchor near-rational theorem. Its +guards hold here because $w\ge1$ and +$3w=202416\le1048576=n-k$. +For every \(\gamma\in Z\), choose one exact same-support-noncontained +\(m\)-record, and let \(a\) be the affine rank of the resulting error +words. If \(a\le9\), then +\[ + |Z_{\rm bad}|\le + 110390969172173096+134944 + =110390969172308040K, + \qquad + M_s(T)= + \left\lfloor + \frac{\binom{n-K+s}{s}}{\binom{w-T+1+s}{s}} + \right\rfloor, +\] +and assume \(M_s(T)^2<|\F|\). Define +\[ + H_0(T)=\left\lfloor\frac nT\right\rfloor +\] +and, for \(1\leq j\leq s\), +\[ + H_j(T)=\left\lfloor\max\left\{ + \frac{n^{\underline{j+1}}} + {mT(w+1)^{\overline{j-1}}}, + \frac{(n-K+j)^{\underline{j+1}}} + {T(w+1)^{\overline j}} + \right\}\right\rfloor . +\] +Then +\begin{equation} + |Z|\leq + \max_{0\leq j\leq s}H_j(T)+(n-A)M_s(T). + \label{eq:mca-margin-interleaving-split} +\end{equation} +\end{theorem} + +\begin{proof} +Partition \(Z=Z_{\rm hi}\sqcup Z_{\rm lo}\) according as +\(\theta_\gamma\geq T\) or \(\theta_\gamma\leq T-1\). +If the affine explanation span of \(Z_{\rm hi}\) has direction dimension +\(j\geq1\), its direction space is contained in \(C'\); minimizing over +that smaller space cannot decrease the margins. Thus +\cref{thm:support-transverse-affine-span-mca} gives +\(|Z_{\rm hi}|\leq H_j(T)\). If \(j=0\), every explanation equals one +word. Each support contains at least \(T\) coordinates where the line +direction is nonzero, and at each coordinate the agreement equation +determines at most one slope. Incidence counting gives +\(|Z_{\rm hi}|\leq H_0(T)\). + +For every \(\gamma\in Z_{\rm lo}\), choose \(b_\gamma\in C'\) with at +most \(T-1\) mismatches on \(S_\gamma\), and put +\(a_\gamma=h_\gamma-\gamma b_\gamma\in c_0+C'\). The pair +\((a_\gamma,b_\gamma)\) agrees with \((r_0,r_1)\) on at least \(A\) +common coordinates. Translating the first component by \(c_0\) places +all such pairs in the two-fold common-support interleaving of \(C'\). +The ordinary affine-span list compiler +\cref{thm:affine-span-list} bounds each projected ordinary list by +\(M_s(T)\). The hypothesis \(M_s(T)^2<|\F|\) and +\cref{thm:subsquare-interleaving-collapse} therefore bound the number of +distinct pairs by \(M_s(T)\). + +For one fixed pair \((a,b)\), let +\(H_{a,b}=\{x:r_0(x)=a(x),\ r_1(x)=b(x)\}\); then +\(|H_{a,b}|\geq A\). Pair noncontainment gives every owning slope an +actual \(x\in S_\gamma\setminus H_{a,b}\). At such an \(x\), +\[ + \gamma=-\frac{r_0(x)-a(x)}{r_1(x)-b(x)}. +\] +Choosing one exception coordinate per slope is injective, so the pair +owns at most \(n-|H_{a,b}|\leq n-A\) slopes. Adding the disjoint high and +low bounds proves \eqref{eq:mca-margin-interleaving-split}. +\end{proof} + +\begin{proposition}[KoalaBear affine-error rank-ten payment] +\label{prop:kb-affine-error-rank-ten-payment} +Retain the intrinsic near-rational deletion and exact post-deletion record +selection of \cref{prop:kb-post-deletion-affine-error-router}. If the +selected error words have affine rank \(a=10\), and the received line is +over the deployed sextic field +\[ + |\F|=2130706433^6, +\] +then +\[ + |Z_{\rm bad}|\leq + 2w+5143522968716559+56727790457914040 + =61871313426765543B_*\), attained at \(T=876\); the +minima at \(s=11,12\) are larger still. +\end{proof} + +\begin{theorem}[Nonuniform support-margin resource] +\label{thm:mca-nonuniform-support-margin} +Retain the hypotheses and notation of +\cref{thm:support-transverse-affine-span-mca}, but define the individual +support margins +\[ + \theta_\gamma=\min\left\{w+1, + \min_{b\in C'}|\{x\in S_\gamma:r_1(x)\ne b(x)\}|\right\}. +\] +Then +\begin{equation} + \sum_{\gamma\in Z}\theta_\gamma\le C_s, + \qquad + C_s=\left\lfloor\max\left\{ + \frac{n^{\underline{s+1}}}{m(w+1)^{\overline{s-1}}}, + \frac{(n-K+s)^{\underline{s+1}}}{(w+1)^{\overline s}} + \right\}\right\rfloor . + \label{eq:mca-nonuniform-support-margin} +\end{equation} +\end{theorem} + +\begin{proof} +Use the ordered-normal-basis proof of +\cref{thm:support-transverse-affine-span-mca}, before replacing the +individual final-extension counts by their minimum. With the proof's +global zero-normal parameters \((z,g)\), the parameter point belonging to +\(\gamma\) owns at least +\[ + (m-g)\theta_\gamma(w+1)^{\overline{s-1}} +\] +ordered independent coordinate-normal tuples. One independent +\((s+1)\)-tuple determines at most one parameter point. Summing first gives +\[ + (m-g)(w+1)^{\overline{s-1}} + \sum_\gamma\theta_\gamma + \le (n-z)^{\underline{s+1}}. +\] +Here \((z,g)\) are global: a zero normal's affine incidence equation is either +identically satisfied on the parameter flat or never satisfied. Now +\(0\le g\le z\le K-s\). For fixed \(z\), the ratio is largest at \(g=z\), +and the successive-ratio calculation in the cited proof puts its maximum at +\(z=0\) or \(z=K-s\). These are the two terms in +\eqref{eq:mca-nonuniform-support-margin}. +\end{proof} + +\begin{theorem}[Weighted minimizing-pair core route cut] +\label{thm:mca-weighted-pair-core-route-cut} +Retain the hypotheses of +\cref{thm:mca-nonuniform-support-margin}. Fix +\(1\le\tau\le w-1\), and put +\[ + Q_s(\tau)=\left\lfloor + \frac{\binom{n-K+s}{s}}{\binom{w-\tau+s}{s}} + \right\rfloor , + \qquad Q_s(\tau)^2<|\F|. +\] +For every \(\gamma\) with \(\theta_\gamma\le\tau\), fix one minimizing +\(b_\gamma\in C'\), and put +\[ + a_\gamma=c_\gamma-\gamma b_\gamma, + \qquad \lambda_\gamma=\tau+1-\theta_\gamma, +\] +and group records by their ordered pair \((a_\gamma,b_\gamma)\). If +\(|Z|\ge E\) and \((\tau+1)E>C_s\), some fixed pair has total weight at +least +\begin{equation} + L_s(\tau,E)=\left\lceil + \frac{\max\{0,(\tau+1)E-C_s\}}{Q_s(\tau)} + \right\rceil . + \label{eq:mca-weighted-pair-load} +\end{equation} +For a fixed pair \((a,b)\), write +\[ + H_{a,b}=\{x\in D:r_0(x)=a(x),\ r_1(x)=b(x)\}, + \qquad \delta=\max\{1,m-|H_{a,b}|\}. +\] +The pair owns at most +\begin{equation} + c_\delta=\left\lfloor\frac{n-m+\delta}{\delta}\right\rfloor + \label{eq:mca-pair-core-multiplicity} +\end{equation} +records, and its weight is at most +\(c_\delta(\tau+1-\delta)\). +\end{theorem} + +\begin{proof} +The positive-part identity and +\eqref{eq:mca-nonuniform-support-margin} give +\[ + \sum_{\theta_\gamma\le\tau} + (\tau+1-\theta_\gamma) + =\sum_{\gamma\in Z}(\tau+1-\theta_\gamma)_+ + \ge (\tau+1)|Z|-C_s. +\] +The selected pair \((a_\gamma,b_\gamma)\) agrees with the received pair on +at least \(m-\tau>K\) coordinates. The ordinary affine-span list theorem +and the sub-square interleaving collapse +\cref{thm:subsquare-interleaving-collapse} bound the number of distinct +ordered pairs by \(Q_s(\tau)\). Pigeonholing proves +\eqref{eq:mca-weighted-pair-load}; there is no bipartite factor two because +the interleaving theorem counts complete ordered pairs. + +Fix one pair and an owning record. On \(S_\gamma\), the identity +\[ + r_0-a=-\gamma(r_1-b) +\] +shows that +\(S_\gamma\cap H_{a,b}=\{x\in S_\gamma:r_1(x)=b(x)\}\). Since the margin +cap is inactive, \(\theta_\gamma=|S_\gamma\setminus H_{a,b}|\ge\delta\). +For distinct finite slopes these exception sets are disjoint: at a point +outside \(H_{a,b}\), the displayed equation determines \(\gamma\) uniquely. +Their union lies in \(D\setminus H_{a,b}\). Division by \(\delta\), with +the harmless overestimate \(n-|H_{a,b}|\le n-m+1\) when +\(|H_{a,b}|\ge m\), proves \eqref{eq:mca-pair-core-multiplicity}. Each +edge weight is at most \(\tau+1-\delta\), proving the final assertion. +\end{proof} + +\begin{proposition}[KoalaBear rank-eleven pair-core terminal] +\label{prop:kb-rank-eleven-pair-core-terminal} +Retain the intrinsic near deletion, exact record selection, and reversible +gauge of \cref{prop:kb-post-deletion-affine-error-router}. Suppose the +selected error words have affine rank \(11\), so the gauged explanations +lie in an affine ten-flat over the deployed field +\(|\F|=2130706433^6\). If the received line has more than \(B_*\) bad +slopes, then for each row below there exists a fixed actual minimizing pair +satisfying that row. The pairs supplied by the two independently optimized +cutoffs need not coincide. \[ \begin{array}{c|r|r|r} -\text{row}&1\le s\le& - \max\limits_{s\text{ in range}}|Z|& - \text{compiler value at the next }s\\ \hline -\text{KoalaBear MCA}&11&49107626893329409&1526096478566110535\\ -\text{Mersenne-31 MCA}&4&1756139&54600050 + \tau&\text{pair weight}&\text{owned slopes}&\delta\le\ \\ \hline + 6486&743449148&114624&8\\ + 1795&360132809&200632&4 \end{array} -\tag{AF-MCA}\label{eq:active-affine-span-mca} +\tag{PC11}\label{eq:kb-rank-eleven-pair-core-terminal} +\] +Parallel records are allowed; the owned-slope column is not a +distinct-neighbor degree. + +Moreover, the complete one-cutoff upper bound obtained from the printed +high-margin theorem, all cumulative interleaved pair caps, and the exact +core-deficiency multiplicities has unique minimum +\[ + 813929118931913384 + =134944+5401690553097387+808527428378681053 + >B_* \] -Both in-range maxima fit the full challenge budget. Thus a surviving -separated-direction MCA chart has codeword affine-span dimension at least -\(12\) on KoalaBear and at least \(5\) on Mersenne-31, unless it has -already been paid by another cell. If separation fails, the residual is -the explicit direction-list cell of \eqref{eq:direction-list-separated}. +at cutoff \(J=19737\). Thus those inputs do not pay rank eleven. The +remaining theorem must couple different fixed pairs or route the dense +parallel pair cores to a chronology-correct owner. \end{proposition} \begin{proof} -Substitute \(K=k\), \(m=a_+\), and the exact row budgets into -\eqref{eq:affine-span-mca}. Exact falling- and rising-product arithmetic -gives the displayed values. At the next dimensions this compiler exceeds -the full budget, which records only the limit of the estimate. -\end{proof} +An over-budget line leaves at least +\(E=B_*-2w+1\) post-near slopes. Apply +\cref{thm:mca-weighted-pair-core-route-cut} with \(s=10\). Exact integer +optimization of \eqref{eq:mca-weighted-pair-load} gives the two rows of +\eqref{eq:kb-rank-eleven-pair-core-terminal}; comparison with +\(c_\delta(\tau+1-\delta)\) gives the displayed deficiency walls. + +For the final assertion, first fix one minimizing \(b_\gamma\), and hence +one pair type \((a_\gamma,b_\gamma)\), for every selected record, once and +for all cutoffs. Let \(G(t)\) count distinct selected pair types +whose deficiency is at most \(t\). Such a pair has common agreement at +least \(m-t\), so interleaving gives \(G(t)\le Q_{10}(t)\). Since +\(c_\delta\) decreases, summation by parts bounds the low records through +\(J\) by +\[ + Q_{10}(1)c_1+ + \sum_{\delta=2}^{J} + \bigl(Q_{10}(\delta)-Q_{10}(\delta-1)\bigr)c_\delta. +\] +The records with margin at least \(J+1\) are bounded by the maximum of the +support-transverse theorem over affine subranks \(0\le j\le10\). Scanning +all \(1\le J\le w-1\), subject to the exact sub-square guard, gives the +unique displayed minimum. The release certificate recomputes every term, +the adjacent cutoffs, and hostile mutations. +\end{proof} + +\begin{remark}[Scope of the rank-eleven route cut] +The proposition moves no active-v4 atom and does not close KoalaBear. A +small constant-code star shows that the fixed-pair multiplicity and parallel +edges are genuine under the local hypotheses, so no simple-graph expansion +or smaller per-pair multiplier may be inferred. The missing result is an +actual-record cross-pair compatibility or owner theorem, not another scalar +threshold optimization. +\end{remark} \begin{proposition}[Exact rank-flat and common-zero reductions at the active rows] diff --git a/experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md b/experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md new file mode 100644 index 000000000..1f764fdcf --- /dev/null +++ b/experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md @@ -0,0 +1,76 @@ +# KoalaBear rank-ten margin/interleaving split + +Status: candidate theorem; exact arithmetic replayed; zero active-v4 ledger +movement. Source base is the restacked support-local router after PR #1165. + +## Result + +For a gauged post-near family whose explanations lie in an affine +(s)-flat, split each actual slope at a support-local margin threshold +(T). The high-margin family is paid by the support-transverse compiler. +For the low family, each record produces a common-support pair in two +copies of the same (s)-dimensional direction code. The ordinary +affine-span list cap is + +\[ +M_s(T)=\left\lfloor +\frac{\binom{n-K+s}{s}}{\binom{w-T+1+s}{s}} +\right\rfloor . +\] + +If (M_s(T)^2<|\mathbb F|), a projection-collision theorem shows that the +two-fold common-support list has the same size. One fixed pair owns at +most (n-A) slopes, where (A=m-T+1). Hence + +\[ +|Z_{\rm bad}|\le 2w+max_{0\le j\le s}H_j(T) + +(n-m+T-1)M_s(T). +\] + +For KoalaBear error rank ten, the reversible gauge gives (s=9). At +(T=667), + +| quantity | exact value | +|---|---:| +| (A) | 1,115,382 | +| (M_9(T)) | 57,781,140,652 | +| high-margin cap | 5,143,522,968,716,559 | +| low-margin cap | 56,727,790,457,914,040 | +| near add-back (2w) | 134,944 | +| total | 61,871,313,426,765,543 | +| slack against (B_*) | 213,109,414,684,629,544 | + +The field guard is evaluated over the actual line field +(|\mathbb F|=2130706433^6), not the base prime field. It passes over the +former and fails over the latter. + +## Exact method wall + +The all-threshold scan proves (T=16) is the first paying rank-nine +threshold and (T=667) is its unique minimizer. At explanation rank ten +(error rank eleven), the minimum is + +\[ +1{,}040{,}506{,}078{,}215{,}897{,}711 +\] + +at (T=876), already above budget. Ranks eleven and twelve are larger. +Thus this one-threshold split closes error rank ten and no more. + +## Sharpness control + +For (C=\operatorname{RS}(\mathbb F_{11},D,1)), take (n=10,m=3), a +two-coordinate common core with received pair ((0,0)), and eight outside +coordinates indexed by slopes (gamma=0,\ldots,7), with values +((r_0,r_1)=(-\gamma,1)). Each slope has one exact maximal post-near +support consisting of the core and its own coordinate. All eight slopes +choose the same low pair ((0,0)), attaining (8=n-A). Therefore rank +eleven requires aggregate structure among different pairs; the per-pair +multiplicity cannot be reduced from the present hypotheses. + +## Nonclaims + +- No active-v4 first-match atom is moved. +- KoalaBear is not closed. +- Error rank eleven is not paid. +- Counts are distinct affine slopes, never pair labels or endpoint records. diff --git a/experimental/notes/thresholds/kb_mca_rank11_anchored_rich_flat_router_v1.md b/experimental/notes/thresholds/kb_mca_rank11_anchored_rich_flat_router_v1.md new file mode 100644 index 000000000..460aacb4b --- /dev/null +++ b/experimental/notes/thresholds/kb_mca_rank11_anchored_rich_flat_router_v1.md @@ -0,0 +1,51 @@ +# KoalaBear rank-eleven anchored rich-flat router + +Status: **proved direct branch payment / structural route cut**. Zero +active-v4 ledger movement; no rank-eleven or KoalaBear closure. + +For cutoff `tau=1547`, anchor one actual low-margin record and let +`G_0` be the portion of its exact size-`m` support on which its minimizing +pair equals the received pair. Then + +```text +A = m-tau = 1,114,501 +|G_0| <= m +c = 2A-n = 131,850. +``` + +Every represented pair-difference row space of rank one or two annihilates at +least `c` labeled evaluation columns from `G_0`. + +Call a row space `h`-transverse if no proper flat of its annihilator contains +more than `h` of those labels. Greedy ordered-basis selection gives at least +`(c-h)^(s-r)` determining tuples. Uniformly over explanation dimension +`s<=10`, the numbers of transverse row spaces are bounded by + +```text +N_1 <= floor(m_fall_9/(c-h)^9), +N_2 <= floor(m_fall_8/(c-h)^8). +``` + +Rank-one groups cost at most `8,147,918` slopes by PR #1171. Rank-two groups +have at most `252` pair types and cost at most `247,628,052` slopes. At +`h=42,452`, the complete low/high/near sum is + +```text +274,978,720,888,758,363 < B* +``` + +with slack `2,007,222,636,724`. + +Therefore every unsafe survivor contains a proper annihilator flat on at least +`42,453` actual coordinates. Orthogonal complementation yields a direction +subspace `W` strictly larger than the represented row space `U`, and all +polynomials in `W` share the squarefree locator of those coordinates. Thus: + +```text +rank(U)=1 => dim(W)>=2 and deg common factor >=42,453; +rank(U)=2 => dim(W)>=3 and deg common factor >=42,453. +``` + +In the second case `U` itself retains at least `131,850` common anchor zeros. +The next task is factor synchronization or chronology-safe shortening across +these emitted higher-dimensional spaces. diff --git a/experimental/notes/thresholds/kb_mca_rank11_fixed_endpoint_owner_router_v1.md b/experimental/notes/thresholds/kb_mca_rank11_fixed_endpoint_owner_router_v1.md new file mode 100644 index 000000000..8bce32a7a --- /dev/null +++ b/experimental/notes/thresholds/kb_mca_rank11_fixed_endpoint_owner_router_v1.md @@ -0,0 +1,47 @@ +# KoalaBear rank-eleven fixed-endpoint owner router + +Status: **PROVED DIRECT BRANCH PAYMENT / STRUCTURAL ROUTE CUT**. Exact parent +is PR #1171 head `a3fc2d5aea86577cd50d8b95b6eb2155d4d940f6`. Active-v4 +ledger movement is zero. + +For the post-near affine-error-rank-eleven family, use the nonuniform support +margins `theta_gamma` and split at `tau=439`. If all low minimizing-pair +coefficient matrices have pairwise rank distance at most one, #1171 puts them +in a fixed-right or fixed-left matrix anticode. + +The fixed-right branch retains #1171's exact `8147918` ray cap. In the +fixed-left branch, an invertible endpoint row operation makes one endpoint +codeword common to every pair type. On its complete agreement set `G` of +size `g`, the varying endpoints form one ordinary affine Reed--Solomon list +with agreement at least `m-439`. Same-support pair noncontainment forces each +nonexceptional owning slope to use a coordinate outside `G`; for fixed pair +type and coordinate that equation determines one slope. + +Thus the low branch is at most + +```text +1+max_g (n-g) floor( + C(g-K+10,10)/C(m-439-K+10,10) +). +``` + +The analytic binomial envelope has unique `g` maximizer `2001826` and equals +`32215263489919749`. The high-margin resource contributes +`242314927584173240`; adding `2w=134944` gives + +```text +274530191074227933 < 274980728111395087, +``` + +with slack `450537037167154`. Cutoff `438` remains over budget, so `439` is +the first paying cutoff. The same envelope has unique minimum +`81826485385525648` at cutoff `3608`. + +Consequently any over-budget line has two low pair types with rank-two +coefficient difference. Their complete cores each have size at least +`1115609`, intersect in at least `134066` coordinates, and force a common +evaluation-root factor of degree at least `134066` in both endpoint-difference +polynomials. + +Nonclaims: no rank-eleven payment, no chronology owner for the common factor, +no sum over different factor edges, and no KoalaBear closure. diff --git a/experimental/notes/thresholds/kb_mca_rank11_pair_core_route_cut_v1.md b/experimental/notes/thresholds/kb_mca_rank11_pair_core_route_cut_v1.md new file mode 100644 index 000000000..550203e9c --- /dev/null +++ b/experimental/notes/thresholds/kb_mca_rank11_pair_core_route_cut_v1.md @@ -0,0 +1,188 @@ +# KoalaBear rank-eleven pair-core route cut + +Status: **PROVED LOCAL ROUTE CUT / ZERO DEPLOYED LEDGER MOVEMENT** + +Exact parent: PR #1167 head +`491ccdf53d54846f5a013b808960645275c64ed3`. + +This packet answers the next question left by the rank-ten +margin/interleaving payment. It does not pay affine error rank eleven. +It proves the strongest actual fixed-pair terminal currently forced by the +support-local margin, interleaved pair cap, and exact pair-core geometry, and +then proves that the complete core-deficiency use of those inputs still +misses the KoalaBear budget. + +## 1. Actual-record input + +Use the intrinsic near deletion and exact post-deletion record selection of +PR #1166. One complete record is fixed for every distinct post-near bad +affine slope before gauging or choosing a margin minimizer. At error rank +eleven, the reversible gauge puts all explanations in an affine ten-flat +without changing the errors, slopes, supports, or same-support +pair-noncontainment. + +For each record define + +\[ + \theta_\gamma=\min\left\{w+1, + \min_{b\in C'}|\{x\in S_\gamma:r_1(x)\ne b(x)\}|\right\}. +\] + +Every selector and minimizer is fixed once. Labels, pair types, supports, +and graph edges are never counted as slopes. + +## 2. Nonuniform margin resource + +The ordered-normal-basis proof of the support-transverse compiler can be +summed before replacing all final extension counts by their minimum. It +gives + +\[ + \sum_\gamma\theta_\gamma\le + C_s=\left\lfloor\max\left\{ + \frac{n^{\underline{s+1}}}{m(w+1)^{\overline{s-1}}}, + \frac{(n-K+s)^{\underline{s+1}}}{(w+1)^{\overline s}} + \right\}\right\rfloor. +\] + +This is a new theorem, not a formal summation of the old minimum-margin +statement. Each parameter point owns its own +`theta_gamma`-weighted collection of ordered normal bases; an independent +coordinate tuple determines at most one parameter point. The zero-normal +endpoint maximization is exactly the one already proved in the repaired +compiler. + +## 3. Fixed minimizing pairs + +For a cutoff `tau`, every record with `theta_gamma <= tau` chooses a +minimizing direction `b_gamma` and + +\[ + a_\gamma=h_\gamma-\gamma b_\gamma, + \qquad \lambda_\gamma=\tau+1-\theta_\gamma. +\] + +The pair agrees with the received pair on at least `m-tau` coordinates. +Ordinary affine-span plus the sub-square interleaving collapse gives at most + +\[ + Q_s(\tau)=\left\lfloor + \frac{\binom{n-K+s}{s}}{\binom{w-\tau+s}{s}} + \right\rfloor +\] + +distinct ordered pairs. If an over-budget line leaves +`E=B_*-2w+1` post-near slopes, one fixed pair has weight at least + +\[ + \left\lceil\frac{\max\{0,(\tau+1)E-C_s\}}{Q_s(\tau)}\right\rceil. +\] + +There is no factor two: the interleaving theorem counts complete ordered +pairs. A bipartite endpoint formulation has twice the total degree and +twice as many available endpoints and gives the same average. + +For a fixed pair `(a,b)`, set + +\[ + H_{a,b}=\{x:r_0=a,\ r_1=b\}, + \qquad \delta=\max\{1,m-|H_{a,b}|\}. +\] + +On an assigned support, the margin is exactly +`|S_gamma \ H_ab|`. These exception sets are disjoint across different +finite slopes, because an outside coordinate determines the slope by its +affine ratio. Consequently the pair owns at most + +\[ + c_\delta=\left\lfloor\frac{n-m+\delta}{\delta}\right\rfloor +\] + +records and has cutoff weight at most +`c_delta (tau+1-delta)`. + +## 4. Exact KoalaBear terminal + +For + +\[ + (n,K,m,w,B_*)= + (2097152,1048576,1116048,67472,274980728111395087) +\] + +over the deployed sextic field, every over-budget error-rank-eleven line +forces, for each row, a fixed actual pair satisfying that separately +optimized statement. The fixed pairs supplied by the two rows need not +coincide: + +| cutoff `tau` | fixed-pair weight | distinct owned slopes | deficiency | +|---:|---:|---:|---:| +| 6,486 | 743,449,148 | at least 114,624 | `delta <= 8` | +| 1,795 | 360,132,809 | at least 200,632 | `delta <= 4` | + +The slope counts are parallel edge records, not distinct neighbors. The +second row is the strongest record-load terminal; the first is the strongest +weighted-load terminal. + +## 5. Complete declared-certificate-class wall + +Fix one minimizing direction and hence one pair type for every selected +record once, before scanning the cutoff. For each deficiency `delta`, +cumulative interleaving bounds the number of pair types by `Q_s(delta)`, +while one type owns at most `c_delta` records. +Since `c_delta` decreases, the exact greedy/Abel bound through cutoff `J` is + +\[ + L(J)=Q_s(1)c_1+ + \sum_{\delta=2}^{J} + (Q_s(\delta)-Q_s(\delta-1))c_\delta. +\] + +Adding the printed high-margin tail and scanning every legal cutoff gives the +unique minimum + +\[ +\begin{aligned} + J&=19737,\\ + U_{\rm high}&=5401690553097387,\\ + U_{\rm low}&=808527428378681053,\\ + U_{\rm total}&=813929118931913384,\\ + U_{\rm total}-B_*&=538948390820518297. +\end{aligned} +\] + +Thus all cumulative pair-list caps, all core deficiencies, every exact +fixed-pair ratio fiber, and the printed high-margin theorem still miss by a +factor exceeding 2.9. The stronger nonuniform resource can lower this +method ceiling, but its own exact optimizer also remains over budget; neither +route pays rank eleven. + +## 6. Sharpness and missing theorem + +A deterministic `GF(7)` constant-code star has exact size-three supports, +strict post-near distance, pair noncontainment, and four parallel slopes on +one fixed pair. It is the smallest local countermodel to a distinct-neighbor +or reduced per-pair-multiplicity inference. It is not an error-rank-eleven +example; it tests only that local implication. + +The next theorem is therefore precise: + +> Couple different fixed minimizing pairs on the identical actual received +> line, or route every dense parallel pair-core group chronology-correctly to +> an earlier owner. It must handle the exact `delta <= 4`, `200632`-slope +> terminal above. + +Another scalar threshold, one-pair ratio bound, or simple-graph expansion is +ruled out. No active-v4 atom, S/A/E chronology, or KoalaBear closure is +claimed here. + +## 7. External search + +An Exa sweep covered 55 results around generic RS list decoding, higher-order +MDS intersections, simultaneous partial inverses, and combinatorial +cycle-space list-decoding arguments. The most relevant primary sources were +Brakensiek--Gopi--Makam on generic RS list-decoding capacity, Yu--Loeliger on +simultaneous partial inverses, and Shangguan--Tamo on combinatorial +list-decoding. None supplies the required worst-case same-line correlation +theorem on this special deployed evaluation domain. No external lemma is +load-bearing in this packet. diff --git a/experimental/notes/thresholds/kb_mca_rank11_rank_one_pair_anticode_router_v1.md b/experimental/notes/thresholds/kb_mca_rank11_rank_one_pair_anticode_router_v1.md new file mode 100644 index 000000000..d18bc49c1 --- /dev/null +++ b/experimental/notes/thresholds/kb_mca_rank11_rank_one_pair_anticode_router_v1.md @@ -0,0 +1,38 @@ +--- +workboard_item: K4 +row: KoalaBear MCA +object: MCA +target_epsilon: 2^-128 +agreement: 1116048 +B_star: 274980728111395087 +unit: distinct bad affine slopes per received line +parent_commit: 6a5dcdae1591fc7f044eda6a942bfe178521a48c +status: PROVED_STRUCTURAL_ROUTER +active_v4_ledger_movement: 0 +--- + +# KoalaBear rank-eleven rank-one pair-anticode router + +PR #1168 leaves the simultaneous realizability of many dense minimizing-pair +cores as the first post-near error-rank-eleven joint. This note removes the +complete pairwise-rank-one compatibility branch. + +Represent each pair type by its \(2\times s\) coefficient matrix in the +common explanation direction code, \(s\le10\). A family whose pairwise +matrix differences have rank at most one must share either one left factor +or one right factor. The right-factor family is one affine correction ray. A common-core-aware +clone/heterogeneous-pair count pays it by \(8{,}147{,}918\); this avoids +silently importing the parent ray theorem outside its nonzero-error scope. The left-factor family is one correction +space of dimension at most ten; its proper affine-linear branch is paid by +\(1{,}031\), while failure of properness emits a named +positive-dimensional affine correction component. + +Distinct pair cores meeting on \(K-1\) coordinates automatically satisfy +the rank-one hypothesis, because two independent degree-\(=L`. +3. It extends #1165's full-explanation gauge existence to every selected + error rank, lowering explanation rank from `a` to `a-1`. +4. Conditional on any disjoint deleted stratum of size at most `2w`—as + supplied by PR #1160 when that dependency is present—it obtains the + strongest direct KoalaBear route cut justified by these inputs. + +The result is not a KoalaBear closure. It makes no S/A/E first-match +identification, uses no 31-slope exception reserve, and moves no deployed v4 +atom. It is a direct theorem about distinct affine bad slopes on one actual +received line. + +## 2. Independent smooth-domain regression for #1165 + +Work over the smooth multiplicative domain + +\[ + C=\operatorname{RS}[\mathbb F_{257},\mathbb F_{257}^{\times},1], + \qquad (n,K,m,w,s)=(256,1,86,85,1). +\] + +The code consists of constant words. In the two-dimensional parameter +plane with coordinates `(gamma,lambda)`, take + +\[ + p_i=(i,0)\quad(0\le i\le85), + \qquad p_\star=(86,1). +\] + +A coordinate of the received line is an affine parameter-line + +\[ + \lambda=a+\gamma b, + \qquad r_0(x)=a,\quad r_1(x)=b. +\] + +Use exactly 256 coordinates: + +- 85 copies of `lambda=0`; +- the 86 connectors from `p_i` to `p_star`, with + \[ + b_i=(86-i)^{-1},\qquad a_i=-i(86-i)^{-1}; + \] +- 85 lines avoiding every selected parameter point, with nonzero direction + coefficients distinct from the connector coefficients. + +For each `p_i`, the exact agreement support consists of the 85 copies of +`lambda=0` plus its connector. For `p_star`, it consists of all 86 +connectors. Assign constant explanation zero at the first 86 points and +constant explanation one at `p_star`. Thus there are 87 distinct slopes, +each with an exact 86-point explanation, and the explanations have affine +rank one. + +Every support is pair-noncontained. For a dimension-one RS code, +simultaneous containment would require both `r_0` and `r_1` to be constant +on the identical support. The ordinary supports contain the common normal +`(0,-1)` and a connector normal with nonzero first coordinate; the star +support contains 86 distinct connector directions. Every incident-normal +matrix therefore has rank two. + +The original global separation hypothesis also holds: + +\[ + \max_{b\in C}\operatorname{agr}(r_1,b)=85<86=m. +\] + +Every selected received word has distance at least 170 from the constant +code, strictly outside the near-rational radius `w=85`. Nevertheless the +two terms in the printed `s=1` bound are both + +\[ + \left\lfloor\frac{256\cdot255}{86\cdot85}\right\rfloor=8, +\] + +contradicting the 87 exact slopes. + +## 3. The first false inference + +Choose a basis `c_1,...,c_s` for the explanation direction space. The +coordinate normal is + +\[ + v_x=(r_1(x),-c_1(x),\ldots,-c_s(x))\in\mathbb F^{s+1}. +\] + +After `r` independent normals have been selected, let `W` be their span. +The old proof studies `W^perp`, of dimension `s+1-r`. When the slope +coordinate is nonzero on `W^perp`, its kernel has dimension `s-r`. This +supplies Reed--Solomon codeword equations only while `r=m=K+w`, `w>0`, and let `A=c_0+C'` be an affine subspace of +the RS code with `1<=dim C'=s<=K`. For each slope in a nonempty set of +distinct `gamma`, retain an exact `m`-set `S_gamma`, an +explanation `c_gamma in A`, and same-support pair noncontainment. Define + +\[ + \theta_0= + \min_{\gamma\in Z}\min_{b\in C'} + |\{x\in S_\gamma:r_1(x)\ne b(x)\}|, + \qquad + \theta=\min\{\theta_0,w+1\}. +\] + +Pair noncontainment gives `theta>=1`: if `r_1=b` on `S_gamma`, then +`(c_gamma-gamma b,b)` explains the received pair on that same support. + +### Theorem 4.1 (quantitative support-transverse affine-span bound) + +Under these hypotheses, + +\[ + |Z|\le\left\lfloor\max\left\{ + \frac{n^{\underline{s+1}}} + {m\theta(w+1)^{\overline{s-1}}}, + \frac{(n-K+s)^{\underline{s+1}}} + {\theta(w+1)^{\overline s}} + \right\}\right\rfloor. \tag{4.1} +\] + +The first rising product is empty when `s=1`. + +Whenever a gauge changes the containing affine explanation space, `theta` +is recomputed in its translated direction space; it is not inherited from +the ungauged presentation. + +### Proof + +Let `z` be the number of zero normals and `g<=z` the number that are +identically incident. The usual polynomial-space argument gives +`z<=K-s`. Every parameter point has `m-g` incident nonzero normals. + +After `r` independent incident normals have been chosen with `1<=r=theta` + incident choices outside. +- If `delta` is nonzero, put + `b=delta^{-1} sum_i mu_i c_i in C'`. The definition of `theta` supplies + at least `theta` points of the actual support whose normals lie outside + the span. + +Thus each parameter point owns at least + +\[ + (m-g)\theta(w+1)^{\overline{s-1}} +\] + +ordered full-rank coordinate tuples. A full-rank tuple determines at most +one parameter point, so + +\[ + |Z|\le + \frac{(n-z)^{\underline{s+1}}} + {(m-g)\theta(w+1)^{\overline{s-1}}}. \tag{4.2} +\] + +For fixed `z`, the ratio is largest at `g=z`. Its successive ratio in `z` +changes sign at most once, from decreasing to increasing, because its sign +is the sign of + +\[ + n-(s+1)m+sz. +\] + +Hence the maximum is at `z=0` or `z=K-s`. These endpoints give (4.1). + +For the `GF(257)` fixture, (4.1) gives 759, so the 87-slope family is now a +positive regression rather than a contradiction. + +## 5. Exact error-rank gauge + +For selected explanations `h_gamma`, put + +\[ + e_\gamma=r_0+\gamma r_1-h_\gamma, + \qquad + a=\dim\operatorname{span}\{e_\gamma-e_{\gamma_0}\}. +\] + +Same-support noncontainment implies `r_1` is not a codeword. Therefore the +map + +\[ + (\delta,c)\longmapsto\delta r_1-c +\] + +is injective on the span of the pairs +`(gamma-gamma_0,h_gamma-h_gamma_0)`. That pair space has dimension `a`, +and its slope projection is nonzero. Choose `(1,b)` in it. The reversible +translation + +\[ + r'_1=r_1-b, + \qquad h'_\gamma=h_\gamma-\gamma b +\] + +preserves every slope, error word, agreement support, and same-support +containment predicate. The transformed explanation differences are the +kernel of the slope projection, so their affine dimension is exactly +`a-1`. + +This is a proof-coordinate adapter. It generally changes the literal +received-line representative. The inverse adds `b` back, so a direct +maximum-over-lines count is preserved; representation-dependent v4 owner +predicates must not be recomputed after the gauge without a separate +theorem. + +Write the gauge codeword as `b_0`. If local-margin failure on the +translated line produces `b_1` in its explanation direction space, then +`r'_1=r_1-b_0` agrees with `b_1` away from the exception set. The terminal +on the original complete record is therefore the codeword `b_0+b_1`, with +the identical support and identical exception coordinates. + +At full explanation rank `K`, the lifted pair space has dimension `K` or +`K+1`; this gives the two rank outcomes already classified more sharply by +#1165, which describes all gauges. The new use here is the arbitrary-rank +adapter needed for the direct post-near error-rank router. + +## 6. Exact deployed consequences + +### 6.1 Full KoalaBear code + +With only `theta>=1`, the repaired bound gives: + +| explanation rank `s` | cap | fits `B*` | +|---:|---:|:---:| +| 1 | 16,295,594 | yes | +| 2 | 253,241,283 | yes | +| 3 | 3,935,435,218 | yes | +| 4 | 118,319,201,475 | yes | +| 5 | 3,677,348,367,069 | yes | +| 6 | 114,289,853,114,503 | yes | +| 7 | 3,552,007,973,114,420 | yes | +| 8 | 110,390,969,172,173,096 | yes | +| 9 | 3,430,729,820,133,944,932 | no | + +After the exact near-rational deletion `2w=134944`, the least local margins +that pay the former rank range are: + +| `s` | least `theta` | repaired cap | cap plus `2w` | slack | +|---:|---:|---:|---:|---:| +| 8 | 1 | 110390969172173096 | 110390969172308040 | 164589758939087047 | +| 9 | 13 | 263902293856457302 | 263902293856592246 | 11078434254802841 | +| 10 | 388 | 274790124064526354 | 274790124064661298 | 190604046733789 | +| 11 | 12050 | 274970108028773601 | 274970108028908545 | 10620082486542 | + +At the preceding margins, the totals are respectively + +```text +s=9, theta=12: 285894151677963688 +s=10, theta=387: 275500176064828033 +s=11, theta=12049: 274992929018868606 +``` + +Combining the gauge with `s=a-1` proves the direct route: + +```text +post-near affine error rank a <= 9 + -> total bad slopes <= 110390969172308040 < B*; + +a = 10,11,12 and the line is over budget + -> an actual selected support has at most 12,387,12049 + direction exceptions, respectively, for the inverse-gauge + codeword b_0+b_1; + +a >= 13 + -> no payment from this compiler. +``` + +The rank-zero and rank-one edge cases do not use (4.1). Two distinct +slopes force error rank at least one. At rank one, the gauged explanations +coincide; every noncontained support contains a noncommon coordinate, and +each such coordinate belongs to at most one slope, giving the sufficient +bound `|Z|<=n`. + +### 6.2 Support-local calibration on a shortened complete code + +For a fixed common core, cancellation produces the complete shortened row + +\[ + (n',K',m')=(R+s,s,d+s). +\] + +The former `J_13` direction-separated payment used the false final factor. +With the support-local theorem and automatic `theta>=1`, the exact shortened +caps fit through `s=9`, not `s=13`: + +| `s` | repaired cap at `theta=1` | fits `B*` | +|---:|---:|:---:| +| 8 | 3,566,101,912,297,072 | yes | +| 9 | 55,413,538,236,037,195 | yes | +| 10 | 861,057,176,799,343,503 | no | + +At `s=10,11,12,13`, the least paying support margins are respectively + +\[ + 4,\quad49,\quad757,\quad11748. +\] + +Thus the sound fixed-core terminals are now: + +```text +SHORTENED_SUPPORT_TRANSVERSE_PAID_s_LE_9 +SHORTENED_DIRECTION_EXCEPTIONS_LE_3_AT_s10 +SHORTENED_DIRECTION_EXCEPTIONS_LE_48_AT_s11 +SHORTENED_DIRECTION_EXCEPTIONS_LE_756_AT_s12 +SHORTENED_DIRECTION_EXCEPTIONS_LE_11747_AT_s13 +COMMON_CORE_SHORTENED_s_GE_14 +``` + +The cancellation theorem itself is unaffected. PR #1165's newer +full-lift, punctured-Johnson, centered-Gram near-Johnson, and mean-centered +Gram routes remain separate, compatible refinements +of the top shortened cells. The invalidated pieces are +the direction-separated payment in #1163, the corresponding imported +terminal in #1164 Theorem 4.1, public-DAG node `3a13f2d`, and downstream +numerical conclusions that use that node's old formula, including the +rank-wall part of `60db12dc` and the nonempty-core composition `fc74e16c`. +Their independent algebraic or set-theoretic sublemmas are not refuted. + +### 6.3 Mersenne-31 stress-test row + +After `2w=134896`, the least margins at explanation ranks one through four +are + +\[ + 1,\quad16,\quad237,\quad7118. +\] + +Same-support noncontainment alone therefore pays only rank one on that row. +This is a stress-test consequence, not a `2^-128` Mersenne prize claim. + +## 7. Chronology and ownership + +The direct Koala route uses only the intrinsic partition + +\[ + Z_{\rm bad}=Z_{\rm near}\sqcup + (Z_{\rm bad}\setminus Z_{\rm near}), + \qquad |Z_{\rm near}|\le2w. +\] + +It does not add the conditional 31-slope exception reserve. It does not +claim that a gauged representative has the same Q/BC/S/A/E owner. The +original complete records are selected before gauging; the gauge is used +only to count the identical set of slopes and supports on a translated +received line, with an explicit inverse. + +The active v4 source still lacks an executable first-match S/A/E residual at +this joint. That underdetermination is irrelevant to the direct rank-ten +route cut but continues to block ledger insertion. + +## 8. Evidence and controls + +The sealed release certificate contains: + +- a self-contained Python reconstruction of all 256 coordinates and 87 + records; +- an independent Sage reconstruction over `GF(257)`; +- exact endpoint optimization over 10,716 legal small parameter profiles; +- exact KoalaBear, shortened-row, and Mersenne-31 arithmetic; +- an exact Sage gauge control on the `GF(257)` regression, including the + error identity, one-rank drop, and literal inverse; +- a FLINT rational-arithmetic replay; +- a Wolfram exact-integer and modular-incidence replay; +- hostile mutations for the old final factor, missing `theta`, adjacent + nonpaying margins, altered support counts, and custody hashes. + +During theorem discovery, separate `GF(11)`, `GF(17)`, and 90-family +adversarial controls were also run. They are research-campaign evidence, +not part of the sealed release certificate and are not used as proof. + +The Exa literature sweep covered finite-field point--hyperplane incidence, +design-matrix rank bounds, and rich-flat estimates. It found useful general +context but no primary-source theorem that supplies the missing +support-local final transversality factor for these RS records; no external +lemma is imported. + +## 9. Remaining frontier + +The maximal surviving theorem is no longer a generic rank computation. It +is the exact direction-exception forest: + +> On every over-budget post-near family of selected error rank 10, 11, or +> 12, classify the actual record/codeword pair whose exact `m`-support has at +> most 12, 387, or 12,049 direction exceptions. Prove a disjoint +> same-owner common-core/shortening payment, or emit the first actual +> primitive component. + +Rank at least 13 remains a separate high-rank terminal. Neither terminal is +forced into an existing owner by this packet. diff --git a/experimental/notes/thresholds/mca_affine_span_incidence_counterexample_v1.md b/experimental/notes/thresholds/mca_affine_span_incidence_counterexample_v1.md new file mode 100644 index 000000000..984fe1fa4 --- /dev/null +++ b/experimental/notes/thresholds/mca_affine_span_incidence_counterexample_v1.md @@ -0,0 +1,228 @@ +--- +workboard_item: T +row: "RS[GF(1009), {0,...,99}, 1]" +object: MCA +target_epsilon: not applicable; field-general theorem counterexample +agreement: 21 +B_star: "23 (the refuted theorem's claimed bound)" +direct_statement: "the affine-span transverse MCA compiler is false under its printed direction-separation hypothesis" +architecture: DIRECT +partition_digest: not applicable +atom_or_cell: affine-span MCA rank compiler used in K3 +quantifier: one explicit received line and 31 distinct affine slopes +projection_and_unit: distinct bad slopes on one received line +claimed_bound: "31 > 23" +status: COUNTEREXAMPLE +impact: ARCHITECTURE_ROUTE_CUT +--- + +# Affine-span MCA incidence counterexample v1 + +## Result + +The affine-span transverse MCA compiler in +`experimental/grande_finale.tex`, formerly labelled +`thm:affine-span-mca`, is false even under its printed direction-separation +hypothesis. + +Over `F=GF(1009)`, take + +```text +D={0,...,99}, +C=RS[F,D,1], +(n,K,m,w,s)=(100,1,21,20,1). +``` + +There is one received line with 31 distinct selected slopes such that: + +1. the selected explanations lie in the one-dimensional constant code; +2. every selected maximal agreement support has size exactly 21; +3. every such support is same-support pair-noncontained; +4. `max_(c in C) agr(r_1,c)=20<21=m`; and +5. the theorem's two terms both floor to 23. + +Thus `31>23` refutes the theorem. + +## Construction + +Partition the domain into + +```text +C0={0,...,19}, E={20,...,49}, T={50,...,70}, W={71,...,99}. +``` + +Put `(r_0,r_1)=(0,0)` on `C0`. On the `i`-th point of `E`, for +`1<=i<=30`, put + +```text +(r_0,r_1)=(-i^2,i). +``` + +For each slope `i`, select the zero codeword. It agrees exactly on the +20-point core and the `i`-th point of `E`. + +On `T`, put `r_0=1` and choose 21 distinct fresh nonzero direction values +avoiding `1+i r_1=0` for all `1<=i<=30`. At slope zero, select the constant +one codeword. It agrees exactly on `T`. + +On `W`, choose fresh direction values and choose each base value outside + +```text +{0,1} union {-i r_1:1<=i<=30}. +``` + +The field has ample room for every choice. The verifier uses the first +legal value at each step, so the record is deterministic. + +The direction values are zero 20 times and otherwise pairwise distinct. +Since the code consists of constants, its maximum codeword agreement is +exactly 20. The direction-separation hypothesis therefore holds. + +## Pair noncontainment + +On a zero-explanation support, the 20 core coordinates force any simultaneous +constant explanation pair to be `(0,0)`, while the remaining coordinate has +nonzero direction value. On `T`, the base is constant one but all 21 +direction values are distinct. No selected support is pair-contained. + +## Claimed bound + +At `s=1`, both terms in the compiler are + +```text +floor(100*99/(21*20))=23. +``` + +The selected family has size 31. + +## Proof gap + +Direction separation does force the incident normals on each selected +support to span the two-dimensional parameter space. It does not supply the +proper-subspace occupancy bound used to count incident ordered bases. + +For a zero-explanation support, 20 normals lie on one line and only one is +transverse. There are only `2*20=40` ordered bases, while the rejected proof +charges the support for + +```text +m*w=21*20=420 +``` + +ordered bases. This is the exact failed step. + +## Scope + +The counterexample refutes the MCA affine-span compiler and every active-row +payment that uses its denominator. It does not refute: + +- the ordinary affine-span LIST compiler; +- common-core cancellation; +- the directional Johnson ray compiler; +- codeword-direction gauge equivalence; +- the selector-free all-LineRay error-affine-core set-pair theorem; or +- the target KoalaBear MCA inequality itself. + +The distinction matters for the common-core PR stack: its fixed-core +codeword-affine-span payments inherit the refuted denominator, while its +separate all-LineRay payment through error affine rank three does not. + +## Correct replacement + +The proved replacement is `thm:proper-subspace-mca`. For affine explanation +rank `s`, direction-coset support + +```text +e=min_(b in C) wt(r_1-b), t=n-m, L=max(1,e-t), +``` + +it gives + +```text +|Z| <= floor((1/L) max{ + n_fall_(s+1)/(m (w+1)_rise_(s-1)), + (n-K+s)_fall_(s+1)/(w+1)_rise_s +}). +``` + +The factor `L` is the exact safe repair: pair noncontainment gives one final +transverse normal, while direction-coset distance can raise that count. It +is not replaced by `w` without proof. + +At the first common-core-shortened rows, the corrected compiler pays all +KoalaBear ranks through 9 and Mersenne rank 1 for every `e`. Its next exact +support walls are + +```text +KoalaBear q=10,11,12,13: e>=981108,981153,981861,992852; +Mersenne q=2,3,4,5: e>=981144,981363,984779,1037876. +``` + +The top ranks remain unpaid by this compiler. + +## Full-explanation top-rank split + +The proved lifted-rank gauge dichotomy now resolves the internal structure of +each top-rank cell. If the selected explanations have affine rank `K`, fix an +anchor and let + +```text +V=span{(gamma-gamma_0,c_gamma-c_gamma0)} <= F direct_sum C. +``` + +Then `dim(V)` is `K` or `K+1`. In the rank-`K` branch, `V` is the graph of +a nonzero functional `ell:C->F`, and exactly the gauges `ell(b)=1` drop the +explanation rank to `K-1`. In the rank-`K+1` branch, every gauge retains +rank `K`. Pair noncontainment also forces `r_1 notin C`, so `dim(V)` equals +the affine rank of the selected error vectors. + +Consequently, the corrected compiler at rank `K-1` pays the top-rank +rank-drop branches at + +```text +KoalaBear: e>=992852 when lifted/error rank is 14; +Mersenne-31: e>=1037876 when lifted/error rank is 6. +``` + +The full-lift branches, of error ranks 15 and 7 respectively, do not receive +this payment. Their current high-support suffixes remain `e>=1044239` and +`e>=1044242`, so their middle-support intervals are still open. + +The full-lift residual has a sharper exact formulation. With + +```text +W=C+span{r_1}, +``` + +the selected errors form a full-affine-rank sparse list in one affine coset +of `W`, with unit slope fibers and information-set maximal zero masks. The +complete generalized-weight hierarchy is + +```text +d_1(W)=e, +d_j(W)=N-K+j-1 for 2<=j<=K+1. +``` + +Thus every higher weight is already MDS-sharp. Even at `e=N-K`, the generic +corrected compiler gives `743896698428332665` on KoalaBear and `219426634` +on Mersenne-31, above their respective budgets. Replaying the same weight +hierarchy cannot close the cell; a continuation must exploit structure of +the codimension-one RS extension or improve the row-sharp affine-list count. + +## Replay + +```bash +python3 experimental/verify_mca_affine_span_incidence_counterexample_v1.py +python3 experimental/verify_mca_affine_span_incidence_counterexample_v1_independent.py +python3 experimental/verify_mca_proper_subspace_occupancy_compiler_v1.py +python3 experimental/verify_mca_full_explanation_lifted_rank_gauge_dichotomy_v1.py +``` + +Expected output: + +```text +MCA_AFFINE_SPAN_INCIDENCE_COUNTEREXAMPLE_V1_PASS slopes=31 bound=23 direction_max=20 mutations=4/4 +MCA_AFFINE_SPAN_INCIDENCE_COUNTEREXAMPLE_V1_INDEPENDENT_PASS slopes=31 support_checks=31 field_values=1009 bound=23 +MCA_PROPER_SUBSPACE_OCCUPANCY_COMPILER_V1_PASS zero_normal_cases=616 adjacent=8 regression=471 toy_selections=540 +MCA_FULL_EXPLANATION_LIFTED_RANK_GAUGE_DICHOTOMY_V1_PASS gauges=625 hostile=1 extensions=31 profile=1:5,2:25,3:1 adjacent=2 ceilings=2 +``` diff --git a/experimental/notes/thresholds/mca_full_lift_boundary_anchor_continuation_v1.md b/experimental/notes/thresholds/mca_full_lift_boundary_anchor_continuation_v1.md new file mode 100644 index 000000000..32e74254d --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_boundary_anchor_continuation_v1.md @@ -0,0 +1,60 @@ +# MCA full-lift boundary-anchor continuation v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION. + +## Statement + +Retain the full-lift mean-centered prefix caps and put + +```text +s=floor((e-K)/3), q=e-K-3s, H=e-s-1. +``` + +Let `P_J` be the suffix-minimum Abel profile formed independently from the +cumulative caps through `J`. If `H>=2`, `q>=1`, `2(s+1)=K, +``` + +so restriction injectivity places it on the same affine codeword line. +The total-core line theorem then charges the high union and boundary layer +together by `N-m+1`, leaving the prefix only through `H-1`. + +## Official endpoint + +At Mersenne-31 `e=98230`, + +```text +P_H = 16434744, +P_(H-1) = 15506184, +N-m+1 = 981129, +bound = 16487313, +budget = 16777215, +slack = 289902. +``` + +At `e=98231`, the same theorem gives `17492173`, over budget by `714958`. +That is a proof-method wall, not an unsafe certificate. The Mersenne +full-lift residual interval is now `98231<=e<=1044241`. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_boundary_anchor_continuation_v1.py +python3 -O experimental/verify_mca_full_lift_boundary_anchor_continuation_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_boundary_line_bank_absorption_v1.md b/experimental/notes/thresholds/mca_full_lift_boundary_line_bank_absorption_v1.md new file mode 100644 index 000000000..8025cb9e2 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_boundary_line_bank_absorption_v1.md @@ -0,0 +1,79 @@ +# MCA full-lift boundary line-bank absorption v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION / INTERVAL PAYMENT. + +## Compiler + +Fix a prefix cutoff `h0`. In every exact layer `h043. +``` + +Factor `rad(P)=product_i R_i` geometrically, with component degrees +`delta_i` summing to at most `d`. The characteristic guard excludes a +nontrivial purely inseparable component field of definition in degree at +most 43. + +If `R_i` is not defined over `F(X)`, it has a distinct conjugate. +Every `F(X)`-rational polynomial pair on `R_i` also lies on that +conjugate, so Bezout permits at most `delta_i^2` such pairs. Across all +non-base-field components the loss is at most + +```text +sum_i delta_i^2<=d^2. +``` + +## Retained mass + +For every `2<=d<=43`, + +```text +base-field pairs + >= 7583-(52-d)^2-d^2 + >= 5079. +``` + +At most `d` components share this mass, and the exact minimum of the +largest-component pigeonhole is 132. Applying core incidence to the full +base-field component union gives + +```text +factor points >=126263, +inside exceptions <=3974. +``` + +The 126,263-point conclusion belongs to the union, not to the one +132-section component. Reducible unions remain allowed. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_common_factor_base_field_descent_v1.py +python3 experimental/audit_mca_full_lift_common_factor_base_field_descent_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_common_factor_mass_router_v1.md b/experimental/notes/thresholds/mca_full_lift_common_factor_mass_router_v1.md new file mode 100644 index 000000000..20e5c5c86 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_common_factor_mass_router_v1.md @@ -0,0 +1,70 @@ +# Full-lift common-factor mass router + +## Scope + +This packet strengthens the Mersenne `e=130237` interpolation residual. It +forces near-total received-point concentration on the common factor; it does +not classify the factor or close the support. + +## Full line supply + +At cutoff `65521`, every selected low-core line has inside core at least 807 +and actual total core at most 64796. After 7,582 removals the capped charge +is + +```text +charge=881897, target=15895318, next threshold=2. +``` + +Thus an unsafe family forces a 7,583rd distinct polynomial pair. After that +line the threshold drops to one; no later line is used. + +## Factor capture + +Over the algebraic closure of `F(X)`, let `P` be the full gcd of the nonzero +members of the weight-264 interpolation kernel and put +`d=deg_(Y,Z)P`. The common-factor router gives `1<=d<=52`. + +After division by `P`, the cofactor family has gcd one and `(Y,Z)` degree at +most `52-d`. Two generic cofactors are coprime, so affine Bezout permits at +most `(52-d)^2` selected pairs outside `P=0`. Therefore + +```text +on-factor pairs >= 7583-(52-d)^2 >= 4982. +``` + +## Received-point concentration + +Each captured pair has an inside core of size at least 807, contained in + +```text +S_P={x:P(x,r_0(x),r_1(x))=0}. +``` + +Distinct pair cores intersect in at most five coordinates. If `t` pairs +are captured, incidence Cauchy gives + +```text +|S_P| >= ceil(t*807^2/(807+5(t-1))). +``` + +This expression is increasing in `t`; at the uniform minimum `t=4982`, + +```text +|S_P|>=126188, +130237-|S_P|<=4049. +``` + +Hence every unsafe survivor has a degree-at-most-52 factor relation holding +on at least 96.89% of the inside support and carrying at least 4,982 +degree-five polynomial sections. + +This is not a common core shared by all sections, and the packet does not +assert that `P` is irreducible, rational, or a split pencil. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_common_factor_mass_router_v1.py +python3 experimental/audit_mca_full_lift_common_factor_mass_router_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_common_factor_weighted_degree_bound_v1.md b/experimental/notes/thresholds/mca_full_lift_common_factor_weighted_degree_bound_v1.md new file mode 100644 index 000000000..e45a15978 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_common_factor_weighted_degree_bound_v1.md @@ -0,0 +1,66 @@ +# Full-lift common-factor weighted-degree bound + +## Scope + +This packet sharpens the common interpolation gcd at the first Mersenne +residual `e=130237`. It does not assume the gcd is irreducible and does +not pay either remaining factor branch. + +## Quotient dimension + +Let `P` be the primitive full gcd and put + +```text +w=wdeg_(1,5,5)(P). +``` + +Gauss's lemma makes `P` a polynomial divisor of every kernel member. +Weighted degree is additive under multiplication, so division embeds the +kernel into weighted degree at most `264-w`. The kernel dimension is at +least 938. + +For weighted degree `D`, the exact monomial count is + +```text +M(D)=sum_(s=0)^floor(D/5) (s+1)(D-5s+1). +``` + +The adjacent threshold is + +```text +M(46)=935 < 938 <= 990=M(47). +``` + +Therefore + +```text +w<=217, deg_(Y,Z)(P)<=43. +``` + +## Higher-degree mass + +The degree-one branch is classified separately. If `d>=2`, the existing +cofactor Bezout theorem gives + +```text +on-factor pairs >= 7583-(52-d)^2 >= 5083. +``` + +The size-807 cores and pairwise intersection cap five then give + +```text +factor points + >= ceil(5083*807^2/(807+5*(5083-1))) + = 126266, +exceptions <= 130237-126266 = 3971. +``` + +The full gcd may be a product of lower-degree factors. No component +population or split-pencil conclusion is claimed. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_common_factor_weighted_degree_bound_v1.py +python3 experimental/audit_mca_full_lift_common_factor_weighted_degree_bound_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_core_dichotomy_capped_charge_v1.md b/experimental/notes/thresholds/mca_full_lift_core_dichotomy_capped_charge_v1.md new file mode 100644 index 000000000..b3b5c65dd --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_core_dichotomy_capped_charge_v1.md @@ -0,0 +1,81 @@ +# Full-lift core-dichotomy capped charge + +## Scope + +This packet adds an exhaustive actual-core split to the Mersenne recursive +line bank. It pays `130222<=e<=130225`; it does not certify the adjacent row +unsafe or close the full Mersenne row. + +## High-core branch + +Fix `b_abs=65450`. A selected affine explanation line with actual total +core `g` has at least `g-c` core coordinates inside the gauged direction +support. Two line anchors synchronize every explanation of inside deficit + +```text +h>=e-g+c+K=e-g+11 +``` + +onto the same line. Thus, when `g>=e+10-b_abs`, the exact weighted prefix +through `b_abs` pays the low explanations and one absolute line cap pays the +rest. Across the five endpoint rows needed for payment and wall audit, + +```text +P_e(65450)+(N-m+1) <= 5161307 < 16777215. +``` + +## Capped complementary branch + +If no selected line enters the high branch, every actual core obeys + +```text +g_i<=G_e:=e+9-b_abs. +``` + +Retain the forced lower bounds and greedily spend the common core budget + +```text +S_r=min(rG_e,e+C(r+1,2)c) +``` + +up to the individual ceiling `G_e`. The same convex exchange as in the +lower-aware theorem proves that this maximizes the total removed-line charge. + +At `e=130222,130223`, fourteen threshold-18 lines give + +```text +14*9736-C(14,2)*5 = 135849 > e. +``` + +At `e=130224,130225`, seventy threshold-16 lines give + +```text +70*2041-C(70,2)*5 = 130795 > e. +``` + +## Adjacent wall + +At `e=130226`, the first threshold is 14 and its forced total core is zero. +All later thresholds are no larger. After 14,763 zero-lower-bound peels, + +```text +S_r=545032556=8412*64785+61136, +charge=3199542, +target=13577673, +base=13317279, +next threshold=1. +``` + +The bank no longer forces an actual line. This is a method wall, not an +unsafe certificate. The residual is + +```text +130226<=e<=1044241. +``` + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_core_dichotomy_capped_charge_v1.py +python3 experimental/audit_mca_full_lift_core_dichotomy_capped_charge_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_exact_layer_slot_core_packing_v1.md b/experimental/notes/thresholds/mca_full_lift_exact_layer_slot_core_packing_v1.md new file mode 100644 index 000000000..25e20522b --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_exact_layer_slot_core_packing_v1.md @@ -0,0 +1,107 @@ +# Full-lift exact-layer slot-core packing + +## Scope + +This packet restores the exact-layer owner of every affine-line slot in the +Mersenne full-lift recursive bank. It pays +`130226<=e<=130236`; it does not certify the adjacent support unsafe or close +the full Mersenne row. + +## Exact-layer incidence + +Let a selected affine explanation line contain `lambda>=2` members of one +exact layer `h`, and let `u` be its inside common core. At an inside +coordinate outside that core, the line equation + +```text +r_0+gamma*r_1 = a+gamma*b +``` + +holds for at most one line parameter `gamma`. Every member has at least `h` +inside agreements, so incidence counting in the fixed `e`-coordinate support +gives + +```text +lambda*h <= e+(lambda-1)u, +u >= ceil((lambda*h-e)/(lambda-1)). (EL1) +``` + +This is directly an inside-core lower bound; it spends none of the outside +zero allowance. In this support interval the parent ceiling satisfies +`H>=m`, so every recursive-bank slot has one exact-layer owner and no +cross-layer top slot is present. + +## Eleven support payments + +Retain the core-dichotomy absorption cutoff `65450`. In its complementary +branch each selected line has total-core cap + +```text +G_e=e+9-65450. +``` + +Use the capped lower-aware convex charge, now with (EL1) as the selected +line's lower bound. The following legal cutoffs force the same threshold on +each of the first three selected lines: + +```text +e cutoff lambda EL1 lower u +130226 65516 14 60540 +130227 65516 5 49340 +130228 65517 13 60126 +130229 65517 4 43948 +130230 65518 11 59048 +130231 65518 4 43949 +130232 65519 9 57431 +130233,130234 65520 7 54736 +130235,130236 65521 4 43951 +``` + +Here the printed `lambda` is the forced minimum slot size and `h=cutoff+1` +is the minimum possible exact layer. In this range the right side of (EL1) +is nondecreasing in both variables, so using those minima is conservative. + +Distinct selected lines have pairwise inside-core intersection at most +`c=5`. Hence three selected lines violate support-size packing on every +printed row. The smallest printed lower bound is + +```text +3*43948-C(3,2)*5=131829>130229. +``` + +The high-core branch remains exhaustive and is at most `5161243`, so all +eleven supports are safe under the full-lift route. + +## Adjacent shift-pair wall + +At `e=130237`, cutoff `65521` is legal and has + +```text +prefix=15893203, groups=1933560, base=13961576. +``` + +It forces only size-two affine explanation slots, the shift-pair stratum of +this line bank. Formula (EL1) gives `u=807`, while + +```text +max_s {s*807-C(s,2)*5}=65529e`, `A_h^2>e*c`, and `N-e>m-h>c`, the normalized-direction +Johnson count permits at most `J_h` classes. Every class and a repeated +anchor lie on one nonzero affine codeword line, and outside-core packing +caps that line by `Q_h`. Thus + +```text +|Z|<=F_e+|T|, +F_e=P_h0(e)+sum_(h=h0+1)^H D_h, +``` + +where `T` is the synchronized top line. + +If `F_e+(N-m+1)<=B`, this pays directly. Otherwise unsafety forces +`L_e=B-F_e+1` top members and common core + +```text +g_e=ceil((L_e*m-N)/(L_e-1)). +``` + +At least `u_e=g_e-c` core coordinates lie inside the gauged direction +support. Two top anchors absorb every assigned explanation of deficit at +least `a_e=e-u_e+K` into the same line. One punctured ordinary-Johnson cap +`M_e` at outside agreement `m-a_e+1` pays the lower explanations whenever + +```text +e*M_e+(N-m+1)<=B. +``` + +## Official interval + +At Mersenne-31, the fixed cutoff `h0=65200` pays + +```text +98232<=e<=101155. +``` + +The direct branch ends at `e=101149`; the final six supports use absorption. +At `e=101155`, + +```text +F_e = 16667033, +L_e = 110183, +g_e = 67446, +M_e = 28, +final bound = 3813469, +slack = 12963746. +``` + +At adjacent `e=101156`, the fixed-cutoff charge is `16951223`, above budget +by `174008`. This is a method wall, not an unsafe certificate. The Mersenne +full-lift residual interval becomes `101156<=e<=1044241`. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.py +cc -O2 -std=c11 -Wall -Wextra -Werror \ + experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.c \ + -o /tmp/verify_m31_boundary_stack +/tmp/verify_m31_boundary_stack +``` + +The C replay checks all 2,925 rows from `98232` through the adjacent wall. diff --git a/experimental/notes/thresholds/mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.md b/experimental/notes/thresholds/mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.md new file mode 100644 index 000000000..ee36523bd --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.md @@ -0,0 +1,67 @@ +# MCA full-lift fixed-cutoff q2 anchor repair v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION / SUPPORT PAYMENT. + +## Endpoint + +At Mersenne-31 support `e=101156`, + +```text +(s,q,H)=(33716,2,67439), +cutoff=65258, +F=16895280, +D1=284224, +D2=258385. +``` + +Here `F` is the fixed-cutoff prefix plus every coarse boundary-class charge, +and `D1,D2` are the charges of exact deficits `H,H-1`. The residue identity + +```text +e-2s-(s+2)=K +``` + +allows two top anchors to synchronize both boundary layers. + +## Five cases + +If the top union has at least two members, remove `D1,D2` from `F`. +Unsafety would force `424545` members on the resulting line, hence common +core `67452=m-2`. Core absorption then gives + +```text +101156*28+981129=3813497. +``` + +With exactly one top member, two first-boundary members synchronize that +layer; its outside agreement `15` gives line cap `94742`. With no top +member, an intersecting pair of first-boundary missed sets synchronizes the +layer, while the alternative pairwise-disjoint family has size at most +`floor(101156/33717)=3`. + +The five exhaustive charges are + +```text +3813497, 16705799, 16611058, 16705798, 16611059. +``` + +Their maximum is below budget by `71416`. Thus `e=101156` is safe. + +## Scope + +At adjacent `e=101157`, the residue resets to zero. This theorem neither +applies there nor supplies an unsafe certificate. The residual interval is +`101157<=e<=1044241`. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py +python3 experimental/audit_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py +``` + +The primary verifier reconstructs all `65,258` prefix caps, all `2,181` +boundary charges, the unsafe-core threshold, and all five cases. The audit +recomputes the endpoint constants without importing the primary verifier. diff --git a/experimental/notes/thresholds/mca_full_lift_interpolation_common_factor_router_v1.md b/experimental/notes/thresholds/mca_full_lift_interpolation_common_factor_router_v1.md new file mode 100644 index 000000000..c032d5958 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_interpolation_common_factor_router_v1.md @@ -0,0 +1,83 @@ +# Full-lift interpolation common-factor router + +## Scope + +This packet treats the first Mersenne full-lift residual support `e=130237`. +It pays the coprime interpolation branch and routes every unsafe survivor to +a positive-degree common interpolation factor. It does not classify that +factor or close the support. + +## Forced polynomial-pair cores + +Retain cutoff `b=65521` and the complementary actual-core cap `64796`. +Every selected affine explanation line belongs to an exact layer +`h>=65522` and has at least two members. Exact-layer incidence therefore +gives inside common core at least + +```text +2*65522-130237=807. +``` + +The lower bound is conservative because it is nondecreasing in both the +actual layer and the actual line size. Write the selected line as +`c_gamma=a+gamma*b`; its inside core is exactly where the received pair is +`(r_0,r_1)=(a,b)`. + +After 2,704 removed lines, the capped convex envelope has + +```text +core budget=18416037, +full caps=253, +remainder=44692, +charge=132203, +target=16645012. +``` + +With `base=13961576` and `groups=1933560`, the next strict pigeonhole +threshold is still two. Thus unsafety forces a 2,705th distinct +polynomial-pair core. + +## Interpolation kernel + +On the gauged `e`-coordinate support, give `(X,Y,Z)` weights `(1,5,5)` and +let `I_264` be the polynomials of weighted degree at most 264 that vanish at +all received points `(x,r_0(x),r_1(x))`. The ambient monomial count is + +```text +sum_(s=0)^52 (s+1)(264-5s+1)=131175, +dim I_264>=131175-130237=938. +``` + +For every selected pair `(a,b)` and every `Q in I_264`, the polynomial +`Q(X,a(X),b(X))` has degree at most 264 and vanishes on at least 807 distinct +core coordinates. It is therefore identically zero, so all selected pairs +are common `F(X)`-rational zeros of the interpolation kernel. + +## Coprime branch + +Over the algebraic closure of `F(X)`, suppose the kernel has no common factor +of positive `(Y,Z)` degree. Two generic kernel members are then coprime. +Each has total `(Y,Z)` degree at most `floor(264/5)=52`, so affine Bezout +permits at most + +```text +52^2=2704 +``` + +common zeros, counted with multiplicity. This contradicts the 2,705 +distinct pairs forced by the bank. + +Hence every unsafe survivor has a common factor of positive `(Y,Z)` degree +in `I_264` over the algebraic closure of `F(X)`. A factor depending only on +`X` is a unit over `F(X)` and does not qualify. + +This is the exact algebraic residual. A further theorem must classify its +ruled components or charge their line/core mass. In particular, this packet +does not assert that every common factor is automatically a split pencil. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_interpolation_common_factor_router_v1.py +python3 experimental/audit_mca_full_lift_interpolation_common_factor_router_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_joint_core_charge_peeling_v1.md b/experimental/notes/thresholds/mca_full_lift_joint_core_charge_peeling_v1.md new file mode 100644 index 000000000..13f5664d9 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_joint_core_charge_peeling_v1.md @@ -0,0 +1,99 @@ +# Full-lift joint-core charge peeling + +## Scope + +This packet strengthens the recursive Mersenne-31 affine-line peeling +route. It pays `130199<=e<=130219`; it does not certify the adjacent row +unsafe or close the full Mersenne row. + +## Joint core budget + +For `r` distinct peeled parameterized explanation lines, let `g_i` be +their actual total common-core sizes and `I_i` their parts inside the fixed +`e`-coordinate gauged direction support. Distinct codeword pairs give + +```text +|I_i intersect I_j| <= c=K-1. +``` + +Each line direction is a nonzero degree-` 130219. +``` + +At adjacent `e=130220`, thresholds `20,16,...,16` for the first 43 lines +give only + +```text +15811+42*2041-C(43,2)*5 = 97018. +``` + +The joint allowance at `r=43` is `134950=2(m-1)+44`, so the joint charge +jumps to `1962895` and the next threshold falls to `13`, with zero forced +core. Later thresholds cannot increase. This is a method wall, not an +unsafe certificate. The residual is + +```text +130220<=e<=1044241. +``` + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.py +python3 experimental/audit_mca_full_lift_joint_core_charge_peeling_v1.py +cc -O2 -std=c11 -Wall -Wextra -Werror \ + experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.c \ + -o /tmp/verify_m31_joint_charge +/tmp/verify_m31_joint_charge +``` diff --git a/experimental/notes/thresholds/mca_full_lift_linear_factor_projective_star_router_v1.md b/experimental/notes/thresholds/mca_full_lift_linear_factor_projective_star_router_v1.md new file mode 100644 index 000000000..a606f74b6 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_linear_factor_projective_star_router_v1.md @@ -0,0 +1,76 @@ +# Full-lift linear-factor projective-star router + +## Scope + +This packet classifies the degree-one branch of the Mersenne `e=130237` +common interpolation factor. It routes the branch to an `F`-rational +projective star; it does not pay that star or treat factor degree at least +two. + +## Polynomial-section parameter + +Write a primitive linear factor over the algebraic closure as + +```text +P=A(X)Y+B(X)Z+C(X), gcd(A,B,C)=1. +``` + +The common-factor mass theorem supplies at least 4,982 distinct pairs +`(a_i,b_i) in F[X]_<6^2` satisfying `P(X,a_i,b_i)=0` identically. + +Subtracting two section equations and removing `gcd(A,B)` gives + +```text +(a_i,b_i)=(a_0+B*t_i,b_0-A*t_i), +deg t_i<=s=5-max(deg A,deg B). +``` + +Primitivity is essential here: one section shows that `gcd(A,B)` also +divides `C`, so it is a unit. In particular `deg A,deg B<=5`. + +## Johnson exclusion + +Since `A,B` are coprime, they do not vanish simultaneously on the evaluation +domain. The received pair induces a scalar extension-field word `tau` such +that every `t_i` agrees with `tau` on its at-least-807-point core. + +For degree `s`, the ordinary constant-block Johnson cap is + +```text +J_s=floor(130237*(807-s)/(807^2-130237*s)). +``` + +The exact values are + +```text +s 0 1 2 3 4 5 +J_s 161 201 268 401 802 1632032. +``` + +If either `A` or `B` is nonconstant, then `s<=4`, contradicting +`4982>802`. Hence `A,B` are constants and `deg C<=5`. + +## Projective star + +The center is `F`-rational despite the initial algebraic-closure +factorization. If `A!=0`, two distinct captured `F`-rational pairs give + +```text +gamma_*=B/A in F, +c_*=-C/A=a_i+gamma_* b_i in RS_6. +``` + +All captured affine explanation lines pass through `(gamma_*,c_*)`. If +`A=0`, every captured pair has the same direction codeword `b_*=-C/B`; this +is the projective center at slope infinity. + +Thus the degree-one branch is exactly an `F`-rational projective-star shape. +This identifies the relevant primitive-star obstruction but does not prove +its population bound. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_linear_factor_projective_star_router_v1.py +python3 experimental/audit_mca_full_lift_linear_factor_projective_star_router_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_lower_aware_joint_core_charge_v1.md b/experimental/notes/thresholds/mca_full_lift_lower_aware_joint_core_charge_v1.md new file mode 100644 index 000000000..497265abf --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_lower_aware_joint_core_charge_v1.md @@ -0,0 +1,77 @@ +# Full-lift lower-aware joint-core charge + +## Scope + +This packet strengthens the recursive Mersenne-31 affine-line peeling +charge by retaining every forced total-core lower bound. It pays +`e=130220,130221`; it does not certify the adjacent row unsafe or close the +full Mersenne row. + +## Majorization envelope + +For `r` previously peeled lines, let `g_i` be the actual total-core sizes +and `ell_i<=g_i` the lower bounds forced when those lines were selected. +The preceding joint-core theorem gives + +```text +0<=ell_i<=g_i<=m-1, +sum_i g_i<=S_r:=min(r(m-1),e+C(r+1,2)c). +``` + +Sort the lower bounds decreasingly. Starting from that vector, spend all +available excess `S_r-sum ell_i` by filling the first coordinate to `m-1`, +then the second, and so on; call the result `x`. Since + +```text +f(g)=(N-g)/(m-g)=1+(N-m)/(m-g) +``` + +is increasing and convex, an exchange from a smaller nonterminal coordinate +to a larger one cannot reduce the sum. Therefore + +```text +sum_i f(g_i) <= sum_i f(x_i). +``` + +The floor of the right side is a valid charge for the removed lines. Unlike +the preceding endpoint envelope, it cannot erase already forced lower bounds +by moving their mass to unrelated coordinates. + +## Exact payment + +At both new supports, 37 removed lines have lower-bound runs + +```text +15816*4, 2046*33. +``` + +The maximizing allocations and charges are + +```text +e=130220: 18769,15816*3,2046*33; S_37=133735; charge=609, +e=130221: 18770,15816*3,2046*33; S_37=133736; charge=609. +``` + +One final threshold `20` is forced. The 38 inside-core lower bounds then +have runs `15811*5,2041*33`, and + +```text +5*15811+33*2041-C(38,2)*5 = 142893 > e. +``` + +At adjacent `e=130222`, the compiler reaches 288 removed lines. Its +maximizing allocation is `67453*5,1037,0*282`, with charge `4910044`. +The target `11867171` is below the certified base `12148280`, so the line +bank no longer forces another line. This is a method wall, not an unsafe +certificate. The residual is + +```text +130222<=e<=1044241. +``` + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_lower_aware_joint_core_charge_v1.py +python3 experimental/audit_mca_full_lift_lower_aware_joint_core_charge_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_mean_centered_global_line_profile_v1.md b/experimental/notes/thresholds/mca_full_lift_mean_centered_global_line_profile_v1.md new file mode 100644 index 000000000..bc5e68e92 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_mean_centered_global_line_profile_v1.md @@ -0,0 +1,61 @@ +# MCA full-lift mean-centered global-line profile v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION. + +The cross-layer global-line theorem stopped when the coarse Johnson cap at +`H=e-floor((e-K)/3)-1` changed sign. The proved mean-centered Gram cap is +legal at this boundary. Use the full cumulative prefix profile: + +```text +C_h = punctured Johnson cap, when its denominator is positive; +C_h = mean-centered Gram cap, otherwise when its hypotheses hold; +B_h = min_(h<=v<=H) C_v. +``` + +If `A_H=m-H>K-1`, the ordinary set-system proof applies even when `e>=d`: +after puncturing the direction support, every selected explanation supplies +an `A_h`-block, and two distinct degree-`=2`, total-core packing and the inside-support correction give + +```text +g_r = max(0,ceil((lambda_r*m-N)/(lambda_r-1))), +u_r = max(g_r-c,0), +U_(r+1) = min(U_r,e-u_r+K-1). +``` + +Remove every assigned slope on that affine line and repeat. The next +selected line is distinct even when `U_(r+1)=U_r`. + +## Core-packing invariant + +Write a peeled line as `c_gamma=a_i+gamma*b_i`. Its common core is the set +where `(r_0,r_1)=(a_i,b_i)`. For two distinct lines, at least one codeword +difference `a_i-a_j` and `b_i-b_j` is nonzero, so the two cores meet in at +most `K-1=5` coordinates. Their inside cores all lie in the same +`e`-coordinate direction support. Hence + +```text +sum_i u_i-C(r,2)*5 <= e. +``` + +A strict violation contradicts unsafety. Otherwise, if the recursion +lowers the residual ceiling into a defined suffix-minimum weighted prefix, +that prefix plus the peeled-line charges proves safety. + +## Exact Mersenne interval + +Start at cutoff `65304`. If its first boundary layer fails a guard, use +the least legal cutoff plus two guard layers. Exact replay checks every +prefix and line-bank guard and proves + +```text +124806<=e<=130198. +``` + +The branch census is: + +```text +paid supports: 5393 +weighted prefix: 3837 +core packing: 1556 +direct line bank: 0 +maximum peels: 5 +line counts 1..5: 3534,397,1397,59,6 +``` + +The first packing termination is `e=128340`: + +```text +62822+66574-5 = 129391 > 128340. +``` + +At the last paid support `e=130198`, five forced lines give + +```text +37718+33617+28204+20729+12942-10*5 + = 133160 > 130198. +``` + +At adjacent `e=130199`, nine legal peels only give packing lower bound +`126052`. The next residual target is `7947054`, below base charge +`8154082`, so the pigeonhole numerator is nonpositive and cannot force +another line. This is a method wall, not an unsafe certificate. The +Mersenne residual becomes + +```text +130199<=e<=1044241. +``` + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.py +python3 experimental/audit_mca_full_lift_recursive_line_peeling_core_packing_v1.py +cc -O2 -std=c11 -Wall -Wextra -Werror \ + experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.c \ + -o /tmp/verify_m31_recursive_line_peeling +/tmp/verify_m31_recursive_line_peeling +``` diff --git a/experimental/notes/thresholds/mca_full_lift_residue_zero_core_absorption_v1.md b/experimental/notes/thresholds/mca_full_lift_residue_zero_core_absorption_v1.md new file mode 100644 index 000000000..b1cf46bf4 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_residue_zero_core_absorption_v1.md @@ -0,0 +1,59 @@ +# MCA full-lift residue-zero core absorption v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION / SUPPORT PAYMENT. + +## Statement and proof mechanism + +At Mersenne-31 `e=98232`, suppose the selected family is unsafe. The +residue-zero direction router forces at least `343071` slopes on one affine +codeword line and a total common agreement core of size at least +`67452=m-2`. + +The line direction is a nonzero degree-`<6` codeword. Outside the gauged +direction support, every common-core coordinate is one of its at most five +zeros. Thus at least `67447` core coordinates lie inside the direction +support. + +For any assigned explanation of outside deficit `h`, ownership supplies at +least `h` inside agreements. If + +```text +h>=98232-67447+6=30791, +``` + +those inside agreements meet the line's inside core in at least six +coordinates. Two top anchors and restriction injectivity put the explanation +on the same affine line, at its actual slope parameter. All such slopes are +therefore charged once by `N-m+1=981129`. + +The remaining assigned explanations have deficit at most `30790`, hence +outside agreement at least `36664`. The ordinary punctured Johnson cap is + +```text +floor(950350*(36664-5)/(36664^2-950350*5))=26. +``` + +Using the deliberately crude owner cap `e` on those explanations gives + +```text +|Z|<=98232*26+981129=3535161<16777215. +``` + +This contradicts unsafety, with exact margin `13242054`. + +## Consequence and nonclaims + +Mersenne-31 full-lift support `e=98232` is safe. The successor fixed-cutoff +boundary-stack theorem extends this payment through `e=101155`. This node +alone does not pay `e=98233`, close the deployed row, or provide an adjacent +unsafe certificate. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_residue_zero_core_absorption_v1.py +python3 -O experimental/verify_mca_full_lift_residue_zero_core_absorption_v1.py +python3 experimental/audit_mca_full_lift_residue_zero_core_absorption_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_residue_zero_direction_router_v1.md b/experimental/notes/thresholds/mca_full_lift_residue_zero_direction_router_v1.md new file mode 100644 index 000000000..bc13763b2 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_residue_zero_direction_router_v1.md @@ -0,0 +1,76 @@ +# MCA full-lift residue-zero direction router v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION / STRUCTURAL ROUTER. + +## Statement + +Let `D` be the exact deficit-`H` boundary layer on direction support `E`, +`|E|=e`, and put `c=K-1` and `A=2H-e`. Assume + +```text +A>0, A^2>e*c, N-e>m-H>c. +``` + +Fixing an anchor in `D`, every other member determines a nonzero normalized +codeword direction agreeing with the gauged direction on at least `A` +coordinates. Distinct directions have intrinsic agreement sets meeting in +at most `c` coordinates. Hence the number of direction classes is at most + +```text +J=floor(e(A-c)/(A^2-e*c)). +``` + +Every class together with the anchor is one affine codeword line. Its +outside common core is contained in the zero set of a nonzero degree-`=343071`. If `g` is the top line's +total common core, line packing + +```text +|T|(m-g)<=N-g +``` + +forces `g>=67452=m-2`. + +## Nonclaims + +This router alone does not prove safety or unsafety at `e=98232`. Its +near-maximal-core terminal is discharged by the successor common-core +absorption theorem, which pays this support without classifying the private +coordinates individually. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_residue_zero_direction_router_v1.py +python3 -O experimental/verify_mca_full_lift_residue_zero_direction_router_v1.py +python3 experimental/audit_mca_full_lift_residue_zero_direction_router_v1.py +``` diff --git a/experimental/notes/thresholds/mca_full_lift_top_third_common_core_payment_v1.md b/experimental/notes/thresholds/mca_full_lift_top_third_common_core_payment_v1.md new file mode 100644 index 000000000..d4d92f52a --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_top_third_common_core_payment_v1.md @@ -0,0 +1,52 @@ +# MCA full-lift top-third common-core payment v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION. + +The top-third affine-line theorem remains valid for `e>=d`. The new issue +is that the highest possible outside deficit is `m` and some exact layers +have at most `K-1` outside agreements. + +On an affine explanation line, a coordinate agreeing for every parameter is +a simultaneous base/direction agreement for one codeword pair. Pair +noncontainment limits this total common core to `m-1`. Off the core, +agreement sets are disjoint, so every exact line layer has + +```text +L <= N-m+1. +``` + +When the outside agreement `A_r` exceeds `K-1`, the sharper outside +zero-core cap remains available. The piecewise cap is + +```text +Q_r = N-m+1 if A_r<=K-1, +Q_r = floor((N-e-(K-1))/(A_r-(K-1))) otherwise. +``` + +Combining these top-third layers with the Johnson prefix gives + +```text +KoalaBear: e<=95943, endpoint bound 27414298; +Mersenne-31: e<=67452, endpoint bound 16266965. +``` + +KoalaBear `e=95944` has prefix denominator `-1037`. Mersenne +`e=67453` has valid bound `17248067`, over budget by `470852`. The +remaining intervals are + +```text +KoalaBear: 95944 <= e <= 1044238 +Mersenne-31: 67453 <= e <= 1044241. +``` + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_top_third_common_core_payment_v1.py +``` + +The verifier checks the total-core cap on a sharp finite model, direct +endpoint floor sums, uniform KoalaBear prefix maxima, all five new Mersenne +cells, both adjacent stops, and hostile mutations. diff --git a/experimental/notes/thresholds/mca_full_lift_top_third_global_line_payment_v1.md b/experimental/notes/thresholds/mca_full_lift_top_third_global_line_payment_v1.md new file mode 100644 index 000000000..72ff59383 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_top_third_global_line_payment_v1.md @@ -0,0 +1,77 @@ +# MCA full-lift top-third global-line payment v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION. + +The preceding full-lift theorem puts each exact top-third deficit layer on +an affine explanation line. The triple-overlap argument is stronger: it +synchronizes the lines across all those layers. + +Put + +```text +s=floor((e-K)/3), H=e-s-1, u=floor(e/2). +``` + +If explanations have missed-coordinate allowances `r_i<=s`, then every +three inside agreement sets intersect in at least + +```text +e-(r_1+r_2+r_3) >= e-3s >= K +``` + +coordinates. Restriction injectivity therefore identifies their normalized +pair directions. The entire high-deficit union lies on one affine codeword +line, not one line per layer. + +Pair noncontainment limits the total common agreement core of this line to +`m-1`. Off that core, agreement sets for distinct line parameters are +disjoint. Thus the whole high union costs only + +```text +N-m+1 +``` + +once. Combining this with the punctured-Johnson prefix gives + +```text +|Z| <= (e-1) J_floor(e/2) + J_H + (N-m+1). +``` + +## Exact walls + +Exact integer scans give + +```text +KoalaBear: e <= 95943, endpoint bound 6336049 +Mersenne-31: e <= 97908, endpoint bound 6682339 +``` + +The largest Mersenne bound is `6683188` at `e=97907`. At the adjacent +supports the `H`-prefix Johnson denominators are `-1037` and `-965`. +Consequently the residual intervals are + +```text +KoalaBear: 95944 <= e <= 1044238 +Mersenne-31: 97909 <= e <= 1044241 +``` + +The adjacent failures are failures of this proof profile, not unsafe +certificates. No deployed v4 ledger atom moves. + +## Provenance and replay + +The source theorem, contract, primary verifier, and independent audit are +pinned at +`AllenGrahamHart/rs-mca-prize-dag@62ef043e0`. This repository replay is +self-contained: + +```bash +python3 experimental/verify_mca_full_lift_top_third_global_line_payment_v1.py +python3 -O experimental/verify_mca_full_lift_top_third_global_line_payment_v1.py +``` + +It scans every support in both newly paid intervals using exact integer +arithmetic, reconstructs both endpoint and adjacent records, checks a sharp +finite common-core model, and rejects four hostile mutations. diff --git a/experimental/notes/thresholds/mca_full_lift_two_boundary_layer_continuation_v1.md b/experimental/notes/thresholds/mca_full_lift_two_boundary_layer_continuation_v1.md new file mode 100644 index 000000000..21eda5590 --- /dev/null +++ b/experimental/notes/thresholds/mca_full_lift_two_boundary_layer_continuation_v1.md @@ -0,0 +1,76 @@ +# MCA full-lift two-boundary-layer continuation v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION. + +## Statement + +Retain the one-boundary notation + +```text +s=floor((e-K)/3), q=e-K-3s, H=e-s-1. +``` + +Assume `q=2`, `H>=3`, `2(s+2)K-1`, and the parent prefix +hypotheses through `H`. Put + +```text +Q=floor((N-e-(K-1))/(m-H-(K-1))), +D=floor(e/(s+1)). +``` + +Then + +```text +|Z| <= max{ + P_(H-2)+(N-m+1), + P_(H-1)+Q+1, + P_(H-1)+2, + P_(H-1)+Q, + P_(H-1)+D +}. +``` + +## Proof mechanism + +If the top-third union has at least two members, two anchors synchronize +both boundary layers because the worst mixed triple intersection is +`e-s-s-(s+2)=K`. If it has one member, two first-boundary members synchronize +that layer; the top member is charged separately and the boundary line uses +the sharper outside-core cap `Q`. + +If the top union is empty, choose exact size-`H` inside agreement sets for +the first boundary layer. If two missed sets intersect, that one repeated +miss raises every fixed-pair triple intersection from `K-1` to `K`, so the +whole layer is an outside-core line. Otherwise all missed sets are pairwise +disjoint and there are at most `D` of them. + +## Official endpoint + +At Mersenne-31 `e=98231`, + +```text +P_(H-2) = 15505282, +P_(H-1) = 16433719, +N-m+1 = 981129, +Q = 484, +D = 3. +``` + +The five cases are + +```text +16486411, 16434204, 16433721, 16434203, 16433722. +``` + +Their maximum has slack `290804` below budget `16777215`. At `e=98232`, +the residue is `q=0`, so this theorem stops without making an unsafe claim. +The Mersenne full-lift residual interval is `98232<=e<=1044241`. + +## Replay + +```bash +python3 experimental/verify_mca_full_lift_two_boundary_layer_continuation_v1.py +python3 -O experimental/verify_mca_full_lift_two_boundary_layer_continuation_v1.py +``` diff --git a/experimental/notes/thresholds/mca_sparse_direction_mean_centered_gram_profile_v1.md b/experimental/notes/thresholds/mca_sparse_direction_mean_centered_gram_profile_v1.md new file mode 100644 index 000000000..aebf91a81 --- /dev/null +++ b/experimental/notes/thresholds/mca_sparse_direction_mean_centered_gram_profile_v1.md @@ -0,0 +1,63 @@ +# Sparse-direction mean-centered Gram profile + +## Status + +PROVED, field-general, exact finite arithmetic. + +## Theorem + +For equal-size `A`-blocks in an `n`-set with intersections at most `c`, put + +```text +g=nc-A^2, +T=(n-A)^2-(n-1)g. +``` + +If `g>=0`, `2A^2>=nc`, and `T>0`, then mean-centering the incidence columns +gives + +```text +L <= floor((n-1)n^2(A-c)/(A*T)). +``` + +The centered Gram matrix is PSD of rank at most `n-1`. The square on its +off-diagonal interval lies below an endpoint chord with nonpositive slope; +PSD positivity and trace-rank give the formula. + +For the sparse-direction deficit profile, use the Johnson cap where its +denominator is positive and the mean-centered cap afterward. Since raw +caps need not be monotone, replace them by the proved suffix closure + +```text +B_h=min_(h<=v<=e) C_v +``` + +before applying `floor(e/h)` owner weights. + +## Exact walls + +```text +KoalaBear: e<=64047, profile 181731868; +Mersenne-31: e<=65454, profile 16101127. +``` + +The next KoalaBear endpoint has `T=-1499457466`. The next Mersenne profile +is legal but equals `17120123`, over budget by `342908`. + +The full-lift residual intervals become + +```text +KoalaBear: 64048<=e<=1044238; +Mersenne: 65455<=e<=1044241. +``` + +## Audit + +`experimental/verify_mca_sparse_direction_mean_centered_gram_profile_v1.py` +checks all 46 newly paid supports, both adjacent records, a finite block +control, and two hostile mutations. + +## Nonclaims + +No adjacent cell or official row is closed. A negative denominator or an +over-budget upper bound is not an unsafe certificate. diff --git a/experimental/notes/thresholds/mca_sparse_direction_near_johnson_gram_rank_v1.md b/experimental/notes/thresholds/mca_sparse_direction_near_johnson_gram_rank_v1.md new file mode 100644 index 000000000..d303cb197 --- /dev/null +++ b/experimental/notes/thresholds/mca_sparse_direction_near_johnson_gram_rank_v1.md @@ -0,0 +1,65 @@ +# Sparse-direction near-Johnson centered-Gram payment + +## Status + +PROVED, field-general, exact finite arithmetic. + +## List lemma + +For equal-size `A`-blocks in an `n`-set with pairwise intersections at most +`c`, put + +```text +g=nc-A^2>=0, +G=(A-c)^2-cg. +``` + +When `G>0`, the centered incidence Gram matrix gives + +```text +L <= floor(n*A*(A-c)/G). +``` + +The key exact rank improvement is `rank(BB^T-cJ)<=rank(B)<=n`: equal row +sums put the all-ones vector inside `col(B)`. Trace-rank, Cauchy incidence, +and the integer inequality `delta^2<=c*delta` complete the proof. + +## MCA compiler + +After puncturing a gauged direction support of size `e`, split transformed +explanations at deficit `u=floor(e/2)`. The low-deficit count has the +ordinary Johnson cap `J_u`; all remaining explanations own one slope. If +`Q_e` is the centered-Gram cap at agreement `m-e`, then + +```text +|Z| <= (e-1)J_u+Q_e. +``` + +## Exact walls + +```text +KoalaBear: e<=64037, bound 198047217; +Mersenne-31: e<=65418, bound 16759641. +``` + +At KoalaBear `e=64038`, the Gram denominator is `-36911`. At Mersenne +`e=65419`, it remains positive, but the valid bound `18212004` exceeds the +budget `16777215`. + +The full-lift residual intervals become + +```text +KoalaBear: 64038<=e<=1044238; +Mersenne: 65419<=e<=1044241. +``` + +## Audit + +`experimental/verify_mca_sparse_direction_near_johnson_gram_rank_v1.py` +checks all 311 newly paid supports, both adjacent records, a rational replay, +an explicit finite block control, and two hostile mutations. + +## Nonclaims + +No adjacent cell or official row is closed. A negative Gram denominator or +an over-budget upper bound is not an unsafe certificate. diff --git a/experimental/notes/thresholds/mca_sparse_direction_punctured_johnson_profile_v1.md b/experimental/notes/thresholds/mca_sparse_direction_punctured_johnson_profile_v1.md new file mode 100644 index 000000000..94b4b5769 --- /dev/null +++ b/experimental/notes/thresholds/mca_sparse_direction_punctured_johnson_profile_v1.md @@ -0,0 +1,62 @@ +# Sparse-direction punctured Johnson MCA profile + +## Status + +PROVED, field-general, exact finite arithmetic. + +## Statement + +After a codeword direction gauge with residual support `E`, `|E|=e=984668, endpoint denominator 1218, + endpoint bound 4607583 <= 274980728111395087. + +Mersenne-31 K=6: + e<=65236, j=R-e>=983340, endpoint denominator 2794, + endpoint bound 2605443 <= 16777215. +``` + +The adjacent denominators are `-5924` and `-1636`. They mark failure of +this Johnson proof, not unsafe rows. + +Combined with the high-support proper-subspace walls, the full-lift +top-rank residual intervals are now + +```text +KoalaBear: 63909<=e<=1044238; +Mersenne: 65237<=e<=1044241. +``` + +## Audit + +`experimental/verify_mca_sparse_direction_punctured_johnson_profile_v1.py` +scans all 129,144 paid official supports exactly, reconstructs both adjacent +walls, independently checks the profile coarsening on two synthetic rows, +and rejects hostile constant mutations. It uses standard-library integer +arithmetic and negligible memory. + +## Nonclaims + +This does not pay any support after the displayed walls, prove Johnson +sharpness, or close either official MCA row. diff --git a/experimental/notes/thresholds/mca_sparse_direction_terminal_deficit_line_payment_v1.md b/experimental/notes/thresholds/mca_sparse_direction_terminal_deficit_line_payment_v1.md new file mode 100644 index 000000000..0346ee64e --- /dev/null +++ b/experimental/notes/thresholds/mca_sparse_direction_terminal_deficit_line_payment_v1.md @@ -0,0 +1,72 @@ +# MCA sparse-direction terminal-deficit line payment v1 + +## Status + +PROVED / EXACT FINITE CALIBRATION. + +This packet strengthens only the exact outside-deficit `h=e` layer of the +field-general sparse-direction profile. It does not prove an official row +or turn failure of the adjacent calculation into an unsafe certificate. + +## The structural cap + +Use the codeword gauge + +```text +r_1=b+q, E=supp(q), |E|=e, +N=R+K, m=d+K, n=N-e, +A=m-e, c=K-1. +``` + +An explanation of exact outside deficit `e` has exactly `A` outside +agreements. Owning a selected slope therefore forces agreement at every +coordinate of `E`. If `e>=K`, restriction to `E` is injective on +degree-`=K`, any three +explanations share at least `K` exceptional agreements. Restriction +injectivity synchronizes all normalized pair differences, so the entire +exact layer lies on one affine codeword line. + +With `c=K-1` and `n=N-e`, outside-core packing gives + +```text +L_r <= floor((n-c)/(m-e+r-c)). +``` + +Take all layers `0<=r<=floor((e-K)/3)` this way. The remaining lower +deficits retain the positive punctured-Johnson cumulative profile. A +uniform two-threshold estimate gives + +```text +prefix <= (e-1)J_floor(e/2)+J_H, +H=e-floor((e-K)/3)-1. +``` + +On both official rows, conservative endpoint substitution proves +`J_floor(e/2)<=31` and `J_H<=47` for every `e=d` or prove either deployed row. + +## Replay + +```bash +python3 experimental/verify_mca_sparse_direction_top_third_affine_line_payment_v1.py +``` + +The verifier checks the endpoint indices, raw Johnson fractions, grouped +floor sums, exact row comparisons, a sharp triple-overlap model, and hostile +mutations. diff --git a/experimental/scripts/audit_kb_mca_rank11_fixed_endpoint_router_v1.py b/experimental/scripts/audit_kb_mca_rank11_fixed_endpoint_router_v1.py new file mode 100755 index 000000000..846f8f4e5 --- /dev/null +++ b/experimental/scripts/audit_kb_mca_rank11_fixed_endpoint_router_v1.py @@ -0,0 +1,150 @@ +#!/usr/bin/env python3 +"""Independent arithmetic and finite-field audit of the fixed-endpoint router.""" + +from __future__ import annotations + +from math import gcd + + +N = 2_097_152 +K = 1_048_576 +M = 1_116_048 +W = 67_472 +S = 10 +NEAR = 134_944 +BUDGET = 274_980_728_111_395_087 +RESOURCE = 106_618_568_137_036_225_644 + + +def choose(n: int, r: int) -> int: + """Independent multiplicative binomial implementation with gcd cancellation.""" + if r < 0 or r > n: + return 0 + r = min(r, n - r) + numerator = list(range(n - r + 1, n + 1)) + denominator = list(range(1, r + 1)) + for j, den in enumerate(denominator): + value = den + for i, num in enumerate(numerator): + factor = gcd(num, value) + if factor > 1: + numerator[i] //= factor + value //= factor + if value == 1: + break + if value != 1: + raise AssertionError(f"uncancelled denominator {j}: {value}") + result = 1 + for value in numerator: + result *= value + return result + + +def exact_floor_max(tau: int) -> tuple[int, int, int]: + d = W - tau + denominator = choose(d + S, S) + # Recurrence for C(x+s,s); no calls to math.comb. + current = choose(d + S, S) + best_value = -1 + best_x = -1 + best_cap = -1 + for x in range(d, K + 1): + if x > d: + current = current * (x + S) // x + cap = current // denominator + value = (K - x) * cap + if value > best_value: + best_value, best_x, best_cap = value, x, cap + return best_value, best_x, best_cap + + +def envelope(tau: int) -> tuple[int, int, int]: + x = 953_250 + low = (K - x) * choose(x + S, S) // choose(W - tau + S, S) + 1 + high = RESOURCE // (tau + 1) + return low, high, NEAR + low + high + + +def projective_check(p: int = 7) -> tuple[int, int, int]: + gl2 = 0 + outside = 0 + maximum = 0 + for a in range(p): + for b in range(p): + for c in range(p): + for d in range(p): + det = (a * d - b * c) % p + if det == 0: + continue + gl2 += 1 + z = pow(det, -1, p) + q00, q01 = d * z % p, -b * z % p + q10, q11 = -c * z % p, a * z % p + assert sum((q01 + gamma * q11) % p == 0 for gamma in range(p)) <= 1 + for v0 in range(1, p): + for v1 in range(p): + outside += 1 + roots = sum( + ( + ((q00 + gamma * q10) * v0) + + ((q01 + gamma * q11) * v1) + ) + % p + == 0 + for gamma in range(p) + ) + maximum = max(maximum, roots) + assert roots <= 1 + return gl2, outside, maximum + + +def main() -> None: + # Derive the continuous maximizer from the exact successive-ratio sign. + threshold_num = S * K - S - 1 + xstar = threshold_num // (S + 1) + 1 + assert xstar == 953_250 + + # Independently scan all cutoffs using the theorem envelope. + first = None + minimum = None + for tau in range(1, W): + low, high, total = envelope(tau) + row = (total, tau, low, high, BUDGET - total) + if first is None and total <= BUDGET: + first = row + if minimum is None or row < minimum: + minimum = row + + assert first == ( + 274_530_191_074_227_933, + 439, + 32_215_263_489_919_749, + 242_314_927_584_173_240, + 450_537_037_167_154, + ) + assert minimum == ( + 81_826_485_385_525_648, + 3608, + 52_284_072_490_672_992, + 29_542_412_894_717_712, + 193_154_242_725_869_439, + ) + + exact439 = exact_floor_max(439) + exact3608 = exact_floor_max(3608) + assert exact439 == (32_215_263_489_916_276, 953_250, 337_948_340_326) + assert exact3608 == (52_284_072_490_618_276, 953_250, 548_476_517_326) + + shared = 2 * (M - 439) - N + assert shared == 134_066 + assert projective_check() == (2016, 84672, 1) + + print( + "KB_MCA_RANK11_FIXED_ENDPOINT_INDEPENDENT_PASS " + f"first_tau={first[1]} best_tau={minimum[1]} " + f"exact439={exact439[0]} common_factor={shared}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/audit_kb_mca_rank11_rich_flat_router_v1.py b/experimental/scripts/audit_kb_mca_rank11_rich_flat_router_v1.py new file mode 100755 index 000000000..8e41adb6d --- /dev/null +++ b/experimental/scripts/audit_kb_mca_rank11_rich_flat_router_v1.py @@ -0,0 +1,165 @@ +#!/usr/bin/env python3 +"""Independent arithmetic and combinatorial audit for the rich-flat router. + +This implementation intentionally does not import the primary verifier. It +uses multiplicative recurrences for binomial ratios and a direct cutoff scan. +""" + +from __future__ import annotations + +import itertools +from math import comb + +N = 2_097_152 +K = 1_048_576 +M = 1_116_048 +W = 67_472 +BUDGET = 274_980_728_111_395_087 +NEAR = 134_944 +RESOURCE = 106_618_568_137_036_225_644 +RAY = 8_147_918 +TAU = 1_547 +H = 42_452 + + +def falling_loop(x: int, t: int) -> int: + value = 1 + for j in range(t): + value *= x - j + return value + + +FALL_M = {t: falling_loop(M, t) for t in (8, 9)} + + +def m2_loop(tau: int) -> int: + d = W - tau + numerator = (N - K + 2) * (N - K + 1) + denominator = (d + 2) * (d + 1) + return numerator // denominator + + +def cap_spaces(tau: int, h: int, t: int) -> int: + c = 2 * (M - tau) - N + return FALL_M[t] // pow(c - h, t) + + +def direct_total(tau: int, h: int) -> int: + a = M - tau + c = 2 * a - N + if not (1 <= tau < W and 0 <= h < c): + raise ValueError("illegal cell") + outside = N - a + rank_two = m2_loop(tau) * outside + return ( + NEAR + + RESOURCE // (tau + 1) + + outside + + cap_spaces(tau, h, 9) * RAY + + cap_spaces(tau, h, 8) * rank_two + ) + + +def scan() -> tuple[int, list[int], tuple[int, int], tuple[int, int]]: + global_h = -1 + maximizers: list[int] = [] + first: tuple[int, int] | None = None + last: tuple[int, int] | None = None + for tau in range(1, W): + c = 2 * (M - tau) - N + if direct_total(tau, 0) > BUDGET: + continue + lo, hi, best = 0, c - 1, -1 + while lo <= hi: + mid = (lo + hi) // 2 + if direct_total(tau, mid) <= BUDGET: + best = mid + lo = mid + 1 + else: + hi = mid - 1 + if first is None: + first = (tau, best) + last = (tau, best) + if best > global_h: + global_h = best + maximizers = [tau] + elif best == global_h: + maximizers.append(tau) + assert first is not None and last is not None + return global_h, maximizers, first, last + + +def rank2(vectors: list[tuple[int, int]], p: int) -> int: + if not vectors: + return 0 + if any(x or y for x, y in vectors): + first = next((v for v in vectors if v != (0, 0)), None) + assert first is not None + if any((first[0] * v[1] - first[1] * v[0]) % p for v in vectors): + return 2 + return 1 + return 0 + + +def tiny_matroid_audit() -> int: + """Independent exhaustive rank-two test over multisets in F_3^2.""" + + types = list(itertools.product(range(3), repeat=2)) + checked = 0 + # Enumerate sorted 5-tuples of vector-type indices. + for indices in itertools.combinations_with_replacement(range(len(types)), 5): + vectors = [types[i] for i in indices] + r = rank2(vectors, 3) + if r == 0: + continue + # Proper flats are zero for rank one and projective lines for rank two. + if r == 1: + h = vectors.count((0, 0)) + else: + h = vectors.count((0, 0)) + for normal in types[1:]: + count = sum((normal[0] * x + normal[1] * y) % 3 == 0 for x, y in vectors) + if count < len(vectors): + h = max(h, count) + ordered = 0 + for positions in itertools.permutations(range(5), r): + chosen = [vectors[i] for i in positions] + if rank2(chosen, 3) == r: + ordered += 1 + assert ordered >= (5 - h) ** r + checked += 1 + return checked + + +def main() -> None: + a = M - TAU + c = 2 * a - N + outside = N - a + m2 = m2_loop(TAU) + n1 = cap_spaces(TAU, H, 9) + n2 = cap_spaces(TAU, H, 8) + total = direct_total(TAU, H) + assert (a, c, outside, m2, n1, n2) == ( + 1_114_501, + 131_850, + 982_651, + 252, + 7_365_150_514, + 589_969_647, + ) + assert total == 274_978_720_888_758_363 + assert BUDGET - total == 2_007_222_636_724 + assert direct_total(TAU, H + 1) - BUDGET == 17_108_854_816_460 + assert m2 == comb(N - K + 2, 2) // comb(W - TAU + 2, 2) + assert scan() == (42_452, [1547, 1548, 1549], (397, 101), (21132, 4)) + checked = tiny_matroid_audit() + assert checked == 1_286 + print( + "KB_MCA_RANK11_RICH_FLAT_AUDIT_PASS " + f"total={total} slack={BUDGET-total} scan_max=42452 " + f"tiny_matroids={checked}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py b/experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py new file mode 100644 index 000000000..9c22481eb --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py @@ -0,0 +1,272 @@ +#!/usr/bin/env python3 +"""Exact certificate for the KoalaBear rank-10 margin/interleaving split.""" + +from __future__ import annotations + +import argparse +import copy +import hashlib +import json +from fractions import Fraction +from math import comb, prod +from pathlib import Path +from typing import Any + + +ROOT = Path(__file__).resolve().parents[2] +MANIFEST = ROOT / "experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/manifest.json" +PARENT = "b67078c7c0254ce9e54e5748634de5133fae98ef" +PACKET_FILES = [ + "agents.md", + "experimental/agents-log.md", + "experimental/grande_finale.tex", + "experimental/notes/thresholds/kb_mca_rank10_margin_interleaving_split_v1.md", + "experimental/data/certificates/kb-mca-rank10-margin-interleaving-v1/README.md", + "experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.py", + "experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/campaign.json", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/00_contract.md", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/01_frontier_map.md", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/02_controls.md", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/03_idea_ledger.csv", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/04_dependency_ledger.csv", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/05_claim_registry.csv", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/06_review_registry.csv", + "experimental/campaigns/kb-mca-rank10-margin-interleaving-post-1166/reviews/literature_sweep.md", +] + + +class Reject(ValueError): + pass + + +def require(value: bool, message: str) -> None: + if not value: + raise Reject(message) + + +def falling(x: int, length: int) -> int: + return prod(x - i for i in range(length)) + + +def rising(x: int, length: int) -> int: + return prod(x + i for i in range(length)) + + +def high_cap(row: dict[str, int], rank: int, threshold: int) -> int: + n, K, m, w = (row[key] for key in ("n", "K", "m", "w")) + value = max( + Fraction(falling(n, rank + 1), m * threshold * rising(w + 1, rank - 1)), + Fraction(falling(n - K + rank, rank + 1), threshold * rising(w + 1, rank)), + ) + return value.numerator // value.denominator + + +def split(row: dict[str, int], rank: int, threshold: int) -> dict[str, Any]: + n, K, m, w = (row[key] for key in ("n", "K", "m", "w")) + require(2 <= threshold <= w, "legal threshold") + agreement = m - threshold + 1 + require(agreement > K, "strict ordinary-list agreement") + ordinary = comb(n - K + rank, rank) // comb(agreement - K + rank, rank) + rank_caps = [n // threshold] + rank_caps.extend(high_cap(row, r, threshold) for r in range(1, rank + 1)) + high = max(rank_caps) + low = (n - agreement) * ordinary + total = row["near"] + high + low + return { + "threshold": threshold, + "agreement": agreement, + "ordinary_list_cap": ordinary, + "high_cap": high, + "high_rank": rank_caps.index(high), + "low_cap": low, + "total": total, + "slack": row["budget"] - total, + "subsquare_over_line_field": ordinary * ordinary < row["p"] ** row["extension_degree"], + "subsquare_over_base_field": ordinary * ordinary < row["p"], + } + + +def scan_summary(row: dict[str, int], rank: int) -> tuple[dict[str, Any], int | None, int, int]: + best: dict[str, Any] | None = None + first_paying: int | None = None + count = 0 + best_multiplicity = 0 + for threshold in range(2, row["w"] + 1): + item = split(row, rank, threshold) + if not item["subsquare_over_line_field"]: + continue + count += 1 + if first_paying is None and item["total"] <= row["budget"]: + first_paying = threshold + if best is None or (item["total"], threshold) < (best["total"], best["threshold"]): + best = item + best_multiplicity = 1 + elif item["total"] == best["total"]: + best_multiplicity += 1 + require(best is not None, "nonempty legal scan") + return best, first_paying, count, best_multiplicity + + +def star_fixture() -> dict[str, Any]: + p, n, K, m = 11, 10, 1, 3 + core = [0, 1] + slopes = list(range(8)) + r0 = [0, 0] + [(-gamma) % p for gamma in slopes] + r1 = [0, 0] + [1] * len(slopes) + supports = [core + [2 + gamma] for gamma in slopes] + for gamma, support in zip(slopes, supports): + agreements = [i for i in range(n) if (r0[i] + gamma * r1[i]) % p == 0] + require(agreements == support, "exact maximal support") + require(len({r0[i] for i in support}) > 1 or len({r1[i] for i in support}) > 1, + "pair noncontainment") + word = [(r0[i] + gamma * r1[i]) % p for i in range(n)] + max_constant_agreement = max(word.count(value) for value in range(p)) + require(n - max_constant_agreement > m - K, "post-near") + agreement = m - 2 + 1 + require(len(slopes) == n - agreement, "sharp n-A multiplicity") + return { + "field": p, + "n": n, + "K": K, + "m": m, + "threshold": 2, + "common_pair": [0, 0], + "common_core_size": len(core), + "owners": len(slopes), + "n_minus_A": n - agreement, + "support_digest": hashlib.sha256(json.dumps(supports, separators=(",", ":")).encode()).hexdigest(), + } + + +def build() -> dict[str, Any]: + row = { + "p": 2130706433, + "extension_degree": 6, + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "near": 134944, + "budget": 274980728111395087, + } + summaries = {rank: scan_summary(row, rank) for rank in range(9, 13)} + optima = {rank: summary[0] for rank, summary in summaries.items()} + require(summaries[9][1] == 16, "first paying threshold") + require(summaries[9][3] == 1, "unique rank-nine optimum") + expected = { + 9: (667, 61871313426765543), + 10: (876, 1040506078215897711), + 11: (1146, 18020673627684167414), + 12: (1487, 323734765765217100200), + } + require({rank: (item["threshold"], item["total"]) for rank, item in optima.items()} == expected, + "rank optima") + optimum = optima[9] + require(optimum["agreement"] == 1115382, "agreement") + require(optimum["ordinary_list_cap"] == 57781140652, "ordinary cap") + require(optimum["high_cap"] == 5143522968716559, "high cap") + require(optimum["low_cap"] == 56727790457914040, "low cap") + require(optimum["slack"] == 213109414684629544, "slack") + require(optimum["subsquare_over_line_field"] and not optimum["subsquare_over_base_field"], + "field-of-definition guard") + return { + "schema": "kb-mca-rank10-margin-interleaving-v1", + "parent": PARENT, + "row": row, + "formula": "2w+max_{0<=j<=s}H_j(T)+(n-m+T-1)M_s(T)", + "first_paying_threshold_rank9": summaries[9][1], + "optima": {str(rank): item for rank, item in optima.items()}, + "neighbor_totals_rank9": { + "666": split(row, 9, 666)["total"], + "668": split(row, 9, 668)["total"], + }, + "star_multiplicity_control": star_fixture(), + "claims": { + "error_rank_10": "PAID", + "error_rank_11_or_more": "UNPAID_BY_THIS_FORMULA", + "active_v4_ledger_movement": 0, + "KoalaBear_closed": False, + }, + "scan_counts": {str(rank): summary[2] for rank, summary in summaries.items()}, + "provenance": { + "repository": "przchojecki/rs-mca", + "exact_pr1166_parent": PARENT, + "public_dag_candidate": "c2c37ceb81f2512736f82d619a3a0e63e4156482", + "exa_sources_reviewed": 20, + "load_bearing_external_lemma": False, + "wolfram_exact_T667_replay": True, + }, + "packet_files": PACKET_FILES, + "packet_file_sha256": { + path: hashlib.sha256((ROOT / path).read_bytes()).hexdigest() + for path in PACKET_FILES + }, + } + + +def canonical(value: Any) -> bytes: + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def payload(value: dict[str, Any]) -> str: + unsigned = copy.deepcopy(value) + unsigned.pop("payload_sha256", None) + return hashlib.sha256(canonical(unsigned)).hexdigest() + + +def validate(value: dict[str, Any], expected: dict[str, Any]) -> None: + require(value == expected, "canonical certificate") + require(value["payload_sha256"] == payload(value), "payload hash") + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--write", action="store_true") + parser.add_argument("--tamper-selftest", action="store_true") + args = parser.parse_args() + if args.write: + value = build() + value["payload_sha256"] = payload(value) + MANIFEST.parent.mkdir(parents=True, exist_ok=True) + MANIFEST.write_text(json.dumps(value, indent=2) + "\n") + print(f"WROTE {MANIFEST}") + return + actual = json.loads(MANIFEST.read_text()) + expected = build() + expected["payload_sha256"] = payload(expected) + validate(actual, expected) + if args.tamper_selftest: + mutations = [ + ("first_paying_threshold_rank9", 17), + ("formula", "WRONG"), + ] + caught = 0 + for key, replacement in mutations: + changed = copy.deepcopy(actual) + changed[key] = replacement + changed["payload_sha256"] = payload(changed) + try: + validate(changed, expected) + except Reject: + caught += 1 + changed = copy.deepcopy(actual) + changed["claims"]["KoalaBear_closed"] = True + changed["payload_sha256"] = payload(changed) + try: + validate(changed, expected) + except Reject: + caught += 1 + require(caught == 3, "mutations caught") + print(f"KB_MCA_RANK10_MARGIN_INTERLEAVING_TAMPER_PASS mutations={caught}/3") + return + optimum = actual["optima"]["9"] + print( + "KB_MCA_RANK10_MARGIN_INTERLEAVING_PASS " + f"T={optimum['threshold']} total={optimum['total']} slack={optimum['slack']} " + f"payload_sha256={actual['payload_sha256']}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage b/experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage new file mode 100644 index 000000000..6acbe5c1b --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank10_margin_interleaving_v1.sage @@ -0,0 +1,38 @@ +#!/usr/bin/env sage +"""Independent Sage replay of decisive rank-ten numbers and GF(11) fixture.""" + +from math import comb, prod + +n, K, m, w = 2097152, 1048576, 1116048, 67472 +p, extension_degree = 2130706433, 6 +budget, near, s, T = 274980728111395087, 134944, 9, 667 + +fall = lambda x, j: prod(x-i for i in range(j)) +rise = lambda x, j: prod(x+i for i in range(j)) +A = m-T+1 +M = comb(n-K+s, s) // comb(A-K+s, s) +caps = [n//T] +for r in range(1, s+1): + caps.append(floor(max( + QQ(fall(n,r+1))/(m*T*rise(w+1,r-1)), + QQ(fall(n-K+r,r+1))/(T*rise(w+1,r)), + ))) +high = max(caps) +low = (n-A)*M +total = near+high+low +assert (A,M,high,low,total,budget-total) == ( + 1115382,57781140652,5143522968716559,56727790457914040, + 61871313426765543,213109414684629544) +assert M^2 < p^extension_degree and M^2 >= p + +F = GF(11) +slopes = list(map(F, range(8))) +r0 = [F(0),F(0)] + [-g for g in slopes] +r1 = [F(0),F(0)] + [F(1)]*8 +for j,g in enumerate(slopes): + S = [i for i in range(10) if r0[i]+g*r1[i] == 0] + assert S == [0,1,j+2] + assert len(set(r0[i] for i in S)) > 1 or len(set(r1[i] for i in S)) > 1 +toy_A = 2 +assert len(slopes) == 10-toy_A +print("KB_MCA_RANK10_MARGIN_INTERLEAVING_SAGE_PASS") diff --git a/experimental/scripts/verify_kb_mca_rank11_fixed_endpoint_router_v1.py b/experimental/scripts/verify_kb_mca_rank11_fixed_endpoint_router_v1.py new file mode 100755 index 000000000..5e5881846 --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank11_fixed_endpoint_router_v1.py @@ -0,0 +1,406 @@ +#!/usr/bin/env python3 +"""Exact verifier for the KoalaBear rank-eleven fixed-endpoint router.""" + +from __future__ import annotations + +import argparse +import copy +import json +from fractions import Fraction +from math import comb, prod + + +ROW = { + "p": 2130706433, + "extension_degree": 6, + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "near": 134944, + "budget": 274980728111395087, +} +S = 10 +PARENT = "a3fc2d5aea86577cd50d8b95b6eb2155d4d940f6" + + +class Reject(ValueError): + pass + + +def require(value: bool, message: str) -> None: + if not value: + raise Reject(message) + + +def falling(x: int, length: int) -> int: + return prod(x - i for i in range(length)) + + +def rising(x: int, length: int) -> int: + return prod(x + i for i in range(length)) + + +def theta_resource(max_rank: int) -> int: + """Parent #1168 nonuniform support-margin resource, including lower ranks.""" + n, K, m, w = (ROW[key] for key in ("n", "K", "m", "w")) + values = [Fraction(n)] + for rank in range(1, max_rank + 1): + values.extend( + [ + Fraction( + falling(n, rank + 1), + m * rising(w + 1, rank - 1), + ), + Fraction( + falling(n - K + rank, rank + 1), + rising(w + 1, rank), + ), + ] + ) + value = max(values) + return value.numerator // value.denominator + + +def continuous_maximizer(max_rank: int) -> int: + """Unique maximizer of (K-x) binom(x+s,s) on integer 0<=x<=K.""" + K = ROW["K"] + threshold_numerator = max_rank * K - max_rank - 1 + return threshold_numerator // (max_rank + 1) + 1 + + +def continuous_numerator(x: int, max_rank: int) -> int: + return (ROW["K"] - x) * comb(x + max_rank, max_rank) + + +def low_fixed_endpoint_envelope(tau: int) -> int: + """Includes the one possible projective exceptional slope.""" + require(1 <= tau < ROW["w"], "legal cutoff") + d = ROW["w"] - tau + x = continuous_maximizer(S) + return ( + continuous_numerator(x, S) // comb(d + S, S) + + 1 + ) + + +def exact_low_scan(tau: int) -> dict[str, int]: + """Exact deployed floor scan, used only as a calibration below the theorem envelope.""" + require(1 <= tau < ROW["w"], "legal exact cutoff") + d = ROW["w"] - tau + denominator = comb(d + S, S) + best = {"value": -1, "x": -1, "pair_cap": -1} + for x in range(d, ROW["K"] + 1): + cap = comb(x + S, S) // denominator + value = (ROW["K"] - x) * cap + if value > best["value"]: + best = {"value": value, "x": x, "pair_cap": cap} + best["with_exception"] = best["value"] + 1 + return best + + +def high_margin_cap(tau: int) -> int: + return theta_resource(S) // (tau + 1) + + +def fixed_left_total(tau: int) -> dict[str, int]: + low = low_fixed_endpoint_envelope(tau) + high = high_margin_cap(tau) + total = ROW["near"] + high + low + return { + "tau": tau, + "A": ROW["m"] - tau, + "d": ROW["w"] - tau, + "forced_common_core": 2 * (ROW["m"] - tau) - ROW["n"], + "low": low, + "high": high, + "near": ROW["near"], + "total": total, + "signed_slack": ROW["budget"] - total, + } + + +def fixed_right_total(tau: int) -> dict[str, int]: + ray_cap = 8147918 + total = ROW["near"] + high_margin_cap(tau) + ray_cap + return { + "tau": tau, + "ray_cap": ray_cap, + "high": high_margin_cap(tau), + "near": ROW["near"], + "total": total, + "signed_slack": ROW["budget"] - total, + } + + +def cutoff_scan() -> dict[str, object]: + rows = [fixed_left_total(tau) for tau in range(1, ROW["w"])] + paying = [row for row in rows if row["signed_slack"] >= 0] + require(paying, "nonempty paying cutoff set") + first = paying[0] + minimum = min(rows, key=lambda row: (row["total"], row["tau"])) + minimum_count = sum(row["total"] == minimum["total"] for row in rows) + return { + "first_paying": first, + "preceding": rows[first["tau"] - 2], + "minimum": minimum, + "minimum_unique": minimum_count == 1, + "after_minimum": rows[minimum["tau"]], + } + + +def projective_outside_owner_control(prime: int = 5) -> dict[str, int]: + """Exhaust all GL_2(F_p), outside vectors with first entry nonzero, and slopes.""" + matrices = 0 + cases = 0 + max_roots = 0 + max_mu_zero = 0 + for a in range(prime): + for b in range(prime): + for c in range(prime): + for d in range(prime): + det = (a * d - b * c) % prime + if det == 0: + continue + matrices += 1 + inv_det = pow(det, -1, prime) + inverse = ( + (d * inv_det % prime, -b * inv_det % prime), + (-c * inv_det % prime, a * inv_det % prime), + ) + mu_zero = 0 + for gamma in range(prime): + mu = (inverse[0][1] + gamma * inverse[1][1]) % prime + if mu == 0: + mu_zero += 1 + max_mu_zero = max(max_mu_zero, mu_zero) + require(mu_zero <= 1, "one projective exceptional slope") + for v0 in range(1, prime): + for v1 in range(prime): + cases += 1 + roots = 0 + for gamma in range(prime): + lam = (inverse[0][0] + gamma * inverse[1][0]) % prime + mu = (inverse[0][1] + gamma * inverse[1][1]) % prime + if (lam * v0 + mu * v1) % prime == 0: + roots += 1 + max_roots = max(max_roots, roots) + require(roots <= 1, "outside coordinate owns at most one slope") + return { + "prime": prime, + "gl2_matrices": matrices, + "outside_vector_cases": cases, + "max_roots": max_roots, + "max_projective_exceptional_slopes": max_mu_zero, + } + + +def build() -> dict[str, object]: + resource = theta_resource(S) + require(resource == 106618568137036225644, "parent theta resource") + + xstar = continuous_maximizer(S) + require(xstar == 953250, "continuous maximizer") + require( + continuous_numerator(xstar, S) > continuous_numerator(xstar - 1, S), + "left neighboring maximum check", + ) + require( + continuous_numerator(xstar, S) > continuous_numerator(xstar + 1, S), + "right neighboring maximum check", + ) + + scan = cutoff_scan() + require( + scan["preceding"] + == { + "tau": 438, + "A": 1115610, + "d": 67034, + "forced_common_core": 134068, + "low": 32210458397220937, + "high": 242866897806460650, + "near": 134944, + "total": 275077356203816531, + "signed_slack": -96628092421444, + }, + "last failing cutoff", + ) + require( + scan["first_paying"] + == { + "tau": 439, + "A": 1115609, + "d": 67033, + "forced_common_core": 134066, + "low": 32215263489919749, + "high": 242314927584173240, + "near": 134944, + "total": 274530191074227933, + "signed_slack": 450537037167154, + }, + "first paying cutoff", + ) + require( + scan["minimum"] + == { + "tau": 3608, + "A": 1112440, + "d": 63864, + "forced_common_core": 127728, + "low": 52284072490672992, + "high": 29542412894717712, + "near": 134944, + "total": 81826485385525648, + "signed_slack": 193154242725869439, + }, + "unique minimum", + ) + require(scan["minimum_unique"], "minimum uniqueness") + require( + scan["after_minimum"]["tau"] == 3609 + and scan["after_minimum"]["total"] == 81826488674890050, + "adjacent minimum check", + ) + + exact_439 = exact_low_scan(439) + require( + exact_439 + == { + "value": 32215263489916276, + "x": 953250, + "pair_cap": 337948340326, + "with_exception": 32215263489916277, + }, + "exact floor calibration at first cutoff", + ) + exact_3608 = exact_low_scan(3608) + require( + exact_3608 + == { + "value": 52284072490618276, + "x": 953250, + "pair_cap": 548476517326, + "with_exception": 52284072490618277, + }, + "exact floor calibration at optimum", + ) + require( + exact_439["with_exception"] <= scan["first_paying"]["low"], + "analytic envelope dominates exact floor scan", + ) + + right = fixed_right_total(439) + require( + right + == { + "tau": 439, + "ray_cap": 8147918, + "high": 242314927584173240, + "near": 134944, + "total": 242314927592456102, + "signed_slack": 32665800518938985, + }, + "fixed-right branch", + ) + + projective = projective_outside_owner_control() + require( + projective + == { + "prime": 5, + "gl2_matrices": 480, + "outside_vector_cases": 9600, + "max_roots": 1, + "max_projective_exceptional_slopes": 1, + }, + "projective control", + ) + + return { + "schema": "kb-mca-rank11-fixed-endpoint-router-v1", + "parent": PARENT, + "row": ROW, + "max_affine_dimension": S, + "theta_resource": resource, + "continuous_maximizer": { + "x": xstar, + "g": ROW["K"] + xstar, + "outside": ROW["K"] - xstar, + }, + "cutoff_scan": scan, + "exact_low_calibrations": { + "tau_439": exact_439, + "tau_3608": exact_3608, + }, + "fixed_right_at_first_cutoff": right, + "projective_control": projective, + "rank_two_terminal": { + "tau": 439, + "minimum_pair_core_size": ROW["m"] - 439, + "minimum_shared_core_size": 2 * (ROW["m"] - 439) - ROW["n"], + "minimum_common_evaluation_factor_degree": 2 * (ROW["m"] - 439) - ROW["n"], + }, + "claims": { + "rank_one_low_pair_anticode_paid": True, + "rank11_paid": False, + "koalabear_closed": False, + "active_v4_ledger_movement": 0, + }, + } + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--json", action="store_true") + parser.add_argument("--tamper-selftest", action="store_true") + args = parser.parse_args() + + result = build() + if args.tamper_selftest: + mutations = [ + ("first cutoff", ("cutoff_scan", "first_paying", "tau"), 438), + ("first total", ("cutoff_scan", "first_paying", "total"), 274530191074227932), + ("common factor", ("rank_two_terminal", "minimum_common_evaluation_factor_degree"), 134065), + ("fixed-right cap", ("fixed_right_at_first_cutoff", "ray_cap"), 8147917), + ("projective roots", ("projective_control", "max_roots"), 2), + ("ledger movement", ("claims", "active_v4_ledger_movement"), 1), + ] + caught = 0 + for _, path, value in mutations: + changed = copy.deepcopy(result) + cursor = changed + for key in path[:-1]: + cursor = cursor[key] + cursor[path[-1]] = value + try: + require(changed == result, "canonical result") + except Reject: + caught += 1 + require(caught == len(mutations), "all hostile mutations caught") + print( + "KB_MCA_RANK11_FIXED_ENDPOINT_TAMPER_PASS " + f"mutations={caught}/{len(mutations)}" + ) + return + + if args.json: + print(json.dumps(result, sort_keys=True)) + return + + first = result["cutoff_scan"]["first_paying"] + minimum = result["cutoff_scan"]["minimum"] + terminal = result["rank_two_terminal"] + print( + "KB_MCA_RANK11_FIXED_ENDPOINT_PASS " + f"first_tau={first['tau']} " + f"first_total={first['total']} " + f"first_slack={first['signed_slack']} " + f"best_tau={minimum['tau']} " + f"best_total={minimum['total']} " + f"rank2_common_factor={terminal['minimum_common_evaluation_factor_degree']}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py b/experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py new file mode 100644 index 000000000..83d62da84 --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py @@ -0,0 +1,488 @@ +#!/usr/bin/env python3 +"""Exact certificate for the KoalaBear rank-11 pair/core route cut. + +The unconditional ceiling uses only the printed support-local high theorem, +the cumulative interleaved pair caps, and fixed-pair core deficiency. The +smaller coupled ceiling is explicitly conditional on the new pointwise +ordered-basis corollary ``sum(theta_gamma) <= C_s``. Neither ceiling pays +rank eleven. +""" + +from __future__ import annotations + +import argparse +import copy +import hashlib +import json +from fractions import Fraction +from math import comb, prod +from pathlib import Path +from typing import Any + + +ROOT = Path(__file__).resolve().parents[2] +MANIFEST = ROOT / "experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/manifest.json" +PARENT = "491ccdf53d54846f5a013b808960645275c64ed3" +UPSTREAM_MAIN = "93fba1be3f3299b0ba4708d88715377bbb656e45" +PACKET_FILES = [ + "agents.md", + "experimental/agents-log.md", + "experimental/grande_finale.tex", + "experimental/notes/thresholds/kb_mca_rank11_pair_core_route_cut_v1.md", + "experimental/data/certificates/kb-mca-rank11-pair-core-route-cut-v1/README.md", + "experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.py", + "experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.sage", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/campaign.json", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/00_contract.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/01_frontier_map.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/02_controls.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/03_idea_ledger.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/04_dependency_ledger.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/05_claim_registry.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/06_review_registry.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/07_review_status.csv", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/proofs/nonuniform_theta_pair_route_cut.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/threads/barrier_adversary.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/controls/gf7_parallel_star.sage", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/literature_sweep.md", + "experimental/campaigns/kb-mca-rank11-pair-core-post-1167/reviews/wolfram_replay.md", +] +ROW = { + "p": 2130706433, + "extension_degree": 6, + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "near": 134944, + "budget": 274980728111395087, +} +EXPLANATION_DIMENSION = 10 + + +class Reject(ValueError): + pass + + +def require(value: bool, message: str) -> None: + if not value: + raise Reject(message) + + +def falling(x: int, length: int) -> int: + return prod(x - index for index in range(length)) + + +def rising(x: int, length: int) -> int: + return prod(x + index for index in range(length)) + + +def ceil_div(numerator: int, denominator: int) -> int: + return -(-numerator // denominator) + + +def theta_resource(rank: int) -> int: + """Floor of the largest ordered-basis resource through ``rank``. + + For a rank-j affine family the two endpoint constants before division by + a margin threshold are the displayed falling/rising factorial ratios. + Rank zero contributes n. Taking the maximum through rank s also supplies + the high-subfamily cap for every possible affine subrank. + """ + + n, K, m, w = (ROW[key] for key in ("n", "K", "m", "w")) + values = [Fraction(n)] + for subrank in range(1, rank + 1): + values.extend( + [ + Fraction( + falling(n, subrank + 1), + m * rising(w + 1, subrank - 1), + ), + Fraction( + falling(n - K + subrank, subrank + 1), + rising(w + 1, subrank), + ), + ] + ) + value = max(values) + return value.numerator // value.denominator + + +def high_cap(rank: int, threshold: int) -> int: + require(1 <= threshold <= ROW["w"] + 1, "legal high threshold") + # floor(max_j C_j/threshold) = floor(floor(max_j C_j)/threshold). + return theta_resource(rank) // threshold + + +def pair_cap(rank: int, deficiency: int) -> int: + """Cumulative number of pairs with core deficiency at most delta.""" + + n, K, w = (ROW[key] for key in ("n", "K", "w")) + require(1 <= deficiency < w, "legal core deficiency") + return comb(n - K + rank, rank) // comb(w - deficiency + rank, rank) + + +def pair_multiplicity(deficiency: int) -> int: + """Sharp disjoint-exception multiplicity for one fixed selected pair.""" + + require(deficiency >= 1, "positive deficiency") + return (ROW["n"] - ROW["m"] + deficiency) // deficiency + + +def pair_weight_capacity(cutoff: int, deficiency: int) -> int: + require(1 <= deficiency <= cutoff, "weighted deficiency range") + return pair_multiplicity(deficiency) * (cutoff + 1 - deficiency) + + +def max_compatible_deficiency(cutoff: int, forced_weight: int) -> int: + """Largest j whose sharp parallel capacity can carry forced_weight.""" + + low, high = 1, cutoff + 1 + while low < high: + middle = (low + high) // 2 + if pair_weight_capacity(cutoff, middle) >= forced_weight: + low = middle + 1 + else: + high = middle + return low - 1 + + +def fixed_pair_optima(rank: int, resource: int) -> dict[str, Any]: + field_size = ROW["p"] ** ROW["extension_degree"] + post_near_excess = ROW["budget"] - ROW["near"] + 1 + by_weight: dict[str, int] | None = None + by_records: dict[str, int] | None = None + legal_cutoffs = 0 + last_legal = 0 + for cutoff in range(1, ROW["w"]): + pairs = pair_cap(rank, cutoff) + if pairs * pairs >= field_size: + continue + legal_cutoffs += 1 + last_legal = cutoff + low_weight = max(0, (cutoff + 1) * post_near_excess - resource) + weight = ceil_div(low_weight, pairs) + records = ceil_div(weight, cutoff) + item = { + "cutoff": cutoff, + "pair_cap": pairs, + "forced_pair_weight": weight, + "forced_records": records, + "max_compatible_deficiency": max_compatible_deficiency(cutoff, weight), + } + if by_weight is None or (weight, -cutoff) > ( + by_weight["forced_pair_weight"], + -by_weight["cutoff"], + ): + by_weight = item + if by_records is None or (records, -cutoff) > ( + by_records["forced_records"], + -by_records["cutoff"], + ): + by_records = item + require(by_weight is not None and by_records is not None, "nonempty pair scan") + return { + "legal_cutoffs": legal_cutoffs, + "last_legal_cutoff": last_legal, + "maximum_forced_weight": by_weight, + "maximum_forced_records": by_records, + } + + +def core_lp_optima(rank: int, resource: int) -> dict[str, Any]: + """Scan the unconditional and sum-theta-conditional core ceilings.""" + + field_size = ROW["p"] ** ROW["extension_degree"] + previous_pairs = 0 + unconditional_low = 0 + conditional_low = 0 + conditional_resource = 0 + unconditional_best: dict[str, int] | None = None + conditional_best: dict[str, int] | None = None + unconditional_multiplicity = 0 + conditional_first = 0 + conditional_last = 0 + conditional_multiplicity = 0 + + for cutoff in range(1, ROW["w"]): + current_pairs = pair_cap(rank, cutoff) + new_pair_types = current_pairs - previous_pairs + slots = new_pair_types * pair_multiplicity(cutoff) + + # Current-theorem LP: Abel/greedy sum over every available pair type. + unconditional_low += slots + + # Conditional LP: a type-delta record costs at least delta units of + # the new global sum-theta resource. Lower delta is always more + # efficient than a high record of cost cutoff+1. + selected = min(slots, (resource - conditional_resource) // cutoff) + conditional_low += selected + conditional_resource += cutoff * selected + + if current_pairs * current_pairs < field_size: + high = high_cap(rank, cutoff + 1) + unconditional = { + "cutoff": cutoff, + "pair_cap": current_pairs, + "high_records": high, + "low_records": unconditional_low, + "total": ROW["near"] + high + unconditional_low, + } + unconditional["signed_slack"] = ROW["budget"] - unconditional["total"] + if ( + unconditional_best is None + or unconditional["total"] < unconditional_best["total"] + ): + unconditional_best = unconditional + unconditional_multiplicity = 1 + elif unconditional["total"] == unconditional_best["total"]: + unconditional_multiplicity += 1 + + conditional_high = (resource - conditional_resource) // (cutoff + 1) + conditional = { + "cutoff": cutoff, + "pair_cap": current_pairs, + "low_records": conditional_low, + "low_theta_used": conditional_resource, + "high_records": conditional_high, + "total": ROW["near"] + conditional_low + conditional_high, + } + conditional["signed_slack"] = ROW["budget"] - conditional["total"] + if conditional_best is None or conditional["total"] < conditional_best["total"]: + conditional_best = conditional + conditional_first = cutoff + conditional_last = cutoff + conditional_multiplicity = 1 + elif conditional["total"] == conditional_best["total"]: + conditional_last = cutoff + conditional_multiplicity += 1 + + previous_pairs = current_pairs + + require( + unconditional_best is not None and conditional_best is not None, + "nonempty core LP scan", + ) + unconditional_best["optimum_multiplicity"] = unconditional_multiplicity + conditional_best["first_optimal_cutoff"] = conditional_first + conditional_best["last_optimal_cutoff"] = conditional_last + conditional_best["optimum_multiplicity"] = conditional_multiplicity + return { + "unconditional_current_theorems": unconditional_best, + "conditional_on_pointwise_theta_sum": conditional_best, + } + + +def abstract_singleton_packing(rank: int, resource: int) -> dict[str, Any]: + """Exact certificate-class packing; not claimed RS-realizable.""" + + pairs = pair_cap(rank, 1) + records_per_pair = pair_multiplicity(1) + slopes = pairs * records_per_pair + total = ROW["near"] + slopes + field_size = ROW["p"] ** ROW["extension_degree"] + require(slopes <= resource, "packing respects sum-theta resource") + require(slopes < field_size, "packing respects affine slope supply") + require(pairs * pairs < field_size, "packing respects sub-square guard") + return { + "status": "ABSTRACT_CERTIFICATE_CLASS_PACKING_NOT_RS_REALIZABILITY", + "deficiency": 1, + "local_margin": 1, + "pair_types": pairs, + "records_per_pair": records_per_pair, + "post_near_records": slopes, + "total_with_near": total, + "excess_over_budget": total - ROW["budget"], + "theta_resource_used": slopes, + } + + +def build() -> dict[str, Any]: + rank = EXPLANATION_DIMENSION + resource = theta_resource(rank) + fixed = fixed_pair_optima(rank, resource) + core = core_lp_optima(rank, resource) + packing = abstract_singleton_packing(rank, resource) + + require(resource == 106618568137036225644, "theta resource") + require( + fixed["maximum_forced_weight"] + == { + "cutoff": 6486, + "pair_cap": 2255946383610, + "forced_pair_weight": 743449148, + "forced_records": 114624, + "max_compatible_deficiency": 8, + }, + "fixed-pair weight optimum", + ) + require( + fixed["maximum_forced_records"] + == { + "cutoff": 1795, + "pair_cap": 1075288922022, + "forced_pair_weight": 360132809, + "forced_records": 200632, + "max_compatible_deficiency": 4, + }, + "fixed-pair record optimum", + ) + require(fixed["last_legal_cutoff"] == 65810, "last sub-square cutoff") + + unconditional = core["unconditional_current_theorems"] + require( + unconditional + == { + "cutoff": 19737, + "pair_cap": 26130774875308, + "high_records": 5401690553097387, + "low_records": 808527428378681053, + "total": 813929118931913384, + "signed_slack": -538948390820518297, + "optimum_multiplicity": 1, + }, + "unconditional core LP optimum", + ) + + conditional = core["conditional_on_pointwise_theta_sum"] + require( + conditional + == { + "cutoff": 26033, + "pair_cap": 107486241601454, + "low_records": 811957734614064312, + "low_theta_used": 106597778100457375003, + "high_records": 798572504373, + "total": 811958533186703629, + "signed_slack": -536977805075308542, + "first_optimal_cutoff": 26033, + "last_optimal_cutoff": 65810, + "optimum_multiplicity": 39778, + }, + "conditional coupled core LP optimum", + ) + + require( + packing["post_near_records"] == 805771548351717555, + "abstract singleton packing", + ) + return { + "schema": "kb-mca-rank11-pair-core-route-cut-v1", + "parent": PARENT, + "row": ROW, + "explanation_dimension": rank, + "theta_resource": resource, + "fixed_pair_concentration": fixed, + "core_deficiency_lp": core, + "abstract_singleton_packing": packing, + "dependency_boundary": { + "unconditional_current_theorems": [ + "support-local high-margin cap", + "sub-square common-support interleaving collapse", + "fixed-pair disjoint exception sets", + ], + "conditional_new_corollary": "sum_gamma theta_gamma <= C_10", + }, + "claims": { + "rank11_paid": False, + "active_v4_ledger_movement": 0, + "KoalaBear_closed": False, + "route_cut": "NEEDS_CROSS_PAIR_COLLISION_OR_OWNER_THEOREM", + }, + "provenance": { + "repository": "przchojecki/rs-mca", + "upstream_main_at_refresh": UPSTREAM_MAIN, + "exact_pr1167_parent": PARENT, + "exa_sources_reviewed": 55, + "load_bearing_external_lemma": False, + "wolfram_exact_replay": True, + }, + "packet_files": PACKET_FILES, + "packet_file_sha256": { + path: hashlib.sha256((ROOT / path).read_bytes()).hexdigest() + for path in PACKET_FILES + }, + } + + +def canonical(value: Any) -> bytes: + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def payload(value: dict[str, Any]) -> str: + unsigned = copy.deepcopy(value) + unsigned.pop("payload_sha256", None) + return hashlib.sha256(canonical(unsigned)).hexdigest() + + +def validate(value: dict[str, Any], expected: dict[str, Any]) -> None: + require(value == expected, "canonical certificate") + require(value["payload_sha256"] == payload(value), "payload hash") + + +def tamper_selftest(expected: dict[str, Any]) -> int: + mutations = [ + lambda item: item["core_deficiency_lp"]["unconditional_current_theorems"].__setitem__( + "total", 813929118931913383 + ), + lambda item: item["core_deficiency_lp"]["conditional_on_pointwise_theta_sum"].__setitem__( + "total", 811958533186703628 + ), + lambda item: item["fixed_pair_concentration"]["maximum_forced_weight"].__setitem__( + "max_compatible_deficiency", 9 + ), + lambda item: item["abstract_singleton_packing"].__setitem__( + "status", "RS_REALIZABLE" + ), + lambda item: item["claims"].__setitem__("rank11_paid", True), + lambda item: item["row"].__setitem__("extension_degree", 1), + ] + caught = 0 + for mutate in mutations: + changed = copy.deepcopy(expected) + mutate(changed) + changed["payload_sha256"] = payload(changed) + try: + validate(changed, expected) + except Reject: + caught += 1 + require(caught == len(mutations), "all hostile mutations caught") + return caught + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--write", action="store_true") + parser.add_argument("--json", action="store_true") + parser.add_argument("--tamper-selftest", action="store_true") + args = parser.parse_args() + + expected = build() + expected["payload_sha256"] = payload(expected) + if args.write: + MANIFEST.parent.mkdir(parents=True, exist_ok=True) + MANIFEST.write_text(json.dumps(expected, indent=2) + "\n") + print(f"WROTE {MANIFEST}") + return + actual = json.loads(MANIFEST.read_text()) + validate(actual, expected) + if args.tamper_selftest: + caught = tamper_selftest(expected) + print(f"KB_MCA_RANK11_PAIR_CORE_ROUTE_CUT_TAMPER_PASS mutations={caught}/6") + return + if args.json: + print(json.dumps(expected, sort_keys=True)) + return + unconditional = expected["core_deficiency_lp"]["unconditional_current_theorems"] + conditional = expected["core_deficiency_lp"]["conditional_on_pointwise_theta_sum"] + print( + "KB_MCA_RANK11_PAIR_CORE_ROUTE_CUT_PASS " + f"unconditional={unconditional['total']} " + f"conditional={conditional['total']} " + f"conditional_over={-conditional['signed_slack']}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.sage b/experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.sage new file mode 100644 index 000000000..6e6bdef8c --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank11_pair_core_route_cut_v1.sage @@ -0,0 +1,50 @@ +#!/usr/bin/env sage +"""Independent Sage sharpness replay for the rank-11 pair/core route cut.""" + +# This is the finite parallel-star control. It proves that a fixed selected +# pair may own floor((n-m+delta)/delta) distinct slopes already at delta=1; +# consequently a pair-core argument may not assume distinct-neighbor +# expansion or reduce the fixed-pair multiplier from the current hypotheses. + +F = GF(11) +n, K, m = 11, 1, 3 +core = [0, 1] +slopes = list(map(F, range(9))) +r0 = [F(0), F(0)] + [-gamma for gamma in slopes] +r1 = [F(0), F(0)] + [F(1)] * len(slopes) + +common_pair_core = [index for index in range(n) if r0[index] == 0 and r1[index] == 0] +assert common_pair_core == core +delta = m - len(common_pair_core) +assert delta == 1 + +supports = [] +for offset, gamma in enumerate(slopes): + support = [index for index in range(n) if r0[index] + gamma * r1[index] == 0] + assert support == core + [offset + 2] + supports.append(tuple(support)) + + # Degree-<1 words are constants. The scalar word has exact maximal + # zero-agreement support and is post-near. + scalar_word = [r0[index] + gamma * r1[index] for index in range(n)] + maximum_constant_agreement = max( + scalar_word.count(value) for value in F + ) + assert maximum_constant_agreement == m + assert n - maximum_constant_agreement > m - K + + # The received pair is not simultaneously constant on this support. + pair_values = {(r0[index], r1[index]) for index in support} + assert len(pair_values) == 2 + + exception = tuple(index for index in support if index not in common_pair_core) + assert exception == (offset + 2,) + +assert len(set(supports)) == len(slopes) +sharp_capacity = (n - m + delta) // delta +assert len(slopes) == sharp_capacity == 9 + +print( + "KB_MCA_RANK11_PAIR_CORE_ROUTE_CUT_SAGE_PASS " + "parallel_records=9 deficiency=1 sharp_capacity=9" +) diff --git a/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.py b/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.py new file mode 100755 index 000000000..63dc1632d --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.py @@ -0,0 +1,371 @@ +#!/usr/bin/env python3 +"""Canonical verifier for the KoalaBear rank-one minimizing-pair router.""" + +from __future__ import annotations + +import argparse +import copy +import hashlib +import itertools +import json +from math import comb +from typing import Iterable + +PARENT = "6a5dcdae1591fc7f044eda6a942bfe178521a48c" +ROW = { + "field_prime": 2130706433, + "extension_degree": 6, + "n": 2097152, + "K": 1048576, + "m": 1116048, + "budget": 274980728111395087, +} +EXPECTED_PROPER = [1, 3, 6, 12, 23, 44, 82, 155, 292, 548, 1031] + + +class Reject(ValueError): + pass + + +def require(condition: bool, message: str) -> None: + if not condition: + raise Reject(message) + + +def sub_matrix(a: tuple[int, ...], b: tuple[int, ...], p: int) -> tuple[int, ...]: + return tuple((x - y) % p for x, y in zip(a, b)) + + +def rank_2x2(matrix: tuple[int, int, int, int], p: int) -> int: + a, b, c, d = matrix + if all(value % p == 0 for value in matrix): + return 0 + return 2 if (a * d - b * c) % p else 1 + + +def projective(vector: tuple[int, int], p: int) -> tuple[int, int]: + require(vector != (0, 0), "nonzero projective vector") + for value in vector: + if value % p: + inverse = pow(value, -1, p) + return tuple((entry * inverse) % p for entry in vector) + raise AssertionError("unreachable") + + +def left_direction(matrix: tuple[int, int, int, int], p: int) -> tuple[int, int]: + a, b, c, d = matrix + column = (a, c) if (a, c) != (0, 0) else (b, d) + return projective(column, p) + + +def right_direction(matrix: tuple[int, int, int, int], p: int) -> tuple[int, int]: + a, b, c, d = matrix + row = (a, b) if (a, b) != (0, 0) else (c, d) + return projective(row, p) + + +def maximal_rank_one_cliques_gf3() -> dict[str, object]: + p = 3 + zero = (0, 0, 0, 0) + vertices = [ + matrix + for matrix in itertools.product(range(p), repeat=4) + if rank_2x2(matrix, p) == 1 + ] + adjacency = { + matrix: { + other + for other in vertices + if other != matrix and rank_2x2(sub_matrix(matrix, other, p), p) == 1 + } + for matrix in vertices + } + + maximal: list[frozenset[tuple[int, ...]]] = [] + + def bron_kerbosch( + chosen: set[tuple[int, ...]], + candidates: set[tuple[int, ...]], + excluded: set[tuple[int, ...]], + ) -> None: + if not candidates and not excluded: + maximal.append(frozenset(chosen)) + return + union = candidates | excluded + pivot = max(union, key=lambda v: len(candidates & adjacency[v])) if union else None + extension = candidates - (adjacency[pivot] if pivot is not None else set()) + for vertex in list(extension): + bron_kerbosch( + chosen | {vertex}, + candidates & adjacency[vertex], + excluded & adjacency[vertex], + ) + candidates.remove(vertex) + excluded.add(vertex) + + bron_kerbosch(set(), set(vertices), set()) + maximal = sorted(set(maximal), key=lambda clique: (len(clique), tuple(sorted(clique)))) + + require(len(vertices) == 32, "GF(3) rank-one neighbor count") + require(len(maximal) == 8, "GF(3) maximal-clique count") + require(all(len(clique) == 8 for clique in maximal), "GF(3) clique size through zero") + + fixed_left = 0 + fixed_right = 0 + encoded: list[dict[str, object]] = [] + for clique in maximal: + lefts = {left_direction(matrix, p) for matrix in clique} + rights = {right_direction(matrix, p) for matrix in clique} + is_left = len(lefts) == 1 + is_right = len(rights) == 1 + require(is_left ^ is_right, "each maximal clique has exactly one type") + fixed_left += int(is_left) + fixed_right += int(is_right) + encoded.append( + { + "nonzero_size": len(clique), + "with_zero_size": len(clique) + 1, + "type": "fixed_left" if is_left else "fixed_right", + } + ) + require((fixed_left, fixed_right) == (4, 4), "GF(3) type split") + + strict_left = (0, 1, 0, 0) + strict_right = (0, 0, 1, 0) + mixed_rank = rank_2x2(sub_matrix(strict_left, strict_right, p), p) + require(mixed_rank == 2, "mixed left/right rejection") + + return { + "field": p, + "ambient_matrices": p**4, + "rank_one_neighbors_of_zero": len(vertices), + "maximal_cliques_through_zero": len(maximal), + "maximal_clique_size_with_zero": 9, + "fixed_left_cliques": fixed_left, + "fixed_right_cliques": fixed_right, + "mixed_strict_difference_rank": mixed_rank, + "cliques": encoded, + } + + +def evaluate_polynomial(coefficients: tuple[int, ...], x: int, p: int) -> int: + value = 0 + power = 1 + for coefficient in coefficients: + value = (value + coefficient * power) % p + power = (power * x) % p + return value + + +def proportional(f: tuple[int, ...], g: tuple[int, ...], p: int) -> bool: + pivot = next(index for index, value in enumerate(f) if value % p) + scalar = g[pivot] * pow(f[pivot], -1, p) % p + return all((g[index] - scalar * f[index]) % p == 0 for index in range(len(f))) + + +def common_root_boundary_gf5() -> dict[str, object]: + p = 5 + K = 3 + polynomials = list(itertools.product(range(p), repeat=K)) + nonzero = [poly for poly in polynomials if any(poly)] + ordered_independent = 0 + maximum = -1 + witness: tuple[tuple[int, ...], tuple[int, ...], tuple[int, ...]] | None = None + distribution: dict[int, int] = {} + for f in nonzero: + for g in nonzero: + if proportional(f, g, p): + continue + ordered_independent += 1 + roots = tuple( + x + for x in range(p) + if evaluate_polynomial(f, x, p) == 0 + and evaluate_polynomial(g, x, p) == 0 + ) + count = len(roots) + distribution[count] = distribution.get(count, 0) + 1 + if count > maximum: + maximum = count + witness = (f, g, roots) + require(ordered_independent == 14880, "GF(5) independent ordered-pair count") + require(maximum == K - 2 == 1, "GF(5) sharp common-root boundary") + require(witness is not None and len(witness[2]) == 1, "GF(5) witness") + return { + "field": p, + "degree_bound": K, + "ordered_independent_pairs": ordered_independent, + "maximum_common_roots": maximum, + "expected_K_minus_2": K - 2, + "distribution": {str(key): value for key, value in sorted(distribution.items())}, + "witness": { + "f": list(witness[0]), + "g": list(witness[1]), + "common_roots": list(witness[2]), + }, + } + + +def affine_ray_bound_at_core(universal_core: int) -> dict[str, int]: + n, K, m = ROW["n"], ROW["K"], ROW["m"] + require(0 <= universal_core <= K - 1, "universal core range") + n_u = n - universal_core + m_u = m - universal_core + q_u = min(K - 1, m_u - 1) + require(1 <= q_u < m_u <= n_u, "legal residual partition") + large_clone_classes = n_u // K if m_u > K - 1 else 0 + affine_line_charge = large_clone_classes * (n - m + 1) + heterogeneous_pair_charge = comb(n_u, 2) // (q_u * (m_u - q_u)) + return { + "universal_core": universal_core, + "n_u": n_u, + "m_u": m_u, + "q_u": q_u, + "large_clone_classes": large_clone_classes, + "affine_line_charge": affine_line_charge, + "heterogeneous_pair_charge": heterogeneous_pair_charge, + "total": affine_line_charge + heterogeneous_pair_charge, + } + + +def affine_ray_scan() -> dict[str, object]: + K = ROW["K"] + best: dict[str, int] | None = None + for universal_core in range(K): + candidate = affine_ray_bound_at_core(universal_core) + if best is None or (candidate["total"], candidate["universal_core"]) > ( + best["total"], + best["universal_core"], + ): + best = candidate + require(best is not None, "nonempty affine-ray scan") + checkpoints = { + str(core): affine_ray_bound_at_core(core) + for core in (0, 67472, 67473, K - 1) + } + require(checkpoints["0"]["total"] == 1962241, "zero-core affine ray") + require(checkpoints["67472"]["total"] == 2945484, "last K-sized-clone core") + require(checkpoints["67473"]["total"] == 1964379, "first small-threshold core") + require( + best + == { + "universal_core": 1048575, + "n_u": 1048577, + "m_u": 67473, + "q_u": 67472, + "large_clone_classes": 0, + "affine_line_charge": 0, + "heterogeneous_pair_charge": 8147918, + "total": 8147918, + }, + "affine-ray optimum", + ) + return { + "scanned_core_min": 0, + "scanned_core_max": K - 1, + "number_of_core_sizes": K, + "checkpoints": checkpoints, + "optimum": best, + } + + +def proper_affine_cap(dimension: int) -> int: + require(0 <= dimension <= 10, "proper affine dimension") + n, m = ROW["n"], ROW["m"] + return comb(n, dimension + 1) // comb(m, dimension + 1) + + +def canonical_json(value: object) -> str: + return json.dumps(value, sort_keys=True, separators=(",", ":")) + + +def build_core() -> dict[str, object]: + proper_table = [proper_affine_cap(dimension) for dimension in range(11)] + require(proper_table == EXPECTED_PROPER, "proper affine table") + require(all(a < b for a, b in zip(proper_table, proper_table[1:])), "proper caps increase") + affine_ray = affine_ray_scan() + ray_max = affine_ray["optimum"]["total"] + require(ray_max == 8147918, "common-core-aware affine-ray arithmetic") + require(ROW["budget"] - ray_max == 274980728103247169, "affine-ray slack") + require(ROW["budget"] - proper_table[-1] == 274980728111394056, "proper slack") + return { + "schema": "kb-mca-rank11-rank-one-pair-anticode-router-v1", + "parent": PARENT, + "row": ROW, + "matrix_anticode_control": maximal_rank_one_cliques_gf3(), + "core_overlap_control": common_root_boundary_gf5(), + "arithmetic": { + "common_core_aware_affine_ray": affine_ray, + "affine_ray_maximum": ray_max, + "affine_ray_slack": ROW["budget"] - ray_max, + "proper_affine_caps_dimensions_0_to_10": proper_table, + "proper_affine_dimension_10_bound": proper_table[-1], + "proper_affine_dimension_10_slack": ROW["budget"] - proper_table[-1], + }, + "claims": { + "rank_one_anticode_router_proved": True, + "maximal_core_overlap_router_proved": True, + "rank11_paid": False, + "koalabear_closed": False, + "active_v4_ledger_movement": 0, + "open_terminal": "rank-two pair differences or positive-dimensional affine-linear correction component", + }, + } + + +def build() -> dict[str, object]: + core = build_core() + digest = hashlib.sha256(canonical_json(core).encode("utf-8")).hexdigest() + return {"payload": core, "canonical_payload_sha256": digest} + + +def tamper_selftest(expected: dict[str, object]) -> int: + mutations: list[tuple[tuple[object, ...], object]] = [ + (("payload", "arithmetic", "affine_ray_maximum"), 8147917), + (("payload", "arithmetic", "proper_affine_dimension_10_bound"), 1030), + (("payload", "matrix_anticode_control", "maximal_cliques_through_zero"), 7), + (("payload", "core_overlap_control", "maximum_common_roots"), 2), + (("payload", "claims", "rank11_paid"), True), + ] + caught = 0 + for path, replacement in mutations: + changed = copy.deepcopy(expected) + target: object = changed + for key in path[:-1]: + target = target[key] # type: ignore[index] + target[path[-1]] = replacement # type: ignore[index] + if changed != expected: + caught += 1 + require(caught == len(mutations), "all hostile mutations caught") + return caught + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--json", action="store_true") + parser.add_argument("--tamper-selftest", action="store_true") + args = parser.parse_args() + result = build() + if args.tamper_selftest: + caught = tamper_selftest(result) + print(f"KB_MCA_RANK11_RANK_ONE_ROUTER_TAMPER_PASS mutations={caught}/{caught}") + return + if args.json: + print(canonical_json(result)) + return + payload = result["payload"] + arithmetic = payload["arithmetic"] + matrix = payload["matrix_anticode_control"] + root = payload["core_overlap_control"] + print( + "KB_MCA_RANK11_RANK_ONE_ROUTER_PASS " + f"affine_ray={arithmetic['affine_ray_maximum']} " + f"proper_r10={arithmetic['proper_affine_dimension_10_bound']} " + f"gf3_cliques={matrix['maximal_cliques_through_zero']} " + f"gf5_common_roots={root['maximum_common_roots']} " + f"sha256={result['canonical_payload_sha256']}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.wl b/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.wl new file mode 100644 index 000000000..45b690e4b --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1.wl @@ -0,0 +1,48 @@ +(* Independent exact-integer replay. *) +n = 2097152; +k = 1048576; +m = 1116048; +budget = 274980728111395087; + +affineRay[u_Integer] := Module[{nu, mu, q, large}, + nu = n - u; + mu = m - u; + q = Min[k - 1, mu - 1]; + large = If[mu > k - 1, Quotient[nu, k], 0]; + large (n - m + 1) + + Quotient[nu (nu - 1), 2 q (mu - q)] + ]; + +bestValue = -1; +bestCore = -1; +Do[ + value = affineRay[u]; + If[value > bestValue || (value == bestValue && u > bestCore), + bestValue = value; + bestCore = u + ], + {u, 0, k - 1} + ]; + +proper = Table[ + Floor[Binomial[n, r + 1]/Binomial[m, r + 1]], + {r, 0, 10} + ]; + +If[ + {bestValue, bestCore} =!= {8147918, 1048575} || + affineRay[0] =!= 1962241 || + affineRay[67472] =!= 2945484 || + affineRay[67473] =!= 1964379 || + proper =!= {1, 3, 6, 12, 23, 44, 82, 155, 292, 548, 1031} || + budget - bestValue =!= 274980728103247169 || + budget - Last[proper] =!= 274980728111394056, + Print["KB_MCA_RANK11_RANK_ONE_ROUTER_WOLFRAM_FAIL"]; + Exit[1] + ]; + +Print[ + "KB_MCA_RANK11_RANK_ONE_ROUTER_WOLFRAM_PASS ", + "affine_ray=", bestValue, " core=", bestCore, + " proper_r10=", Last[proper] + ]; diff --git a/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1_independent.py b/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1_independent.py new file mode 100755 index 000000000..4168bf693 --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank11_rank_one_pair_anticode_router_v1_independent.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python3 +"""Independent replay of the KoalaBear rank-one pair-anticode router.""" + +from __future__ import annotations + +import hashlib +import itertools +import json +from math import comb + +PARENT = "6a5dcdae1591fc7f044eda6a942bfe178521a48c" +N = 2097152 +K = 1048576 +M = 1116048 +BUDGET = 274980728111395087 + + +def rank(matrix: tuple[int, int, int, int], p: int) -> int: + a, b, c, d = matrix + if matrix == (0, 0, 0, 0): + return 0 + return 2 if (a * d - b * c) % p else 1 + + +def minus(a: tuple[int, ...], b: tuple[int, ...], p: int) -> tuple[int, ...]: + return tuple((x - y) % p for x, y in zip(a, b)) + + +def normalized(v: tuple[int, int], p: int) -> tuple[int, int]: + for x in v: + if x: + inv = pow(x, -1, p) + return ((v[0] * inv) % p, (v[1] * inv) % p) + raise AssertionError + + +def outer(u: tuple[int, int], v: tuple[int, int], p: int) -> tuple[int, int, int, int]: + return ( + u[0] * v[0] % p, + u[0] * v[1] % p, + u[1] * v[0] % p, + u[1] * v[1] % p, + ) + + +def projective_lines(p: int) -> list[tuple[int, int]]: + values = { + normalized(v, p) + for v in itertools.product(range(p), repeat=2) + if v != (0, 0) + } + return sorted(values) + + +def clique_controls() -> dict[str, int]: + p = 3 + zero = (0, 0, 0, 0) + vectors = list(itertools.product(range(p), repeat=2)) + lines = projective_lines(p) + cliques: list[frozenset[tuple[int, ...]]] = [] + for fixed_left in lines: + cliques.append(frozenset(outer(fixed_left, v, p) for v in vectors)) + for fixed_right in lines: + cliques.append(frozenset(outer(u, fixed_right, p) for u in vectors)) + assert len(cliques) == 8 + assert len(set(cliques)) == 8 + ambient = list(itertools.product(range(p), repeat=4)) + for clique in cliques: + assert zero in clique and len(clique) == 9 + for a, b in itertools.combinations(clique, 2): + assert rank(minus(a, b, p), p) == 1 + for candidate in ambient: + if candidate in clique: + continue + assert any(rank(minus(candidate, member, p), p) != 1 for member in clique) + mixed_left = outer((1, 0), (0, 1), p) + mixed_right = outer((0, 1), (1, 0), p) + assert rank(minus(mixed_left, mixed_right, p), p) == 2 + return { + "maximal_cliques": len(cliques), + "size": 9, + "left": len(lines), + "right": len(lines), + "mixed_rank": 2, + } + + +def value(poly: tuple[int, ...], x: int, p: int) -> int: + return sum(coef * pow(x, index, p) for index, coef in enumerate(poly)) % p + + +def dependent(a: tuple[int, ...], b: tuple[int, ...], p: int) -> bool: + for scalar in range(p): + if all((b[i] - scalar * a[i]) % p == 0 for i in range(len(a))): + return True + return False + + +def root_control() -> dict[str, int]: + p = 5 + polys = [f for f in itertools.product(range(p), repeat=3) if any(f)] + pairs = 0 + maximum = 0 + for f in polys: + for g in polys: + if dependent(f, g, p): + continue + pairs += 1 + common = sum(value(f, x, p) == value(g, x, p) == 0 for x in range(p)) + maximum = max(maximum, common) + assert pairs == 14880 + assert maximum == 1 + return {"ordered_independent_pairs": pairs, "maximum_common_roots": maximum} + + +def affine_ray(universal_core: int) -> int: + n_u = N - universal_core + m_u = M - universal_core + q_u = min(K - 1, m_u - 1) + large = n_u // K if m_u > K - 1 else 0 + return large * (N - M + 1) + comb(n_u, 2) // (q_u * (m_u - q_u)) + + +def main() -> None: + best_value = -1 + best_core = -1 + for universal_core in range(K): + candidate = affine_ray(universal_core) + if (candidate, universal_core) > (best_value, best_core): + best_value, best_core = candidate, universal_core + proper = [comb(N, r + 1) // comb(M, r + 1) for r in range(11)] + assert (best_value, best_core) == (8147918, 1048575) + assert affine_ray(0) == 1962241 + assert affine_ray(67472) == 2945484 + assert affine_ray(67473) == 1964379 + assert BUDGET - best_value == 274980728103247169 + assert proper == [1, 3, 6, 12, 23, 44, 82, 155, 292, 548, 1031] + assert BUDGET - proper[-1] == 274980728111394056 + result = { + "parent": PARENT, + "affine_ray_maximum": best_value, + "affine_ray_core": best_core, + "proper": proper, + "clique_control": clique_controls(), + "root_control": root_control(), + "rank11_paid": False, + } + digest = hashlib.sha256( + json.dumps(result, sort_keys=True, separators=(",", ":")).encode() + ).hexdigest() + print( + "KB_MCA_RANK11_RANK_ONE_ROUTER_INDEPENDENT_PASS " + f"affine_ray={best_value} core={best_core} proper_r10={proper[-1]} sha256={digest}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_rank11_rich_flat_manifest_v1.py b/experimental/scripts/verify_kb_mca_rank11_rich_flat_manifest_v1.py new file mode 100755 index 000000000..c33d80180 --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank11_rich_flat_manifest_v1.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +"""Verify the rich-flat packet's frozen file hashes and canonical payload.""" + +from __future__ import annotations + +import hashlib +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[2] +MANIFEST = ROOT / "experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/manifest.json" + + +def sha256(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def main() -> None: + data = json.loads(MANIFEST.read_text(encoding="utf-8")) + for entry in data["files"]: + path = ROOT / entry["path"] + assert path.is_file(), entry["path"] + assert path.stat().st_size == entry["bytes"], entry["path"] + assert sha256(path) == entry["sha256"], entry["path"] + result = ROOT / "experimental/data/certificates/kb-mca-rank11-rich-flat-router-v1/result.json" + assert sha256(result) == data["result_sha256"] + payload = {key: value for key, value in data.items() if key != "canonical_payload_sha256"} + canonical = json.dumps(payload, sort_keys=True, separators=(",", ":")).encode("utf-8") + assert hashlib.sha256(canonical).hexdigest() == data["canonical_payload_sha256"] + print( + "KB_MCA_RANK11_RICH_FLAT_MANIFEST_PASS " + f"files={len(data['files'])} payload={data['canonical_payload_sha256']}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_rank11_rich_flat_router_v1.py b/experimental/scripts/verify_kb_mca_rank11_rich_flat_router_v1.py new file mode 100755 index 000000000..277d0538a --- /dev/null +++ b/experimental/scripts/verify_kb_mca_rank11_rich_flat_router_v1.py @@ -0,0 +1,362 @@ +#!/usr/bin/env python3 +"""Exact verifier for the KoalaBear rank-eleven anchored rich-flat router. + +The packet is a one-commit successor to PR #1172. It proves that the +transverse row-space branch fits the deployed slope budget and that every +survivor emits a larger common-factor direction subspace. +""" + +from __future__ import annotations + +import argparse +import copy +import itertools +import json +from math import comb, prod +from typing import Iterable, Sequence + + +ROW = { + "p": 2_130_706_433, + "extension_degree": 6, + "n": 2_097_152, + "K": 1_048_576, + "m": 1_116_048, + "w": 67_472, + "near": 134_944, + "budget": 274_980_728_111_395_087, + "theta_resource_s10": 106_618_568_137_036_225_644, + "rank1_group_cap": 8_147_918, +} + +SELECTED_TAU = 1_547 +SELECTED_H = 42_452 +PARENT = "193b7bf99a5cc7ccea042f25677e698d9f988eee" + + +class Reject(ValueError): + pass + + +def require(condition: bool, message: str) -> None: + if not condition: + raise Reject(message) + + +def falling(x: int, length: int) -> int: + require(length >= 0, "nonnegative falling length") + return prod(x - index for index in range(length)) + + +def pair_cap_dim2(tau: int) -> int: + n, K, w = ROW["n"], ROW["K"], ROW["w"] + require(1 <= tau < w, "legal cutoff") + d = w - tau + return comb(n - K + 2, 2) // comb(d + 2, 2) + + +def transverse_space_cap(tau: int, h: int, rank: int) -> int: + """Number of h-transverse represented row spaces of a fixed rank. + + The actual explanation dimension is at most ten. A rank-r row space has + annihilator dimension at most 10-r. The exact tuple bound is monotone in + that dimension, so ranks one and two use lengths nine and eight. + """ + + require(rank in (1, 2), "row-space rank") + A = ROW["m"] - tau + c = 2 * A - ROW["n"] + require(0 <= h < c, "legal rich-flat threshold") + tuple_length = 10 - rank + return falling(ROW["m"], tuple_length) // (c - h) ** tuple_length + + +def envelope(tau: int, h: int) -> dict[str, int | bool]: + n, K, m, w = (ROW[key] for key in ("n", "K", "m", "w")) + require(1 <= tau < w, "legal cutoff") + A = m - tau + c = 2 * A - n + require(c > 0, "positive anchor-overlap floor") + require(0 <= h < c, "legal threshold") + + d = A - K + multiplicity = n - A + m2 = pair_cap_dim2(tau) + rank2_group_cap = m2 * multiplicity + high_tail = ROW["theta_resource_s10"] // (tau + 1) + rank1_spaces = transverse_space_cap(tau, h, 1) + rank2_spaces = transverse_space_cap(tau, h, 2) + rank1_total = rank1_spaces * ROW["rank1_group_cap"] + rank2_total = rank2_spaces * rank2_group_cap + low_total = multiplicity + rank1_total + rank2_total + total = ROW["near"] + high_tail + low_total + + return { + "tau": tau, + "A": A, + "d": d, + "anchor_overlap_floor": c, + "pair_multiplicity": multiplicity, + "pair_cap_dim2": m2, + "rank2_group_cap": rank2_group_cap, + "field_guard": m2 * m2 < ROW["p"] ** ROW["extension_degree"], + "transverse_threshold": h, + "emitted_core_size": h + 1, + "rank1_space_count": rank1_spaces, + "rank2_space_count": rank2_spaces, + "rank1_total": rank1_total, + "rank2_total": rank2_total, + "anchor_pair_total": multiplicity, + "low_total": low_total, + "high_tail": high_tail, + "near_addback": ROW["near"], + "total": total, + "signed_slack": ROW["budget"] - total, + } + + +def max_paying_h(tau: int) -> int: + A = ROW["m"] - tau + c = 2 * A - ROW["n"] + if c <= 0 or envelope(tau, 0)["total"] > ROW["budget"]: + return -1 + low, high, best = 0, c - 1, -1 + while low <= high: + middle = (low + high) // 2 + if envelope(tau, middle)["total"] <= ROW["budget"]: + best = middle + low = middle + 1 + else: + high = middle - 1 + return best + + +def global_threshold_scan() -> dict[str, object]: + maxima: list[tuple[int, int]] = [] + global_h = -1 + first_paying: tuple[int, int] | None = None + last_paying: tuple[int, int] | None = None + for tau in range(1, ROW["w"]): + h = max_paying_h(tau) + if h >= 0: + if first_paying is None: + first_paying = (tau, h) + last_paying = (tau, h) + if h > global_h: + global_h = h + maxima = [(tau, h)] + elif h == global_h: + maxima.append((tau, h)) + require(first_paying is not None and last_paying is not None, "nonempty scan") + return { + "global_max_h": global_h, + "global_max_entries": maxima, + "first_paying": first_paying, + "last_paying": last_paying, + } + + +def rank_mod(vectors: Sequence[Sequence[int]], p: int) -> int: + if not vectors: + return 0 + matrix = [[entry % p for entry in row] for row in vectors] + rows, cols = len(matrix), len(matrix[0]) + rank = 0 + for col in range(cols): + pivot = next((r for r in range(rank, rows) if matrix[r][col] % p), None) + if pivot is None: + continue + matrix[rank], matrix[pivot] = matrix[pivot], matrix[rank] + inv = pow(matrix[rank][col], -1, p) + matrix[rank] = [(entry * inv) % p for entry in matrix[rank]] + for r in range(rows): + if r == rank: + continue + factor = matrix[r][col] % p + if factor: + matrix[r] = [ + (matrix[r][j] - factor * matrix[rank][j]) % p + for j in range(cols) + ] + rank += 1 + if rank == rows: + break + return rank + + +def vector_lines(p: int, dimension: int) -> list[tuple[int, ...]]: + vectors = list(itertools.product(range(p), repeat=dimension)) + return [vector for vector in vectors if any(vector)] + + +def max_proper_flat_occupancy(multiset: Sequence[tuple[int, ...]], p: int, rank: int) -> int: + """Brute-force maximum occupancy in a proper flat of the full span.""" + + if rank == 0: + return 0 + ambient_vectors = vector_lines(p, len(multiset[0])) if multiset else [] + best = sum(1 for vector in multiset if not any(vector)) + # Every proper flat is contained in a hyperplane. Enumerate hyperplanes + # by nonzero normal vectors; this suffices for the occupancy maximum. + for normal in ambient_vectors: + count = sum( + 1 + for vector in multiset + if sum(a * b for a, b in zip(normal, vector)) % p == 0 + ) + if count < len(multiset): + best = max(best, count) + return best + + +def ordered_basis_count(multiset: Sequence[tuple[int, ...]], p: int, rank: int) -> int: + count = 0 + for indices in itertools.permutations(range(len(multiset)), rank): + vectors = [multiset[index] for index in indices] + if rank_mod(vectors, p) == rank: + count += 1 + return count + + +def compositions(total: int, parts: int) -> Iterable[tuple[int, ...]]: + if parts == 1: + yield (total,) + return + for first in range(total + 1): + for tail in compositions(total - first, parts - 1): + yield (first,) + tail + + +def finite_matroid_control() -> dict[str, int]: + """Exhaustively test the ordered-basis lemma in small vector spaces.""" + + checked = 0 + for p, dimension, size in ((2, 3, 5), (3, 2, 5)): + types = list(itertools.product(range(p), repeat=dimension)) + for counts in compositions(size, len(types)): + multiset: list[tuple[int, ...]] = [] + for vector, multiplicity in zip(types, counts): + multiset.extend([vector] * multiplicity) + rank = rank_mod(multiset, p) + if rank == 0: + continue + h = max_proper_flat_occupancy(multiset, p, rank) + bases = ordered_basis_count(multiset, p, rank) + require(bases >= (size - h) ** rank, "ordered-basis lower bound") + checked += 1 + return {"configurations_checked": checked} + + +def build() -> dict[str, object]: + selected = envelope(SELECTED_TAU, SELECTED_H) + adjacent = envelope(SELECTED_TAU, SELECTED_H + 1) + scan = global_threshold_scan() + finite = finite_matroid_control() + + expected_selected = { + "tau": 1547, + "A": 1114501, + "d": 65925, + "anchor_overlap_floor": 131850, + "pair_multiplicity": 982651, + "pair_cap_dim2": 252, + "rank2_group_cap": 247628052, + "field_guard": True, + "transverse_threshold": 42452, + "emitted_core_size": 42453, + "rank1_space_count": 7365150514, + "rank2_space_count": 589969647, + "rank1_total": 60010642445729852, + "rank2_total": 146093034425737644, + "anchor_pair_total": 982651, + "low_total": 206103676872450147, + "high_tail": 68875044016173272, + "near_addback": 134944, + "total": 274978720888758363, + "signed_slack": 2007222636724, + } + require(selected == expected_selected, "selected exact envelope") + require(adjacent["total"] - ROW["budget"] == 17108854816460, + "adjacent threshold failure") + require( + scan + == { + "global_max_h": 42452, + "global_max_entries": [(1547, 42452), (1548, 42452), (1549, 42452)], + "first_paying": (397, 101), + "last_paying": (21132, 4), + }, + "global threshold scan", + ) + + return { + "schema": "kb-mca-rank11-anchored-rich-flat-router-v1", + "parent": PARENT, + "row": ROW, + "selected": selected, + "adjacent_h_over_budget": adjacent["total"] - ROW["budget"], + "scan": scan, + "finite_matroid_control": finite, + "terminal": { + "common_zero_coordinates_at_least": SELECTED_H + 1, + "rank1_extension_dimension_at_least": 2, + "rank2_extension_dimension_at_least": 3, + "rank2_original_common_zero_floor": selected["anchor_overlap_floor"], + "locator_division_degree_ceiling": ROW["K"] - (SELECTED_H + 1), + }, + "claims": { + "transverse_branch_paid": True, + "rank11_paid": False, + "koalabear_closed": False, + "active_v4_ledger_movement": 0, + }, + } + + +def tamper_selftest(expected: dict[str, object]) -> int: + mutations = [ + ("selected", "total", expected["selected"]["total"] - 1), + ("selected", "rank1_space_count", expected["selected"]["rank1_space_count"] + 1), + ("selected", "rank2_space_count", expected["selected"]["rank2_space_count"] - 1), + ("terminal", "common_zero_coordinates_at_least", 42452), + ("claims", "rank11_paid", True), + ("scan", "global_max_h", 42453), + ] + caught = 0 + for section, key, value in mutations: + changed = copy.deepcopy(expected) + changed[section][key] = value + try: + require(changed == expected, "canonical result") + except Reject: + caught += 1 + require(caught == len(mutations), "all hostile mutations rejected") + return caught + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--json", action="store_true") + parser.add_argument("--tamper-selftest", action="store_true") + args = parser.parse_args() + + result = build() + if args.tamper_selftest: + caught = tamper_selftest(result) + print(f"KB_MCA_RANK11_RICH_FLAT_TAMPER_PASS mutations={caught}/6") + return + if args.json: + print(json.dumps(result, sort_keys=True, separators=(",", ":"))) + return + selected = result["selected"] + print( + "KB_MCA_RANK11_RICH_FLAT_PASS " + f"tau={selected['tau']} h={selected['transverse_threshold']} " + f"emitted_core={selected['emitted_core_size']} " + f"total={selected['total']} slack={selected['signed_slack']} " + f"finite_controls={result['finite_matroid_control']['configurations_checked']}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py b/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py new file mode 100644 index 000000000..512140ddb --- /dev/null +++ b/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py @@ -0,0 +1,825 @@ +#!/usr/bin/env python3 +"""Verify the post-#1165 support-local theta refinement and route cut.""" + +from __future__ import annotations + +import argparse +import copy +import hashlib +import json +import subprocess +from collections import Counter +from fractions import Fraction +from math import prod +from pathlib import Path +from typing import Any, Callable + + +ROOT = Path(__file__).resolve().parents[2] +MANIFEST = ROOT / ( + "experimental/data/certificates/" + "kb-mca-support-local-theta-router-v1/manifest.json" +) +PARENT_HEAD = "b6d30ef4f5ff966665b7672e1780a637509873a4" +UPSTREAM_MAIN = "93fba1be3f3299b0ba4708d88715377bbb656e45" + +PACKET_FILES = [ + "agents.md", + "experimental/agents-log.md", + "experimental/grande_finale.tex", + "experimental/notes/thresholds/kb_mca_support_local_theta_and_error_rank_router_v1.md", + "experimental/data/certificates/kb-mca-support-local-theta-router-v1/README.md", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.py", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.sage", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1_flint.py", + "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.wl", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/campaign.json", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/00_contract.md", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/01_frontier_map.md", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/02_controls.md", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/03_idea_ledger.csv", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/04_dependency_ledger.csv", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/05_claim_registry.csv", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/06_review_registry.csv", + "experimental/campaigns/kb-mca-support-local-theta-post-1165/reviews/literature_sweep.md", +] + + +class Reject(ValueError): + pass + + +def require(condition: bool, message: str) -> None: + if not condition: + raise Reject(message) + + +def strict_pairs(pairs: list[tuple[str, Any]]) -> dict[str, Any]: + out: dict[str, Any] = {} + for key, value in pairs: + require(key not in out, f"duplicate JSON key: {key}") + out[key] = value + return out + + +def strict_load(path: Path) -> Any: + return json.loads( + path.read_text(), + object_pairs_hook=strict_pairs, + parse_float=lambda value: (_ for _ in ()).throw(Reject(f"float {value}")), + parse_constant=lambda value: (_ for _ in ()).throw(Reject(f"constant {value}")), + ) + + +def canonical_bytes(value: Any) -> bytes: + return json.dumps( + value, sort_keys=True, separators=(",", ":"), ensure_ascii=False + ).encode() + + +def sha256(data: bytes) -> str: + return hashlib.sha256(data).hexdigest() + + +def payload_hash(value: dict[str, Any]) -> str: + unsigned = copy.deepcopy(value) + unsigned.pop("payload_sha256", None) + return sha256(canonical_bytes(unsigned)) + + +def git_blob(data: bytes) -> str: + return hashlib.sha1( + b"blob " + str(len(data)).encode() + b"\0" + data + ).hexdigest() + + +def falling(value: int, length: int) -> int: + return prod(value - index for index in range(length)) + + +def rising(value: int, length: int) -> int: + return prod(value + index for index in range(length)) + + +def rank_mod(rows: list[list[int]], modulus: int) -> int: + matrix = [[entry % modulus for entry in row] for row in rows] + rank = 0 + width = len(matrix[0]) if matrix else 0 + for column in range(width): + pivot = next( + (index for index in range(rank, len(matrix)) + if matrix[index][column]), + None, + ) + if pivot is None: + continue + matrix[rank], matrix[pivot] = matrix[pivot], matrix[rank] + inverse = pow(matrix[rank][column], -1, modulus) + matrix[rank] = [(inverse * entry) % modulus + for entry in matrix[rank]] + for index in range(len(matrix)): + if index == rank or matrix[index][column] == 0: + continue + factor = matrix[index][column] + matrix[index] = [ + (left - factor * right) % modulus + for left, right in zip(matrix[index], matrix[rank]) + ] + rank += 1 + return rank + + +def local_bound( + n: int, K: int, m: int, rank: int, theta: int, g: int, c: int +) -> Fraction: + w = m - K + require(n >= m == K + w and w >= 0, "legal row") + require(1 <= rank <= K, "legal affine rank") + require(1 <= theta <= w + 1, "capped positive theta") + require(g >= 0 and c >= 0 and g + c <= K - rank, "legal zero profile") + return Fraction( + falling(n - g - c, rank + 1), + (m - g) * theta * rising(w + 1 + c, rank - 1), + ) + + +def closed_bound(n: int, K: int, m: int, rank: int, theta: int = 1) -> Fraction: + w = m - K + require(n >= m == K + w and w >= 0, "legal row") + require(1 <= rank <= K, "legal affine rank") + require(1 <= theta <= w + 1, "capped positive theta") + first = Fraction( + falling(n, rank + 1), + m * theta * rising(w + 1, rank - 1), + ) + second = Fraction( + falling(n - K + rank, rank + 1), + theta * rising(w + 1, rank), + ) + return max(first, second) + + +def floor_fraction(value: Fraction) -> int: + return value.numerator // value.denominator + + +def minimum_margin( + n: int, K: int, m: int, rank: int, available_budget: int +) -> int: + raw = closed_bound(n, K, m, rank, 1) + # floor(raw / theta) <= B iff raw / theta < B + 1. + theta = max( + 1, + raw.numerator // (raw.denominator * (available_budget + 1)) + 1, + ) + while theta <= m - K + 1 and floor_fraction( + closed_bound(n, K, m, rank, theta) + ) > available_budget: + theta += 1 + return theta + + +def endpoint_controls() -> int: + checks = 0 + for n in range(7, 25): + for K in range(2, n - 1): + for rank in range(1, min(5, K)): + for w in range(1, min(6, n - K)): + m = K + w + if m > n: + continue + for theta in range(1, min(w + 2, 5)): + brute = max( + local_bound(n, K, m, rank, theta, g, c) + for c in range(K - rank + 1) + for g in range(K - rank - c + 1) + ) + require( + brute == closed_bound(n, K, m, rank, theta), + "endpoint optimization", + ) + checks += 1 + require(checks == 10716, "endpoint control count") + return checks + + +def counterexample() -> dict[str, Any]: + p, n, K, m = 257, 256, 1, 86 + w = m - K + points = [(gamma, 0) for gamma in range(m)] + [(m, 1)] + hyperplanes: list[tuple[int, int, str]] = [ + (0, 0, "common") for _ in range(w) + ] + connector_b: set[int] = set() + for gamma in range(m): + b = pow(m - gamma, -1, p) + a = (-gamma * b) % p + connector_b.add(b) + hyperplanes.append((a, b, f"connector-{gamma}")) + available_b = [value for value in range(1, p) if value not in connector_b] + for index, b in enumerate(available_b[:w]): + forbidden_a = {(lam - gamma * b) % p for gamma, lam in points} + a = next(value for value in range(p) if value not in forbidden_a) + hyperplanes.append((a, b, f"unused-{index}")) + require(len(hyperplanes) == n, "coordinate count") + require( + len({b for _, b, role in hyperplanes if role != "common"}) == m + w, + "distinct noncommon directions", + ) + + r0 = [a for a, _, _ in hyperplanes] + r1 = [b for _, b, _ in hyperplanes] + supports: list[list[int]] = [] + errors: list[list[int]] = [] + normal_ranks: list[int] = [] + near_distances: list[int] = [] + for gamma, lam in points: + support = [ + index for index, (a, b, _) in enumerate(hyperplanes) + if (a + gamma * b - lam) % p == 0 + ] + require(len(support) == m, "exact support") + require( + len({r0[index] for index in support}) > 1 + or len({r1[index] for index in support}) > 1, + "same-support pair noncontainment", + ) + normal_ranks.append(rank_mod([[r1[index], -1] for index in support], p)) + supports.append(support) + error = [ + (r0[index] + gamma * r1[index] - lam) % p + for index in range(n) + ] + errors.append(error) + word = [(r0[index] + gamma * r1[index]) % p for index in range(n)] + near_distances.append(n - max(Counter(word).values())) + + require(set(normal_ranks) == {2}, "full incident normal rank") + require(not set.intersection(*(set(support) for support in supports)), + "empty global core") + direction_max = max(Counter(r1).values()) + require(direction_max == w < m, "global direction separation") + require(min(near_distances) == 170 > w, "outside near radius") + error_rank = rank_mod([ + [(left - right) % p for left, right in zip(error, errors[0])] + for error in errors[1:] + ], p) + require(error_rank == 2, "error rank") + + old_cap = max( + falling(n, 2) // (m * w), + falling(n - K + 1, 2) // (w * (w + 1)), + ) + repaired_cap = floor_fraction(closed_bound(n, K, m, 1, 1)) + require(old_cap == 8 < len(points) == 87 <= repaired_cap == 759, + "counterexample and repair") + + fixture = { + "points": points, + "hyperplanes": hyperplanes, + "supports": supports, + } + return { + "field": p, + "domain": "GF(257)^*", + "n": n, + "K": K, + "m": m, + "w": w, + "slopes": len(points), + "support_sizes": sorted(set(map(len, supports))), + "incident_normal_ranks": sorted(set(normal_ranks)), + "explanation_affine_rank": 1, + "error_affine_rank": error_rank, + "global_core_size": 0, + "direction_max_agreement": direction_max, + "minimum_near_distance": min(near_distances), + "old_printed_cap": old_cap, + "repaired_theta1_cap": repaired_cap, + "fixture_sha256": sha256(canonical_bytes(fixture)), + } + + +def row_tables() -> dict[str, Any]: + kb = { + "n": 2097152, + "K": 1048576, + "m": 1116048, + "w": 67472, + "budget": 274980728111395087, + } + kb_caps = [ + floor_fraction(closed_bound(kb["n"], kb["K"], kb["m"], rank, 1)) + for rank in range(1, 10) + ] + require(kb_caps == [ + 16295594, + 253241283, + 3935435218, + 118319201475, + 3677348367069, + 114289853114503, + 3552007973114420, + 110390969172173096, + 3430729820133944932, + ], "Koala theta-one caps") + near = 2 * kb["w"] + available = kb["budget"] - near + transitions = [] + for rank in (8, 9, 10, 11): + theta = minimum_margin(kb["n"], kb["K"], kb["m"], rank, available) + cap = floor_fraction(closed_bound( + kb["n"], kb["K"], kb["m"], rank, theta + )) + previous_total = None + if theta > 1: + previous_total = floor_fraction(closed_bound( + kb["n"], kb["K"], kb["m"], rank, theta - 1 + )) + near + require(previous_total > kb["budget"], "minimal Koala theta") + transitions.append({ + "explanation_rank": rank, + "minimum_theta": theta, + "exception_ceiling_if_unpaid": theta - 1, + "cap": cap, + "cap_plus_2w": cap + near, + "slack": kb["budget"] - cap - near, + "previous_total": previous_total, + }) + require([item["minimum_theta"] for item in transitions] + == [1, 13, 388, 12050], "Koala theta thresholds") + + m31 = { + "n": 2097152, + "K": 1048576, + "m": 1116024, + "w": 67448, + "budget": 16777215, + } + m31_available = m31["budget"] - 2 * m31["w"] + m31_transitions = [] + for rank in range(1, 5): + theta = minimum_margin( + m31["n"], m31["K"], m31["m"], rank, m31_available + ) + cap = floor_fraction(closed_bound( + m31["n"], m31["K"], m31["m"], rank, theta + )) + m31_transitions.append({ + "explanation_rank": rank, + "minimum_theta": theta, + "cap": cap, + "cap_plus_2w": cap + 2 * m31["w"], + "slack": m31["budget"] - cap - 2 * m31["w"], + }) + if theta > 1: + require( + floor_fraction(closed_bound( + m31["n"], m31["K"], m31["m"], rank, theta - 1 + )) + 2 * m31["w"] > m31["budget"], + "minimal M31 theta", + ) + require([item["minimum_theta"] for item in m31_transitions] + == [1, 16, 237, 7118], "M31 theta thresholds") + + R, d = 1048576, 67472 + shortened = [] + for rank in range(1, 15): + n = R + rank + K = rank + m = d + rank + cap = floor_fraction(closed_bound(n, K, m, rank, 1)) + theta = minimum_margin(n, K, m, rank, kb["budget"]) + shortened.append({ + "rank": rank, + "theta1_cap": cap, + "minimum_theta": theta, + "theta_is_feasible": theta <= d + 1, + }) + if 1 < theta <= d + 1: + require( + floor_fraction(closed_bound( + n, K, m, rank, theta - 1 + )) > kb["budget"], + "minimal shortened theta", + ) + require(shortened[8]["theta1_cap"] == 55413538236037195, + "shortened rank-nine cap") + require(shortened[9]["theta1_cap"] == 861057176799343503, + "shortened rank-ten cap") + require([shortened[index - 1]["minimum_theta"] + for index in (10, 11, 12, 13, 14)] + == [4, 49, 757, 11748, 182530], "shortened thresholds") + require(shortened[13]["theta_is_feasible"] is False, + "shortened rank fourteen cannot pay by theta") + + return { + "KoalaBear": { + **kb, + "near_charge_2w": near, + "theta1_caps_s1_through_s9": kb_caps, + "transitions_s8_through_s11": transitions, + "paid_error_rank_at_most": 9, + "paid_total": 110390969172308040, + "paid_slack": 164589758939087047, + "error_rank_10_11_12_exception_ceilings": [12, 387, 12049], + }, + "Mersenne31_stress_control": { + **m31, + "transitions_s1_through_s4": m31_transitions, + }, + "shortened_complete_code": { + "R": R, + "d": d, + "rows_s1_through_s14": shortened, + "automatic_theta_paid_through_rank": 9, + "rank_10_11_12_13_exception_ceilings": [3, 48, 756, 11747], + "first_unpaid_even_at_maximum_theta": 14, + }, + } + + +def source_binding(identifier: str, path: str, blob: str, digest: str, + role: str) -> dict[str, str]: + return { + "id": identifier, + "path": path, + "git_blob_sha1": blob, + "sha256": digest, + "role": role, + } + + +def external_source_binding( + identifier: str, + commit: str, + path: str, + blob: str, + digest: str, + role: str, +) -> dict[str, str]: + binding = source_binding(identifier, path, blob, digest, role) + binding["commit"] = commit + return binding + + +def build_manifest() -> dict[str, Any]: + tables = row_tables() + manifest: dict[str, Any] = { + "schema": "rs-mca-kb-support-local-theta-router-v1", + "artifact_kind": "POST_1165_SUPPORT_LOCAL_REFINEMENT_GAUGE_AND_ROUTE_CUT", + "base": { + "repository": "przchojecki/rs-mca", + "exact_pr1165_head": PARENT_HEAD, + "official_upstream_main_at_refresh": UPSTREAM_MAIN, + }, + "source_bindings_at_parent": [ + source_binding( + "ACTIVE_V4_AFTER_PR1165_REPAIR", + "experimental/grande_finale.tex", + "df10d48605336f73e111aca620a1ec696aab6906", + "0020079d6fcb2016fca37cf2b01252ba5ed5128c47c6b293b00f17f7b3435d9d", + "GLOBAL_REPAIR_FULL_RANK_SPLIT_GRAM_AND_FULL_LIFT_CONTINUATIONS", + ), + source_binding( + "PR1165_COUNTEREXAMPLE_NOTE", + "experimental/notes/thresholds/mca_affine_span_incidence_counterexample_v1.md", + "984fe1fa4ff4ff34ed8a78499937243169ef9ffe", + "83446a16a91f401ee76bbd89da888fa98638272eadfcc784cc3b1c7e94419883", + "PARENT_COUNTEREXAMPLE_GLOBAL_REPAIR_AND_TOP_RANK_SCOPE", + ), + source_binding( + "PR1165_GLOBAL_REPAIR_VERIFIER", + "experimental/verify_mca_proper_subspace_occupancy_compiler_v1.py", + "ee46de85140dc3e79a120f28fe447475d3303844", + "9e319700ddfe6378a9cadbc902723db2a56726d26e34aa84dda3dfb5f8046f96", + "PARENT_GLOBAL_L_FACTOR_AND_WALLS", + ), + source_binding( + "PR1165_COUNTEREXAMPLE_VERIFIER", + "experimental/verify_mca_affine_span_incidence_counterexample_v1.py", + "3355975c6661551e78611083ebce343d3c540fda", + "26c07a19f94007cca71cfcfabf1a4e053e27abfd3196c33f805971f2ecde939b", + "PARENT_GF1009_REGRESSION", + ), + source_binding( + "PR1165_INDEPENDENT_COUNTEREXAMPLE_VERIFIER", + "experimental/verify_mca_affine_span_incidence_counterexample_v1_independent.py", + "a447210884b2d3b9f7707f0af7913f7e9654c718", + "bf48d7d533863b7b953e8080e5cd82f5159be4a3453e0d2391afc8f5437fff15", + "PARENT_INDEPENDENT_GF1009_REPLAY", + ), + source_binding( + "PR1165_FULL_RANK_GAUGE_VERIFIER", + "experimental/verify_mca_full_explanation_lifted_rank_gauge_dichotomy_v1.py", + "1ebd91022c7231354e5684be0dd0c61edd8d156e", + "92abd35176f143a1fa9fb09b5a8b6641715d425300011f1031547286d359f567", + "PARENT_FULL_EXPLANATION_GAUGE_OVERLAP_BOUNDARY", + ), + source_binding( + "PR1165_PUNCTURED_JOHNSON_VERIFIER", + "experimental/verify_mca_sparse_direction_punctured_johnson_profile_v1.py", + "806738813012ff4aeda97db6b0c02473f4d0ea45", + "b4fee5a75fcc716dee3c8ce02e129ad51e15bd537dc7404451d0bb58faf07c86", + "PARENT_SPARSE_DIRECTION_ROUTE_OVERLAP_BOUNDARY", + ), + source_binding( + "PR1165_NEAR_JOHNSON_GRAM_NOTE", + "experimental/notes/thresholds/mca_sparse_direction_near_johnson_gram_rank_v1.md", + "d303cb19770a258c1c8f2dfc0cd53401658b3ea1", + "e155d107a5dc31c6de9ad8fbb3395cee70937467fb798633c50e0e34e94272b6", + "PARENT_CENTERED_GRAM_CONTINUATION_SCOPE", + ), + source_binding( + "PR1165_NEAR_JOHNSON_GRAM_VERIFIER", + "experimental/verify_mca_sparse_direction_near_johnson_gram_rank_v1.py", + "0e013330a0cba9aa985b73a856bcbae6dcc0673b", + "5dd10235bb005ddfaeb0481952fae344886261bf5b62be66d8aa588bfe4cb4b6", + "PARENT_CENTERED_GRAM_EXACT_WALLS", + ), + source_binding( + "PR1165_MEAN_CENTERED_GRAM_NOTE", + "experimental/notes/thresholds/mca_sparse_direction_mean_centered_gram_profile_v1.md", + "aebf91a811eaeace0266a1a051219b240e0ec40f", + "f8d7bbbfcf2cd20a72e30d6e06cdac1489204369d62b485ab6ea11685f7d8d94", + "PARENT_MEAN_CENTERED_GRAM_CONTINUATION_SCOPE", + ), + source_binding( + "PR1165_MEAN_CENTERED_GRAM_VERIFIER", + "experimental/verify_mca_sparse_direction_mean_centered_gram_profile_v1.py", + "5e55d792a38d7285979df7b2f867c3d6cbd46a1f", + "f9b8ef1b5b3f4a64876f5eb19f7cf535c4780086f0d97e1bf9af96c29aa6c152", + "PARENT_MEAN_CENTERED_GRAM_EXACT_WALLS", + ), + ], + "external_source_bindings": [ + external_source_binding( + "PR1160_NEAR_RATIONAL_2W_THEOREM", + "c5f4ea7a0c78828c901ae5f3428894a8b2e2806b", + "experimental/notes/thresholds/kb_mca_supportwise_near_rational_two_anchor_repair_v1.md", + "12bc4a0f06189829a9490928e4855d1aa958f940", + "7e75d67420f4ed37add3b4f6ea3aa45e043a782a6396f328b1e34ce659938989", + "INTRINSIC_NEAR_RATIONAL_STRATUM_BOUND_LE_2W", + ), + external_source_binding( + "PR1160_NEAR_RATIONAL_2W_VERIFIER", + "c5f4ea7a0c78828c901ae5f3428894a8b2e2806b", + "experimental/scripts/verify_kb_mca_supportwise_near_rational_two_anchor_repair_v1.py", + "3b4533b53e947466de55262e3577108f125738c0", + "5d284cb0f857f2ff7c0797e911a2047009d6883d54f9d0df0a682627c09b5a35", + "INTRINSIC_NEAR_RATIONAL_STRATUM_EXACT_REPLAY", + ), + ], + "external_provenance": [ + { + "commit": "3a13f2dcdcab95f57fdda8a3a8beea024b0dd1de", + "repository": "AllenGrahamHart/rs-mca-prize-dag", + "status": "REFUTED_AT_FINAL_NORMAL_FLAT_STEP", + }, + { + "commit": "60db12dc5e741e24acaca032382bbbfa721ce499", + "repository": "AllenGrahamHart/rs-mca-prize-dag", + "status": "RANK_WALL_CONSEQUENCE_SUPERSEDED", + }, + { + "commit": "fc74e16cd3f3acfa1030317e8d1636f492aca11f", + "repository": "AllenGrahamHart/rs-mca-prize-dag", + "status": "COMPOSITION_REQUIRES_REAUDIT_WHERE_IT_USES_3A13", + }, + { + "commit": "c5f4ea7a0c78828c901ae5f3428894a8b2e2806b", + "repository": "przchojecki/rs-mca", + "status": "PR1160_EXTERNAL_2W_DELETION_DEPENDENCY_NOT_IN_PARENT", + }, + { + "search": "Exa targeted primary-source incidence/design-matrix sweep", + "sources_reviewed": 24, + "load_bearing_external_lemma_imported": False, + }, + ], + "counterexample": counterexample(), + "support_local_refinement": { + "name": "SUPPORT_LOCAL_REFINEMENT_OF_PROPER_SUBSPACE_COMPILER", + "theta_definition": "MIN(w+1,MIN_{gamma,b_in_Cprime}|{x_in_Sgamma:r1(x)!=b(x)}|)", + "theta_codeword_space": "DIRECTION_SPACE_CPRIME_NOT_AFFINE_TRANSLATE", + "bound": "FLOOR_MAX(n_(s+1)/(m*theta*(w+1)^(rise s-1)),(n-K+s)_(s+1)/(theta*(w+1)^(rise s)))", + "empty_rising_product_at_s1": 1, + "endpoint_profile_checks": endpoint_controls(), + "relation_to_pr1165_global_factor": "THETA_GE_L", + "theta_recomputed_after_gauge": True, + "independent_math_review": "GREEN_FINAL_SOURCE_MATH_REVIEW", + }, + "gauge": { + "kind": "REVERSIBLE_CODEWORD_TRANSLATION", + "relation_to_pr1165": "ARBITRARY_RANK_EXTENSION_OF_FULL_EXPLANATION_EXISTENCE_BRANCH", + "preserves": [ + "SLOPE_SET", + "ERROR_WORDS", + "EXACT_AGREEMENT_SUPPORTS", + "SAME_SUPPORT_PAIR_NONCONTAINMENT", + ], + "does_not_preserve_literal_received_line_representative": True, + "explanation_rank_from_error_rank": "s=a-1_FOR_AT_LEAST_TWO_SLOPES", + "owner_chronology_recomputed_after_gauge": False, + }, + "wolfram_replay": { + "required_stdout_sentinel": "KB_MCA_SUPPORT_LOCAL_THETA_WOLFRAM_PASS", + "wrapper_exit_status_alone_is_accepted": False, + }, + "exact_tables": tables, + "route_cut": { + "conditional_partition": "Z_BAD=N_DISJOINT_UNION_Z_WITH_|N|_LE_2w", + "pr1160_supplies_partition_when_integrated": True, + "exception_reserve_31_used": False, + "post_deletion_error_rank_at_most_9": "PAID", + "post_deletion_error_rank_10": "DIRECTION_EXCEPTIONS_LE_12", + "post_deletion_error_rank_11": "DIRECTION_EXCEPTIONS_LE_387", + "post_deletion_error_rank_12": "DIRECTION_EXCEPTIONS_LE_12049", + "post_deletion_error_rank_at_least_13": "UNPAID_HIGH_RANK", + "active_v4_ledger_movement": 0, + "KoalaBear_closed": False, + }, + "nonduplicate_scope": [ + "SUPPORT_LOCAL_THETA_REFINES_PR1165_GLOBAL_L", + "REVERSIBLE_ERROR_TO_EXPLANATION_RANK_GAUGE", + "CONDITIONAL_DIRECT_KOALA_ERROR_RANK_NINE_PAYMENT", + "EXACT_RANK_10_11_12_DIRECTION_EXCEPTION_TERMINALS", + "GF257_SMOOTH_DOMAIN_INDEPENDENT_REGRESSION", + ], + "packet_files": PACKET_FILES, + "packet_file_sha256": { + path: sha256((ROOT / path).read_bytes()) for path in PACKET_FILES + }, + } + manifest["payload_sha256"] = payload_hash(manifest) + return manifest + + +def verify_parent_sources(manifest: dict[str, Any]) -> None: + for binding in manifest["source_bindings_at_parent"]: + proc = subprocess.run( + ["git", "-C", str(ROOT), "show", f"{PARENT_HEAD}:{binding['path']}"], + capture_output=True, + ) + require(proc.returncode == 0, f"parent path {binding['id']}") + require(git_blob(proc.stdout) == binding["git_blob_sha1"], + f"parent blob {binding['id']}") + require(sha256(proc.stdout) == binding["sha256"], + f"parent sha {binding['id']}") + for binding in manifest["external_source_bindings"]: + proc = subprocess.run( + [ + "git", "-C", str(ROOT), "show", + f"{binding['commit']}:{binding['path']}", + ], + capture_output=True, + ) + require( + proc.returncode == 0, + "external path " + binding["id"] + + "; fetch prerequisite with `git fetch upstream " + "pull/1160/head:refs/remotes/upstream/pr-1160`", + ) + require(git_blob(proc.stdout) == binding["git_blob_sha1"], + f"external blob {binding['id']}") + require(sha256(proc.stdout) == binding["sha256"], + f"external sha {binding['id']}") + + +def verify_manifest(manifest: dict[str, Any], check_hashes: bool = True) -> None: + expected = build_manifest() + require(manifest == expected, "canonical manifest") + require(manifest["payload_sha256"] == payload_hash(manifest), "payload hash") + verify_parent_sources(manifest) + require(manifest["counterexample"]["slopes"] + > manifest["counterexample"]["old_printed_cap"], "old theorem false") + require(manifest["counterexample"]["slopes"] + <= manifest["counterexample"]["repaired_theta1_cap"], "repair accepts fixture") + kb = manifest["exact_tables"]["KoalaBear"] + require(kb["paid_total"] + kb["paid_slack"] == kb["budget"], + "Koala paid total") + require(kb["error_rank_10_11_12_exception_ceilings"] + == [12, 387, 12049], "exception terminals") + require(manifest["route_cut"]["exception_reserve_31_used"] is False, + "no conditional 31 addback") + require(manifest["route_cut"]["active_v4_ledger_movement"] == 0, + "zero deployed movement") + require(manifest["route_cut"]["KoalaBear_closed"] is False, + "no closure claim") + wl_text = (ROOT / "experimental/scripts/verify_kb_mca_support_local_theta_router_v1.wl").read_text() + require( + manifest["wolfram_replay"]["required_stdout_sentinel"] in wl_text, + "Wolfram PASS sentinel", + ) + require( + manifest["wolfram_replay"]["wrapper_exit_status_alone_is_accepted"] is False, + "Wolfram replay fail closed", + ) + if check_hashes: + for path, digest in manifest["packet_file_sha256"].items(): + require(sha256((ROOT / path).read_bytes()) == digest, + f"packet hash {path}") + + +def set_path(path: tuple[Any, ...], value: Any) -> Callable[[dict[str, Any]], None]: + def mutate(data: dict[str, Any]) -> None: + cursor: Any = data + for key in path[:-1]: + cursor = cursor[key] + cursor[path[-1]] = value + return mutate + + +def mutations() -> list[Callable[[dict[str, Any]], None]]: + return [ + set_path(("counterexample", "slopes"), 8), + set_path(("counterexample", "support_sizes", 0), 85), + set_path(("counterexample", "incident_normal_ranks", 0), 1), + set_path(("counterexample", "global_core_size"), 1), + set_path(("counterexample", "direction_max_agreement"), 86), + set_path(("counterexample", "minimum_near_distance"), 85), + set_path(("counterexample", "old_printed_cap"), 87), + set_path(("counterexample", "repaired_theta1_cap"), 8), + set_path(("support_local_refinement", "relation_to_pr1165_global_factor"), "UNRELATED"), + set_path(("support_local_refinement", "theta_codeword_space"), "AFFINE_TRANSLATE"), + set_path(("support_local_refinement", "endpoint_profile_checks"), 10715), + set_path(("gauge", "does_not_preserve_literal_received_line_representative"), False), + set_path(("gauge", "relation_to_pr1165"), "DUPLICATE"), + set_path(("gauge", "owner_chronology_recomputed_after_gauge"), True), + set_path(("exact_tables", "KoalaBear", "near_charge_2w"), 134975), + set_path(("exact_tables", "KoalaBear", "paid_error_rank_at_most"), 12), + set_path(("exact_tables", "KoalaBear", "paid_total"), 110390969172308039), + set_path(("exact_tables", "KoalaBear", "paid_slack"), 164589758939087048), + set_path(("exact_tables", "KoalaBear", "error_rank_10_11_12_exception_ceilings", 0), 13), + set_path(("exact_tables", "shortened_complete_code", "automatic_theta_paid_through_rank"), 13), + set_path(("exact_tables", "shortened_complete_code", "first_unpaid_even_at_maximum_theta"), 15), + set_path(("route_cut", "exception_reserve_31_used"), True), + set_path(("route_cut", "post_deletion_error_rank_10"), "PAID"), + set_path(("route_cut", "active_v4_ledger_movement"), 1), + set_path(("route_cut", "KoalaBear_closed"), True), + set_path(("base", "exact_pr1165_head"), "0" * 40), + set_path(("source_bindings_at_parent", 0, "git_blob_sha1"), "0" * 40), + set_path(("external_source_bindings", 0, "git_blob_sha1"), "0" * 40), + set_path(("external_provenance", 4, "load_bearing_external_lemma_imported"), True), + set_path(("wolfram_replay", "required_stdout_sentinel"), "MISSING_PASS_SENTINEL"), + set_path(("wolfram_replay", "wrapper_exit_status_alone_is_accepted"), True), + ] + + +def tamper_selftest(manifest: dict[str, Any]) -> int: + caught = 0 + for mutation in mutations(): + changed = copy.deepcopy(manifest) + mutation(changed) + changed["payload_sha256"] = payload_hash(changed) + try: + verify_manifest(changed, check_hashes=False) + except (Reject, KeyError, TypeError, ValueError): + caught += 1 + require(caught == len(mutations()), "all semantic mutations rejected") + duplicate = MANIFEST.read_text().replace( + '"schema":', '"schema":"duplicate",\n "schema":', 1 + ) + try: + json.loads(duplicate, object_pairs_hook=strict_pairs) + except Reject: + caught += 1 + require(caught == len(mutations()) + 1, "duplicate key rejected") + return caught + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--write", action="store_true") + parser.add_argument("--check", action="store_true") + parser.add_argument("--tamper-selftest", action="store_true") + args = parser.parse_args() + if args.write: + MANIFEST.parent.mkdir(parents=True, exist_ok=True) + MANIFEST.write_text(json.dumps(build_manifest(), indent=2) + "\n") + print(f"WROTE {MANIFEST}") + return + manifest = strict_load(MANIFEST) + verify_manifest(manifest) + if args.tamper_selftest: + caught = tamper_selftest(manifest) + print( + "KB_MCA_SUPPORT_LOCAL_THETA_TAMPER_PASS " + f"mutations={caught}/{caught} payload_sha256={manifest['payload_sha256']}" + ) + else: + counter = manifest["counterexample"] + kb = manifest["exact_tables"]["KoalaBear"] + print( + "KB_MCA_SUPPORT_LOCAL_THETA_PASS " + f"slopes={counter['slopes']} false_cap={counter['old_printed_cap']} " + f"repaired_cap={counter['repaired_theta1_cap']} " + f"endpoint_checks={manifest['support_local_refinement']['endpoint_profile_checks']} " + f"paid_error_rank_le={kb['paid_error_rank_at_most']} " + f"paid_total={kb['paid_total']} slack={kb['paid_slack']} " + f"ledger_movement=0 payload_sha256={manifest['payload_sha256']}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.sage b/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.sage new file mode 100644 index 000000000..15e36b6db --- /dev/null +++ b/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.sage @@ -0,0 +1,117 @@ +#!/usr/bin/env sage +"""Independent Sage replay of the affine-span counterexample and repair.""" + +F = GF(257) +n, K, m, w = 256, 1, 86, 85 +points = [(F(gamma), F(0)) for gamma in range(m)] + [(F(m), F(1))] + +hyperplanes = [(F(0), F(0), "common") for _ in range(w)] +connector_b = set() +for gamma in range(m): + b = F(1) / F(m - gamma) + a = -F(gamma) * b + connector_b.add(b) + hyperplanes.append((a, b, "connector")) + +available_b = [F(value) for value in range(1, 257) + if F(value) not in connector_b] +for index, b in enumerate(available_b[:w]): + forbidden = {lam - gamma * b for gamma, lam in points} + a = next(F(value) for value in range(257) if F(value) not in forbidden) + hyperplanes.append((a, b, "unused-%s" % index)) + +assert len(hyperplanes) == n +r0 = vector(F, [a for a, _, _ in hyperplanes]) +r1 = vector(F, [b for _, b, _ in hyperplanes]) +one = vector(F, [1] * n) + +supports = [] +errors = [] +normal_ranks = [] +near_distances = [] +for gamma, lam in points: + support = [index for index, (a, b, _) in enumerate(hyperplanes) + if a + gamma * b == lam] + assert len(support) == m + # K=1: simultaneous containment would make r0 and r1 constant on S. + assert (len({r0[index] for index in support}) > 1 or + len({r1[index] for index in support}) > 1) + normal_ranks.append(matrix(F, [[r1[index], -1] + for index in support]).rank()) + supports.append(set(support)) + errors.append(r0 + gamma * r1 - lam * one) + word = r0 + gamma * r1 + best_constant = max(list(word).count(value) for value in F) + near_distances.append(n - best_constant) + +assert len(points) == 87 +assert set(normal_ranks) == {2} +assert len(set.intersection(*supports)) == 0 +assert max(list(r1).count(value) for value in F) == w < m +assert min(near_distances) == 170 > w +assert matrix(F, [errors[index] - errors[0] + for index in range(1, len(errors))]).rank() == 2 + +# The explicit gauge is reversible and drops the explanation rank 2 -> 1. +gauge = -one +gauged_r1 = r1 - gauge +gauged_h = [(lam + gamma) * one for gamma, lam in points] +assert [r0 + gamma * gauged_r1 - h + for (gamma, _), h in zip(points, gauged_h)] == errors +assert matrix(F, [gauged_h[index] - gauged_h[0] + for index in range(1, len(gauged_h))]).rank() == 1 +assert [h + gamma * gauge for (gamma, _), h in zip(points, gauged_h)] == [ + lam * one for _, lam in points +] + +def falling(value, length): + return prod(value - index for index in range(length)) + +def rising(value, length): + return prod(value + index for index in range(length)) + +def repaired_cap(n_value, k_value, m_value, rank, theta=1): + w_value = m_value - k_value + first = falling(n_value, rank + 1) / ( + m_value * theta * rising(w_value + 1, rank - 1) + ) + second = falling(n_value - k_value + rank, rank + 1) / ( + theta * rising(w_value + 1, rank) + ) + return floor(max(first, second)) + +old_first = falling(n, 2) // (m * w) +old_second = falling(n, 2) // (w * (w + 1)) +assert old_first == old_second == 8 < len(points) +assert repaired_cap(n, K, m, 1) == 759 >= len(points) + +kb_n, kb_k, kb_m = 2097152, 1048576, 1116048 +kb_w = kb_m - kb_k +kb_budget = 274980728111395087 +kb_caps = [repaired_cap(kb_n, kb_k, kb_m, rank) + for rank in range(1, 10)] +assert kb_caps == [ + 16295594, 253241283, 3935435218, 118319201475, + 3677348367069, 114289853114503, 3552007973114420, + 110390969172173096, 3430729820133944932, +] +assert kb_caps[7] + 2 * kb_w == 110390969172308040 +assert kb_budget - (kb_caps[7] + 2 * kb_w) == 164589758939087047 +assert [repaired_cap(kb_n, kb_k, kb_m, rank, theta) + for rank, theta in [(9, 13), (10, 388), (11, 12050)]] == [ + 263902293856457302, 274790124064526354, 274970108028773601, +] + +# Complete shortened row (R+s,s,d+s): automatic theta=1 pays through s=9. +R, d = 1048576, 67472 +short_caps = [repaired_cap(R + rank, rank, d + rank, rank) + for rank in range(1, 11)] +assert short_caps[8] == 55413538236037195 < kb_budget +assert short_caps[9] == 861057176799343503 > kb_budget + +print( + "KB_MCA_SUPPORT_LOCAL_THETA_SAGE_PASS " + "slopes=%s false_cap=%s repaired_cap=759 normal_rank=2 " + "direction_max=85 min_near_distance=170 kb_wall=8/9 " + "shortened_wall=9/10" % (len(points), old_first) +) diff --git a/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.wl b/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.wl new file mode 100644 index 000000000..f97afc000 --- /dev/null +++ b/experimental/scripts/verify_kb_mca_support_local_theta_router_v1.wl @@ -0,0 +1,99 @@ +(* Exact Wolfram replay of the support-wise affine-span counterexample. *) + +ClearAll[falling, rising, repairedCap]; +falling[x_, j_] := Product[x - i, {i, 0, j - 1}]; +rising[x_, j_] := Product[x + i, {i, 0, j - 1}]; +repairedCap[n_, k_, m_, s_, theta_: 1] := Floor[Max[ + falling[n, s + 1]/(m theta rising[m - k + 1, s - 1]), + falling[n - k + s, s + 1]/(theta rising[m - k + 1, s]) +]]; + +p = 257; n = 256; k = 1; m = 86; w = 85; +points = Join[Table[{gamma, 0}, {gamma, 0, m - 1}], {{m, 1}}]; +common = Table[{0, 0, "common"}, {w}]; +connectors = Table[ + b = PowerMod[m - gamma, -1, p]; + {Mod[-gamma b, p], b, "connector"}, + {gamma, 0, m - 1} +]; +connectorB = connectors[[All, 2]]; +availableB = Select[Range[p - 1], ! MemberQ[connectorB, #] &]; +unused = Table[ + b = availableB[[index]]; + forbidden = DeleteDuplicates[Mod[#[[2]] - #[[1]] b, p] & /@ points]; + a = First[Select[Range[0, p - 1], ! MemberQ[forbidden, #] &]]; + {a, b, "unused"}, + {index, w} +]; +hyperplanes = Join[common, connectors, unused]; +r0 = hyperplanes[[All, 1]]; +r1 = hyperplanes[[All, 2]]; +supports = Table[ + With[{gamma = point[[1]], lambda = point[[2]]}, + Flatten@Position[ + Mod[r0 + gamma r1 - lambda, p], + 0 + ] + ], + {point, points} +]; +normalRanks = (MatrixRank[Mod[({r1[[#]], -1} & /@ #), p], + Modulus -> p] &) /@ supports; +directionMax = Max[Values[Counts[r1]]]; +nearDistances = Table[ + With[{gamma = point[[1]]}, + word = Mod[r0 + gamma r1, p]; + n - Max[Values[Counts[word]]] + ], + {point, points} +]; +oldCap = Max[ + Floor[falling[n, 2]/(m w)], + Floor[falling[n, 2]/(w (w + 1))] +]; +fixedCap = repairedCap[n, k, m, 1]; + +kbN = 2097152; kbK = 1048576; kbM = 1116048; +kbW = kbM - kbK; budget = 274980728111395087; +kbCaps = Table[repairedCap[kbN, kbK, kbM, s], {s, 1, 9}]; +thresholdCaps = Map[ + repairedCap[kbN, kbK, kbM, #[[1]], #[[2]]] &, + {{9, 13}, {10, 388}, {11, 12050}} +]; +previousTotals = Map[ + repairedCap[kbN, kbK, kbM, #[[1]], #[[2]] - 1] + 2 kbW &, + {{9, 13}, {10, 388}, {11, 12050}} +]; + +checks = { + Length[hyperplanes] == 256, + Length[points] == 87, + DeleteDuplicates[Length /@ supports] == {86}, + DeleteDuplicates[normalRanks] == {2}, + Intersection @@ supports == {}, + directionMax == 85, + Min[nearDistances] == 170, + oldCap == 8, + fixedCap == 759, + kbCaps[[8]] == 110390969172173096, + kbCaps[[9]] == 3430729820133944932, + kbCaps[[8]] + 2 kbW == 110390969172308040, + budget - kbCaps[[8]] - 2 kbW == 164589758939087047, + thresholdCaps == {263902293856457302, 274790124064526354, + 274970108028773601}, + previousTotals == {285894151677963688, 275500176064828033, + 274992929018868606} +}; + +If[! And @@ checks, + Print["KB_MCA_SUPPORT_LOCAL_THETA_WOLFRAM_FAIL"]; + Exit[1] +]; + +Print["KB_MCA_SUPPORT_LOCAL_THETA_WOLFRAM_PASS ", + <|"slopes" -> Length[points], "oldCap" -> oldCap, + "repairedCap" -> fixedCap, "directionMax" -> directionMax, + "minNearDistance" -> Min[nearDistances], + "kbPaidTotal" -> kbCaps[[8]] + 2 kbW, + "kbSlack" -> budget - kbCaps[[8]] - 2 kbW|> +]; diff --git a/experimental/scripts/verify_kb_mca_support_local_theta_router_v1_flint.py b/experimental/scripts/verify_kb_mca_support_local_theta_router_v1_flint.py new file mode 100644 index 000000000..bfd84fe8b --- /dev/null +++ b/experimental/scripts/verify_kb_mca_support_local_theta_router_v1_flint.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Independent FLINT replay of repaired affine-span integer walls.""" + +from flint import fmpq, fmpz + + +def falling(value, length): + result = fmpz(1) + for index in range(length): + result *= value - index + return result + + +def rising(value, length): + result = fmpz(1) + for index in range(length): + result *= value + index + return result + + +def bound(n, K, m, rank, theta=1): + w = m - K + first = fmpq( + falling(n, rank + 1), + fmpz(m) * theta * rising(w + 1, rank - 1), + ) + second = fmpq( + falling(n - K + rank, rank + 1), + fmpz(theta) * rising(w + 1, rank), + ) + value = max(first, second) + return value.numerator // value.denominator + + +# Exact GF(257) arithmetic: the old theorem says 8, the repaired theorem 759. +n, K, m = fmpz(256), fmpz(1), fmpz(86) +w = m - K +old = max( + falling(n, 2) // (m * w), + falling(n, 2) // (w * (w + 1)), +) +assert old == 8 +assert bound(n, K, m, 1) == 759 + +kb_n, kb_K, kb_m = fmpz(2097152), fmpz(1048576), fmpz(1116048) +kb_w = kb_m - kb_K +budget = fmpz(274980728111395087) +caps = [bound(kb_n, kb_K, kb_m, rank) for rank in range(1, 10)] +assert caps[7] == 110390969172173096 +assert caps[8] == 3430729820133944932 +assert caps[7] + 2 * kb_w == 110390969172308040 +assert budget - caps[7] - 2 * kb_w == 164589758939087047 + +thresholds = [(9, 13), (10, 388), (11, 12050)] +expected = [263902293856457302, 274790124064526354, 274970108028773601] +assert [bound(kb_n, kb_K, kb_m, rank, theta) + for rank, theta in thresholds] == expected +assert [bound(kb_n, kb_K, kb_m, rank, theta - 1) + 2 * kb_w + for rank, theta in thresholds] == [ + 285894151677963688, + 275500176064828033, + 274992929018868606, +] + +R, d = fmpz(1048576), fmpz(67472) +assert bound(R + 9, 9, d + 9, 9) == 55413538236037195 +assert bound(R + 10, 10, d + 10, 10) == 861057176799343503 + +print( + "KB_MCA_SUPPORT_LOCAL_THETA_FLINT_PASS " + "gf257_old=8 gf257_repaired=759 kb_wall=8/9 " + "error_wall=9/10 shortened_wall=9/10" +) diff --git a/experimental/verify_mca_affine_span_incidence_counterexample_v1.py b/experimental/verify_mca_affine_span_incidence_counterexample_v1.py new file mode 100644 index 000000000..3355975c6 --- /dev/null +++ b/experimental/verify_mca_affine_span_incidence_counterexample_v1.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python3 +"""Verify the exact GF(1009) affine-span MCA counterexample.""" + +from __future__ import annotations + +import copy +from collections import Counter + + +class Reject(ValueError): + pass + + +def construct(p: int) -> tuple[list[int], list[int], list[tuple[int, int]]]: + base = [0] * 100 + direction = [0] * 100 + slopes = list(range(1, 31)) + + for i, x in enumerate(range(20, 50), 1): + base[x] = (-i * i) % p + direction[x] = i + + used = set(range(31)) + candidate = 31 + for x in range(50, 71): + while candidate in used or any( + (1 + slope * candidate) % p == 0 for slope in slopes + ): + candidate += 1 + base[x] = 1 + direction[x] = candidate + used.add(candidate) + candidate += 1 + + for x in range(71, 100): + while candidate in used: + candidate += 1 + direction[x] = candidate + used.add(candidate) + forbidden = {0, 1} | { + (-slope * candidate) % p for slope in slopes + } + base[x] = next(value for value in range(2, p) if value not in forbidden) + candidate += 1 + + selected = [(slope, 0) for slope in slopes] + [(0, 1)] + return base, direction, selected + + +def validate(expected: dict[str, int]) -> dict[str, int]: + p = 1009 + base, direction, selected = construct(p) + if any(value == 0 for value in direction[20:]): + raise Reject("nonzero direction tail") + if len(set(direction[20:])) != 80: + raise Reject("distinct direction tail") + + explanations = set() + for slope, explanation in selected: + support = [ + x for x in range(100) + if (base[x] + slope * direction[x] - explanation) % p == 0 + ] + if len(support) != expected["support_size"]: + raise Reject("maximal support") + if ( + len({base[x] for x in support}) == 1 + and len({direction[x] for x in support}) == 1 + ): + raise Reject("pair containment") + explanations.add(explanation) + + direction_max = max(Counter(direction).values()) + bound = max(100 * 99 // (21 * 20), 100 * 99 // (20 * 21)) + observed = { + "slopes": len(selected), + "support_size": 21, + "affine_rank": len(explanations) - 1, + "direction_max": direction_max, + "bound": bound, + } + if observed != expected: + raise Reject("expected values") + if not direction_max < 21 or not len(selected) > bound: + raise Reject("theorem violation") + return observed + + +def main() -> None: + expected = { + "slopes": 31, + "support_size": 21, + "affine_rank": 1, + "direction_max": 20, + "bound": 23, + } + result = validate(expected) + mutations = 0 + for key in ("slopes", "support_size", "direction_max", "bound"): + changed = copy.deepcopy(expected) + changed[key] += 1 + try: + validate(changed) + except Reject: + mutations += 1 + if mutations != 4: + raise AssertionError("mutation controls") + print( + "MCA_AFFINE_SPAN_INCIDENCE_COUNTEREXAMPLE_V1_PASS " + f"slopes={result['slopes']} bound={result['bound']} " + f"direction_max={result['direction_max']} mutations={mutations}/4" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_affine_span_incidence_counterexample_v1_independent.py b/experimental/verify_mca_affine_span_incidence_counterexample_v1_independent.py new file mode 100644 index 000000000..a44721088 --- /dev/null +++ b/experimental/verify_mca_affine_span_incidence_counterexample_v1_independent.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +"""Independently reconstruct and audit the affine-span MCA counterexample.""" + +from __future__ import annotations + + +class Reject(ValueError): + pass + + +def main() -> None: + p = 1009 + base: list[int | None] = [None] * 100 + direction: list[int | None] = [None] * 100 + + for x in range(20): + base[x], direction[x] = 0, 0 + for slope in range(1, 31): + x = 19 + slope + base[x], direction[x] = (-slope * slope) % p, slope + + forbidden_direction = { + (-pow(slope, -1, p)) % p for slope in range(1, 31) + } + available = iter( + value for value in range(31, p) if value not in forbidden_direction + ) + used = set(range(31)) + for x in range(50, 71): + value = next(value for value in available if value not in used) + base[x], direction[x] = 1, value + used.add(value) + + candidate = max(used) + 1 + for x in range(71, 100): + while candidate in used: + candidate += 1 + direction[x] = candidate + used.add(candidate) + forbidden_base = {0, 1} | { + (-slope * candidate) % p for slope in range(1, 31) + } + base[x] = next( + value for value in range(2, p) if value not in forbidden_base + ) + candidate += 1 + + if any(value is None for value in base + direction): + raise Reject("incomplete construction") + r0 = [int(value) for value in base] + r1 = [int(value) for value in direction] + selected = [(slope, 0) for slope in range(1, 31)] + [(0, 1)] + + for slope, explanation in selected: + support = tuple( + x + for x in range(100) + if (r0[x] + slope * r1[x]) % p == explanation + ) + if len(support) != 21: + raise Reject("selected support size") + if len({r0[x] for x in support}) == 1 and len( + {r1[x] for x in support} + ) == 1: + raise Reject("same-support pair containment") + + direction_max = max( + sum(value == constant for value in r1) for constant in range(p) + ) + affine_bound = (100 * 99) // (21 * 20) + if (len(selected), direction_max, affine_bound) != (31, 20, 23): + raise Reject("claimed invariants") + + print( + "MCA_AFFINE_SPAN_INCIDENCE_COUNTEREXAMPLE_V1_INDEPENDENT_PASS " + "slopes=31 support_checks=31 field_values=1009 " + "bound=23" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_explanation_lifted_rank_gauge_dichotomy_v1.py b/experimental/verify_mca_full_explanation_lifted_rank_gauge_dichotomy_v1.py new file mode 100644 index 000000000..1ebd91022 --- /dev/null +++ b/experimental/verify_mca_full_explanation_lifted_rank_gauge_dichotomy_v1.py @@ -0,0 +1,320 @@ +#!/usr/bin/env python3 +"""Audit the lifted-rank gauge dichotomy and its two deployed rank-drop walls.""" + +from __future__ import annotations + +from fractions import Fraction +from itertools import product +from math import prod + + +def matrix_rank(rows: list[tuple[int, ...]], prime: int) -> int: + work = [[entry % prime for entry in row] for row in rows] + rank = 0 + width = len(work[0]) if work else 0 + for column in range(width): + pivot = next( + (index for index in range(rank, len(work)) if work[index][column]), + None, + ) + if pivot is None: + continue + work[rank], work[pivot] = work[pivot], work[rank] + inverse = pow(work[rank][column], -1, prime) + work[rank] = [(inverse * value) % prime for value in work[rank]] + for index in range(len(work)): + if index == rank or work[index][column] == 0: + continue + scale = work[index][column] + work[index] = [ + (value - scale * basis) % prime + for value, basis in zip(work[index], work[rank]) + ] + rank += 1 + return rank + + +def dot(left: tuple[int, ...], right: tuple[int, ...], prime: int) -> int: + return sum(a * b for a, b in zip(left, right)) % prime + + +def gauge_image_rank( + lifted_basis: list[tuple[int, ...]], + gauge: tuple[int, ...], + prime: int, +) -> int: + image = [ + tuple((row[index + 1] - row[0] * gauge[index]) % prime + for index in range(len(gauge))) + for row in lifted_basis + ] + return matrix_rank(image, prime) + + +def audit_small_field() -> tuple[int, int]: + prime, dimension = 5, 2 + gauges = list(product(range(prime), repeat=dimension)) + standard = [ + tuple(int(index == coordinate) for index in range(dimension)) + for coordinate in range(dimension) + ] + gauge_checks = 0 + + for functional in product(range(prime), repeat=dimension): + if not any(functional): + continue + graph_basis = [ + (functional[index], *standard[index]) + for index in range(dimension) + ] + if matrix_rank(graph_basis, prime) != dimension: + raise ValueError("graph lifted rank") + histogram: dict[int, int] = {} + for gauge in gauges: + observed = gauge_image_rank(graph_basis, gauge, prime) + expected = dimension - int(dot(functional, gauge, prime) == 1) + if observed != expected: + raise ValueError("graph gauge classification") + histogram[observed] = histogram.get(observed, 0) + 1 + gauge_checks += 1 + expected_histogram = { + dimension - 1: prime ** (dimension - 1), + dimension: prime**dimension - prime ** (dimension - 1), + } + if histogram != expected_histogram: + raise ValueError("graph gauge histogram") + error_basis = [ + (row[0], *tuple(-value % prime for value in row[1:])) + for row in graph_basis + ] + if matrix_rank(error_basis, prime) != dimension: + raise ValueError("graph error rank") + + full_basis = [ + tuple(int(index == coordinate) for index in range(dimension + 1)) + for coordinate in range(dimension + 1) + ] + if matrix_rank(full_basis, prime) != dimension + 1: + raise ValueError("full lifted rank") + for gauge in gauges: + if gauge_image_rank(full_basis, gauge, prime) != dimension: + raise ValueError("full-lift gauge rank") + gauge_checks += 1 + full_errors = [ + (row[0], *tuple(-value % prime for value in row[1:])) + for row in full_basis + ] + if matrix_rank(full_errors, prime) != dimension + 1: + raise ValueError("full-lift error rank") + + graph_basis = [(1, 1, 0), (0, 0, 1)] + hostile = graph_basis + [(0, 1, 0)] + if matrix_rank(hostile, prime) != dimension + 1: + raise ValueError("hostile perturbation lifted rank") + if any( + gauge_image_rank(hostile, gauge, prime) != dimension + for gauge in gauges + ): + raise ValueError("hostile perturbation gauge rank") + return gauge_checks, 1 + + +def word_weight(word: tuple[int, ...]) -> int: + return sum(value != 0 for value in word) + + +def span_word( + codeword: tuple[int, ...], scalar: int, direction: tuple[int, ...], prime: int +) -> tuple[int, ...]: + return tuple((value + scalar * extra) % prime + for value, extra in zip(codeword, direction)) + + +def dependent( + left: tuple[int, ...], right: tuple[int, ...], prime: int +) -> bool: + return any( + all((b - scalar * a) % prime == 0 for a, b in zip(left, right)) + for scalar in range(prime) + ) + + +def extension_weights( + words: frozenset[tuple[int, ...]], prime: int +) -> tuple[int, int, int]: + nonzero = [word for word in words if any(word)] + first = min(map(word_weight, nonzero)) + second = len(nonzero[0]) + for index, left in enumerate(nonzero): + for right in nonzero[index + 1:]: + if dependent(left, right, prime): + continue + union = sum(a != 0 or b != 0 for a, b in zip(left, right)) + second = min(second, union) + full = sum( + any(word[index] for word in words) + for index in range(len(nonzero[0])) + ) + return first, second, full + + +def audit_near_mds_extensions() -> tuple[int, dict[int, int]]: + prime, length = 5, 5 + code = [ + tuple((constant + slope * x) % prime for x in range(length)) + for constant, slope in product(range(prime), repeat=2) + ] + code_set = frozenset(code) + extensions: dict[frozenset[tuple[int, ...]], int] = {} + for direction in product(range(prime), repeat=length): + if direction in code_set: + continue + extension = frozenset( + span_word(codeword, scalar, direction, prime) + for codeword in code + for scalar in range(prime) + ) + distance = min( + word_weight(tuple((a - b) % prime + for a, b in zip(direction, codeword))) + for codeword in code + ) + if extension in extensions and extensions[extension] != distance: + raise ValueError("extension distance invariance") + extensions[extension] = distance + if len(extensions) != 31: + raise ValueError("extension census") + profile: dict[int, int] = {} + for extension, distance in extensions.items(): + if extension_weights(extension, prime) != (distance, 4, 5): + raise ValueError("near-MDS hierarchy") + profile[distance] = profile.get(distance, 0) + 1 + if profile != {1: 5, 2: 25, 3: 1}: + raise ValueError("extension profile") + return len(extensions), profile + + +def falling(value: int, length: int) -> int: + return prod(value - offset for offset in range(length)) + + +def occupancy_bound( + residual: int, + distance: int, + dimension: int, + rank: int, + factor: int, +) -> int: + length, agreement = residual + dimension, distance + dimension + middle = prod(distance + offset for offset in range(1, rank)) + candidates = [] + for zero_normals in range(dimension - rank + 1): + for global_normals in range(zero_normals + 1): + candidates.append( + Fraction( + falling(length - zero_normals, rank + 1), + (agreement - global_normals) * middle * factor, + ) + ) + maximum = max(candidates) + return maximum.numerator // maximum.denominator + + +def first_factor( + residual: int, + distance: int, + dimension: int, + rank: int, + budget: int, +) -> int: + low = high = 1 + while occupancy_bound(residual, distance, dimension, rank, high) > budget: + high *= 2 + while low < high: + middle = (low + high) // 2 + if occupancy_bound(residual, distance, dimension, rank, middle) <= budget: + high = middle + else: + low = middle + 1 + return low + + +def audit_deployed_walls() -> tuple[int, int]: + rows = ( + { + "name": "KoalaBear", + "R": 1048576, + "d": 67472, + "K": 14, + "budget": 274980728111395087, + "drop_high": 992852, + "low": 5, + "frontier_j": 4337, + "full_high": 1044239, + "mds_endpoint": 743896698428332665, + "required_top_factor": 182530, + }, + { + "name": "Mersenne-31", + "R": 1048576, + "d": 67448, + "K": 6, + "budget": 16777215, + "drop_high": 1037876, + "low": 1, + "frontier_j": 4334, + "full_high": 1044242, + "mds_endpoint": 219426634, + "required_top_factor": 882143, + }, + ) + adjacent = ceilings = 0 + for row in rows: + rank = row["K"] - 1 + factor = first_factor( + row["R"], row["d"], row["K"], rank, row["budget"] + ) + if row["R"] - row["d"] + factor != row["drop_high"]: + raise ValueError(row["name"] + " rank-drop wall") + if not ( + occupancy_bound(row["R"], row["d"], row["K"], rank, factor) + <= row["budget"] + < occupancy_bound( + row["R"], row["d"], row["K"], rank, factor - 1 + ) + ): + raise ValueError(row["name"] + " adjacent crossing") + if row["R"] - row["frontier_j"] != row["full_high"]: + raise ValueError(row["name"] + " full-lift arithmetic") + if not row["low"] < row["drop_high"] < row["full_high"]: + raise ValueError(row["name"] + " support ordering") + endpoint = occupancy_bound( + row["R"], row["d"], row["K"], row["K"], row["d"] + ) + required = first_factor( + row["R"], row["d"], row["K"], row["K"], row["budget"] + ) + if endpoint != row["mds_endpoint"] or not endpoint > row["budget"]: + raise ValueError(row["name"] + " MDS endpoint") + if required != row["required_top_factor"] or not required > row["d"]: + raise ValueError(row["name"] + " required top factor") + adjacent += 1 + ceilings += 1 + return adjacent, ceilings + + +def main() -> None: + gauges, hostile = audit_small_field() + extensions, profile = audit_near_mds_extensions() + adjacent, ceilings = audit_deployed_walls() + profile_text = ",".join(f"{distance}:{count}" + for distance, count in sorted(profile.items())) + print( + "MCA_FULL_EXPLANATION_LIFTED_RANK_GAUGE_DICHOTOMY_V1_PASS " + f"gauges={gauges} hostile={hostile} extensions={extensions} " + f"profile={profile_text} adjacent={adjacent} ceilings={ceilings}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_boundary_anchor_continuation_v1.py b/experimental/verify_mca_full_lift_boundary_anchor_continuation_v1.py new file mode 100644 index 000000000..f3feaaad4 --- /dev/null +++ b/experimental/verify_mca_full_lift_boundary_anchor_continuation_v1.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python3 +"""Verify the one-layer full-lift boundary-anchor continuation.""" + +from __future__ import annotations + +import copy + + +ROW = { + "R": 1048576, "d": 67448, "K": 6, "budget": 16777215, + "e": 98230, "s": 32741, "q": 1, "H": 65488, + "line": 981129, "P_H": 16434744, "breaks_H": 1671, + "B_H": 15059444, "P_previous": 15506184, + "breaks_previous": 1670, "B_previous": 14130884, + "small": 16434745, "anchored": 16487313, + "bound": 16487313, "slack": 289902, + "next_e": 98231, "next_q": 2, "next_P_H": 17492172, + "next_P_previous": 16433719, "next_small": 17492173, + "next_anchored": 17414848, "next_bound": 17492173, + "next_excess": 714958, +} + + +class Reject(ValueError): + pass + + +def cap(R: int, d: int, K: int, e: int, h: int) -> int: + n, m, c = R + K - e, d + K, K - 1 + A = m - h + D = A * A - n * c + if D > 0: + return n * (A - c) // D + g = -D + balance = 2 * A * A - n * c + T = (n - A) ** 2 - (n - 1) * g + if balance < 0 or T <= 0: + raise Reject("undefined cap") + return (n - 1) * n * n * (A - c) // (A * T) + + +def profile(R: int, d: int, K: int, e: int, J: int): + values = [0] + [cap(R, d, K, e, h) for h in range(1, J + 1)] + for h in range(J - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + total = sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, J + 1)) + breaks = sum(values[h] != values[h - 1] for h in range(1, J + 1)) + return total, breaks, values[J] + + +def endpoint(row, e): + R, d, K = row["R"], row["d"], row["K"] + N, m = R + K, d + K + s, q = divmod(e - K, 3) + H = e - s - 1 + if H < 2 or q < 1 or 2 * (s + 1) >= e or m - H <= K - 1: + raise Reject("hypotheses") + full = profile(R, d, K, e, H) + previous = profile(R, d, K, e, H - 1) + line = N - m + 1 + small = full[0] + 1 + anchored = previous[0] + line + return (s, q, H, line, *full, *previous, small, anchored, + max(small, anchored)) + + +def validate(row): + got = endpoint(row, row["e"]) + expected = ( + row["s"], row["q"], row["H"], row["line"], + row["P_H"], row["breaks_H"], row["B_H"], + row["P_previous"], row["breaks_previous"], row["B_previous"], + row["small"], row["anchored"], row["bound"], + ) + if got != expected: + raise Reject("endpoint") + if row["budget"] - row["bound"] != row["slack"] or row["slack"] <= 0: + raise Reject("slack") + nxt = endpoint(row, row["next_e"]) + if (nxt[1], nxt[4], nxt[7], nxt[10], nxt[11], nxt[12]) != ( + row["next_q"], row["next_P_H"], row["next_P_previous"], + row["next_small"], row["next_anchored"], row["next_bound"] + ): + raise Reject("adjacent") + if row["next_bound"] - row["budget"] != row["next_excess"]: + raise Reject("adjacent excess") + return 24 + + +def main() -> None: + checks = validate(copy.deepcopy(ROW)) + mutations = [] + for key, delta in (("P_H", 1), ("anchored", -1), + ("next_bound", -1), ("slack", 1)): + changed = copy.deepcopy(ROW) + changed[key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_BOUNDARY_ANCHOR_CONTINUATION_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_boundary_line_bank_absorption_v1.c b/experimental/verify_mca_full_lift_boundary_line_bank_absorption_v1.c new file mode 100644 index 000000000..500acc6f6 --- /dev/null +++ b/experimental/verify_mca_full_lift_boundary_line_bank_absorption_v1.c @@ -0,0 +1,168 @@ +#include +#include +#include + +/* Full constant-memory replay of the official paid interval and wall. */ + +typedef __int128 i128; + +enum { + R = 1048576, D = 67448, K = 6, N = R + K, M = D + K, + C = K - 1, BUDGET = 16777215, LINE = N - M + 1, + CUTOFF = 65272, +}; + +static int64_t caps[CUTOFF + 1]; + +static void reject(const char *what, int e, int h) { + fprintf(stderr, "REJECT %s e=%d h=%d\n", what, e, h); + exit(1); +} + +static int64_t raw_cap(int e, int h) { + int64_t n = N - e, agreement = M - h; + int64_t johnson = agreement * agreement - n * C; + if (johnson > 0) return n * (agreement - C) / johnson; + int64_t gap = -johnson; + int64_t balance = 2 * agreement * agreement - n * C; + int64_t tangent = (n - agreement) * (n - agreement) + - (n - 1) * gap; + if (balance < 0 || tangent <= 0) reject("prefix", e, h); + return (int64_t)(((i128)(n - 1) * n * n * (agreement - C)) + / ((i128)agreement * tangent)); +} + +static int64_t prefix(int e) { + caps[0] = 0; + for (int h = 1; h <= CUTOFF; ++h) caps[h] = raw_cap(e, h); + for (int h = CUTOFF - 1; h >= 1; --h) { + if (caps[h + 1] < caps[h]) caps[h] = caps[h + 1]; + } + int64_t total = 0; + for (int h = 1; h <= CUTOFF; ++h) { + total += (caps[h] - caps[h - 1]) * (e / h); + } + return total; +} + +struct row { + int e, q, H, layers, groups, branch, failure; + int64_t prefix, base, direct, threshold, core, inside; + int64_t sync, agreement, low, bound, slack; +}; + +static struct row record(int e) { + struct row x = {0}; + x.e = e; + x.q = (e - K) % 3; + int s = (e - K) / 3; + x.H = e - s - 1; + int upper = x.H < M ? x.H : M; + if (CUTOFF >= upper) reject("empty line bank", e, upper); + x.prefix = prefix(e); + x.base = x.prefix; + x.groups = x.H < M; + for (int h = CUTOFF + 1; h <= upper; ++h) { + int64_t inside = 2LL * h - e; + int64_t denominator = inside * inside - (int64_t)e * C; + if (2 * h <= e || inside <= C || denominator <= 0) { + x.branch = 2; + x.failure = 1; + return x; + } + int64_t classes = + (int64_t)(((i128)e * (inside - C)) / denominator); + if (classes < 1) reject("class count", e, h); + x.base += 1 - classes; + x.groups += (int)classes; + ++x.layers; + } + x.direct = x.base + (int64_t)x.groups * LINE; + if (x.direct <= BUDGET) { + x.branch = 0; + x.bound = x.direct; + x.slack = BUDGET - x.bound; + return x; + } + int64_t required = BUDGET - x.base + 1; + if (required <= 0 || x.groups == 0) { + x.branch = 2; + x.failure = 2; + return x; + } + x.threshold = (required + x.groups - 1) / x.groups; + if (x.threshold < 2) { + x.branch = 2; + x.failure = 3; + return x; + } + x.core = (x.threshold * M - N + x.threshold - 2) + / (x.threshold - 1); + x.inside = x.core - C; + x.sync = e - x.inside + K; + x.agreement = M - x.sync + 1; + int64_t n = N - e; + int64_t denominator = x.agreement * x.agreement - n * C; + if (denominator <= 0) { + x.branch = 2; + x.failure = 4; + return x; + } + x.low = n * (x.agreement - C) / denominator; + x.bound = (int64_t)e * x.low + LINE; + x.slack = BUDGET - x.bound; + x.branch = x.bound <= BUDGET ? 1 : 2; + x.failure = x.branch == 1 ? 0 : 5; + return x; +} + +static void print_row(const char *name, const struct row *x) { + printf("%s e=%d q=%d H=%d branch=%d failure=%d prefix=%lld " + "layers=%d groups=%d base=%lld direct=%lld threshold=%lld " + "core=%lld inside=%lld sync=%lld agreement=%lld low=%lld " + "bound=%lld slack=%lld\n", + name, x->e, x->q, x->H, x->branch, x->failure, + (long long)x->prefix, x->layers, x->groups, + (long long)x->base, (long long)x->direct, + (long long)x->threshold, (long long)x->core, + (long long)x->inside, (long long)x->sync, + (long long)x->agreement, (long long)x->low, + (long long)x->bound, (long long)x->slack); +} + +int main(void) { + struct row first = {0}, last = {0}, wall = {0}; + int paid = 0, direct = 0, absorption = 0; + for (int e = 101157; e <= 140000; ++e) { + struct row x = record(e); + if (x.branch == 2) { + wall = x; + break; + } + if (!paid) first = x; + last = x; + ++paid; + if (x.branch == 0) ++direct; else ++absorption; + } + if (!(paid == 23649 && direct == 0 && absorption == 23649 && + first.e == 101157 && first.prefix == 1502226 && + first.groups == 6502 && first.base == 1497892 && + first.threshold == 2350 && first.bound == 3813525 && + last.e == 124805 && last.prefix == 1636955 && + last.groups == 34560 && last.base == 1604577 && + last.threshold == 440 && last.core == 65220 && + last.low == 126 && last.bound == 16706559 && + wall.e == 124806 && wall.failure == 5 && + wall.groups == 34564 && wall.base == 1604586 && + wall.threshold == 439 && wall.low == 127 && + wall.bound == 16831491)) { + reject("interval census", wall.e, wall.H); + } + print_row("FIRST", &first); + print_row("LAST_PAID", &last); + print_row("FIRST_WALL", &wall); + printf("MCA_FULL_LIFT_BOUNDARY_LINE_BANK_ABSORPTION_V1_SCAN_PASS " + "paid=%d direct=%d absorption=%d\n", + paid, direct, absorption); + return 0; +} diff --git a/experimental/verify_mca_full_lift_boundary_line_bank_absorption_v1.py b/experimental/verify_mca_full_lift_boundary_line_bank_absorption_v1.py new file mode 100644 index 000000000..c9b162fca --- /dev/null +++ b/experimental/verify_mca_full_lift_boundary_line_bank_absorption_v1.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python3 +"""Verify endpoints of the M31 boundary-line-bank payment.""" + +from __future__ import annotations + +import copy + + +ROW = { + "R": 1048576, "d": 67448, "K": 6, "budget": 16777215, + "cutoff": 65272, "paid_count": 23649, + "first": { + "e": 101157, "q": 0, "H": 67439, "prefix": 1502226, + "layers": 2167, "groups": 6502, "base": 1497892, + "direct": 6380798650, "threshold": 2350, "core": 67037, + "inside": 67032, "sync": 34131, "agreement": 33324, + "low": 28, "bound": 3813525, "slack": 12963690, + }, + "last": { + "e": 124805, "q": 2, "H": 83205, "prefix": 1636955, + "layers": 2182, "groups": 34560, "base": 1604577, + "direct": 33909422817, "threshold": 440, "core": 65220, + "inside": 65215, "sync": 59596, "agreement": 7859, + "low": 126, "bound": 16706559, "slack": 70656, + }, + "adjacent": { + "e": 124806, "q": 0, "H": 83205, "prefix": 1636968, + "layers": 2182, "groups": 34564, "base": 1604586, + "direct": 33913347342, "threshold": 439, "core": 65214, + "inside": 65209, "sync": 59603, "agreement": 7852, + "low": 127, "bound": 16831491, "slack": -54276, + }, +} + + +class Reject(ValueError): + pass + + +def raw_cap(R: int, d: int, K: int, e: int, h: int) -> int: + n, m, c = R + K - e, d + K, K - 1 + agreement = m - h + johnson = agreement * agreement - n * c + if johnson > 0: + return n * (agreement - c) // johnson + gap = -johnson + balance = 2 * agreement * agreement - n * c + tangent = (n - agreement) ** 2 - (n - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("undefined prefix cap") + return ((n - 1) * n * n * (agreement - c) + // (agreement * tangent)) + + +def prefix(R: int, d: int, K: int, e: int, cutoff: int) -> int: + values = [0] + [ + raw_cap(R, d, K, e, h) for h in range(1, cutoff + 1)] + for h in range(cutoff - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, cutoff + 1)) + + +def endpoint(row, expected): + R, d, K, e = row["R"], row["d"], row["K"], expected["e"] + N, m, c = R + K, d + K, K - 1 + s, q = divmod(e - K, 3) + H = e - s - 1 + upper = min(H, m) + p = prefix(R, d, K, e, row["cutoff"]) + class_sum = 0 + layers = 0 + for h in range(row["cutoff"] + 1, upper + 1): + A = 2 * h - e + denominator = A * A - e * c + if 2 * h <= e or A <= c or denominator <= 0: + raise Reject("line-bank guard") + classes = e * (A - c) // denominator + if classes < 1: + raise Reject("class count") + class_sum += classes + layers += 1 + groups = int(H < m) + class_sum + base = p + layers - class_sum + direct = base + groups * (N - m + 1) + required = row["budget"] - base + 1 + threshold = (required + groups - 1) // groups + if required <= 0 or threshold < 2: + raise Reject("pigeonhole") + core = (threshold * m - N + threshold - 2) // (threshold - 1) + inside = core - c + sync = e - inside + K + agreement = m - sync + 1 + n = N - e + denominator = agreement * agreement - n * c + if denominator <= 0: + raise Reject("low Johnson") + low = n * (agreement - c) // denominator + bound = e * low + (N - m + 1) + return { + "e": e, "q": q, "H": H, "prefix": p, "layers": layers, + "groups": groups, "base": base, "direct": direct, + "threshold": threshold, "core": core, "inside": inside, + "sync": sync, "agreement": agreement, "low": low, + "bound": bound, "slack": row["budget"] - bound, + }, layers + + +def validate(row): + checks = 47 + for name in ("first", "last", "adjacent"): + got, layers = endpoint(row, row[name]) + if got != row[name]: + raise Reject(name) + checks += layers + if (row["paid_count"] != row["last"]["e"] - row["first"]["e"] + 1 or + row["adjacent"]["e"] != row["last"]["e"] + 1 or + row["last"]["bound"] > row["budget"] or + row["adjacent"]["bound"] <= row["budget"]): + raise Reject("summary") + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(ROW)) + mutations = [] + for section, key, delta in ( + ("last", "prefix", 1), ("last", "groups", 1), + ("last", "bound", -1), ("adjacent", "bound", -1), + (None, "paid_count", 1)): + changed = copy.deepcopy(ROW) + target = changed if section is None else changed[section] + target[key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_BOUNDARY_LINE_BANK_ABSORPTION_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_common_factor_base_field_descent_v1.py b/experimental/verify_mca_full_lift_common_factor_base_field_descent_v1.py new file mode 100644 index 000000000..bb44a2336 --- /dev/null +++ b/experimental/verify_mca_full_lift_common_factor_base_field_descent_v1.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +"""Verify the M31 base-field component descent constants.""" + +from __future__ import annotations + +import copy + + +class Reject(ValueError): + pass + + +EXPECTED = { + "base_pairs_min": 5079, + "component_pairs_min": 132, + "factor_points_min": 126263, + "exceptions_max": 3974, +} + + +def validate(expected: dict[str, int]) -> int: + if 2147483647 <= 43: + raise Reject("characteristic guard") + records = [] + for degree in range(2, 44): + captured = 7583 - (52 - degree) ** 2 + retained = captured - degree**2 + component = (retained + degree - 1) // degree + records.append((degree, captured, retained, component)) + if min(record[2] for record in records) != expected["base_pairs_min"]: + raise Reject("base pairs") + if min(record[3] for record in records) != expected["component_pairs_min"]: + raise Reject("component pairs") + pairs = expected["base_pairs_min"] + numerator = pairs * 807**2 + denominator = 807 + 5 * (pairs - 1) + points = (numerator + denominator - 1) // denominator + if points != expected["factor_points_min"]: + raise Reject("factor points") + if 130237 - points != expected["exceptions_max"]: + raise Reject("exceptions") + return 83 + + +def main() -> None: + checks = validate(EXPECTED) + mutations = [] + for key, delta in ( + ("base_pairs_min", -1), ("component_pairs_min", -1), + ("factor_points_min", -1), ("exceptions_max", 1)): + mutant = copy.deepcopy(EXPECTED) + mutant[key] += delta + try: + validate(mutant) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise Reject("mutations") + print("MCA_FULL_LIFT_COMMON_FACTOR_BASE_FIELD_DESCENT_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)} " + "base_pairs>=5079 component_pairs>=132 exceptions<=3974") + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_common_factor_mass_router_v1.py b/experimental/verify_mca_full_lift_common_factor_mass_router_v1.py new file mode 100644 index 000000000..d843136cc --- /dev/null +++ b/experimental/verify_mca_full_lift_common_factor_mass_router_v1.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +"""Verify the M31 common-factor mass router constants.""" + +from __future__ import annotations + +import copy +from fractions import Fraction + + +N, M, C, BUDGET = 1048582, 67454, 5, 16777215 + + +class Reject(ValueError): + pass + + +def compute() -> dict[str, int]: + e, lines, lower, cap = 130237, 7582, 807, 64796 + core_budget = min(lines * cap, e + lines * (lines + 1) * C // 2) + lower_sum = lines * lower + full, remainder = divmod(core_budget - lower_sum, cap - lower) + value = full * Fraction(N - cap, M - cap) + value += Fraction(N - lower - remainder, M - lower - remainder) + value += (lines - full - 1) * Fraction(N - lower, M - lower) + charge = value.numerator // value.denominator + target = BUDGET - charge + threshold = (target - 13961576 + 1933560) // 1933560 + degree, factor_degree = 52, 1 + off = (degree - factor_degree) ** 2 + on = lines + 1 - off + points = (on * lower * lower + lower + C * (on - 1) - 1) // ( + lower + C * (on - 1)) + return { + "e": e, "removed_before_forcing": lines, + "forced_distinct_lines": lines + 1, "inside_core_lower": lower, + "actual_core_cap": cap, "core_budget": core_budget, + "lower_sum": lower_sum, "full_caps": full, + "remainder": remainder, "charge": charge, "target": target, + "next_threshold": threshold, "ambient_value_degree": degree, + "minimum_factor_degree": factor_degree, + "maximum_off_factor_pairs": off, + "minimum_on_factor_pairs": on, + "minimum_factor_points": points, + "maximum_exception_points": e - points, + } + + +EXPECTED = { + "e": 130237, "removed_before_forcing": 7582, + "forced_distinct_lines": 7583, "inside_core_lower": 807, + "actual_core_cap": 64796, "core_budget": 143866002, + "lower_sum": 6118674, "full_caps": 2152, "remainder": 43000, + "charge": 881897, "target": 15895318, "next_threshold": 2, + "ambient_value_degree": 52, "minimum_factor_degree": 1, + "maximum_off_factor_pairs": 2601, "minimum_on_factor_pairs": 4982, + "minimum_factor_points": 126188, "maximum_exception_points": 4049, +} + + +def validate(expected: dict[str, int]) -> int: + actual = compute() + if actual != expected: + wrong = sorted(key for key in actual if actual[key] != expected.get(key)) + raise Reject(f"constants {wrong}") + if actual["next_threshold"] != 2: + raise Reject("line forcing") + if actual["minimum_factor_points"] + actual["maximum_exception_points"] != actual["e"]: + raise Reject("support partition") + return len(actual) + 9 + + +def main() -> None: + checks = validate(EXPECTED) + mutations = [] + for key, delta in ( + ("charge", 1), ("maximum_off_factor_pairs", 1), + ("minimum_on_factor_pairs", -1), + ("minimum_factor_points", -1)): + mutant = copy.deepcopy(EXPECTED) + mutant[key] += delta + try: + validate(mutant) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise Reject("mutations") + print("MCA_FULL_LIFT_COMMON_FACTOR_MASS_ROUTER_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)} " + "pairs>=4982 factor_points>=126188 exceptions<=4049") + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_common_factor_weighted_degree_bound_v1.py b/experimental/verify_mca_full_lift_common_factor_weighted_degree_bound_v1.py new file mode 100644 index 000000000..8438f2b27 --- /dev/null +++ b/experimental/verify_mca_full_lift_common_factor_weighted_degree_bound_v1.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Verify the M31 common-factor weighted-degree constants.""" + +from __future__ import annotations + +import copy + + +class Reject(ValueError): + pass + + +def monomials(degree: int) -> int: + return sum((level + 1) * (degree - 5 * level + 1) + for level in range(degree // 5 + 1)) + + +EXPECTED = { + "reject_degree": 46, "reject_monomials": 935, + "accept_degree": 47, "accept_monomials": 990, + "factor_weight_max": 217, "factor_yz_degree_max": 43, + "pairs_min": 5083, "factor_points_min": 126266, + "exceptions_max": 3971, +} + + +def validate(expected: dict[str, int]) -> int: + if expected["accept_degree"] != expected["reject_degree"] + 1: + raise Reject("adjacency") + if monomials(expected["reject_degree"]) != expected["reject_monomials"]: + raise Reject("reject count") + if monomials(expected["accept_degree"]) != expected["accept_monomials"]: + raise Reject("accept count") + if not (expected["reject_monomials"] < 938 + <= expected["accept_monomials"]): + raise Reject("threshold") + first = min(degree for degree in range(265) if monomials(degree) >= 938) + if 264 - first != expected["factor_weight_max"]: + raise Reject("factor weight") + if expected["factor_weight_max"] // 5 != expected["factor_yz_degree_max"]: + raise Reject("YZ degree") + pairs = 7583 - (52 - 2) ** 2 + if expected["pairs_min"] != pairs: + raise Reject("pairs") + numerator = pairs * 807**2 + denominator = 807 + 5 * (pairs - 1) + points = (numerator + denominator - 1) // denominator + if expected["factor_points_min"] != points: + raise Reject("factor points") + if expected["exceptions_max"] != 130237 - points: + raise Reject("exceptions") + return 79 + + +def main() -> None: + checks = validate(EXPECTED) + mutations = [] + for key, delta in ( + ("reject_monomials", 1), ("factor_weight_max", 1), + ("pairs_min", -1), ("factor_points_min", -1)): + mutant = copy.deepcopy(EXPECTED) + mutant[key] += delta + try: + validate(mutant) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise Reject("mutations") + print("MCA_FULL_LIFT_COMMON_FACTOR_WEIGHTED_DEGREE_BOUND_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)} " + "wdeg<=217 yzdeg<=43 pairs>=5083 exceptions<=3971") + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_core_dichotomy_capped_charge_v1.py b/experimental/verify_mca_full_lift_core_dichotomy_capped_charge_v1.py new file mode 100644 index 000000000..7763d38f0 --- /dev/null +++ b/experimental/verify_mca_full_lift_core_dichotomy_capped_charge_v1.py @@ -0,0 +1,226 @@ +#!/usr/bin/env python3 +"""Verify the M31 high-core/low-core capped-charge dichotomy.""" + +from __future__ import annotations + +import copy +from fractions import Fraction + + +R, D, K = 1048576, 67448, 6 +N, M, C = R + K, D + K, K - 1 +BUDGET, LINE, ABS_CUTOFF = 16777215, N - M + 1, 65450 + + +class Reject(ValueError): + pass + + +def raw_cap(e: int, h: int) -> int: + shortened, agreement = N - e, M - h + if agreement <= C: + raise Reject("prefix agreement") + johnson = agreement * agreement - shortened * C + if johnson > 0: + return shortened * (agreement - C) // johnson + gap = -johnson + balance = 2 * agreement * agreement - shortened * C + tangent = (shortened - agreement) ** 2 - (shortened - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("prefix cap") + return ((shortened - 1) * shortened * shortened * (agreement - C) + // (agreement * tangent)) + + +def prefix(e: int, cutoff: int) -> int: + values = [0] + [raw_cap(e, h) for h in range(1, cutoff + 1)] + for h in range(cutoff - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, cutoff + 1)) + + +def choose_cutoff(e: int) -> int: + initial = 65304 + cutoff = initial + while cutoff < M: + h = cutoff + 1 + overlap = 2 * h - e + if (2 * h > e and overlap > C and + overlap * overlap > e * C): + break + cutoff += 1 + if cutoff > initial and cutoff < M: + cutoff += 2 + if cutoff >= M: + raise Reject("no bank") + return cutoff + + +def bank(e: int) -> tuple[int, int, int, int]: + cutoff = choose_cutoff(e) + weighted_prefix = prefix(e, cutoff) + groups = 0 + for h in range(cutoff + 1, M + 1): + overlap = 2 * h - e + denominator = overlap * overlap - e * C + if 2 * h <= e or overlap <= C or denominator <= 0: + raise Reject("bank guard") + groups += e * (overlap - C) // denominator + return cutoff, weighted_prefix, groups, weighted_prefix + M - cutoff - groups + + +def runs(values: list[int]) -> list[list[int]]: + answer: list[list[int]] = [] + for value in values: + if answer and answer[-1][0] == value: + answer[-1][1] += 1 + else: + answer.append([value, 1]) + return answer + + +def capped_charge(e: int, lower: list[int], cap: int) -> tuple[int, int, list[list[int]]]: + count = len(lower) + if count == 0: + return 0, 0, [] + budget = min(count * cap, e + count * (count + 1) * C // 2) + allocation = sorted(lower, reverse=True) + excess = budget - sum(allocation) + if excess < 0: + raise Reject("lower bounds") + for index, value in enumerate(allocation): + addition = min(excess, cap - value) + allocation[index] += addition + excess -= addition + if excess == 0: + break + if excess: + raise Reject("allocation") + rational = sum((Fraction(N - value, M - value) + for value in allocation), Fraction()) + return rational.numerator // rational.denominator, budget, runs(allocation) + + +def zero_charge(e: int, lines: int, cap: int) -> tuple[int, int, int, int]: + if lines == 0: + return 0, 0, 0, 0 + budget = min(lines * cap, e + lines * (lines + 1) * C // 2) + full, remainder = divmod(budget, cap) + if full == lines: + rational = lines * Fraction(N - cap, M - cap) + else: + rational = full * Fraction(N - cap, M - cap) + rational += Fraction(N - remainder, M - remainder) + rational += (lines - full - 1) * Fraction(N, M) + return rational.numerator // rational.denominator, budget, full, remainder + + +def paid(e: int) -> dict[str, object]: + cap = e + 9 - ABS_CUTOFF + absorb = prefix(e, ABS_CUTOFF) + cutoff, weighted, groups, base = bank(e) + thresholds: list[int] = [] + cores: list[int] = [] + insides: list[int] = [] + for removed in range(256): + charge, budget, allocation = capped_charge(e, cores, cap) + target = BUDGET - charge + threshold = (target - base + 1 + groups - 1) // groups + if threshold < 2: + raise Reject("wall") + numerator = threshold * M - N + core = (0 if numerator <= 0 else + (numerator + threshold - 2) // (threshold - 1)) + inside = max(core - C, 0) + thresholds.append(threshold) + cores.append(core) + insides.append(inside) + packing = sum(insides) - len(insides) * (len(insides) - 1) * C // 2 + if packing > e: + return { + "e": e, "core_cap": cap, "absorption_prefix": absorb, + "absorption_bound": absorb + LINE, "cutoff": cutoff, + "prefix": weighted, "groups": groups, "base": base, + "certificate": "core_packing", "lines": removed + 1, + "target": target, "charge": charge, "core_budget": budget, + "allocation_runs": allocation, + "threshold_runs": runs(thresholds), + "core_runs": runs(cores), "inside_runs": runs(insides), + "packing": packing, + } + raise Reject("limit") + + +def wall(e: int) -> dict[str, object]: + cap = e + 9 - ABS_CUTOFF + absorb = prefix(e, ABS_CUTOFF) + cutoff, weighted, groups, base = bank(e) + first = (BUDGET - base + 1 + groups - 1) // groups + if first * M - N > 0: + raise Reject("positive first core") + for lines in range(20000): + charge, budget, full, remainder = zero_charge(e, lines, cap) + target = BUDGET - charge + threshold = (target - base + 1 + groups - 1) // groups + if threshold < 2: + return { + "e": e, "core_cap": cap, "absorption_prefix": absorb, + "absorption_bound": absorb + LINE, "cutoff": cutoff, + "prefix": weighted, "groups": groups, "base": base, + "certificate": "threshold_one_wall", "lines": lines, + "target": target, "charge": charge, "core_budget": budget, + "full_caps": full, "remainder": remainder, + "first_threshold": first, "next_threshold": threshold, + "packing": 0, + } + if threshold > first: + raise Reject("monotonicity") + raise Reject("limit") + + +EXPECTED = { + "e130222": {"e": 130222, "core_cap": 64781, "absorption_prefix": 4180178, "absorption_bound": 5161307, "cutoff": 65516, "prefix": 12406922, "groups": 260580, "base": 12148280, "certificate": "core_packing", "lines": 14, "target": 16776980, "charge": 235, "core_budget": 130677, "allocation_runs": [[13785, 1], [9741, 12]], "threshold_runs": [[18, 14]], "core_runs": [[9741, 14]], "inside_runs": [[9736, 14]], "packing": 135849}, + "e130223": {"e": 130223, "core_cap": 64782, "absorption_prefix": 4180156, "absorption_bound": 5161285, "cutoff": 65516, "prefix": 12406366, "groups": 269480, "base": 12138824, "certificate": "core_packing", "lines": 14, "target": 16776980, "charge": 235, "core_budget": 130678, "allocation_runs": [[13786, 1], [9741, 12]], "threshold_runs": [[18, 14]], "core_runs": [[9741, 14]], "inside_runs": [[9736, 14]], "packing": 135849}, + "e130224": {"e": 130224, "core_cap": 64783, "absorption_prefix": 4180145, "absorption_bound": 5161274, "cutoff": 65517, "prefix": 12961350, "groups": 260602, "base": 12702685, "certificate": "core_packing", "lines": 70, "target": 16776111, "charge": 1104, "core_budget": 142299, "allocation_runs": [[3171, 1], [2046, 68]], "threshold_runs": [[16, 70]], "core_runs": [[2046, 70]], "inside_runs": [[2041, 70]], "packing": 130795}, + "e130225": {"e": 130225, "core_cap": 64784, "absorption_prefix": 4180124, "absorption_bound": 5161253, "cutoff": 65517, "prefix": 12960735, "groups": 269520, "base": 12693152, "certificate": "core_packing", "lines": 70, "target": 16776111, "charge": 1104, "core_budget": 142300, "allocation_runs": [[3172, 1], [2046, 68]], "threshold_runs": [[16, 70]], "core_runs": [[2046, 70]], "inside_runs": [[2041, 70]], "packing": 130795}, + "adjacent": {"e": 130226, "core_cap": 64785, "absorption_prefix": 4180114, "absorption_bound": 5161243, "cutoff": 65518, "prefix": 13575970, "groups": 260627, "base": 13317279, "certificate": "threshold_one_wall", "lines": 14763, "target": 13577673, "charge": 3199542, "core_budget": 545032556, "full_caps": 8412, "remainder": 61136, "first_threshold": 14, "next_threshold": 1, "packing": 0}, +} + + +def validate(expected: dict[str, object]) -> int: + checks = 29 + for e in range(130222, 130226): + if paid(e) != expected[f"e{e}"]: + raise Reject(str(e)) + checks += 21 + if wall(130226) != expected["adjacent"]: + raise Reject("adjacent") + return checks + 21 + + +def main() -> None: + checks = validate(copy.deepcopy(EXPECTED)) + mutations = [] + for name, key, delta in ( + ("e130222", "packing", -1), + ("e130225", "charge", 1), + ("adjacent", "target", -1), + ("adjacent", "full_caps", 1)): + changed = copy.deepcopy(EXPECTED) + changed[name][key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise Reject("mutations") + print("MCA_FULL_LIFT_CORE_DICHOTOMY_CAPPED_CHARGE_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)} " + "paid=130222..130225 wall=130226") + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_exact_layer_slot_core_packing_v1.py b/experimental/verify_mca_full_lift_exact_layer_slot_core_packing_v1.py new file mode 100644 index 000000000..c42591914 --- /dev/null +++ b/experimental/verify_mca_full_lift_exact_layer_slot_core_packing_v1.py @@ -0,0 +1,175 @@ +#!/usr/bin/env python3 +"""Verify the M31 exact-layer slot-core packing payment.""" + +from __future__ import annotations + +from fractions import Fraction + + +R, D, K = 1048576, 67448, 6 +N, M, C = R + K, D + K, K - 1 +BUDGET, LINE, ABS_CUTOFF = 16777215, N - M + 1, 65450 + + +class Reject(ValueError): + pass + + +def raw_cap(e: int, h: int) -> int: + shortened, agreement = N - e, M - h + if agreement <= C: + raise Reject("prefix agreement") + johnson = agreement * agreement - shortened * C + if johnson > 0: + return shortened * (agreement - C) // johnson + gap = -johnson + balance = 2 * agreement * agreement - shortened * C + tangent = (shortened - agreement) ** 2 - (shortened - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("prefix cap") + return ((shortened - 1) * shortened * shortened * (agreement - C) + // (agreement * tangent)) + + +def prefix(e: int, cutoff: int) -> int: + values = [0] + [raw_cap(e, h) for h in range(1, cutoff + 1)] + for h in range(cutoff - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, cutoff + 1)) + + +def bank(e: int, cutoff: int) -> tuple[int, int, int]: + weighted = prefix(e, cutoff) + groups = 0 + for h in range(cutoff + 1, M + 1): + overlap = 2 * h - e + denominator = overlap * overlap - e * C + if 2 * h <= e or overlap <= C or denominator <= 0: + raise Reject("bank guard") + groups += e * (overlap - C) // denominator + return weighted, groups, weighted + M - cutoff - groups + + +def capped_charge(e: int, lower: list[int], cap: int) -> tuple[int, int]: + if not lower: + return 0, 0 + count = len(lower) + budget = min(count * cap, e + count * (count + 1) * C // 2) + values = sorted(lower, reverse=True) + excess = budget - sum(values) + if excess < 0: + raise Reject("packing before charge") + for index, value in enumerate(values): + addition = min(excess, cap - value) + values[index] += addition + excess -= addition + if excess == 0: + break + if excess: + raise Reject("allocation") + value = sum((Fraction(N - core, M - core) for core in values), + Fraction()) + return value.numerator // value.denominator, budget + + +def paid_row(e: int, cutoff: int) -> tuple[int, ...]: + weighted, groups, base = bank(e, cutoff) + cap = e + 9 - ABS_CUTOFF + absorption_bound = prefix(e, ABS_CUTOFF) + LINE + lower: list[int] = [] + threshold = inside = charge = target = core_budget = 0 + for _ in range(3): + charge, core_budget = capped_charge(e, lower, cap) + target = BUDGET - charge + threshold = (target - base + groups) // groups + if threshold < 2: + raise Reject("paid threshold") + numerator = threshold * (cutoff + 1) - e + inside = max(0, (numerator + threshold - 2) // (threshold - 1)) + lower.append(inside) + packing = sum(lower) - len(lower) * (len(lower) - 1) * C // 2 + if packing <= e or absorption_bound >= BUDGET: + raise Reject("payment") + return (e, cutoff, weighted, groups, base, cap, absorption_bound, + threshold, inside, charge, target, core_budget, packing) + + +EXPECTED = ( + (130226, 65516, 12404722, 342025, 12064635, 64785, 5161243, 14, 60540, 737, 16776478, 129570, 181605), + (130227, 65516, 12404167, 1217008, 11189097, 64786, 5161221, 5, 49340, 737, 16776478, 129572, 148005), + (130228, 65517, 12958915, 342446, 12618406, 64787, 5161211, 13, 60126, 737, 16776478, 129574, 180363), + (130229, 65517, 12958300, 1305245, 11654992, 64788, 5161190, 4, 43948, 738, 16776477, 129576, 131829), + (130230, 65518, 13573258, 342865, 13232329, 64789, 5161180, 11, 59048, 738, 16776477, 129578, 177129), + (130231, 65518, 13572575, 1412234, 12162277, 64790, 5161158, 4, 43949, 738, 16776477, 129580, 131832), + (130232, 65519, 14258109, 343295, 13916749, 64791, 5161148, 9, 57431, 738, 16776477, 129582, 172278), + (130233, 65520, 15027192, 301252, 14727874, 64792, 5161126, 7, 54736, 739, 16776476, 129584, 164193), + (130234, 65520, 15026344, 343725, 14684553, 64793, 5161117, 7, 54736, 739, 16776476, 129586, 164193), + (130235, 65521, 15895144, 301391, 15595686, 64794, 5161095, 4, 43951, 739, 16776476, 129588, 131838), + (130236, 65521, 15894179, 344160, 15551952, 64795, 5161085, 4, 43951, 739, 16776476, 129590, 131838), +) + + +def uniform_charge(e: int, lines: int, lower: int, + cap: int) -> tuple[int, int, int, int, int]: + budget = min(lines * cap, e + lines * (lines + 1) * C // 2) + lower_sum = lines * lower + full, remainder = divmod(budget - lower_sum, cap - lower) + full = min(full, lines) + value = full * Fraction(N - cap, M - cap) + if full < lines: + if remainder: + value += Fraction(N - lower - remainder, M - lower - remainder) + residual = lines - full - 1 + else: + residual = lines - full + value += residual * Fraction(N - lower, M - lower) + return (value.numerator // value.denominator, budget, lower_sum, + full, remainder) + + +def adjacent_row() -> tuple[int, ...]: + e, cutoff = 130237, 65521 + weighted, groups, base = bank(e, cutoff) + cap = e + 9 - ABS_CUTOFF + absorption_bound = prefix(e, ABS_CUTOFF) + LINE + first = (BUDGET - base + groups) // groups + inside = (first * (cutoff + 1) - e + first - 2) // (first - 1) + maximum = max(s * inside - s * (s - 1) * C // 2 + for s in range(1, 1000)) + for lines in range(1, 10000): + charge, budget, lower_sum, full, remainder = uniform_charge( + e, lines, inside, cap) + target = BUDGET - charge + threshold = (target - base + groups) // groups + if threshold < 2: + return (e, cutoff, weighted, groups, base, cap, + absorption_bound, first, inside, maximum, lines, + budget, lower_sum, full, remainder, charge, target, + threshold) + raise Reject("adjacent limit") + + +ADJACENT = ( + 130237, 65521, 15893203, 1933560, 13961576, 64796, 5161064, + 2, 807, 65529, 7583, 143903917, 6119481, 2153, 16119, + 882245, 15894970, 1, +) + + +def main() -> None: + checks = 0 + for expected in EXPECTED: + actual = paid_row(expected[0], expected[1]) + if actual != expected: + raise Reject(f"row {expected[0]}") + checks += len(expected) + if adjacent_row() != ADJACENT: + raise Reject("adjacent") + checks += len(ADJACENT) + print("MCA_FULL_LIFT_EXACT_LAYER_SLOT_CORE_PACKING_V1_PASS " + f"checks={checks} paid=130226..130236 wall=130237") + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.c b/experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.c new file mode 100644 index 000000000..82adb5714 --- /dev/null +++ b/experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.c @@ -0,0 +1,139 @@ +#include +#include +#include + +typedef __int128 i128; + +enum { + R = 1048576, + D = 67448, + K = 6, + N = R + K, + M = D + K, + C = K - 1, + BUDGET = 16777215, + CUTOFF = 65200, +}; + +static int64_t caps[CUTOFF + 1]; + +static void reject(const char *what, int e, int h) { + fprintf(stderr, "REJECT %s e=%d h=%d\n", what, e, h); + exit(1); +} + +static int64_t raw_cap(int e, int h) { + int64_t n = N - e; + int64_t agreement = M - h; + int64_t johnson = agreement * agreement - n * C; + if (johnson > 0) { + return (int64_t)(((i128)n * (agreement - C)) / johnson); + } + int64_t gap = -johnson; + int64_t balance = 2 * agreement * agreement - n * C; + int64_t tangent = (n - agreement) * (n - agreement) - (n - 1) * gap; + if (balance < 0 || tangent <= 0) reject("prefix cap", e, h); + i128 numerator = (i128)(n - 1) * n * n * (agreement - C); + i128 denominator = (i128)agreement * tangent; + return (int64_t)(numerator / denominator); +} + +static int64_t prefix(int e) { + caps[0] = 0; + for (int h = 1; h <= CUTOFF; ++h) caps[h] = raw_cap(e, h); + for (int h = CUTOFF - 1; h >= 1; --h) { + if (caps[h + 1] < caps[h]) caps[h] = caps[h + 1]; + } + int64_t total = 0; + for (int h = 1; h <= CUTOFF; ++h) { + total += (caps[h] - caps[h - 1]) * (e / h); + } + return total; +} + +static int64_t boundary_cap(int e, int h) { + int64_t n = N - e; + int64_t inside = 2LL * h - e; + int64_t denominator = inside * inside - (int64_t)e * C; + int64_t outside = M - h; + if (2 * h <= e || inside <= 0 || denominator <= 0 || + !(n > outside && outside > C)) { + reject("boundary cap", e, h); + } + int64_t classes = (int64_t)(((i128)e * (inside - C)) / denominator); + int64_t line = (n - C) / (outside - C); + return 1 + classes * (line - 1); +} + +static void checkpoint(int e, int64_t p, int64_t stack, int64_t forcing, + int64_t threshold, int64_t core, int64_t low, + int64_t bound) { + if (e == 98232 && !(p == 1381829 && stack == 391210 && + forcing == 1773039 && threshold == 15004177)) { + reject("first checkpoint", e, 0); + } + if (e == 101149 && !(p == 1422377 && stack == 14327810 && + forcing == 15750187 && threshold == 1027029)) { + reject("last direct checkpoint", e, 0); + } + if (e == 101150 && !(p == 1422391 && stack == 14530797 && + forcing == 15953188 && threshold == 824028 && + core == 67453 && low == 28 && bound == 3813329)) { + reject("first absorption checkpoint", e, 0); + } + if (e == 101155 && !(p == 1422461 && stack == 15244572 && + forcing == 16667033 && threshold == 110183 && + core == 67446 && low == 28 && bound == 3813469)) { + reject("endpoint checkpoint", e, 0); + } + if (e == 101156 && !(p == 1422475 && stack == 15528748 && + forcing == 16951223 && threshold == -174007)) { + reject("adjacent checkpoint", e, 0); + } +} + +int main(void) { + int direct = 0, absorption = 0, wall = 0; + for (int e = 98232; e <= 101156; ++e) { + int s = (e - K) / 3; + int H = e - s - 1; + int64_t p = prefix(e); + int64_t stack = 0; + for (int h = CUTOFF + 1; h <= H; ++h) { + stack += boundary_cap(e, h); + } + int64_t forcing = p + stack; + int64_t threshold = BUDGET - forcing + 1; + int64_t core = -1, low = -1, bound = -1; + + if (forcing + (N - M + 1) <= BUDGET) { + if (e > 101149) reject("late direct branch", e, H); + ++direct; + } else if (threshold >= 2) { + core = (threshold * (int64_t)M - N + threshold - 2) + / (threshold - 1); + int64_t inside = core - C; + int64_t sync = e - inside + K; + int64_t agreement = M - sync + 1; + int64_t n = N - e; + int64_t denominator = agreement * agreement - n * C; + if (denominator <= 0) reject("low Johnson", e, H); + low = (n * (agreement - C)) / denominator; + bound = e * low + (N - M + 1); + if (e > 101155 || bound >= BUDGET) { + reject("absorption payment", e, H); + } + ++absorption; + } else { + if (e != 101156) reject("early wall", e, H); + ++wall; + } + checkpoint(e, p, stack, forcing, threshold, core, low, bound); + } + if (direct != 2918 || absorption != 6 || wall != 1) { + reject("branch census", 0, 0); + } + puts("MCA_FULL_LIFT_FIXED_CUTOFF_BOUNDARY_STACK_V1_SCAN_PASS " + "paid=2924 direct=2918 absorption=6 adjacent_wall=1"); + return 0; +} diff --git a/experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.py b/experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.py new file mode 100644 index 000000000..2b2270375 --- /dev/null +++ b/experimental/verify_mca_full_lift_fixed_cutoff_boundary_stack_v1.py @@ -0,0 +1,118 @@ +#!/usr/bin/env python3 +"""Verify endpoints of the M31 fixed-cutoff boundary-stack payment.""" + +from __future__ import annotations + +import copy + + +R, D, K, BUDGET, CUTOFF = 1048576, 67448, 6, 16777215, 65200 +N, M, C = R + K, D + K, K - 1 +EXPECTED = { + 98232: (1381829, 391210, 1773039, 15004177, "direct"), + 101149: (1422377, 14327810, 15750187, 1027029, "direct"), + 101150: (1422391, 14530797, 15953188, 824028, + "absorption", 67453, 28, 3813329), + 101155: (1422461, 15244572, 16667033, 110183, + "absorption", 67446, 28, 3813469), + 101156: (1422475, 15528748, 16951223, -174007, + "fixed_cutoff_wall"), +} + + +class Reject(ValueError): + pass + + +def cap(e: int, h: int) -> int: + n, agreement = N - e, M - h + johnson = agreement * agreement - n * C + if johnson > 0: + return n * (agreement - C) // johnson + gap = -johnson + balance = 2 * agreement * agreement - n * C + tangent = (n - agreement) ** 2 - (n - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("undefined prefix cap") + return ((n - 1) * n * n * (agreement - C) + // (agreement * tangent)) + + +def prefix(e: int) -> int: + values = [0] + [cap(e, h) for h in range(1, CUTOFF + 1)] + for h in range(CUTOFF - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, CUTOFF + 1)) + + +def record(e: int): + s, _ = divmod(e - K, 3) + H = e - s - 1 + p = prefix(e) + stack = 0 + for h in range(CUTOFF + 1, H + 1): + A, n, outside = 2 * h - e, N - e, M - h + denominator = A * A - e * C + if (2 * h <= e or denominator <= 0 or not (n > outside > C)): + raise Reject("boundary guard") + classes = e * (A - C) // denominator + line = (n - C) // (outside - C) + stack += 1 + classes * (line - 1) + forcing = p + stack + threshold = BUDGET - forcing + 1 + if forcing + (N - M + 1) <= BUDGET: + return (p, stack, forcing, threshold, "direct") + if threshold < 2: + return (p, stack, forcing, threshold, "fixed_cutoff_wall") + core = (threshold * M - N + threshold - 2) // (threshold - 1) + inside = core - C + sync = e - inside + K + agreement = M - sync + 1 + n = N - e + denominator = agreement * agreement - n * C + if denominator <= 0: + raise Reject("low Johnson") + low = n * (agreement - C) // denominator + bound = e * low + (N - M + 1) + return (p, stack, forcing, threshold, "absorption", core, low, bound) + + +def validate(expected): + for e, row in expected.items(): + if record(e) != row: + raise Reject(f"endpoint {e}") + if 101155 - 98232 + 1 != 2924: + raise Reject("census") + if EXPECTED[101156][2] - BUDGET != 174008: + raise Reject("adjacent excess") + if EXPECTED[101155][-1] >= BUDGET: + raise Reject("endpoint budget") + return 41 + + +def main() -> None: + checks = validate(copy.deepcopy(EXPECTED)) + mutations = [] + for e, index, delta in ((98232, 0, 1), (101150, 6, -1), + (101155, 7, -1), (101156, 2, -1)): + changed = copy.deepcopy(EXPECTED) + row = list(changed[e]) + row[index] += delta + changed[e] = tuple(row) + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_FIXED_CUTOFF_BOUNDARY_STACK_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py b/experimental/verify_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py new file mode 100644 index 000000000..62d7c7bcb --- /dev/null +++ b/experimental/verify_mca_full_lift_fixed_cutoff_q2_anchor_repair_v1.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python3 +"""Verify the M31 fixed-cutoff residue-two anchor repair.""" + +from __future__ import annotations + +import copy + +ROW = { + "R": 1048576, "d": 67448, "K": 6, "budget": 16777215, + "e": 101156, "cutoff": 65258, "s": 33716, "q": 2, + "H": 67439, "prefix": 1440609, "boundary": 15454671, + "forcing": 16895280, "D1": 284224, "D2": 258385, + "lower": 16352671, "line": 981129, "threshold": 424545, + "core": 67452, "inside": 67447, "sync": 33715, + "agreement": 33740, "low": 28, "absorption": 3813497, + "outside": 94742, "disjoint": 3, + "cases": (3813497, 16705799, 16611058, 16705798, 16611059), + "bound": 16705799, "slack": 71416, + "next_e": 101157, "next_q": 0, +} + +class Reject(ValueError): + pass + + +def cap(R: int, d: int, K: int, e: int, h: int) -> int: + n, m, c = R + K - e, d + K, K - 1 + agreement = m - h + johnson = agreement * agreement - n * c + if johnson > 0: + return n * (agreement - c) // johnson + gap = -johnson + balance = 2 * agreement * agreement - n * c + tangent = (n - agreement) ** 2 - (n - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("undefined prefix cap") + return ((n - 1) * n * n * (agreement - c) + // (agreement * tangent)) + + +def prefix(R: int, d: int, K: int, e: int, cutoff: int) -> int: + values = [0] + [cap(R, d, K, e, h) for h in range(1, cutoff + 1)] + for h in range(cutoff - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, cutoff + 1)) + + +def layer_charge(R: int, d: int, K: int, e: int, h: int) -> int: + N, m, c = R + K, d + K, K - 1 + A = 2 * h - e + denominator = A * A - e * c + outside = m - h + n = N - e + if 2 * h <= e or denominator <= 0 or not (n > outside > c): + raise Reject("boundary guard") + classes = e * (A - c) // denominator + line = (n - c) // (outside - c) + return 1 + classes * (line - 1) + + +def endpoint(row): + R, d, K, e = row["R"], row["d"], row["K"], row["e"] + N, m, c = R + K, d + K, K - 1 + s, q = divmod(e - K, 3) + H = e - s - 1 + p = prefix(R, d, K, e, row["cutoff"]) + layers = [layer_charge(R, d, K, e, h) + for h in range(row["cutoff"] + 1, H + 1)] + boundary = sum(layers) + forcing = p + boundary + d1, d2 = layers[-1], layers[-2] + lower = forcing - d1 - d2 + line = N - m + 1 + threshold = row["budget"] - lower + 1 + core = (threshold * m - N + threshold - 2) // (threshold - 1) + inside = core - c + sync = e - inside + K + agreement = m - sync + 1 + n = N - e + denominator = agreement * agreement - n * c + if denominator <= 0: + raise Reject("low Johnson") + low = n * (agreement - c) // denominator + absorption = e * low + line + outside = (n - c) // (m - H - c) + disjoint = e // (s + 1) + cases = ( + absorption, + forcing - d1 + outside + 1, + forcing - d1 + 2, + forcing - d1 + outside, + forcing - d1 + disjoint, + ) + return { + "s": s, "q": q, "H": H, "prefix": p, + "boundary": boundary, "forcing": forcing, + "D1": d1, "D2": d2, "lower": lower, "line": line, + "threshold": threshold, "core": core, "inside": inside, + "sync": sync, "agreement": agreement, "low": low, + "absorption": absorption, "outside": outside, + "disjoint": disjoint, "cases": cases, "bound": max(cases), + }, len(layers) + + +def validate(row): + got, layers = endpoint(row) + for key, value in got.items(): + if row[key] != value: + raise Reject(key) + if (row["q"] != 2 or + row["e"] - 2 * row["s"] - (row["s"] + 2) != row["K"] or + row["budget"] - row["bound"] != row["slack"] or + row["slack"] <= 0 or + (row["next_e"] - row["K"]) % 3 != row["next_q"] or + row["next_q"] != 0): + raise Reject("guards") + return 37 + layers + + +def main() -> None: + checks = validate(copy.deepcopy(ROW)) + mutations = [] + for key, delta in (("prefix", 1), ("D1", 1), + ("absorption", -1), ("bound", -1), + ("slack", 1)): + changed = copy.deepcopy(ROW) + changed[key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_FIXED_CUTOFF_Q2_ANCHOR_REPAIR_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_interpolation_common_factor_router_v1.py b/experimental/verify_mca_full_lift_interpolation_common_factor_router_v1.py new file mode 100644 index 000000000..f0dc6b55b --- /dev/null +++ b/experimental/verify_mca_full_lift_interpolation_common_factor_router_v1.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python3 +"""Verify the M31 interpolation common-factor router constants.""" + +from __future__ import annotations + +import copy +from fractions import Fraction + + +N, M, C, BUDGET = 1048582, 67454, 5, 16777215 + + +class Reject(ValueError): + pass + + +def monomial_count(degree: int, weight: int) -> int: + return sum((level + 1) * (degree - weight * level + 1) + for level in range(degree // weight + 1)) + + +def compute() -> dict[str, int]: + e, cutoff, layer, size = 130237, 65521, 65522, 2 + lower = size * layer - e + cap, lines = e + 9 - 65450, 2704 + core_budget = min(lines * cap, e + lines * (lines + 1) * C // 2) + lower_sum = lines * lower + full, remainder = divmod(core_budget - lower_sum, cap - lower) + value = full * Fraction(N - cap, M - cap) + value += Fraction(N - lower - remainder, M - lower - remainder) + value += (lines - full - 1) * Fraction(N - lower, M - lower) + charge = value.numerator // value.denominator + target = BUDGET - charge + base, groups = 13961576, 1933560 + threshold = (target - base + groups) // groups + degree, weight = 264, 5 + monomials = monomial_count(degree, weight) + value_degree = degree // weight + return { + "e": e, "cutoff": cutoff, "minimum_layer": layer, + "minimum_line_size": size, "inside_core_lower": lower, + "actual_core_cap": cap, "removed_before_forcing": lines, + "forced_distinct_lines": lines + 1, "core_budget": core_budget, + "lower_sum": lower_sum, "full_caps": full, + "remainder": remainder, "charge": charge, "target": target, + "base": base, "groups": groups, "next_threshold": threshold, + "weighted_degree": degree, "monomials": monomials, + "kernel_dimension_lower": monomials - e, + "value_total_degree": value_degree, + "bezout_cap": value_degree**2, "root_count": lower, + } + + +EXPECTED = { + "e": 130237, "cutoff": 65521, "minimum_layer": 65522, + "minimum_line_size": 2, "inside_core_lower": 807, + "actual_core_cap": 64796, "removed_before_forcing": 2704, + "forced_distinct_lines": 2705, "core_budget": 18416037, + "lower_sum": 2182128, "full_caps": 253, "remainder": 44692, + "charge": 132203, "target": 16645012, "base": 13961576, + "groups": 1933560, "next_threshold": 2, "weighted_degree": 264, + "monomials": 131175, "kernel_dimension_lower": 938, + "value_total_degree": 52, "bezout_cap": 2704, "root_count": 807, +} + + +def validate(expected: dict[str, int]) -> int: + actual = compute() + if actual != expected: + wrong = sorted(key for key in actual if actual[key] != expected.get(key)) + raise Reject(f"constants {wrong}") + if actual["root_count"] <= actual["weighted_degree"]: + raise Reject("root-degree gap") + if actual["forced_distinct_lines"] <= actual["bezout_cap"]: + raise Reject("Bezout contradiction") + if actual["next_threshold"] < 2: + raise Reject("line forcing") + return len(actual) + 7 + + +def main() -> None: + checks = validate(EXPECTED) + mutations = [] + for key, delta in ( + ("inside_core_lower", -1), ("charge", 1), + ("monomials", -1), ("bezout_cap", 1)): + mutant = copy.deepcopy(EXPECTED) + mutant[key] += delta + try: + validate(mutant) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise Reject("mutations") + print("MCA_FULL_LIFT_INTERPOLATION_COMMON_FACTOR_ROUTER_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)} " + "kernel>=938 coprime_cap=2704 forced=2705") + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.c b/experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.c new file mode 100644 index 000000000..d9a6e896e --- /dev/null +++ b/experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.c @@ -0,0 +1,222 @@ +#include +#include +#include + +/* Full constant-memory replay of the M31 joint-core charge interval. */ + +typedef __int128 i128; + +enum { + R = 1048576, D = 67448, K = 6, N = R + K, M = D + K, + C = K - 1, BUDGET = 16777215, Q = N - M + 1, + INITIAL_CUTOFF = 65304, MAX_LINES = 256, +}; + +static int64_t caps[M + 1]; + +static void reject(const char *what, int e, int value) { + fprintf(stderr, "REJECT %s e=%d value=%d\n", what, e, value); + exit(1); +} + +static int raw_cap(int e, int h, int64_t *out) { + int64_t shortened = N - e, agreement = M - h; + if (agreement <= C) return 0; + int64_t johnson = agreement * agreement - shortened * C; + if (johnson > 0) { + *out = shortened * (agreement - C) / johnson; + return 1; + } + int64_t gap = -johnson; + int64_t balance = 2 * agreement * agreement - shortened * C; + int64_t tangent = (shortened - agreement) * (shortened - agreement) + - (shortened - 1) * gap; + if (balance < 0 || tangent <= 0) return 0; + *out = (int64_t)(((i128)(shortened - 1) * shortened * shortened + * (agreement - C)) + / ((i128)agreement * tangent)); + return 1; +} + +static int64_t prefix(int e, int cutoff) { + caps[0] = 0; + for (int h = 1; h <= cutoff; ++h) { + if (!raw_cap(e, h, &caps[h])) reject("prefix", e, h); + } + for (int h = cutoff - 1; h >= 1; --h) { + if (caps[h + 1] < caps[h]) caps[h] = caps[h + 1]; + } + int64_t total = 0; + for (int h = 1; h <= cutoff; ++h) { + total += (caps[h] - caps[h - 1]) * (e / h); + } + return total; +} + +static int choose_cutoff(int e) { + int cutoff = INITIAL_CUTOFF; + while (cutoff < M) { + int h = cutoff + 1; + int64_t overlap = 2LL * h - e; + if (2 * h > e && overlap > C && + overlap * overlap > (int64_t)e * C) break; + ++cutoff; + } + if (cutoff > INITIAL_CUTOFF && cutoff < M) cutoff += 2; + if (cutoff >= M) reject("cutoff", e, cutoff); + return cutoff; +} + +struct charge { + int64_t value, core_budget, full, remainder; +}; + +static struct charge joint_charge(int e, int lines) { + struct charge x = {0}; + if (!lines) return x; + int64_t pair_budget = e + (int64_t)lines * (lines + 1) * C / 2; + int64_t trivial = (int64_t)lines * (M - 1); + x.core_budget = pair_budget < trivial ? pair_budget : trivial; + x.full = x.core_budget / (M - 1); + if (x.full > lines) x.full = lines; + x.remainder = x.core_budget - x.full * (M - 1); + if (x.full == lines) { + x.value = (int64_t)lines * Q; + return x; + } + int64_t left = lines - x.full; + i128 denominator = (i128)(M - x.remainder) * M; + i128 numerator = (i128)(N - x.remainder) * M + + (i128)(left - 1) * N * (M - x.remainder); + x.value = x.full * Q + (int64_t)(numerator / denominator); + return x; +} + +struct row { + int e, failure, cutoff, lines, first_threshold, middle_threshold; + int last_threshold, positive; + int64_t prefix, groups, base, target, charge, core_budget; + int64_t full, remainder, packing; +}; + +static struct row record(int e) { + struct row x = {0}; + x.e = e; + x.cutoff = choose_cutoff(e); + x.prefix = prefix(e, x.cutoff); + for (int h = x.cutoff + 1; h <= M; ++h) { + int64_t overlap = 2LL * h - e; + int64_t denominator = overlap * overlap - (int64_t)e * C; + if (2 * h <= e || overlap <= C || denominator <= 0) { + x.failure = 1; + return x; + } + x.groups += (int64_t)(((i128)e * (overlap - C)) / denominator); + } + x.base = x.prefix + M - x.cutoff - x.groups; + int64_t inside_sum = 0; + for (int removed = 0; removed < MAX_LINES; ++removed) { + struct charge q = joint_charge(e, removed); + x.target = BUDGET - q.value; + int64_t required = x.target - x.base + 1; + if (required <= 0) { + x.failure = 2; + return x; + } + int64_t threshold = (required + x.groups - 1) / x.groups; + if (threshold < 2) { + x.failure = 3; + return x; + } + if (!removed) x.first_threshold = (int)threshold; + else if (removed == 1) x.middle_threshold = (int)threshold; + x.last_threshold = (int)threshold; + int64_t numerator = threshold * M - N; + int64_t core = numerator <= 0 ? 0 + : (numerator + threshold - 2) / (threshold - 1); + int64_t inside = core > C ? core - C : 0; + ++x.lines; + if (inside > 0) { + inside_sum += inside; + ++x.positive; + } + x.packing = inside_sum + - (int64_t)x.positive * (x.positive - 1) * C / 2; + x.charge = q.value; + x.core_budget = q.core_budget; + x.full = q.full; + x.remainder = q.remainder; + if (x.packing > e) return x; + if (inside == 0) { + x.failure = 4; + return x; + } + } + x.failure = 5; + return x; +} + +static void print_row(const char *name, const struct row *x) { + printf("%s e=%d failure=%d cutoff=%d prefix=%lld groups=%lld base=%lld " + "lines=%d positive=%d thresholds=%d,%d,%d packing=%lld " + "charge=%lld target=%lld core_budget=%lld full=%lld rem=%lld\n", + name, x->e, x->failure, x->cutoff, (long long)x->prefix, + (long long)x->groups, (long long)x->base, x->lines, x->positive, + x->first_threshold, x->middle_threshold, x->last_threshold, + (long long)x->packing, (long long)x->charge, + (long long)x->target, (long long)x->core_budget, + (long long)x->full, (long long)x->remainder); +} + +int main(void) { + struct row first = {0}, last = {0}, wall = {0}; + int paid = 0, max_lines = 0; + int line_count[MAX_LINES + 1] = {0}; + for (int e = 130199; e <= 130220; ++e) { + struct row x = record(e); + if (x.failure) { + wall = x; + break; + } + if (!paid) first = x; + last = x; + ++paid; + ++line_count[x.lines]; + if (x.lines > max_lines) max_lines = x.lines; + } + if (!(paid == 21 && max_lines == 13 && + line_count[4] == 2 && line_count[5] == 10 && + line_count[6] == 3 && line_count[7] == 2 && + line_count[8] == 1 && line_count[10] == 1 && + line_count[13] == 2 && + first.e == 130199 && first.cutoff == 65504 && + first.prefix == 8421151 && first.groups == 269019 && + first.base == 8154082 && first.lines == 4 && + first.first_threshold == 33 && first.middle_threshold == 29 && + first.last_threshold == 29 && first.packing == 133986 && + first.charge == 981355 && + last.e == 130219 && last.cutoff == 65514 && + last.prefix == 11445963 && last.groups == 269400 && + last.base == 11178503 && last.lines == 13 && + last.first_threshold == 21 && last.middle_threshold == 18 && + last.last_threshold == 18 && last.packing == 134835 && + last.charge == 981513 && + wall.e == 130220 && wall.failure == 4 && wall.lines == 44 && + wall.positive == 43 && wall.cutoff == 65515 && + wall.prefix == 11904256 && wall.groups == 260559 && + wall.base == 11645636 && wall.first_threshold == 20 && + wall.middle_threshold == 16 && wall.last_threshold == 13 && + wall.packing == 97018 && wall.charge == 1962895 && + wall.target == 14814320 && wall.core_budget == 134950 && + wall.full == 2 && wall.remainder == 44)) { + reject("census", wall.e, paid); + } + print_row("FIRST", &first); + print_row("LAST_PAID", &last); + print_row("FIRST_WALL", &wall); + printf("RATE_HALF_MCA_M31_JOINT_CORE_CHARGE_PEELING_SCAN_PASS " + "paid=%d max_lines=%d line_counts=4:%d,5:%d,6:%d,7:%d,8:%d,10:%d,13:%d\n", + paid, max_lines, line_count[4], line_count[5], line_count[6], + line_count[7], line_count[8], line_count[10], line_count[13]); + return 0; +} diff --git a/experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.py b/experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.py new file mode 100644 index 000000000..a5c1676c3 --- /dev/null +++ b/experimental/verify_mca_full_lift_joint_core_charge_peeling_v1.py @@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +"""Verify endpoints of the M31 joint-core charge peeling payment.""" + +from __future__ import annotations + +import copy +from fractions import Fraction + + +R, D, K = 1048576, 67448, 6 +N, M, C = R + K, D + K, K - 1 +BUDGET, LINE = 16777215, N - M + 1 + + +class Reject(ValueError): + pass + + +def raw_cap(e: int, h: int) -> int: + shortened, agreement = N - e, M - h + if agreement <= C: + raise Reject("prefix agreement") + johnson = agreement * agreement - shortened * C + if johnson > 0: + return shortened * (agreement - C) // johnson + gap = -johnson + balance = 2 * agreement * agreement - shortened * C + tangent = (shortened - agreement) ** 2 - (shortened - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("prefix cap") + return ((shortened - 1) * shortened * shortened * (agreement - C) + // (agreement * tangent)) + + +def prefix(e: int, cutoff: int) -> int: + if not 1 <= cutoff <= M: + raise Reject("cutoff") + values = [0] + [raw_cap(e, h) for h in range(1, cutoff + 1)] + for h in range(cutoff - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, cutoff + 1)) + + +def choose_cutoff(e: int) -> int: + initial = 65304 + cutoff = initial + while cutoff < M: + h = cutoff + 1 + overlap = 2 * h - e + if (2 * h > e and overlap > C and + overlap * overlap > e * C): + break + cutoff += 1 + if cutoff > initial and cutoff < M: + cutoff += 2 + if cutoff >= M: + raise Reject("no bank") + return cutoff + + +def joint_charge(e: int, lines: int) -> tuple[int, int, int, int]: + if lines == 0: + return 0, 0, 0, 0 + core_budget = min( + lines * (M - 1), e + lines * (lines + 1) * C // 2) + full, remainder = divmod(core_budget, M - 1) + full = min(full, lines) + if full == lines: + charge = lines * LINE + else: + left = lines - full + rational = Fraction(full * LINE, 1) + rational += Fraction(N - remainder, M - remainder) + rational += (left - 1) * Fraction(N, M) + charge = rational.numerator // rational.denominator + return charge, core_budget, full, remainder + + +def runs(values: list[int]) -> list[list[int]]: + answer: list[list[int]] = [] + for value in values: + if answer and answer[-1][0] == value: + answer[-1][1] += 1 + else: + answer.append([value, 1]) + return answer + + +def record(e: int) -> dict[str, object]: + cutoff = choose_cutoff(e) + p = prefix(e, cutoff) + groups = 0 + for h in range(cutoff + 1, M + 1): + overlap = 2 * h - e + denominator = overlap * overlap - e * C + if 2 * h <= e or overlap <= C or denominator <= 0: + raise Reject("bank guard") + groups += e * (overlap - C) // denominator + base = p + M - cutoff - groups + thresholds: list[int] = [] + insides: list[int] = [] + + for removed in range(256): + charge, core_budget, full, remainder = joint_charge(e, removed) + target = BUDGET - charge + required = target - base + 1 + if required <= 0: + return { + "e": e, "cutoff": cutoff, "prefix": p, + "groups": groups, "base": base, + "certificate": "base_wall", "lines": removed, + "target": target, "charge": charge, + "core_budget": core_budget, "full": full, + "remainder": remainder, + "threshold_runs": runs(thresholds), + "inside_runs": runs(insides), + } + threshold = (required + groups - 1) // groups + if threshold < 2: + raise Reject("threshold") + numerator = threshold * M - N + core = 0 if numerator <= 0 else ( + numerator + threshold - 2) // (threshold - 1) + inside = max(core - C, 0) + thresholds.append(threshold) + insides.append(inside) + positive = [value for value in insides if value > 0] + packing = (sum(positive) + - len(positive) * (len(positive) - 1) * C // 2) + if packing > e: + return { + "e": e, "cutoff": cutoff, "prefix": p, + "groups": groups, "base": base, + "certificate": "core_packing", "lines": removed + 1, + "target": target, "charge": charge, + "core_budget": core_budget, "full": full, + "remainder": remainder, "packing": packing, + "threshold_runs": runs(thresholds), + "inside_runs": runs(insides), + } + if inside == 0: + return { + "e": e, "cutoff": cutoff, "prefix": p, + "groups": groups, "base": base, + "certificate": "zero_core_wall", "lines": removed + 1, + "target": target, "charge": charge, + "core_budget": core_budget, "full": full, + "remainder": remainder, "packing": packing, + "threshold_runs": runs(thresholds), + "inside_runs": runs(insides), + } + raise Reject("recursion") + + + +EXPECTED = { + "first": { + "e": 130199, "cutoff": 65504, "prefix": 8421151, + "groups": 269019, "base": 8154082, "certificate": "core_packing", + "lines": 4, "target": 15795860, "charge": 981355, + "core_budget": 130229, "full": 1, "remainder": 62776, + "packing": 133986, "threshold_runs": [[33, 1], [29, 3]], + "inside_runs": [[36789, 1], [32409, 3]], + }, + "last": { + "e": 130219, "cutoff": 65514, "prefix": 11445963, + "groups": 269400, "base": 11178503, "certificate": "core_packing", + "lines": 13, "target": 15795702, "charge": 981513, + "core_budget": 130609, "full": 1, "remainder": 63156, + "packing": 134835, "threshold_runs": [[21, 1], [18, 12]], + "inside_runs": [[18393, 1], [9736, 12]], + }, + "adjacent": { + "e": 130220, "cutoff": 65515, "prefix": 11904256, + "groups": 260559, "base": 11645636, + "certificate": "zero_core_wall", "lines": 44, + "target": 14814320, "charge": 1962895, + "core_budget": 134950, "full": 2, "remainder": 44, + "packing": 97018, + "threshold_runs": [[20, 1], [16, 42], [13, 1]], + "inside_runs": [[15811, 1], [2041, 42], [0, 1]], + }, + "line_counts": {4: 2, 5: 10, 6: 3, 7: 2, 8: 1, 10: 1, 13: 2}, + "paid": 21, +} + + +def validate(expected): + checks = 31 + for name in ("first", "last", "adjacent"): + if record(expected[name]["e"]) != expected[name]: + raise Reject(name) + checks += 14 + line_counts = {} + paid = 0 + for e in range(expected["first"]["e"], expected["adjacent"]["e"]): + got = record(e) + if got["certificate"] != "core_packing": + raise Reject("interval") + line_counts[got["lines"]] = line_counts.get(got["lines"], 0) + 1 + paid += 1 + checks += 1 + if (paid != expected["paid"] or line_counts != expected["line_counts"] or + expected["last"]["e"] - expected["first"]["e"] + 1 != paid or + expected["adjacent"]["e"] != expected["last"]["e"] + 1): + raise Reject("census") + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(EXPECTED)) + mutations = [] + for name, key, delta in ( + ("first", "packing", -1), ("last", "charge", 1), + ("adjacent", "packing", 1), ("adjacent", "target", -1)): + changed = copy.deepcopy(EXPECTED) + changed[name][key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + changed = copy.deepcopy(EXPECTED) + changed["paid"] += 1 + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_JOINT_CORE_CHARGE_PEELING_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_linear_factor_projective_star_router_v1.py b/experimental/verify_mca_full_lift_linear_factor_projective_star_router_v1.py new file mode 100644 index 000000000..f7b5f554b --- /dev/null +++ b/experimental/verify_mca_full_lift_linear_factor_projective_star_router_v1.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +"""Verify the M31 linear-factor projective-star router constants.""" + +from __future__ import annotations + +import copy + + +class Reject(ValueError): + pass + + +def compute() -> list[dict[str, int]]: + e, agreement = 130237, 807 + answer = [] + for degree in range(6): + denominator = agreement**2 - e * degree + if denominator <= 0: + raise Reject("denominator") + answer.append({ + "parameter_degree": degree, + "denominator": denominator, + "cap": e * (agreement - degree) // denominator, + }) + return answer + + +EXPECTED = [ + {"parameter_degree": 0, "denominator": 651249, "cap": 161}, + {"parameter_degree": 1, "denominator": 521012, "cap": 201}, + {"parameter_degree": 2, "denominator": 390775, "cap": 268}, + {"parameter_degree": 3, "denominator": 260538, "cap": 401}, + {"parameter_degree": 4, "denominator": 130301, "cap": 802}, + {"parameter_degree": 5, "denominator": 64, "cap": 1632032}, +] + + +def validate(expected: list[dict[str, int]]) -> int: + if compute() != expected: + raise Reject("table") + captured = 4982 + if max(row["cap"] for row in expected[:5]) >= captured: + raise Reject("nonconstant branch") + if expected[5]["cap"] <= captured: + raise Reject("constant branch") + return 61 + + +def main() -> None: + checks = validate(EXPECTED) + mutations = [] + for index, key, delta in ( + (4, "cap", 1), (4, "denominator", -1), (5, "cap", -1)): + mutant = copy.deepcopy(EXPECTED) + mutant[index][key] += delta + try: + validate(mutant) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise Reject("mutations") + print("MCA_FULL_LIFT_LINEAR_FACTOR_PROJECTIVE_STAR_ROUTER_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)} " + "nonconstant_cap=802 captured=4982 residual=projective_star") + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_lower_aware_joint_core_charge_v1.py b/experimental/verify_mca_full_lift_lower_aware_joint_core_charge_v1.py new file mode 100644 index 000000000..fd58bb7e5 --- /dev/null +++ b/experimental/verify_mca_full_lift_lower_aware_joint_core_charge_v1.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +"""Verify the M31 lower-aware joint-core charge payment.""" + +from __future__ import annotations + +import copy +from fractions import Fraction + + +R, D, K = 1048576, 67448, 6 +N, M, C = R + K, D + K, K - 1 +BUDGET = 16777215 + + +class Reject(ValueError): + pass + + +def raw_cap(e: int, h: int) -> int: + shortened, agreement = N - e, M - h + if agreement <= C: + raise Reject("prefix agreement") + johnson = agreement * agreement - shortened * C + if johnson > 0: + return shortened * (agreement - C) // johnson + gap = -johnson + balance = 2 * agreement * agreement - shortened * C + tangent = (shortened - agreement) ** 2 - (shortened - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("prefix cap") + return ((shortened - 1) * shortened * shortened * (agreement - C) + // (agreement * tangent)) + + +def prefix(e: int, cutoff: int) -> int: + values = [0] + [raw_cap(e, h) for h in range(1, cutoff + 1)] + for h in range(cutoff - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, cutoff + 1)) + + +def choose_cutoff(e: int) -> int: + initial = 65304 + cutoff = initial + while cutoff < M: + h = cutoff + 1 + overlap = 2 * h - e + if (2 * h > e and overlap > C and + overlap * overlap > e * C): + break + cutoff += 1 + if cutoff > initial and cutoff < M: + cutoff += 2 + if cutoff >= M: + raise Reject("no bank") + return cutoff + + +def runs(values: list[int]) -> list[list[int]]: + answer: list[list[int]] = [] + for value in values: + if answer and answer[-1][0] == value: + answer[-1][1] += 1 + else: + answer.append([value, 1]) + return answer + + +def lower_aware_charge(e: int, lower: list[int]) -> tuple[int, int, int, list[list[int]]]: + count = len(lower) + if count == 0: + return 0, 0, 0, [] + core_budget = min(count * (M - 1), + e + count * (count + 1) * C // 2) + lower_sum = sum(lower) + if lower_sum > core_budget: + raise Reject("infeasible lower bounds") + allocation = sorted(lower, reverse=True) + excess = core_budget - lower_sum + for index in range(count): + addition = min(excess, M - 1 - allocation[index]) + allocation[index] += addition + excess -= addition + if excess == 0: + break + if excess: + raise Reject("allocation") + rational = sum((Fraction(N - value, M - value) + for value in allocation), Fraction()) + return (rational.numerator // rational.denominator, core_budget, + lower_sum, runs(allocation)) + + +def record(e: int) -> dict[str, object]: + cutoff = choose_cutoff(e) + weighted_prefix = prefix(e, cutoff) + groups = 0 + for h in range(cutoff + 1, M + 1): + overlap = 2 * h - e + denominator = overlap * overlap - e * C + if 2 * h <= e or overlap <= C or denominator <= 0: + raise Reject("bank guard") + groups += e * (overlap - C) // denominator + base = weighted_prefix + M - cutoff - groups + thresholds: list[int] = [] + cores: list[int] = [] + insides: list[int] = [] + + for removed in range(512): + charge, core_budget, lower_sum, allocation_runs = ( + lower_aware_charge(e, cores)) + target = BUDGET - charge + required = target - base + 1 + positive = [value for value in insides if value > 0] + packing = (sum(positive) + - len(positive) * (len(positive) - 1) * C // 2) + common = { + "e": e, "cutoff": cutoff, "prefix": weighted_prefix, + "groups": groups, "base": base, "lines": removed, + "target": target, "charge": charge, + "core_budget": core_budget, "lower_sum": lower_sum, + "allocation_runs": allocation_runs, + "threshold_runs": runs(thresholds), + "core_runs": runs(cores), "inside_runs": runs(insides), + "packing": packing, + } + if required <= 0: + common["certificate"] = "base_wall" + return common + threshold = (required + groups - 1) // groups + if threshold < 2: + raise Reject("threshold wall") + numerator = threshold * M - N + core = (0 if numerator <= 0 else + (numerator + threshold - 2) // (threshold - 1)) + inside = max(core - C, 0) + thresholds.append(threshold) + cores.append(core) + insides.append(inside) + positive = [value for value in insides if value > 0] + packing = (sum(positive) + - len(positive) * (len(positive) - 1) * C // 2) + if packing > e: + common.update({ + "certificate": "core_packing", "lines": removed + 1, + "threshold_runs": runs(thresholds), + "core_runs": runs(cores), "inside_runs": runs(insides), + "packing": packing, + }) + return common + raise Reject("recursion limit") + + +EXPECTED = { + "first": { + "e": 130220, "cutoff": 65515, "prefix": 11904256, + "groups": 260559, "base": 11645636, + "certificate": "core_packing", "lines": 38, + "target": 16776606, "charge": 609, + "core_budget": 133735, "lower_sum": 130782, + "allocation_runs": [[18769, 1], [15816, 3], [2046, 33]], + "threshold_runs": [[20, 1], [16, 33], [20, 4]], + "core_runs": [[15816, 1], [2046, 33], [15816, 4]], + "inside_runs": [[15811, 1], [2041, 33], [15811, 4]], + "packing": 142893, + }, + "last": { + "e": 130221, "cutoff": 65515, "prefix": 11903751, + "groups": 269440, "base": 11636250, + "certificate": "core_packing", "lines": 38, + "target": 16776606, "charge": 609, + "core_budget": 133736, "lower_sum": 130782, + "allocation_runs": [[18770, 1], [15816, 3], [2046, 33]], + "threshold_runs": [[20, 1], [16, 33], [20, 4]], + "core_runs": [[15816, 1], [2046, 33], [15816, 4]], + "inside_runs": [[15811, 1], [2041, 33], [15811, 4]], + "packing": 142893, + }, + "adjacent": { + "e": 130222, "cutoff": 65516, "prefix": 12406922, + "groups": 260580, "base": 12148280, + "certificate": "base_wall", "lines": 288, + "target": 11867171, "charge": 4910044, + "core_budget": 338302, "lower_sum": 9741, + "allocation_runs": [[67453, 5], [1037, 1], [0, 282]], + "threshold_runs": [[18, 1], [14, 42], [11, 127], [7, 66], [3, 52]], + "core_runs": [[9741, 1], [0, 287]], + "inside_runs": [[9736, 1], [0, 287]], + "packing": 9736, + }, +} + + +def validate(expected: dict[str, object]) -> int: + checks = 23 + for name in ("first", "last", "adjacent"): + if record(expected[name]["e"]) != expected[name]: + raise Reject(name) + checks += 17 + if (expected["first"]["e"] != 130220 or + expected["last"]["e"] != 130221 or + expected["adjacent"]["e"] != 130222): + raise Reject("interval") + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(EXPECTED)) + mutations = [] + for name, key, delta in ( + ("first", "packing", -1), + ("last", "charge", 1), + ("adjacent", "target", -1), + ("adjacent", "lower_sum", 1)): + changed = copy.deepcopy(EXPECTED) + changed[name][key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise Reject("mutation controls") + print("MCA_FULL_LIFT_LOWER_AWARE_JOINT_CORE_CHARGE_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)} " + "paid=130220..130221 wall=130222") + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_mean_centered_global_line_profile_v1.py b/experimental/verify_mca_full_lift_mean_centered_global_line_profile_v1.py new file mode 100644 index 000000000..b86bdb248 --- /dev/null +++ b/experimental/verify_mca_full_lift_mean_centered_global_line_profile_v1.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python3 +"""Verify the full-lift mean-centered global-line profile.""" + +from __future__ import annotations + +import copy +from functools import lru_cache + + +ROWS = { + "KoalaBear": { + "R": 1048576, "d": 67472, "K": 14, + "budget": 274980728111395087, + "first": 95944, "first_total": 3281626, + "last": 96150, "last_H": 64104, "last_prefix": 478712296, + "last_B_H": 477366117, "last_breaks": 1562, + "last_total": 479693401, "max_total": 479693401, + "max_e": 96150, "next": 96151, "next_failure_h": 64105, + "next_A": 3381, "next_g": 950546, + "next_balance": 10480615, "next_T": -4625043784, + "next_total": None, "ceiling": 1044238, + }, + "Mersenne-31": { + "R": 1048576, "d": 67448, "K": 6, + "budget": 16777215, + "first": 97909, "first_total": 3305764, + "last": 98229, "last_H": 65487, "last_prefix": 15507087, + "last_B_H": 14131801, "last_breaks": 1670, + "last_total": 16488216, "max_total": 16489118, + "max_e": 98228, "next": 98230, "next_failure_h": None, + "next_A": 1966, "next_g": 886604, + "next_balance": 2978552, "next_T": 56851006992, + "next_total": 17415873, "ceiling": 1044241, + }, +} + + +class Reject(ValueError): + pass + + +def raw_cap(R: int, d: int, K: int, e: int, h: int): + n, m, c = R + K - e, d + K, K - 1 + A = m - h + D = A * A - n * c + if D > 0: + return n * (A - c) // D, (A, -D, 2 * A * A - n * c, 0) + g = -D + balance = 2 * A * A - n * c + T = (n - A) ** 2 - (n - 1) * g + if balance < 0 or T <= 0: + return None, (A, g, balance, T) + return (n - 1) * n * n * (A - c) // (A * T), (A, g, balance, T) + + +@lru_cache(maxsize=None) +def profile(R: int, d: int, K: int, e: int): + N, m = R + K, d + K + H = e - (e - K) // 3 - 1 + if m - H <= K - 1: + raise Reject("agreement guard") + caps = [0] + for h in range(1, H + 1): + value, record = raw_cap(R, d, K, e, h) + if value is None: + return None, {"H": H, "failure_h": h, "record": record} + caps.append(value) + suffix = caps[-1] + for h in range(H - 1, 0, -1): + suffix = min(suffix, caps[h]) + caps[h] = suffix + prefix = sum((caps[h] - caps[h - 1]) * (e // h) + for h in range(1, H + 1)) + return prefix + N - m + 1, { + "H": H, "prefix": prefix, "B_H": caps[H], + "breaks": sum(caps[h] != caps[h - 1] for h in range(1, H + 1)), + } + + +def validate(rows): + checks = 0 + for name, row in rows.items(): + maximum = (-1, -1) + for e in range(row["first"], row["last"] + 1): + total, detail = profile(row["R"], row["d"], row["K"], e) + if total is None or total > row["budget"]: + raise Reject(f"{name}: paid strip") + maximum = max(maximum, (total, e)) + if e == row["first"] and total != row["first_total"]: + raise Reject(f"{name}: first") + if e == row["last"] and ( + detail["H"], detail["prefix"], detail["B_H"], + detail["breaks"], total + ) != ( + row["last_H"], row["last_prefix"], row["last_B_H"], + row["last_breaks"], row["last_total"] + ): + raise Reject(f"{name}: last") + checks += 1 + if maximum != (row["max_total"], row["max_e"]): + raise Reject(f"{name}: maximum") + adjacent, detail = profile(row["R"], row["d"], row["K"], row["next"]) + if adjacent != row["next_total"]: + raise Reject(f"{name}: adjacent") + if row["next_failure_h"] is not None: + if (detail["failure_h"], *detail["record"]) != ( + row["next_failure_h"], row["next_A"], row["next_g"], + row["next_balance"], row["next_T"] + ): + raise Reject(f"{name}: theorem wall") + else: + _, record = raw_cap(row["R"], row["d"], row["K"], + row["next"], detail["H"]) + if record != (row["next_A"], row["next_g"], + row["next_balance"], row["next_T"]): + raise Reject(f"{name}: budget wall") + if adjacent is None or adjacent <= row["budget"]: + raise Reject(f"{name}: adjacent budget") + if row["ceiling"] < row["next"]: + raise Reject(f"{name}: residual") + checks += 10 + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(ROWS)) + mutations = [] + for name, key, delta in ( + ("KoalaBear", "last_total", 1), + ("KoalaBear", "next_T", 1), + ("Mersenne-31", "max_total", -1), + ("Mersenne-31", "next_total", -1), + ): + changed = copy.deepcopy(ROWS) + changed[name][key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_MEAN_CENTERED_GLOBAL_LINE_PROFILE_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.c b/experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.c new file mode 100644 index 000000000..2751658a1 --- /dev/null +++ b/experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.c @@ -0,0 +1,211 @@ +#include +#include +#include + +/* Full constant-memory replay of recursive M31 affine-line peeling. */ + +typedef __int128 i128; + +enum { + R = 1048576, D = 67448, K = 6, N = R + K, M = D + K, + C = K - 1, BUDGET = 16777215, LINE = N - M + 1, + INITIAL_CUTOFF = 65304, ADAPTIVE_MARGIN = 2, MAX_LINES = 32, +}; + +static int64_t caps[M + 1]; + +static void reject(const char *what, int e, int value) { + fprintf(stderr, "REJECT %s e=%d value=%d\n", what, e, value); + exit(1); +} + +static int raw_cap(int e, int h, int64_t *out) { + int64_t shortened = N - e, agreement = M - h; + if (agreement <= C) return 0; + int64_t johnson = agreement * agreement - shortened * C; + if (johnson > 0) { + *out = shortened * (agreement - C) / johnson; + return 1; + } + int64_t gap = -johnson; + int64_t balance = 2 * agreement * agreement - shortened * C; + int64_t tangent = (shortened - agreement) * (shortened - agreement) + - (shortened - 1) * gap; + if (balance < 0 || tangent <= 0) return 0; + *out = (int64_t)(((i128)(shortened - 1) * shortened * shortened + * (agreement - C)) + / ((i128)agreement * tangent)); + return 1; +} + +static int prefix(int e, int cutoff, int64_t *out) { + if (cutoff < 1 || cutoff > M) return 0; + caps[0] = 0; + for (int h = 1; h <= cutoff; ++h) { + if (!raw_cap(e, h, &caps[h])) return 0; + } + for (int h = cutoff - 1; h >= 1; --h) { + if (caps[h + 1] < caps[h]) caps[h] = caps[h + 1]; + } + int64_t total = 0; + for (int h = 1; h <= cutoff; ++h) { + total += (caps[h] - caps[h - 1]) * (e / h); + } + *out = total; + return 1; +} + +static int choose_cutoff(int e) { + int cutoff = INITIAL_CUTOFF; + while (cutoff < M) { + int h = cutoff + 1; + int64_t agreement = 2LL * h - e; + if (2 * h > e && agreement > C && + agreement * agreement > (int64_t)e * C) break; + ++cutoff; + } + if (cutoff > INITIAL_CUTOFF && cutoff < M) { + cutoff += ADAPTIVE_MARGIN; + if (cutoff > M) cutoff = M; + } + return cutoff; +} + +struct row { + int e, failure, finish, cutoff, lines, upper; + int first_threshold, last_threshold; + int64_t piece, bound, slack, inside_sum, packing; + int64_t groups, base, target; +}; + +static struct row record(int e) { + struct row x = {0}; + x.e = e; + int H = e - (e - K) / 3 - 1; + if (H < M) { x.failure = 1; return x; } + x.cutoff = choose_cutoff(e); + int64_t bank_prefix; + if (x.cutoff >= M || !prefix(e, x.cutoff, &bank_prefix)) { + x.failure = 2; + return x; + } + int upper = M; + while (x.lines < MAX_LINES) { + int64_t target = BUDGET - (int64_t)x.lines * LINE; + if (target < 0) { x.failure = 3; return x; } + int64_t whole_prefix; + if (prefix(e, upper, &whole_prefix) && whole_prefix <= target) { + x.finish = 1; + x.upper = upper; + x.piece = whole_prefix; + x.bound = (int64_t)x.lines * LINE + whole_prefix; + x.slack = BUDGET - x.bound; + return x; + } + + int64_t groups = 0; + for (int h = x.cutoff + 1; h <= upper; ++h) { + int64_t agreement = 2LL * h - e; + int64_t denominator = agreement * agreement - (int64_t)e * C; + if (2 * h <= e || agreement <= C || denominator <= 0) { + x.failure = 4; + return x; + } + groups += (int64_t)(((i128)e * (agreement - C)) / denominator); + } + int64_t base = bank_prefix + upper - x.cutoff - groups; + int64_t required = target - base + 1; + if (required <= 0) { + x.failure = 5; + x.upper = upper; + x.groups = groups; + x.base = base; + x.target = target; + return x; + } + if (groups < 1) { x.failure = 6; return x; } + int64_t threshold = (required + groups - 1) / groups; + if (threshold < 2 || threshold > LINE) { + x.failure = 7; + return x; + } + if (!x.lines) x.first_threshold = (int)threshold; + x.last_threshold = (int)threshold; + int64_t numerator = threshold * M - N; + int64_t core = numerator <= 0 ? 0 + : (numerator + threshold - 2) / (threshold - 1); + int64_t inside = core > C ? core - C : 0; + int64_t sync = e - inside + K; + x.inside_sum += inside; + ++x.lines; + x.packing = x.inside_sum + - (int64_t)x.lines * (x.lines - 1) * C / 2; + if (x.packing > e) { + x.finish = 2; + x.upper = upper; + return x; + } + if (sync - 1 < upper) upper = (int)sync - 1; + } + x.failure = 8; + return x; +} + +static void print_row(const char *name, const struct row *x) { + printf("%s e=%d failure=%d finish=%d cutoff=%d lines=%d upper=%d " + "piece=%lld bound=%lld slack=%lld inside=%lld packing=%lld " + "first_threshold=%d last_threshold=%d groups=%lld base=%lld " + "target=%lld\n", + name, x->e, x->failure, x->finish, x->cutoff, x->lines, + x->upper, (long long)x->piece, (long long)x->bound, + (long long)x->slack, (long long)x->inside_sum, + (long long)x->packing, x->first_threshold, x->last_threshold, + (long long)x->groups, (long long)x->base, + (long long)x->target); +} + +int main(void) { + struct row first = {0}, first_packing = {0}, last = {0}, wall = {0}; + int paid = 0, profile = 0, packing = 0, max_lines = 0; + int line_count[MAX_LINES + 1] = {0}; + for (int e = 124806; e <= 130199; ++e) { + struct row x = record(e); + if (x.failure) { wall = x; break; } + if (!paid) first = x; + if (x.finish == 2 && !first_packing.e) first_packing = x; + last = x; + ++paid; + ++line_count[x.lines]; + if (x.lines > max_lines) max_lines = x.lines; + if (x.finish == 1) ++profile; + else if (x.finish == 2) ++packing; + else reject("finish", e, x.finish); + } + if (!(paid == 5393 && profile == 3837 && packing == 1556 && + max_lines == 5 && line_count[1] == 3534 && + line_count[2] == 397 && line_count[3] == 1397 && + line_count[4] == 59 && line_count[5] == 6 && + first.e == 124806 && first.bound == 2603990 && + first.first_threshold == 433 && + first_packing.e == 128340 && first_packing.lines == 2 && + first_packing.packing == 129391 && + last.e == 130198 && last.cutoff == 65504 && last.lines == 5 && + last.packing == 133160 && last.first_threshold == 34 && + last.last_threshold == 19 && + wall.e == 130199 && wall.failure == 5 && wall.lines == 9 && + wall.groups == 269019 && wall.base == 8154082 && + wall.target == 7947054 && wall.inside_sum == 126232 && + wall.packing == 126052)) { + reject("census", wall.e, paid); + } + print_row("FIRST", &first); + print_row("FIRST_PACKING", &first_packing); + print_row("LAST_PAID", &last); + print_row("FIRST_WALL", &wall); + printf("MCA_FULL_LIFT_RECURSIVE_LINE_PEELING_CORE_PACKING_V1_SCAN_PASS " + "paid=%d profile=%d packing=%d max_lines=%d " + "line_counts=1:%d,2:%d,3:%d,4:%d,5:%d\n", + paid, profile, packing, max_lines, line_count[1], line_count[2], + line_count[3], line_count[4], line_count[5]); + return 0; +} diff --git a/experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.py b/experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.py new file mode 100644 index 000000000..63f325df9 --- /dev/null +++ b/experimental/verify_mca_full_lift_recursive_line_peeling_core_packing_v1.py @@ -0,0 +1,206 @@ +#!/usr/bin/env python3 +"""Verify selected exact records for recursive M31 line peeling.""" + +from __future__ import annotations + +import copy + + +R, D, K = 1048576, 67448, 6 +N, M, C = R + K, D + K, K - 1 +BUDGET, LINE = 16777215, N - M + 1 + +EXPECTED = { + "first": { + "e": 124806, "cutoff": 65304, "certificate": "profile", + "lines": 1, "upper": 59633, "piece": 1622861, + "bound": 2603990, "slack": 14173225, "inside_sum": 65178, + "packing": 65178, "thresholds": [433], + }, + "first_packing": { + "e": 128340, "cutoff": 65304, "certificate": "packing", + "lines": 2, "upper": 65523, "piece": 0, "bound": 0, + "slack": 0, "inside_sum": 129396, "packing": 129391, + "thresholds": [213, 1122], + }, + "last": { + "e": 130198, "cutoff": 65504, "certificate": "packing", + "lines": 5, "upper": 67454, "piece": 0, "bound": 0, + "slack": 0, "inside_sum": 133210, "packing": 133160, + "thresholds": [34, 30, 26, 22, 19], + }, + "adjacent": { + "e": 130199, "cutoff": 65504, "certificate": "wall", + "lines": 9, "upper": 67454, "piece": 8154082, + "bound": 7947054, "slack": 0, "inside_sum": 126232, + "packing": 126052, "thresholds": [33, 29, 25, 22, 18, 14, 11, 7, 3], + }, + "paid_count": 5393, +} + + +class Reject(ValueError): + pass + + +def raw_cap(e: int, h: int) -> int: + shortened, agreement = N - e, M - h + if agreement <= C: + raise Reject("prefix agreement") + johnson = agreement * agreement - shortened * C + if johnson > 0: + return shortened * (agreement - C) // johnson + gap = -johnson + balance = 2 * agreement * agreement - shortened * C + tangent = (shortened - agreement) ** 2 - (shortened - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("undefined prefix") + return ((shortened - 1) * shortened * shortened * (agreement - C) + // (agreement * tangent)) + + +def prefix(e: int, cutoff: int) -> int: + if not 1 <= cutoff <= M: + raise Reject("prefix cutoff") + values = [0] + [raw_cap(e, h) for h in range(1, cutoff + 1)] + for h in range(cutoff - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, cutoff + 1)) + + +def choose_cutoff(e: int) -> int: + initial = 65304 + cutoff = initial + while cutoff < M: + h = cutoff + 1 + agreement = 2 * h - e + if (2 * h > e and agreement > C and + agreement * agreement > e * C): + break + cutoff += 1 + if cutoff > initial and cutoff < M: + cutoff += 2 + if cutoff >= M: + raise Reject("no bank") + return cutoff + + +def record(e: int) -> dict[str, object]: + H = e - (e - K) // 3 - 1 + if H < M: + raise Reject("scope") + cutoff = choose_cutoff(e) + bank_prefix = prefix(e, cutoff) + upper = M + steps: list[dict[str, int]] = [] + inside_sum = 0 + + while len(steps) < 32: + target = BUDGET - len(steps) * LINE + if target < 0: + raise Reject("budget") + try: + whole_prefix = prefix(e, upper) + except Reject: + whole_prefix = None + if whole_prefix is not None and whole_prefix <= target: + bound = len(steps) * LINE + whole_prefix + return { + "e": e, "cutoff": cutoff, "certificate": "profile", + "lines": len(steps), "upper": upper, "piece": whole_prefix, + "bound": bound, "slack": BUDGET - bound, + "inside_sum": inside_sum, + "packing": inside_sum - len(steps) * (len(steps) - 1) * C // 2, + "thresholds": [step["threshold"] for step in steps], + } + groups = 0 + for h in range(cutoff + 1, upper + 1): + agreement = 2 * h - e + denominator = agreement * agreement - e * C + if 2 * h <= e or agreement <= C or denominator <= 0: + raise Reject("bank guard") + groups += e * (agreement - C) // denominator + base = bank_prefix + upper - cutoff - groups + required = target - base + 1 + if required <= 0: + return { + "e": e, "cutoff": cutoff, "certificate": "wall", + "lines": len(steps), "upper": upper, "piece": base, + "bound": target, "slack": 0, "inside_sum": inside_sum, + "packing": inside_sum - len(steps) * (len(steps) - 1) * C // 2, + "thresholds": [step["threshold"] for step in steps], + } + threshold = (required + groups - 1) // groups + if not 2 <= threshold <= LINE: + raise Reject("threshold") + numerator = threshold * M - N + core = 0 if numerator <= 0 else ( + numerator + threshold - 2) // (threshold - 1) + inside = max(core - C, 0) + sync = e - inside + K + inside_sum += inside + line_number = len(steps) + 1 + packing = inside_sum - line_number * (line_number - 1) * C // 2 + steps.append({"threshold": threshold, "inside": inside, + "sync": sync, "packing": packing}) + if packing > e: + return { + "e": e, "cutoff": cutoff, "certificate": "packing", + "lines": len(steps), "upper": upper, "piece": 0, + "bound": 0, "slack": 0, "inside_sum": inside_sum, + "packing": packing, + "thresholds": [step["threshold"] for step in steps], + } + upper = min(upper, sync - 1) + raise Reject("recursion") + + +def validate(expected: dict[str, object]) -> int: + checks = 43 + for name in ("first", "first_packing", "last", "adjacent"): + got = record(expected[name]["e"]) + if got != expected[name]: + raise Reject(name) + checks += 10 + len(got["thresholds"]) + if (expected["paid_count"] != + expected["last"]["e"] - expected["first"]["e"] + 1 or + expected["adjacent"]["e"] != expected["last"]["e"] + 1): + raise Reject("summary") + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(EXPECTED)) + mutations = [] + for name, key, delta in ( + ("first", "bound", 1), + ("first_packing", "packing", -1), + ("last", "inside_sum", 1), + ("adjacent", "piece", -1)): + changed = copy.deepcopy(EXPECTED) + changed[name][key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + changed = copy.deepcopy(EXPECTED) + changed["paid_count"] += 1 + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_RECURSIVE_LINE_PEELING_CORE_PACKING_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_residue_zero_core_absorption_v1.py b/experimental/verify_mca_full_lift_residue_zero_core_absorption_v1.py new file mode 100644 index 000000000..481e138af --- /dev/null +++ b/experimental/verify_mca_full_lift_residue_zero_core_absorption_v1.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +"""Verify the first residue-zero common-core absorption payment.""" + +from __future__ import annotations + +import copy + + +ROW = { + "R": 1048576, "d": 67448, "K": 6, "e": 98232, + "budget": 16777215, "core": 67452, "inside_core": 67447, + "sync_start": 30791, "low_end": 30790, + "agreement": 36664, "punctured_length": 950350, + "johnson_denominator": 1339497146, + "johnson_numerator": 34838880650, "list_cap": 26, + "low_slopes": 2554032, "line_cap": 981129, + "bound": 3535161, "slack": 13242054, "next_e": 98233, +} + + +class Reject(ValueError): + pass + + +def endpoint(row): + R, d, K, e = row["R"], row["d"], row["K"], row["e"] + N, m, c = R + K, d + K, K - 1 + inside = row["core"] - c + sync = e - inside + K + low_end = sync - 1 + agreement = m - low_end + n = N - e + denominator = agreement * agreement - n * c + numerator = n * (agreement - c) + list_cap = numerator // denominator + low = e * list_cap + line = N - m + 1 + bound = low + line + if row["core"] < m - 2 or denominator <= 0 or bound >= row["budget"]: + raise Reject("guards") + return { + "inside_core": inside, "sync_start": sync, "low_end": low_end, + "agreement": agreement, "punctured_length": n, + "johnson_denominator": denominator, + "johnson_numerator": numerator, "list_cap": list_cap, + "low_slopes": low, "line_cap": line, "bound": bound, + "slack": row["budget"] - bound, "next_e": e + 1, + } + + +def validate(row): + for key, value in endpoint(row).items(): + if row[key] != value: + raise Reject(key) + return 23 + + +def main() -> None: + checks = validate(copy.deepcopy(ROW)) + mutations = [] + for key, delta in (("inside_core", 1), ("list_cap", -1), + ("bound", -1), ("slack", 1)): + changed = copy.deepcopy(ROW) + changed[key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_RESIDUE_ZERO_CORE_ABSORPTION_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_residue_zero_direction_router_v1.py b/experimental/verify_mca_full_lift_residue_zero_direction_router_v1.py new file mode 100644 index 000000000..be8c35d07 --- /dev/null +++ b/experimental/verify_mca_full_lift_residue_zero_direction_router_v1.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +"""Verify the first Mersenne residue-zero direction-class router.""" + +from __future__ import annotations + +import copy + + +ROW = { + "R": 1048576, "d": 67448, "K": 6, "budget": 16777215, + "e": 98232, "s": 32742, "residue": 0, "H": 65489, + "pair_agreement": 32746, "direction_classes": 3, + "outside_line_cap": 484, "boundary_cap": 1450, + "P_H1": 16432695, "prefix_boundary": 16434145, + "top_threshold": 343071, "line_cap": 981129, + "forced_core": 67452, "m": 67454, "N": 1048582, +} + + +class Reject(ValueError): + pass + + +def cap(R: int, d: int, K: int, e: int, h: int) -> int: + n, m, c = R + K - e, d + K, K - 1 + A = m - h + denominator = A * A - n * c + if denominator > 0: + return n * (A - c) // denominator + gap = -denominator + balance = 2 * A * A - n * c + tangent = (n - A) ** 2 - (n - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("undefined cap") + return (n - 1) * n * n * (A - c) // (A * tangent) + + +def profile(R: int, d: int, K: int, e: int, end: int) -> int: + values = [0] + [cap(R, d, K, e, h) for h in range(1, end + 1)] + for h in range(end - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + return sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, end + 1)) + + +def endpoint(row): + R, d, K, e = row["R"], row["d"], row["K"], row["e"] + N, m, c = R + K, d + K, K - 1 + s, residue = divmod(e - K, 3) + H = e - s - 1 + A = 2 * H - e + denominator = A * A - e * c + if (residue != 0 or A <= 0 or denominator <= 0 or + not (N - e > m - H > c)): + raise Reject("hypotheses") + classes = e * (A - c) // denominator + outside = (N - e - c) // (m - H - c) + boundary = 1 + classes * (outside - 1) + prefix = profile(R, d, K, e, H - 1) + prefix_boundary = prefix + boundary + threshold = row["budget"] - prefix_boundary + 1 + line_cap = N - m + 1 + forced_core = (threshold * m - N + threshold - 2) // (threshold - 1) + if threshold > line_cap or forced_core != m - 2: + raise Reject("terminal") + return { + "s": s, "residue": residue, "H": H, "pair_agreement": A, + "direction_classes": classes, "outside_line_cap": outside, + "boundary_cap": boundary, "P_H1": prefix, + "prefix_boundary": prefix_boundary, "top_threshold": threshold, + "line_cap": line_cap, "forced_core": forced_core, + "m": m, "N": N, + } + + +def validate(row): + got = endpoint(row) + for key, value in got.items(): + if row[key] != value: + raise Reject(key) + return 19 + + +def main() -> None: + checks = validate(copy.deepcopy(ROW)) + mutations = [] + for key, delta in (("direction_classes", 1), ("boundary_cap", -1), + ("top_threshold", -1), ("forced_core", 1)): + changed = copy.deepcopy(ROW) + changed[key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_RESIDUE_ZERO_DIRECTION_ROUTER_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_top_third_common_core_payment_v1.py b/experimental/verify_mca_full_lift_top_third_common_core_payment_v1.py new file mode 100644 index 000000000..f212875e5 --- /dev/null +++ b/experimental/verify_mca_full_lift_top_third_common_core_payment_v1.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python3 +"""Audit the full-lift top-third common-core payment.""" + +from __future__ import annotations + +import copy + + +ROWS = { + "KoalaBear": { + "R": 1048576, "d": 67472, "K": 14, + "budget": 274980728111395087, + "last": 95943, "last_total": 27414298, + "last_line": 22059354, "last_J_u": 50, "last_J_H": 557844, + "max_line": 24121368, "max_line_e": 67486, + "next": 95944, "next_H_den": -1037, "next_total": None, + "floor": 95944, "ceiling": 1044238, + }, + "Mersenne-31": { + "R": 1048576, "d": 67448, "K": 6, + "budget": 16777215, + "last": 67452, "last_total": 16266965, + "last_line": 14310842, "last_J_u": 29, "last_J_H": 44, + "max_line": 14310842, "max_line_e": 67452, + "next": 67453, "next_H_den": 500624611, + "next_total": 17248067, + "floor": 67453, "ceiling": 1044241, + }, +} + + +class Reject(ValueError): + pass + + +def direct_line_sum(R: int, d: int, K: int, e: int) -> int: + N, m, c = R + K, d + K, K - 1 + n, t = N - e, N - m + s = (e - K) // 3 + r_min = max(0, e - m) + total = 0 + for r in range(r_min, s + 1): + A = m - e + r + total += t + 1 if A <= c else (n - c) // (A - c) + return total + + +def profile(R: int, d: int, K: int, e: int) -> tuple[int, int, int, int] | None: + N, m, c = R + K, d + K, K - 1 + n = N - e + s = (e - K) // 3 + H = e - s - 1 + u = e // 2 + values = [] + denominators = [] + for h in (u, H): + A = m - h + denominator = A * A - n * c + denominators.append(denominator) + if denominator <= 0: + return None + values.append(n * (A - c) // denominator) + line = direct_line_sum(R, d, K, e) + total = (e - 1) * values[0] + values[1] + line + return total, line, values[0], values[1] + + +def johnson_pair(R: int, d: int, K: int, e: int) -> tuple[int, int] | None: + N, m, c = R + K, d + K, K - 1 + n = N - e + s = (e - K) // 3 + values = [] + for h in (e // 2, e - s - 1): + A = m - h + denominator = A * A - n * c + if denominator <= 0: + return None + values.append(n * (A - c) // denominator) + return values[0], values[1] + + +def finite_core_control() -> int: + blocks = [ + {0, 1, 2}, {0, 1, 3}, {0, 1, 4}, {0, 1, 5}, {0, 1, 6}, + ] + core = set.intersection(*blocks) + stripped = [block - core for block in blocks] + if len(core) != 2: + raise Reject("common core") + if any(left & right for i, left in enumerate(stripped) for right in stripped[i + 1:]): + raise Reject("off-core packing") + if len(blocks) != 7 - 3 + 1: + raise Reject("sharp total cap") + return len(blocks) * len(stripped) + + +def validate(rows: dict[str, dict[str, int | None]]) -> int: + checks = 0 + for name, row in rows.items(): + R, d, K = row["R"], row["d"], row["K"] + last = profile(R, d, K, row["last"]) + if last is None or last != ( + row["last_total"], row["last_line"], row["last_J_u"], row["last_J_H"] + ): + raise Reject(f"{name}: endpoint") + if last[0] > row["budget"]: + raise Reject(f"{name}: budget") + if name == "KoalaBear": + max_u = max_H = 0 + for e in range(d, row["last"] + 1): + current = johnson_pair(R, d, K, e) + if current is None: + raise Reject("KoalaBear strip") + max_u = max(max_u, current[0]) + max_H = max(max_H, current[1]) + if (max_u, max_H) != (50, 557844): + raise Reject("KoalaBear maxima") + line = direct_line_sum(R, d, K, d + K) + if (line, d + K) != (row["max_line"], row["max_line_e"]): + raise Reject("KoalaBear line max") + if (row["last"] - 1) * max_u + max_H + line > row["budget"]: + raise Reject("KoalaBear uniform") + e = row["next"] + N, m, c = R + K, d + K, K - 1 + H = e - (e - K) // 3 - 1 + A = m - H + if A * A - (N - e) * c != row["next_H_den"]: + raise Reject("KoalaBear stop") + else: + for e in range(d, row["last"] + 1): + current = profile(R, d, K, e) + if current is None or current[0] > row["budget"]: + raise Reject("Mersenne strip") + adjacent = profile(R, d, K, row["next"]) + if adjacent is None or adjacent[0] != row["next_total"] or adjacent[0] <= row["budget"]: + raise Reject("Mersenne stop") + checks += 9 + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(ROWS)) + finite_core_control() + mutations = [] + for name, key in (("KoalaBear", "last_line"), ("Mersenne-31", "next_total")): + changed = copy.deepcopy(ROWS) + changed[name][key] += 1 + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_TOP_THIRD_COMMON_CORE_PAYMENT_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_top_third_global_line_payment_v1.py b/experimental/verify_mca_full_lift_top_third_global_line_payment_v1.py new file mode 100644 index 000000000..8e289f7c0 --- /dev/null +++ b/experimental/verify_mca_full_lift_top_third_global_line_payment_v1.py @@ -0,0 +1,155 @@ +#!/usr/bin/env python3 +"""Verify the full-lift top-third global-line payment.""" + +from __future__ import annotations + +import copy + + +ROWS = { + "KoalaBear": { + "R": 1048576, "d": 67472, "K": 14, + "budget": 274980728111395087, + "first": 67472, "first_total": 2937808, + "last": 95943, "last_s": 31976, "last_H": 63966, + "last_u": 47971, "last_J_u": 50, "last_J_H": 557844, + "last_H_den": 5989, "line_cap": 981105, + "last_prefix": 5354944, "last_total": 6336049, + "max_total": 6336049, "max_total_e": 95943, + "next": 95944, "next_H": 63967, "next_H_den": -1037, + "floor": 95944, "ceiling": 1044238, + }, + "Mersenne-31": { + "R": 1048576, "d": 67448, "K": 6, + "budget": 16777215, + "first": 67448, "first_total": 2937136, + "last": 97908, "last_s": 32634, "last_H": 65273, + "last_u": 48954, "last_J_u": 52, "last_J_H": 610046, + "last_H_den": 3391, "line_cap": 981129, + "last_prefix": 5701210, "last_total": 6682339, + "max_total": 6683188, "max_total_e": 97907, + "next": 97909, "next_H": 65274, "next_H_den": -965, + "floor": 97909, "ceiling": 1044241, + }, +} + + +class Reject(ValueError): + pass + + +def profile(R: int, d: int, K: int, e: int) -> dict[str, int] | None: + N, m, c = R + K, d + K, K - 1 + n = N - e + s = (e - K) // 3 + H = e - s - 1 + u = e // 2 + values = [] + denominators = [] + for h in (u, H): + A = m - h + denominator = A * A - n * c + if denominator <= 0: + return None + values.append(n * (A - c) // denominator) + denominators.append(denominator) + prefix = (e - 1) * values[0] + values[1] + line_cap = N - m + 1 + return { + "s": s, "H": H, "u": u, + "J_u": values[0], "J_H": values[1], + "H_den": denominators[1], "line_cap": line_cap, + "prefix": prefix, "total": prefix + line_cap, + } + + +def finite_controls() -> int: + E = set(range(11)) + missed = [{0, 1, 2}, {3, 4}, {5, 6, 7}] + shared = set.intersection(*(E - current for current in missed)) + if len(shared) != 3: + raise Reject("cross-layer triple overlap") + blocks = [ + {0, 1, 2}, {0, 1, 3}, {0, 1, 4}, {0, 1, 5}, {0, 1, 6}, + ] + core = set.intersection(*blocks) + stripped = [block - core for block in blocks] + if len(core) != 2 or any( + left & right + for index, left in enumerate(stripped) + for right in stripped[index + 1:] + ): + raise Reject("total-core packing") + return len(shared) + len(blocks) + + +def validate(rows: dict[str, dict[str, int]]) -> int: + checks = finite_controls() + for name, row in rows.items(): + first = profile(row["R"], row["d"], row["K"], row["first"]) + last = profile(row["R"], row["d"], row["K"], row["last"]) + if first is None or first["total"] != row["first_total"]: + raise Reject(f"{name}: first endpoint") + if last is None: + raise Reject(f"{name}: last endpoint unavailable") + expected = { + "s": row["last_s"], "H": row["last_H"], + "u": row["last_u"], "J_u": row["last_J_u"], + "J_H": row["last_J_H"], "H_den": row["last_H_den"], + "line_cap": row["line_cap"], "prefix": row["last_prefix"], + "total": row["last_total"], + } + if any(last[key] != value for key, value in expected.items()): + raise Reject(f"{name}: endpoint record") + maximum = (-1, -1) + for e in range(row["first"], row["last"] + 1): + current = profile(row["R"], row["d"], row["K"], e) + if current is None or current["total"] > row["budget"]: + raise Reject(f"{name}: paid strip") + maximum = max(maximum, (current["total"], e)) + checks += 1 + if maximum != (row["max_total"], row["max_total_e"]): + raise Reject(f"{name}: maximum") + adjacent = profile(row["R"], row["d"], row["K"], row["next"]) + if adjacent is not None: + raise Reject(f"{name}: adjacent unexpectedly available") + e = row["next"] + N, m, c = row["R"] + row["K"], row["d"] + row["K"], row["K"] - 1 + H = e - (e - row["K"]) // 3 - 1 + A = m - H + denominator = A * A - (N - e) * c + if (H, denominator) != (row["next_H"], row["next_H_den"]): + raise Reject(f"{name}: adjacent record") + if row["floor"] != row["next"] or row["ceiling"] < row["floor"]: + raise Reject(f"{name}: residual interval") + checks += 13 + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(ROWS)) + mutations = [] + for name, key, delta in ( + ("KoalaBear", "last_total", 1), + ("KoalaBear", "next_H_den", 1), + ("Mersenne-31", "max_total", -1), + ("Mersenne-31", "line_cap", 1), + ): + changed = copy.deepcopy(ROWS) + changed[name][key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_TOP_THIRD_GLOBAL_LINE_PAYMENT_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_full_lift_two_boundary_layer_continuation_v1.py b/experimental/verify_mca_full_lift_two_boundary_layer_continuation_v1.py new file mode 100644 index 000000000..3227ae315 --- /dev/null +++ b/experimental/verify_mca_full_lift_two_boundary_layer_continuation_v1.py @@ -0,0 +1,115 @@ +#!/usr/bin/env python3 +"""Verify the residue-two full-lift boundary-layer continuation.""" + +from __future__ import annotations + +import copy + + +ROW = { + "R": 1048576, "d": 67448, "K": 6, "budget": 16777215, + "e": 98231, "s": 32741, "q": 2, "H": 65489, + "line": 981129, "outside": 484, "disjoint": 3, + "P_H2": 15505282, "breaks_H2": 1670, "B_H2": 14129968, + "P_H1": 16433719, "breaks_H1": 1671, "B_H1": 15058405, + "cases": (16486411, 16434204, 16433721, 16434203, 16433722), + "bound": 16486411, "slack": 290804, + "next_e": 98232, "next_q": 0, +} + + +class Reject(ValueError): + pass + + +def cap(R: int, d: int, K: int, e: int, h: int) -> int: + n, m, c = R + K - e, d + K, K - 1 + A = m - h + denominator = A * A - n * c + if denominator > 0: + return n * (A - c) // denominator + gap = -denominator + balance = 2 * A * A - n * c + tangent = (n - A) ** 2 - (n - 1) * gap + if balance < 0 or tangent <= 0: + raise Reject("undefined cap") + return (n - 1) * n * n * (A - c) // (A * tangent) + + +def profile(R: int, d: int, K: int, e: int, end: int): + values = [0] + [cap(R, d, K, e, h) for h in range(1, end + 1)] + for h in range(end - 1, 0, -1): + values[h] = min(values[h], values[h + 1]) + total = sum((values[h] - values[h - 1]) * (e // h) + for h in range(1, end + 1)) + breaks = sum(values[h] != values[h - 1] for h in range(1, end + 1)) + return total, breaks, values[end] + + +def endpoint(row): + R, d, K, e = row["R"], row["d"], row["K"], row["e"] + N, m, c = R + K, d + K, K - 1 + s, q = divmod(e - K, 3) + H = e - s - 1 + if q != 2 or H < 3 or 2 * (s + 2) >= e or m - H <= c: + raise Reject("hypotheses") + # Fail closed unless every parent cap through H is defined. + profile(R, d, K, e, H) + p2 = profile(R, d, K, e, H - 2) + p1 = profile(R, d, K, e, H - 1) + line = N - m + 1 + outside = (N - e - c) // (m - H - c) + disjoint = e // (s + 1) + cases = ( + p2[0] + line, + p1[0] + outside + 1, + p1[0] + 2, + p1[0] + outside, + p1[0] + disjoint, + ) + return (s, q, H, line, outside, disjoint, *p2, *p1, + cases, max(cases)) + + +def validate(row): + got = endpoint(row) + expected = ( + row["s"], row["q"], row["H"], row["line"], row["outside"], + row["disjoint"], row["P_H2"], row["breaks_H2"], row["B_H2"], + row["P_H1"], row["breaks_H1"], row["B_H1"], row["cases"], + row["bound"], + ) + if got != expected: + raise Reject("endpoint") + if row["budget"] - row["bound"] != row["slack"] or row["slack"] <= 0: + raise Reject("slack") + if row["e"] - 3 * row["s"] - 2 != row["K"]: + raise Reject("mixed intersection") + if (row["next_e"] - row["K"]) % 3 != row["next_q"] or row["next_q"] != 0: + raise Reject("adjacent residue") + return 27 + + +def main() -> None: + checks = validate(copy.deepcopy(ROW)) + mutations = [] + for key, delta in (("outside", 1), ("bound", -1), + ("slack", 1), ("next_q", 1)): + changed = copy.deepcopy(ROW) + changed[key] += delta + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_FULL_LIFT_TWO_BOUNDARY_LAYER_CONTINUATION_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_proper_subspace_occupancy_compiler_v1.py b/experimental/verify_mca_proper_subspace_occupancy_compiler_v1.py new file mode 100644 index 000000000..ee46de851 --- /dev/null +++ b/experimental/verify_mca_proper_subspace_occupancy_compiler_v1.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python3 +"""Verify the exact finite walls of the corrected MCA occupancy compiler.""" + +from __future__ import annotations + +from fractions import Fraction +from itertools import product as cartesian_product +from math import prod + + +def falling(value: int, length: int) -> int: + result = 1 + for offset in range(length): + result *= value - offset + return result + + +def bound(R: int, d: int, K: int, rank: int, factor: int) -> int: + N, m = R + K, d + K + middle = prod(d + offset for offset in range(1, rank)) + values = [] + for zero_normals in range(K - rank + 1): + for global_normals in range(zero_normals + 1): + values.append( + Fraction( + falling(N - zero_normals, rank + 1), + (m - global_normals) * middle * factor, + ) + ) + maximum = max(values) + return maximum.numerator // maximum.denominator + + +def first_factor(R: int, d: int, K: int, rank: int, budget: int) -> int: + low = high = 1 + while bound(R, d, K, rank, high) > budget: + high *= 2 + while low < high: + middle = (low + high) // 2 + if bound(R, d, K, rank, middle) <= budget: + high = middle + else: + low = middle + 1 + return low + + +def exhaustive_rank_one_toy() -> int: + p, N, K, m = 3, 3, 1, 2 + words = list(cartesian_product(range(p), repeat=N)) + code = [(constant,) * N for constant in range(p)] + checks = 0 + for base in words: + for direction in words: + e = min( + sum(value != constant for value in direction) + for constant in range(p) + ) + options: list[list[int | None]] = [] + for slope in range(p): + received = tuple( + (base[x] + slope * direction[x]) % p for x in range(N) + ) + candidates: list[int | None] = [None] + for explanation, word in enumerate(code): + support = tuple( + x for x in range(N) if received[x] == word[x] + ) + if len(support) < m: + continue + pair_contained = any( + all( + base[x] == first and direction[x] == second + for x in support + ) + for first in range(p) + for second in range(p) + ) + if not pair_contained: + candidates.append(explanation) + options.append(candidates) + corrected = bound(N - K, m - K, K, 1, max(1, e - (N - m))) + for choice in cartesian_product(*options): + selected = [value for value in choice if value is not None] + if len(selected) < 2 or len(set(selected)) < 2: + continue + if len(selected) > corrected: + raise ValueError("rank-one toy violation") + checks += 1 + return checks + + +def main() -> None: + rows = ( + { + "name": "KoalaBear", + "R": 1048576, + "d": 67472, + "K": 14, + "budget": 274980728111395087, + "factors": (1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 49, 757, 11748, 182530), + "walls": (981108, 981153, 981861, 992852), + "top_bound": 743896698428332665, + }, + { + "name": "Mersenne-31", + "R": 1048576, + "d": 67448, + "K": 6, + "budget": 16777215, + "factors": (1, 16, 235, 3651, 56748, 882143), + "walls": (981144, 981363, 984779, 1037876), + "top_bound": 219426634, + }, + ) + zero_normal_cases = 0 + adjacent_checks = 0 + for row in rows: + factors = tuple( + first_factor(row["R"], row["d"], row["K"], rank, row["budget"]) + for rank in range(1, row["K"] + 1) + ) + if factors != row["factors"]: + raise ValueError(row["name"] + " factors") + conditional = factors[len(factors) - 5:-1] + walls = tuple(row["R"] - row["d"] + factor for factor in conditional) + if walls != row["walls"]: + raise ValueError(row["name"] + " walls") + for offset, factor in enumerate(conditional, len(factors) - 4): + paid = bound(row["R"], row["d"], row["K"], offset, factor) + previous = bound(row["R"], row["d"], row["K"], offset, factor - 1) + if not paid <= row["budget"] < previous: + raise ValueError(row["name"] + " adjacent crossing") + adjacent_checks += 1 + if bound(row["R"], row["d"], row["K"], row["K"], row["d"]) != row["top_bound"]: + raise ValueError(row["name"] + " top-rank wall") + if not factors[-1] > row["d"]: + raise ValueError(row["name"] + " top-rank feasibility") + zero_normal_cases += sum( + (row["K"] - rank + 1) * (row["K"] - rank + 2) // 2 + for rank in range(1, row["K"] + 1) + ) + + regression = bound(99, 20, 1, 1, 1) + if regression != 471 or not 31 <= regression: + raise ValueError("GF(1009) regression") + toy_checks = exhaustive_rank_one_toy() + if toy_checks != 540: + raise ValueError("toy census") + print( + "MCA_PROPER_SUBSPACE_OCCUPANCY_COMPILER_V1_PASS " + f"zero_normal_cases={zero_normal_cases} adjacent={adjacent_checks} " + f"regression={regression} toy_selections={toy_checks}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_sparse_direction_mean_centered_gram_profile_v1.py b/experimental/verify_mca_sparse_direction_mean_centered_gram_profile_v1.py new file mode 100755 index 000000000..5e55d792a --- /dev/null +++ b/experimental/verify_mca_sparse_direction_mean_centered_gram_profile_v1.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python3 +"""Audit the exact mean-centered sparse-direction Gram profile.""" + +from __future__ import annotations + +import copy +from fractions import Fraction +from itertools import combinations + + +ROWS = { + "KoalaBear": { + "R": 1048576, "d": 67472, "K": 14, + "budget": 274980728111395087, + "first": 64038, "last": 64047, "defect": 984529, + "n": 984543, "A": 3439, "g": 972338, + "balance": 10854383, "T": 5257459620, + "Q": 180835154, "profile": 181731868, + "next": 64048, "next_T": -1499457466, "next_profile": None, + }, + "Mersenne-31": { + "R": 1048576, "d": 67448, "K": 6, + "budget": 16777215, + "first": 65419, "last": 65454, "defect": 983122, + "n": 983128, "A": 2000, "g": 915640, + "balance": 3084360, "T": 62421746104, + "Q": 15184718, "profile": 16101127, + "next": 65455, "next_T": 58496056500, + "next_profile": 17120123, + }, +} + + +class Reject(ValueError): + pass + + +def raw_cap(R: int, d: int, K: int, e: int, h: int) -> int | None: + n = R + K - e + A = d + K - h + c = K - 1 + D = A * A - n * c + if D > 0: + return n * (A - c) // D + g = -D + T = (n - A) ** 2 - (n - 1) * g + if g < 0 or 2 * A * A < n * c or T <= 0: + return None + return (n - 1) * n * n * (A - c) // (A * T) + + +def profile(R: int, d: int, K: int, e: int) -> int | None: + caps = [0] + for h in range(1, e + 1): + value = raw_cap(R, d, K, e, h) + if value is None: + return None + caps.append(value) + suffix = caps[-1] + for h in range(e - 1, 0, -1): + suffix = min(suffix, caps[h]) + caps[h] = suffix + if any(caps[h] < caps[h - 1] for h in range(1, e + 1)): + raise Reject("suffix monotonicity") + return sum((caps[h] - caps[h - 1]) * (e // h) for h in range(1, e + 1)) + + +def endpoint(row: dict[str, int | None], e: int) -> dict[str, int | None]: + R, d, K = (int(row[key]) for key in ("R", "d", "K")) + n = R + K - e + A = d + K - e + c = K - 1 + g = n * c - A * A + balance = 2 * A * A - n * c + T = (n - A) ** 2 - (n - 1) * g + Q = None + if g >= 0 and balance >= 0 and T > 0: + Q = (n - 1) * n * n * (A - c) // (A * T) + return { + "n": n, "A": A, "g": g, "balance": balance, "T": T, + "Q": Q, "profile": profile(R, d, K, e), + } + + +def validate(rows: dict[str, dict[str, int | None]]) -> int: + checks = 0 + for name, expected in ROWS.items(): + row = rows[name] + if row["defect"] != row["R"] - row["last"]: + raise Reject(f"{name}: defect") + observed = endpoint(row, int(row["last"])) + for key in ("n", "A", "g", "balance", "T", "Q", "profile"): + if observed[key] != expected[key] or row[key] != expected[key]: + raise Reject(f"{name}: {key}") + checks += 1 + adjacent = endpoint(row, int(row["next"])) + if adjacent["T"] != row["next_T"] or adjacent["profile"] != row["next_profile"]: + raise Reject(f"{name}: adjacent") + for e in range(int(row["first"]), int(row["last"]) + 1): + value = profile(int(row["R"]), int(row["d"]), int(row["K"]), e) + if value is None or value > row["budget"]: + raise Reject(f"{name}: strip") + checks += 1 + return checks + + +def block_control() -> int: + blocks = [ + {0, 1, 2}, {0, 3, 4}, {1, 3, 5}, {2, 4, 5}, + {0, 5, 6}, {1, 4, 6}, {2, 3, 6}, + ] + n, A, c = 10, 3, 1 + if any(len(x & y) > c for x, y in combinations(blocks, 2)): + raise Reject("block intersections") + g = n * c - A * A + T = (n - A) ** 2 - (n - 1) * g + cap = Fraction((n - 1) * n * n * (A - c), A * T) + if len(blocks) > cap.numerator // cap.denominator: + raise Reject("block cap") + return len(blocks) ** 2 + + +def main() -> None: + checks = validate(copy.deepcopy(ROWS)) + block_control() + mutations = [] + for name, key in (("KoalaBear", "T"), ("Mersenne-31", "profile")): + changed = copy.deepcopy(ROWS) + changed[name][key] += 1 + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_SPARSE_DIRECTION_MEAN_CENTERED_GRAM_PROFILE_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_sparse_direction_near_johnson_gram_rank_v1.py b/experimental/verify_mca_sparse_direction_near_johnson_gram_rank_v1.py new file mode 100755 index 000000000..0e013330a --- /dev/null +++ b/experimental/verify_mca_sparse_direction_near_johnson_gram_rank_v1.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python3 +"""Audit the sparse-direction near-Johnson centered-Gram payment.""" + +from __future__ import annotations + +import copy +from fractions import Fraction +from itertools import combinations + + +ROWS = { + "KoalaBear": { + "R": 1048576, "d": 67472, "K": 14, + "budget": 274980728111395087, + "first": 63909, "last": 64037, "defect": 984539, + "n": 984553, "A": 3449, "g": 903588, "G": 59452, + "Q": 196254209, "u": 32018, "J": 28, + "bound": 198047217, "next": 64038, + "next_G": -36911, "next_bound": None, + }, + "Mersenne-31": { + "R": 1048576, "d": 67448, "K": 6, + "budget": 16777215, + "first": 65237, "last": 65418, "defect": 983158, + "n": 983164, "A": 2036, "g": 770524, "G": 272341, + "Q": 14927965, "u": 32709, "J": 28, + "bound": 16759641, "next": 65419, + "next_G": 247950, "next_bound": 18212004, + }, +} + + +class Reject(ValueError): + pass + + +def record(R: int, d: int, K: int, e: int) -> dict[str, int | None]: + n = R + K - e + A = d + K - e + c = K - 1 + g = n * c - A * A + G = (A - c) ** 2 - c * g + Q = None if G <= 0 else n * A * (A - c) // G + u = e // 2 + Au = d + K - u + D = Au * Au - n * c + if D <= 0: + raise Reject("half Johnson denominator") + J = n * (Au - c) // D + return { + "n": n, "A": A, "g": g, "G": G, "Q": Q, "u": u, "J": J, + "bound": None if Q is None else (e - 1) * J + Q, + } + + +def validate(rows: dict[str, dict[str, int | None]]) -> int: + checks = 0 + for name, expected in ROWS.items(): + row = rows[name] + if row["defect"] != row["R"] - row["last"]: + raise Reject(f"{name}: defect") + endpoint = record(row["R"], row["d"], row["K"], row["last"]) + for key in ("n", "A", "g", "G", "Q", "u", "J", "bound"): + if endpoint[key] != expected[key] or row[key] != expected[key]: + raise Reject(f"{name}: {key}") + checks += 1 + adjacent = record(row["R"], row["d"], row["K"], row["next"]) + if adjacent["G"] != row["next_G"] or adjacent["bound"] != row["next_bound"]: + raise Reject(f"{name}: adjacent") + for e in range(row["first"], row["last"] + 1): + item = record(row["R"], row["d"], row["K"], e) + if item["g"] < 0 or item["G"] <= 0: + raise Reject(f"{name}: hypotheses") + if item["bound"] is None or item["bound"] > row["budget"]: + raise Reject(f"{name}: budget") + checks += 1 + return checks + + +def independent_controls() -> int: + blocks = [ + {0, 1, 2}, {0, 3, 4}, {1, 3, 5}, {2, 4, 5}, + {0, 5, 6}, {1, 4, 6}, {2, 3, 6}, + ] + n, A, c = 10, 3, 1 + if any(len(left & right) > c for left, right in combinations(blocks, 2)): + raise Reject("block intersections") + g = n * c - A * A + G = (A - c) ** 2 - c * g + fraction = Fraction(n * A * (A - c), G) + if len(blocks) > fraction.numerator // fraction.denominator: + raise Reject("independent Gram cap") + + checks = len(blocks) ** 2 + for row in ROWS.values(): + endpoint = record(row["R"], row["d"], row["K"], row["last"]) + q = Fraction(endpoint["n"] * endpoint["A"] * + (endpoint["A"] - row["K"] + 1), endpoint["G"]) + if q.numerator // q.denominator != endpoint["Q"]: + raise Reject("rational replay") + checks += 1 + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(ROWS)) + independent_controls() + mutations = [] + for name, key in (("KoalaBear", "G"), ("Mersenne-31", "bound")): + changed = copy.deepcopy(ROWS) + changed[name][key] += 1 + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_SPARSE_DIRECTION_NEAR_JOHNSON_GRAM_RANK_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_sparse_direction_punctured_johnson_profile_v1.py b/experimental/verify_mca_sparse_direction_punctured_johnson_profile_v1.py new file mode 100755 index 000000000..806738813 --- /dev/null +++ b/experimental/verify_mca_sparse_direction_punctured_johnson_profile_v1.py @@ -0,0 +1,175 @@ +#!/usr/bin/env python3 +"""Audit the punctured-Johnson sparse-direction MCA profile.""" + +from __future__ import annotations + +import copy +from fractions import Fraction + + +ROWS = { + "KoalaBear": { + "R": 1048576, + "d": 67472, + "K": 14, + "budget": 274980728111395087, + "last": 63908, + "defect": 984668, + "dlast": 1218, + "dnext": -5924, + "half": 31954, + "jhalf": 27, + "jlast": 2882094, + "coarse": 4607583, + }, + "Mersenne-31": { + "R": 1048576, + "d": 67448, + "K": 6, + "budget": 16777215, + "last": 65236, + "defect": 983340, + "dlast": 2794, + "dnext": -1636, + "half": 32618, + "jhalf": 28, + "jlast": 778863, + "coarse": 2605443, + }, +} + + +class Reject(ValueError): + pass + + +def denominator(R: int, d: int, K: int, e: int, h: int | None = None) -> int: + if h is None: + h = e + return (d + K - h) ** 2 - (R + K - e) * (K - 1) + + +def cap(R: int, d: int, K: int, e: int, h: int) -> int: + if h == 0: + return 0 + den = denominator(R, d, K, e, h) + if den <= 0: + raise Reject("nonpositive denominator") + return (R + K - e) * (d - h + 1) // den + + +def coarse(R: int, d: int, K: int, e: int) -> int: + return (e - 1) * cap(R, d, K, e, e // 2) + cap(R, d, K, e, e) + + +def derive(row: dict[str, int]) -> dict[str, int]: + R, d, K, budget = (row[key] for key in ("R", "d", "K", "budget")) + last = 0 + best = (-1, -1) + previous = None + checks = 0 + for e in range(1, d): + den = denominator(R, d, K, e) + if den <= 0: + break + if previous is not None and den >= previous: + raise Reject("denominator not descending") + previous = den + value = coarse(R, d, K, e) + if value > budget: + raise Reject("budget failure inside Johnson prefix") + if value > best[1]: + best = (e, value) + last = e + checks += 1 + half = last // 2 + return { + "last": last, + "defect": R - last, + "dlast": denominator(R, d, K, last), + "dnext": denominator(R, d, K, last + 1), + "half": half, + "jhalf": cap(R, d, K, last, half), + "jlast": cap(R, d, K, last, last), + "coarse": best[1], + "maximizer": best[0], + "checks": checks, + } + + +def independent_cap(R: int, d: int, K: int, e: int, h: int) -> int: + if h == 0: + return 0 + length = R + K - e + agreement = d + K - h + den = agreement * agreement - length * (K - 1) + if den <= 0: + raise Reject("independent denominator") + value = Fraction(length * (agreement - K + 1), den) + return value.numerator // value.denominator + + +def profile_controls() -> int: + checks = 0 + for R, d, K in ((101, 20, 3), (211, 31, 5)): + for e in range(1, min(d, 18)): + if denominator(R, d, K, e) <= 0: + continue + previous = 0 + profile = 0 + for h in range(1, e + 1): + current = independent_cap(R, d, K, e, h) + if current < previous: + raise Reject("cumulative cap") + profile += (current - previous) * (e // h) + previous = current + upper = ( + (e - 1) * independent_cap(R, d, K, e, e // 2) + + independent_cap(R, d, K, e, e) + ) + if profile > upper: + raise Reject("coarse profile") + checks += 1 + return checks + + +def validate(rows: dict[str, dict[str, int]]) -> int: + checks = 0 + for name, expected in ROWS.items(): + row = rows[name] + derived = derive(row) + for key in ( + "last", "defect", "dlast", "dnext", "half", "jhalf", + "jlast", "coarse", + ): + if derived[key] != expected[key] or row[key] != expected[key]: + raise Reject(f"{name}: {key}") + checks += 1 + if derived["maximizer"] != expected["last"]: + raise Reject(f"{name}: maximizer") + checks += derived["checks"] + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(ROWS)) + profile_controls() + mutations = [] + for name, key in (("KoalaBear", "last"), ("Mersenne-31", "coarse")): + changed = copy.deepcopy(ROWS) + changed[name][key] += 1 + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_SPARSE_DIRECTION_PUNCTURED_JOHNSON_PROFILE_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_sparse_direction_terminal_deficit_line_payment_v1.py b/experimental/verify_mca_sparse_direction_terminal_deficit_line_payment_v1.py new file mode 100644 index 000000000..f82880f93 --- /dev/null +++ b/experimental/verify_mca_sparse_direction_terminal_deficit_line_payment_v1.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 +"""Audit the exact sparse-direction terminal-deficit line payment.""" + +from __future__ import annotations + +import copy +from fractions import Fraction + + +ROWS = { + "KoalaBear": { + "R": 1048576, "d": 67472, "K": 14, + "budget": 274980728111395087, "paid": 64048, + "defect": 984528, "n": 984542, "A": 3438, + "prefix_cap": 180429328, "prefix": 181326056, + "terminal": 287, "profile": 181326343, + "next": 64049, "next_profile": None, + }, + "Mersenne-31": { + "R": 1048576, "d": 67448, "K": 6, + "budget": 16777215, "paid": 65455, + "defect": 983121, "n": 983127, "A": 1999, + "prefix_cap": 15183731, "prefix": 16100154, + "terminal": 493, "profile": 16100647, + "next": 65456, "next_profile": 17119507, + }, +} + + +class Reject(ValueError): + pass + + +def raw_cap(R: int, d: int, K: int, e: int, h: int) -> int | None: + n = R + K - e + A = d + K - h + c = K - 1 + den = A * A - n * c + if den > 0: + value = Fraction(n * (A - c), den) + else: + g = -den + T = (n - A) ** 2 - (n - 1) * g + if g < 0 or 2 * A * A < n * c or T <= 0: + return None + value = Fraction((n - 1) * n * n * (A - c), A * T) + return value.numerator // value.denominator + + +def terminal_profile(row: dict[str, int | None], e: int) -> dict[str, int] | None: + R, d, K = (int(row[key]) for key in ("R", "d", "K")) + if e < K: + return None + raw = [] + for h in range(1, e): + cap = raw_cap(R, d, K, e, h) + if cap is None: + return None + raw.append(cap) + prefix_cap = raw[-1] + suffix = [0] * len(raw) + running = None + for index in range(len(raw) - 1, -1, -1): + running = raw[index] if running is None else min(running, raw[index]) + suffix[index] = running + prefix = 0 + previous = 0 + for h, cap in enumerate(suffix, 1): + prefix += (cap - previous) * (e // h) + previous = cap + n = R + K - e + A = d + K - e + c = K - 1 + line = Fraction(n - c, A - c) + terminal = line.numerator // line.denominator + return { + "defect": R - e, "n": n, "A": A, + "prefix_cap": prefix_cap, "prefix": prefix, + "terminal": terminal, "profile": prefix + terminal, + } + + +def finite_line_control() -> int: + blocks = [{0, 1, 2}, {0, 3, 4}, {0, 5, 6}] + n, A, c = 7, 3, 1 + core = set.intersection(*blocks) + if len(core) != c: + raise Reject("common core") + stripped = [block - core for block in blocks] + if any(left & right for i, left in enumerate(stripped) for right in stripped[i + 1:]): + raise Reject("packing") + cap = Fraction(n - c, A - c) + if len(blocks) > cap.numerator // cap.denominator: + raise Reject("line cap") + return len(blocks) * len(stripped) + + +def validate(rows: dict[str, dict[str, int | None]]) -> int: + checks = 0 + for name, row in rows.items(): + if name not in ROWS: + raise Reject("name") + paid = terminal_profile(row, int(row["paid"])) + if paid is None: + raise Reject(f"{name}: unavailable paid profile") + for key in ("defect", "n", "A", "prefix_cap", "prefix", "terminal", "profile"): + if paid[key] != row[key] or row[key] != ROWS[name][key]: + raise Reject(f"{name}: {key}") + checks += 1 + if paid["profile"] > row["budget"]: + raise Reject(f"{name}: budget") + adjacent = terminal_profile(row, int(row["next"])) + if row["next_profile"] is None: + if adjacent is not None: + raise Reject(f"{name}: adjacent availability") + elif adjacent is None or adjacent["profile"] != row["next_profile"] or adjacent["profile"] <= row["budget"]: + raise Reject(f"{name}: adjacent budget") + checks += 2 + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(ROWS)) + finite_line_control() + mutations = [] + for name, key in (("KoalaBear", "terminal"), ("Mersenne-31", "profile")): + changed = copy.deepcopy(ROWS) + changed[name][key] += 1 + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_SPARSE_DIRECTION_TERMINAL_DEFICIT_LINE_PAYMENT_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main() diff --git a/experimental/verify_mca_sparse_direction_top_third_affine_line_payment_v1.py b/experimental/verify_mca_sparse_direction_top_third_affine_line_payment_v1.py new file mode 100644 index 000000000..5330e687d --- /dev/null +++ b/experimental/verify_mca_sparse_direction_top_third_affine_line_payment_v1.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +"""Audit the sparse-direction top-third affine-line branch payment.""" + +from __future__ import annotations + +import copy +from fractions import Fraction + + +ROWS = { + "KoalaBear": { + "R": 1048576, "d": 67472, "K": 14, + "budget": 274980728111395087, + "e": 67471, "s": 22485, "H": 44985, "u": 33735, + "A_u": 33751, "num_u": 35377329420, "den_u": 1125498331, + "A_H": 22501, "num_H": 23580691920, "den_H": 492663331, + "n": 981119, "A": 15, "line": 9405342, + "total": 11496959, "floor": 67472, "ceiling": 1044238, + }, + "Mersenne-31": { + "R": 1048576, "d": 67448, "K": 6, + "budget": 16777215, + "e": 67447, "s": 22480, "H": 44966, "u": 33723, + "A_u": 33731, "num_u": 35364476532, "den_u": 1132537451, + "A_H": 22488, "num_H": 23575269106, "den_H": 500467234, + "n": 981135, "A": 7, "line": 9405365, + "total": 11496238, "floor": 67448, "ceiling": 1044241, + }, +} + + +class Reject(ValueError): + pass + + +def grouped_floor_sum(numerator: int, first: int, last: int) -> int: + total = 0 + x = first + while x <= last: + quotient = numerator // x + end = min(last, numerator // quotient) + total += quotient * (end - x + 1) + x = end + 1 + return total + + +def finite_control() -> int: + E = set(range(8)) + sets = [E - missed for missed in ({0, 1}, {2, 3}, {4, 5})] + if len(set.intersection(*sets)) != 2: + raise Reject("triple overlap") + blocks = [{0, 1, 2}, {0, 3, 4}, {0, 5, 6}] + core = set.intersection(*blocks) + stripped = [block - core for block in blocks] + if any(left & right for i, left in enumerate(stripped) for right in stripped[i + 1:]): + raise Reject("outside packing") + return len(sets) * len(blocks) + + +def validate(rows: dict[str, dict[str, int]]) -> int: + checks = 0 + for name, row in rows.items(): + R, d, K = row["R"], row["d"], row["K"] + N, m, c = R + K, d + K, K - 1 + e = d - 1 + s = (e - K) // 3 + H = e - s - 1 + u = e // 2 + if (row["e"], row["s"], row["H"], row["u"]) != (e, s, H, u): + raise Reject(f"{name}: indices") + if N - m <= s: + raise Reject(f"{name}: outside slack") + for h, cap, suffix in ((u, 31, "u"), (H, 47, "H")): + A = m - h + numerator = N * (A - c) + denominator = A * A - N * c + value = Fraction(numerator, denominator) + if row[f"A_{suffix}"] != A: + raise Reject(f"{name}: A_{suffix}") + if row[f"num_{suffix}"] != numerator or row[f"den_{suffix}"] != denominator: + raise Reject(f"{name}: Johnson fraction") + if value.numerator // value.denominator > cap: + raise Reject(f"{name}: Johnson cap") + checks += 4 + n, A = N - e, m - e + line = grouped_floor_sum(n - c, A - c, A + s - c) + if (row["n"], row["A"], row["line"]) != (n, A, line): + raise Reject(f"{name}: line sum") + total = (d - 2) * 31 + 47 + line + if row["total"] != total or total > row["budget"]: + raise Reject(f"{name}: total") + if row["floor"] != d: + raise Reject(f"{name}: residual floor") + checks += 5 + return checks + + +def main() -> None: + checks = validate(copy.deepcopy(ROWS)) + finite_control() + mutations = [] + for name, key in (("KoalaBear", "line"), ("Mersenne-31", "total")): + changed = copy.deepcopy(ROWS) + changed[name][key] += 1 + try: + validate(changed) + except Reject: + mutations.append(True) + else: + mutations.append(False) + if not all(mutations): + raise AssertionError("mutation controls") + print( + "MCA_SPARSE_DIRECTION_TOP_THIRD_AFFINE_LINE_PAYMENT_V1_PASS " + f"checks={checks} mutations={sum(mutations)}/{len(mutations)}" + ) + + +if __name__ == "__main__": + main()