diff --git a/research/p104-endpoint-support-capacity/README.md b/research/p104-endpoint-support-capacity/README.md new file mode 100644 index 0000000000..72221a7413 --- /dev/null +++ b/research/p104-endpoint-support-capacity/README.md @@ -0,0 +1,256 @@ +# P104 endpoint-support capacity + +The 406-lifetime necessary-screen control in [PR2889][2889] cannot realize the +frozen X-only monotone correction. It can span the endpoint frames, but cannot +carry enough distinct required coefficients. This package proves two further +necessary histogram rows and checks their finite geometric premises. + +For each orientation there are **4,656 residual demands**. A proper subspace +of any endpoint contains at most **30** of its residual labels. Consequently +335 histories `(1,7,1)` and 71 unit-step histories can cover at most +`335 + 30*71 = 2465`, strictly below 4,656. The deficit is 2,191 in each row. +This rejects those exact histories, not every network with 406 lifetimes. + +A different 400-lifetime profile passes these rows and the earlier numerical +screens, including the declared favorable moment relaxation. Thus this is a +specific compatibility obstruction, not a new universal lifetime floor, a +rejection of the P104 family, a correction circuit or a new exponent. +The selected result and frozen predecessors are unchanged. + +## Model and predecessor boundary + +Use the frozen 104-port PR1972 paths retained by PR1991. Write the required +added correction as `C = I-G/2`. Its 4,992 nonzero entries have magnitude 1/2. +The sources X are immutable, the targets Y are write-only, and their original +frame paths increase by inclusion. Source lines `ell_s` and final target +hyperplanes `H_t` are distinct in the nine-dimensional binary frame space. + +New helpers start at ZERO with source-independent arbitrary dirty values, +follow increasing frame paths, and end at FULL with their logical dirt +restored. Reinitialization counts another lifetime. Added operations are +fixed rational linear combinations within equal frames. Arbitrary relays, +cancellation and even singular same-frame mixing are allowed. The correction +cannot read Y or the original helper/private fields, write X, descend, change +the original paths or use source-dependent initialization. The retained +channel does not write X or read Y, which the replay checks. + +These are the same substantive boundaries used by PR2353, PR2614, PR2640, +PR2675 and PR2889. We reuse their source-support/dependence-path reasoning. +The new restriction counts *distinct residual labels*, rather than the binary +dimension of their span or all source-target pairs at an interior cut. + +The inspected pending predecessor is Hiroki Kumazaki's PR2889 at +`5cd56602d65c4d0767c86b518a37168d571cf3ba`. Its dimension rows correctly +leave its 406 profile as a necessary-screen control, not a construction. +This package answers its explicit compatible-endpoint handoff without +changing that predecessor. Source pins for every executable input are in +[SOURCES.json](SOURCES.json). No pending supplier is admitted here. + +## Endpoint residuals and proper-subspace capacities + +Let `q_s` be the nonzero vector of `ell_s`, and `h_t` the unique nonzero +ordinary covector with kernel `H_t`. This does not identify the compressed +root-label pairing with the ordinary binary dot product. + +For each target t, remove any demanded source whose label is in any earlier +proper Y_t frame, or whose X_s path visits H_t. Denote the remaining labels +by `N_t`. For each source s, remove any demanded target for which some X_s +frame of dimension greater than one is contained in H_t. Denote the remaining +target normals by `F_s`. These removals grant all possible bypasses without +requiring chronological access, which favors the proposed correction. + +The replay reconstructs the root order and all frame paths from the two +pinned JSON inputs, then checks: + +- No direct source-to-target contact at H_t, and no target visits a source line. +- The source labels and target normals each lie in an affine odd hyperplane. +- Each N_t spans H_t; each F_s spans `ell_s^ann`, of dimension eight. +- Both `sum_t |N_t|` and `sum_s |F_s|` equal 4,656. +- For every endpoint, the largest intersection of its residual set with any + proper subspace is 24, 28, 29 or 30. Each orientation has respectively + 12, 24, 24 and 44 endpoints of those types. + +It suffices to enumerate the 255 hyperplanes inside each eight-dimensional +endpoint. Every proper subspace extends to one of these hyperplanes. +The primary implementation tests the 510 nontrivial ambient functionals +other than the endpoint annihilator; they represent each proper hyperplane +twice. RESULT.json includes a maximizing functional for every endpoint. +The separate implementation computes all 512 character sums by a nine-stage +integer Walsh-Hadamard transform and recovers the intersections as +`(|N| + character_sum)/2`. It uses bitset frame paths, imports no primary or +predecessor implementation, and agrees on every endpoint and witness. + +## Written program-to-histogram implication + +Project each helper's logical row onto the independent X inputs. Its source +support lies in its current frame. Initialization has empty support; +equal-frame operations preserve the invariant; increasing transport cannot +violate it. Restored lifetime boundaries have zero X row, so reuse does not +introduce an uncounted source-dependency edge. + +Fix target t. Any nonzero coefficient indexed by N_t must reach H_t through +a new helper entering from a proper frame A. It cannot be delivered earlier, +and cannot arrive by direct X read, by the definition of N_t. Expand a finite +linear program into its chronological dependency graph. A nonzero final +coefficient has a nonzero path even with cancellation. That path supplies +an entrance whose A contains its source label. Mixing at H_t cannot create +a source coefficient absent from every entrance. + +For an entrance from dimension d, its number of distinct N_t labels is at +most 30 by the checked proper-subspace bound. It is also at most `2^(d-1)` +for d>0, since all source labels are odd under a common nonzero functional. +A ZERO entrance carries none. Define + +```text +f(0) = 0 +f(d) = min(2^(d-1), 30), for 1 <= d <= 7. +``` + +The union bound gives `|N_t| <= sum_entrances f(dim A)`. It permits duplicate +labels, unproductive entrances, arbitrary relays and dirty-state compensation; +none makes the bound stronger than justified. + +Dually, for source s, each coefficient indexed by F_s must be read at ell_s +and leave on a helper's first departure to B. A later source read reaching +the target would have been removed from F_s. Target reads and source writes +are forbidden, so the dependency cannot bypass that departure. Its target +normal belongs to `B^ann`, a proper subspace of `ell_s^ann`. The same argument +bounds its distinct F_s normals by `f(9-dim B)`. + +A nested lifetime visits at most one designated source line and at most one +designated target hyperplane. Thus summing the endpoint inequalities counts +each lifetime at most once in each orientation. For a positive composition +h of nine, define: + +```text +a(h) = f(dimension immediately before visiting dimension 8), or 0 if absent +d(h) = f(9 - dimension immediately after leaving dimension 1), or 0 if absent +``` + +For the complete history histogram x, every permitted correction satisfies + +```text +sum_h a(h) x_h >= 4656 +sum_h d(h) x_h >= 4656. +``` + +Visiting dimension eight directly from ZERO, or leaving a line directly for +FULL, contributes zero. Reversing a history exchanges its two weights. +The replay checks all 256 histories, including asymmetric and empty-contact +controls. The universal implication above is a written proof, not finite +network enumeration or a proof-assistant theorem. + +## Rejected and surviving profiles + +Let c count histories `(1,7,1)` and u count nine unit jumps. Their support +weights are respectively 1 and 30 in both orientations. The earlier +span-dimension weights are 1 and 7. + +| c | u | Lifetimes | Span total | Support total | New rows | +|---:|---:|---:|---:|---:|---| +| 329 | 71 | 400 | 826 | 2459 | fail | +| 335 | 71 | 406 | 832 | 2465 | fail | +| 253 | 147 | 400 | 1282 | 4663 | pass | + +The last profile also has 9,661 capacity at every old interior cut, 400 proper +arrivals and departures, rank mass 3,600, and 744 ideal idle rank units. +It exceeds the reported mixer lifetime floors, stays in the quoted 387 to +482 investigation window, and passes PR2889's dimension rows. + +Reusing Douglas Colkitt's exact rational ceiling engine, the primary replay +certifies its moment upper bound **0.999729278053145** at the selected complex +primitive saving `67018507072324140917/40000000000000000000000`. This is only +the inherited `m=73`, 832-family, nine-stage, centre-56, ideal rank-51-idle +relaxation, including the original channel profile. The original transport +profile is recounted from the literal word. The engine is source-authenticated +but not independently reimplemented. No actual geometry, chronology, +coefficients, dirty restoration word, owners or complete consumer is supplied +for the surviving profile. Unknown additional costs are not zero. + +## Reproduce and validation limits + +Python 3.12 or later, standard library only: + +```sh +python3.12 scripts/research_package.py --package research/p104-endpoint-support-capacity +``` + +Direct checks, including optimized execution: + +```sh +python3 -I -O -Werror -B research/p104-endpoint-support-capacity/verify.py +python3 -I -O -Werror -B research/p104-endpoint-support-capacity/independent.py +python3 -I -O -Werror -B research/p104-endpoint-support-capacity/test_verify.py +``` + +The first command ends with +`PASS_P104_ENDPOINT_SUPPORT required=4656 capacity=30 rejected=406 control=400`. +`--emit` prints a recomputed receipt; normal replay checks RESULT.json and +writes nothing. The tests cover normal/optimized CLIs, all boundary weight +cases, a read-only Git-free export, source corruption before code execution, +a typed receipt fault, the weaker affine-only bound and a phantom endpoint +visit. Deliberately replacing the geometric cap by the old affine bound fails. + +Local validation passed on Linux x86_64 / CPython 3.12.15: the registered +three-command replay, five behavioral test groups, Ruff 0.17.1, warning-as-error +source compilation and the selected-result binding check. Direct CPython +3.13.5 optimized primary and independent replays also passed. These checks +were rerun after fast-forwarding the publication branch to canonical main +`a1bfbc677fdcbc2a27a9b3bf6c78cac8fd6da9e2`. The scientific pins, priority +revision, selected record and PR2889 head were unchanged. Final overlap at +08:29 to 08:30 UTC covered 488 open PRs, 2,103 closed PR bodies and 1,558 +Discussion records with complete pagination. It found the credited PR2889 +handoff; arbitrary code diffs and unpublished work remain outside coverage. + +Native phases, full corrected-word execution, rounding, physical hosting, +movement, supplier admission, all-size lifting, the selected cold replay and +the outer multiplication theorem are not checked. No independent human, +formal-kernel or hosted-CI review is claimed. + +Engineering limits: Python allocates managed objects during these bounded +finite computations. Frames have at most 512 members, paths at most ten +frames, residual sets at most 48 labels, input JSON files at most 2 MB, and +there are exactly 104 endpoints per orientation and 256 histories. The one +`exec` is limited to the exact SHA256-authenticated, self-contained ceiling +source bytes to avoid source-adjacent bytecode caches. Its narrow static +warning suppression does not apply to untrusted input or any other module. +A static import can replace it if the inherited cost module gains a stable +cache-independent import contract. All changed functions are under 60 lines. + +## Open next questions + +Does a profile surviving the new rows admit simultaneous endpoint assignments +and chronological reads? Pin the 253/147 profile above as a first finite test, +using the endpoint-specific capacities in RESULT.json rather than the relaxed +uniform maximum. This matters because the seven units of support slack leave +little room for assigning the 24/28/29-capacity endpoints. Interior sharing, +coefficient compatibility and a complete paid consumer remain blockers. + +Family decision: stop after this necessary-condition audit. A favorable +surviving screen does not justify a construction campaign or supplier +admission. Reopen only for a named geometric/chronological constraint or a +fully stated changed producer/consumer boundary with its complete cost ledger. + +## Credit and task scope + +Nick Petalas. Apache-2.0. Task `p104-side-correction`, refined to the explicit +PR2889 endpoint-assignment handoff. The single chooser nonce is +`e5cc9f5989ecea2fa6060e7b440c4314`; scientific base is canonical main +`2b4c46fbb19b2df3685b751965877fa7c7fa34af`, priority revision 5. +[The canonical claim][claim] records coordination and freshness. + +Credit Hiroki Kumazaki for PR2889's endpoint-span audit and PR2353's monotone +model; ywz65 for PR2614's later-read-aware source departures; Arham Tahir for +PR2675/2682's coupled screens; Sagar Thakrar for the newer mixer handoff at +`743640530229e1821ae11dc104798871272d6f00`; Philippe Van Velzen for the relay +construction and window bill; Nick Petalas/PR2640/2604 for crossing capacities +and the legal cheap carrier; and Douglas Colkitt for the inherited ceiling +engine. None of those earlier facts or methods is claimed as new here. + +Retain the Rohan Arun/PR1972, Chafik Boukhalfa/PR1991, Adam Gall/PR1940, +Josie Elliston/PR1071, Ali Romman/PR1125 and geometry/native/compiler lineage. +No predecessor source is copied or modified. Exact inspected predecessor +heads and the remaining obligations are recorded in TASK.json. + +[2889]: https://github.com/CrocSwap/integer-mult-bounds/pull/2889 +[claim]: https://github.com/CrocSwap/integer-mult-bounds/discussions/2245#discussioncomment-18967463 diff --git a/research/p104-endpoint-support-capacity/RESULT.json b/research/p104-endpoint-support-capacity/RESULT.json new file mode 100644 index 0000000000..d838abbe55 --- /dev/null +++ b/research/p104-endpoint-support-capacity/RESULT.json @@ -0,0 +1,2109 @@ +{ + "arrival_endpoints": [ + { + "proper_max": 30, + "residual": 45, + "witness": 425 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 397 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 173 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 432 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 444 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 287 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 311 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 432 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 123 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 425 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 306 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 120 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 311 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 173 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 452 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 349 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 340 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 216 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 219 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 503 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 510 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 483 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 210 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 238 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 464 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 473 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 505 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 508 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 397 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 397 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 237 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 508 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 204 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 508 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 448 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 423 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 425 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 264 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 337 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 471 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 425 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 373 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 366 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 354 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 387 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 383 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 397 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 425 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 397 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 397 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 439 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 425 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 326 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 335 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 452 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 508 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 391 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 354 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 347 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 403 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 326 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 405 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 505 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 489 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 486 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 492 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 492 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 498 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 492 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 503 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 504 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 413 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 486 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 495 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 470 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 498 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 301 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 387 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 399 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 464 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 476 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 470 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 265 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 470 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 462 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 450 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 423 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 424 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 498 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 492 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 503 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 441 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 438 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 440 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 425 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 425 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 197 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 508 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 232 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 246 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 172 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 438 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 411 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 508 + } + ], + "departure_endpoints": [ + { + "proper_max": 30, + "residual": 45, + "witness": 479 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 503 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 509 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 509 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 506 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 509 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 509 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 493 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 508 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 508 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 509 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 508 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 422 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 359 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 339 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 438 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 508 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 380 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 509 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 422 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 422 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 493 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 462 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 469 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 255 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 496 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 495 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 479 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 495 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 509 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 493 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 493 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 509 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 506 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 509 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 493 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 495 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 509 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 503 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 366 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 438 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 371 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 373 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 436 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 496 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 436 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 479 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 479 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 479 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 422 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 223 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 455 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 476 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 493 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 496 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 436 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 436 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 115 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 436 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 510 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 510 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 479 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 510 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 422 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 115 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 495 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 510 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 510 + }, + { + "proper_max": 24, + "residual": 36, + "witness": 510 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 509 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 493 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 223 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 495 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 509 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 255 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 509 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 495 + }, + { + "proper_max": 30, + "residual": 45, + "witness": 495 + }, + { + "proper_max": 28, + "residual": 44, + "witness": 503 + }, + { + "proper_max": 29, + "residual": 46, + "witness": 493 + }, + { + "proper_max": 30, + "residual": 47, + "witness": 493 + }, + { + "proper_max": 30, + "residual": 48, + "witness": 493 + } + ], + "history_weights": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 16 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 8 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 16 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 4 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 16 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 8 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 16 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 2 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 16 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 8 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 16 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 4 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 16 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 8 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 16 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 0, + 30 + ], + [ + 0, + 0 + ], + [ + 1, + 1 + ], + [ + 2, + 0 + ], + [ + 2, + 30 + ], + [ + 4, + 0 + ], + [ + 4, + 30 + ], + [ + 4, + 0 + ], + [ + 4, + 30 + ], + [ + 8, + 0 + ], + [ + 8, + 16 + ], + [ + 8, + 0 + ], + [ + 8, + 30 + ], + [ + 8, + 0 + ], + [ + 8, + 30 + ], + [ + 8, + 0 + ], + [ + 8, + 30 + ], + [ + 16, + 0 + ], + [ + 16, + 8 + ], + [ + 16, + 0 + ], + [ + 16, + 30 + ], + [ + 16, + 0 + ], + [ + 16, + 30 + ], + [ + 16, + 0 + ], + [ + 16, + 30 + ], + [ + 16, + 0 + ], + [ + 16, + 16 + ], + [ + 16, + 0 + ], + [ + 16, + 30 + ], + [ + 16, + 0 + ], + [ + 16, + 30 + ], + [ + 16, + 0 + ], + [ + 16, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 4 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 16 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 8 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 16 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 2 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 16 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 8 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 16 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 4 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 16 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 8 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 16 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ], + [ + 30, + 0 + ], + [ + 30, + 30 + ] + ], + "profiles": [ + { + "cheap": 329, + "cut_capacity": 4873, + "ideal_idle_mass": 744, + "lifetimes": 400, + "moment_upper": "0.999470826199440", + "span_total": 826, + "support_rows_pass": false, + "support_total": 2459, + "unit": 71 + }, + { + "cheap": 335, + "cut_capacity": 4879, + "ideal_idle_mass": 690, + "lifetimes": 406, + "moment_upper": "0.999503341067906", + "span_total": 832, + "support_rows_pass": false, + "support_total": 2465, + "unit": 71 + }, + { + "cheap": 253, + "cut_capacity": 9661, + "ideal_idle_mass": 744, + "lifetimes": 400, + "moment_upper": "0.999729278053145", + "span_total": 1282, + "support_rows_pass": true, + "support_total": 4663, + "unit": 147 + } + ], + "proper_capacity": 30, + "required_per_orientation": 4656 +} diff --git a/research/p104-endpoint-support-capacity/SOURCES.json b/research/p104-endpoint-support-capacity/SOURCES.json new file mode 100644 index 0000000000..3ba351e41f --- /dev/null +++ b/research/p104-endpoint-support-capacity/SOURCES.json @@ -0,0 +1,42 @@ +{ + "schema_version": 1, + "base_commit": "2b4c46fbb19b2df3685b751965877fa7c7fa34af", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "889b95d936746df124872133ae1e7cc339adcb92", + "sha256": "7d185cd8c2af35988d638d969748ad7b670f902606444dbfc748e4402c340df6" + }, + { + "path": "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "usage": "input", + "git_blob": "86beaf424e9f0f800ae3a62797d94ec9386b7706", + "sha256": "0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e" + }, + { + "path": "research/p104-native-channel/inputs/P104-FIXTURE.json", + "usage": "input", + "git_blob": "2e16f99b295bb386fd13bd8fbd57b42ef54143a9", + "sha256": "516c06f6ec3cb84be588c546108de897650288576dd5fbf5fe44b9c5546ad8a4" + }, + { + "path": "research/complex-local-word-ceiling/ceiling.py", + "usage": "input", + "git_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "sha256": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + }, + { + "path": "research/community-frontier1094-audit/ASSEMBLY.json", + "usage": "input", + "git_blob": "5fd676df060f3b450782fdf5ff5f6beb63a5eeb0", + "sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045" + } + ] +} diff --git a/research/p104-endpoint-support-capacity/TASK.json b/research/p104-endpoint-support-capacity/TASK.json new file mode 100644 index 0000000000..232e5dad30 --- /dev/null +++ b/research/p104-endpoint-support-capacity/TASK.json @@ -0,0 +1,95 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "priority_revision": 5, + "base_commit": "2b4c46fbb19b2df3685b751965877fa7c7fa34af", + "original_card": { + "id": "p104-side-correction", + "question": "Which unresolved physical correction, endpoint transport or hosting obligation in a pinned P104 follow-up can be closed or decisively rejected?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/p104-native-channel/README.md", + "research/p104-native-channel/PROOF.md", + "docs/research/community-efficient1000-review.md" + ], + "methods": [ + "Construct one side-correction word at an explicit chronological cut with the needed frames still available.", + "Derive a lower bound on the side correction and hosting costs that decides whether this channel can beat the selected budget." + ], + "acceptance_gate": "An exact arbitrary-input identity, source/target frame availability and restoration at the chosen cut, plus the complete channel+correction+idle/hosting bill or an explicit favorable bound. The native channel alone is not a supplier. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the P104 row in research-family-status.md and its exact pending source heads before choosing a task. #1991 is the reviewed channel; #2586 is a pending physical dual with explicit added transport costs, not an admitted supplier.", + "scope": "Source-bound orientation only. Read the named package and review before relying on its local evidence; this command is not its replay or supplier admission." + }, + "first_experiment": "Check live claims, pin the chosen follow-up and reproduce only the evidence needed for one unresolved obligation. Compare its complete correction/transport/hosting invoice with the target budget; test legal chronological access. Do not rebuild #1991 or assume #2586 has solved global admission.", + "bottleneck_link": "Completing an already realized changed channel tests a concrete construction opportunity, instead of refining the incumbent packing. A positive local result still needs global and all-size admission.", + "allowed_variations": [ + "One correction factorization, one chronological cut, or one explicit hosting obstruction.", + "A changed correction schedule with an updated full bill and native frame contract." + ], + "scope_change_triggers": [ + "Recompiling the already certified low-rank channel without closing a new obligation.", + "Treating a pending ancestor, local histogram or unpriced side correction as an admitted global supplier.", + "Repeating a correction or physical conversion already supplied by a pending follow-up without adding independent coverage or a different unresolved obligation." + ], + "overlap_terms": [ + "P104", + "I-G/2", + "side correction", + "native channel", + "1972", + "1991", + "2586", + "endpoint transport", + "physical dual", + "relay composition" + ] + }, + "scope_status": "refined", + "actual_scope": "Audit the distinct residual-label capacity of endpoint arrivals and source departures in the frozen X-only monotone P104 model; decide the exact 406-lifetime control in PR2889, then stop.", + "scope_change_reason": "PR2889 supplies the dimension-span rows and explicitly leaves compatible endpoint assignments open. Count residual support rather than reconstructing its span proof or a corrected physical dual.", + "bottleneck_link": "A favorable histogram moment is insufficient if its histories cannot convey the required correction coefficients. This closes one concrete geometric compatibility obligation before native synthesis.", + "budget_minutes": 60, + "stop_rule": "Stop after proving and replaying the endpoint-support rows and rejecting the pinned 406 profile; retain a surviving necessary-screen control. No construction campaign or family expansion.", + "outcome": "completed", + "evidence": "README.md gives the scoped program-to-histogram proof. RESULT.json and two code-disjoint geometric implementations certify 4656 residual demands, proper capacity 30, all 256 history weights, rejection of the 406 profile and a surviving 400 profile. The inherited exact cost engine certifies the latter's favorable declared relaxation.", + "scope_key": "P104/frozen-X-only-monotone/PR2889-406/residual-endpoint-support", + "chooser_nonce": "e5cc9f5989ecea2fa6060e7b440c4314", + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2245#discussioncomment-18967463", + "milestone": "scoped necessary-condition audit", + "family_decision": "stop; neither a surviving necessary profile nor a favorable cost relaxation admits a supplier", + "unresolved_costs": ["compatible frames and chronological contacts", "rational coefficient realization", "arbitrary dirty restoration program", "native and dual execution", "physical owners and idle/residual realization", "precision and movement", "all-size lifting and complete consumer"], + "predecessors": [ + {"pr": 2889, "head": "5cd56602d65c4d0767c86b518a37168d571cf3ba", "author": "Hiroki Kumazaki", "role": "endpoint-span rows and 406-profile handoff"}, + {"pr": 2353, "head": "2704eadf6b5205d4b965e9c6fc6dce28b89783cf", "author": "Hiroki Kumazaki", "role": "monotone relay model and target support"}, + {"pr": 2614, "head": "a4a2a1c734283272691b1083c819e98e7d757f20", "author": "ywz65", "role": "later-read-aware source departure"}, + {"pr": 2640, "head": "2a5b9d72371211eac1288b690bc2739a97132439", "author": "Nick Petalas", "role": "crossing capacity and support-path implication"}, + {"pr": 2675, "head": "ad889658a5586099132c6d7f38374df9a9d20bca", "author": "Arham Tahir", "role": "coupled declared moment relaxation"}, + {"pr": 2682, "head": "732ac496c06c080152483ed26af44749e9f26083", "author": "Arham Tahir", "role": "proper-arrival cost screen"}, + {"head": "743640530229e1821ae11dc104798871272d6f00", "author": "Sagar Thakrar", "role": "credited mixer lifetime floors; not replayed here"} + ], + "entry_overlap": {"open_prs": 490, "closed_prs": 2101, "discussion_records": 1556, "complete_pagination": true, "checked_at_utc": "2026-10-16T08:20:56Z", "limits": "Title/body/comment and local README/TASK search, not arbitrary code diffs or unpublished work; no novelty guarantee."}, + "submission_checkpoint": { + "canonical_main": "a1bfbc677fdcbc2a27a9b3bf6c78cac8fd6da9e2", + "checked_at_utc": "2026-10-16T08:30:46Z", + "priority_revision": 5, + "changes": "Publication branch fast-forwarded; only unrelated review/integration changes. Guidance, selected record, all four live inputs and PR2889 head unchanged. Registered replay rerun.", + "overlap": {"open_prs": 488, "closed_prs": 2103, "discussion_records": 1558, "complete_pagination": true, "nearest_result": "PR2889, credited explicit handoff", "limits": "No arbitrary code-diff or unpublished-work coverage; no novelty guarantee."} + }, + "author": "Nick Petalas", + "ai_assistance": "Disclosure withheld under contributor instructions.", + "open_questions": [ + { + "question": "Can a profile passing these uniform support rows admit simultaneous endpoint assignments and chronological reads?", + "why_it_matters": "The surviving 253-cheap/147-unit profile has only seven units of uniform support slack; endpoint-specific capacities may exclude it without native synthesis.", + "first_step": "Apply the 208 endpoint-specific capacity records to this fixed 400-lifetime profile, retaining all prior cuts and endpoint rows; stop on a finite incompatibility certificate.", + "blocked_by": "Compatible contacts, interior sharing, rational coefficients, restoration and a complete paid consumer remain unresolved." + } + ] +} diff --git a/research/p104-endpoint-support-capacity/VERIFY.json b/research/p104-endpoint-support-capacity/VERIFY.json new file mode 100644 index 0000000000..299ba89c10 --- /dev/null +++ b/research/p104-endpoint-support-capacity/VERIFY.json @@ -0,0 +1,29 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "research/p104-native-channel/inputs/P104-FIXTURE.json", + "research/complex-local-word-ceiling/ceiling.py", + "research/community-frontier1094-audit/ASSEMBLY.json" + ], + "commands": [ + { + "argv": ["{python}", "-I", "-O", "-Werror", "-B", "{package}/verify.py"], + "timeout_seconds": 60, + "checks": "Source-bound geometry, 208 proper-subspace capacity records, 256 history weights, rejected/surviving profiles and inherited exact cost controls" + }, + { + "argv": ["{python}", "-I", "-O", "-Werror", "-B", "{package}/independent.py"], + "timeout_seconds": 60, + "checks": "Code-disjoint bitset/Fourier reconstruction of both residual and proper-subspace censuses" + }, + { + "argv": ["{python}", "-I", "-O", "-Werror", "-B", "{package}/test_verify.py"], + "timeout_seconds": 120, + "checks": "Five behavioral groups, optimized/normal CLI, Git-free read-only replay, source/typed-receipt faults and weaker-bound/phantom-arrival mutants" + } + ] +} diff --git a/research/p104-endpoint-support-capacity/independent.py b/research/p104-endpoint-support-capacity/independent.py new file mode 100644 index 0000000000..2a0d6fc012 --- /dev/null +++ b/research/p104-endpoint-support-capacity/independent.py @@ -0,0 +1,140 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Independent bitset/Fourier census, with no primary or predecessor imports.""" + +import hashlib +import json +from itertools import combinations, product +from pathlib import Path + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parents[1] + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def read_json(path): + require(path.stat().st_size <= 2_000_000, 'JSON capacity') + return json.loads(path.read_bytes()) + + +def source(name): + manifest = read_json(PACKAGE / 'SOURCES.json') + require(len(manifest['files']) <= 10, 'manifest capacity') + path = 'research/p104-native-channel/inputs/' + name + rows = [r for r in manifest['files'] if r['path'] == path and r['usage'] == 'input'] + require(len(rows) == 1, 'input pin') + require((ROOT / path).stat().st_size <= 2_000_000, 'input capacity') + data = (ROOT / path).read_bytes() + require(hashlib.sha256(data).hexdigest() == rows[0]['sha256'], + 'independent source hash') + return json.loads(data) + + +def frame(basis): + require(len(basis) <= 9, 'binary dimension') + vectors = [0] + for vector in basis: + require(type(vector) is int and 0 < vector < 512, 'binary basis element') + vectors += [v ^ vector for v in vectors] + require(len(set(vectors)) == len(vectors), 'independent basis') + return sum(1 << v for v in vectors) + + +def parity_kernel(normal): + return sum(1 << v for v in range(512) if (v & normal).bit_count() % 2 == 0) + + +def model(): + witness, fixture = source('LOWRANK-WITNESS.json'), source('P104-FIXTURE.json') + require(len(witness['program']) == 4058, 'source word length') + paths = [[frame(witness['initial_frames'][f'{kind}{i}'])] + for kind in 'XY' for i in range(104)] + for event in witness['program']: + if event[0] == 'transport' and event[1][0] in 'XY': + index = int(event[1][1:]) + (104 if event[1][0] == 'Y' else 0) + require(paths[index][-1] == frame(event[2]), 'chronological path') + after = frame(event[3]) + require(paths[index][-1] & after == paths[index][-1], 'nested path') + paths[index].append(after) + require(all(len(p) <= 10 for p in paths), 'bounded data paths') + require(all(paths[i][0].bit_count() == 2 for i in range(104)), 'source lines') + labels = [(paths[i][0] ^ 1).bit_length() - 1 for i in range(104)] + kernels = {parity_kernel(n): n for n in range(1, 512)} + normals = [kernels[paths[104 + t][-1]] for t in range(104)] + roots = [] + for axes in combinations(range(8), 2): + for sign in [-1, 1]: + roots.append(tuple(2 if i == axes[0] else 2 * sign if i == axes[1] else 0 + for i in range(8))) + roots += [(1, *s) for s in product([-1, 1], repeat=7) if sum(s) % 4 == 3] + removed = fixture['section4_explicit_P104'] + ports = sorted(set(roots) - set(map(tuple, removed['F0'] + removed['C']))) + require(len(roots) == 120 and len(ports) == 104, 'independent root order') + required = [[sum(ports[t][i] * ports[s][i] for i in range(8)) != 8 * (s == t) + for s in range(104)] for t in range(104)] + require(sum(map(sum, required)) == 4992, 'independent demand count') + return paths, labels, normals, required + + +def fourier_cap(points, normal): + require(len(set(points)) == len(points) <= 48, 'residual alphabet') + spectrum = [0] * 512 + for point in points: + spectrum[point] = 1 + # Nine bounded Walsh-Hadamard stages, computing all character sums. + for bit in range(9): + stride = 1 << bit + for block in range(0, 512, 2 * stride): + for j in range(block, block + stride): + a, b = spectrum[j], spectrum[j + stride] + spectrum[j], spectrum[j + stride] = a + b, a - b + require(spectrum[0] == spectrum[normal] == len(points), 'ambient annihilator') + value, witness = max((spectrum[a], a) for a in range(1, 512) if a != normal) + require((len(points) + value) % 2 == 0, 'integer intersection count') + return {'residual': len(points), 'proper_max': (len(points) + value) // 2, + 'witness': witness} + + +def calculate(): + paths, labels, normals, required = model() + arrival, departure = [], [] + for t in range(104): + earlier = 0 + for mask in paths[104 + t][:-1]: + earlier |= mask + points = [labels[s] for s in range(104) if required[t][s] + and not earlier & (1 << labels[s]) + and paths[104 + t][-1] not in paths[s]] + arrival.append(fourier_cap(points, normals[t])) + for s in range(104): + targets = [] + for t in range(104): + if not required[t][s]: + continue + endpoint = paths[104 + t][-1] + if not any(mask.bit_count() > 2 and mask & endpoint == mask for mask in paths[s]): + targets.append(normals[t]) + departure.append(fourier_cap(targets, labels[s])) + return arrival, departure + + +def main(): + arrival, departure = calculate() + expected = read_json(PACKAGE / 'RESULT.json') + require(arrival == expected['arrival_endpoints'], 'independent arrival receipt') + require(departure == expected['departure_endpoints'], 'independent departure receipt') + require(sum(r['residual'] for r in arrival) == 4656 + and sum(r['residual'] for r in departure) == 4656, 'both residual totals') + require(max(r['proper_max'] for r in arrival + departure) == 30, 'capacity maximum') + require(fourier_cap([1 << i for i in range(8)], 256) + == {'residual': 8, 'proper_max': 7, 'witness': 384}, + 'proper rather than ambient hyperplane control') + print('PASS_INDEPENDENT_ENDPOINT_SUPPORT orientations=2 endpoints=208 required=4656 cap=30') + + +if __name__ == '__main__': + main() diff --git a/research/p104-endpoint-support-capacity/test_verify.py b/research/p104-endpoint-support-capacity/test_verify.py new file mode 100644 index 0000000000..51cf30012e --- /dev/null +++ b/research/p104-endpoint-support-capacity/test_verify.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Behavioral checks of the published CLI and meaningful failure controls.""" + +import json +import runpy +import shutil +import subprocess +import sys +import tempfile +import unittest +from pathlib import Path + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parents[1] +PRIMARY = runpy.run_path(str(PACKAGE / 'verify.py')) + + +def run(package, script='verify.py', optimized=True): + argv = [sys.executable, '-I', '-Werror', '-B'] + if optimized: + argv.append('-O') + return subprocess.run(argv + [str(package / script)], check=False, + capture_output=True, text=True, timeout=30, cwd=package.parent) + + +def export(destination): + target = destination / 'research' / PACKAGE.name + target.mkdir(parents=True) + files = [p for p in PACKAGE.iterdir() if p.is_file()] + if len(files) > 12: + raise ValueError('bounded package export') + for path in files: + shutil.copyfile(path, target / path.name) + sources = json.loads((PACKAGE / 'SOURCES.json').read_text()) + for row in sources['files']: + if row['usage'] == 'input': + path = destination / row['path'] + path.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / row['path'], path) + return target + + +class EndpointSupportTests(unittest.TestCase): + def test_published_receipt_and_independent_cli(self): + for optimized in (False, True): + completed = run(PACKAGE, optimized=optimized) + self.assertEqual(completed.returncode, 0, completed.stderr) + payload, marker = completed.stdout.rsplit('\nPASS_', 1) + result = json.loads(payload) + self.assertEqual(marker.strip(), + 'P104_ENDPOINT_SUPPORT required=4656 capacity=30 rejected=406 control=400') + self.assertEqual([r['support_total'] for r in result['profiles']], [2459, 2465, 4663]) + self.assertEqual([r['support_rows_pass'] for r in result['profiles']], [False, False, True]) + self.assertEqual(result['profiles'][2]['moment_upper'], '0.999729278053145') + independent = run(PACKAGE, 'independent.py') + self.assertEqual(independent.returncode, 0, independent.stderr) + self.assertEqual(independent.stdout.strip(), + 'PASS_INDEPENDENT_ENDPOINT_SUPPORT orientations=2 endpoints=208 required=4656 cap=30') + + def test_history_boundary_and_asymmetric_cases(self): + weights = PRIMARY['history_weights'] + for jumps, expected in [([1, 7, 1], (1, 1)), ([1] * 9, (30, 30)), + ([1, 1, 6, 1], (2, 30)), ([1, 6, 1, 1], (30, 2)), + ([8, 1], (0, 0)), ([1, 8], (0, 0)), + ([1, 1, 7], (0, 30)), ([7, 1, 1], (30, 0))]: + self.assertEqual(weights(jumps), expected) + for invalid in ([], [0, 9], [1, 7], [1.0, 7, 1], [True, 7, 1]): + with self.assertRaisesRegex(ValueError, 'positive composition'): + weights(invalid) + + def test_git_free_read_only_export(self): + with tempfile.TemporaryDirectory() as temporary: + package = export(Path(temporary)) + files = [p for p in Path(temporary).rglob('*') if p.is_file()] + before = {str(p): p.read_bytes() for p in files} + for path in files: + path.chmod(0o444) + try: + for script in ('verify.py', 'independent.py'): + completed = run(package, script) + self.assertEqual(completed.returncode, 0, completed.stderr) + self.assertEqual({str(p): p.read_bytes() for p in files}, before) + self.assertFalse(any(p.name == '__pycache__' for p in Path(temporary).rglob('*'))) + finally: + for path in files: + path.chmod(0o644) + + def test_sources_and_typed_receipt_reject(self): + with tempfile.TemporaryDirectory() as temporary: + package = export(Path(temporary)) + engine = Path(temporary) / 'research/complex-local-word-ceiling/ceiling.py' + original = engine.read_bytes() + engine.write_bytes(b'raise RuntimeError("SHOULD_NOT_EXECUTE")\n') + failed = run(package) + self.assertNotEqual(failed.returncode, 0) + self.assertIn('source hash', failed.stderr) + self.assertNotIn('SHOULD_NOT_EXECUTE', failed.stderr) + engine.write_bytes(original) + receipt = package / 'RESULT.json' + result = json.loads(receipt.read_bytes()) + result['profiles'][0]['support_rows_pass'] = 0 + receipt.write_text(json.dumps(result)) + failed = run(package) + self.assertNotEqual(failed.returncode, 0) + self.assertIn('typed receipt equality', failed.stderr) + + def test_affine_only_and_phantom_arrival_mutants_reject(self): + with tempfile.TemporaryDirectory() as temporary: + package = export(Path(temporary)) + path = package / 'verify.py' + original = path.read_text() + for before, after in [('min(1 << (dimension - 1), 30)', '1 << (dimension - 1)'), + ('if after == 8:', 'if after == 9:')]: + self.assertEqual(original.count(before), 1) + path.write_text(original.replace(before, after)) + completed = run(package) + self.assertNotEqual(completed.returncode, 0) + self.assertNotIn('PASS_P104_ENDPOINT_SUPPORT', completed.stdout) + path.write_text(original) + completed = run(package) + self.assertEqual(completed.returncode, 0, completed.stderr) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/p104-endpoint-support-capacity/verify.py b/research/p104-endpoint-support-capacity/verify.py new file mode 100644 index 0000000000..9cc81621ea --- /dev/null +++ b/research/p104-endpoint-support-capacity/verify.py @@ -0,0 +1,282 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Check finite endpoint-support premises; see README.md for the network proof.""" + +import argparse +import hashlib +import json +from collections import Counter +from fractions import Fraction +from itertools import combinations, pairwise, product +from pathlib import Path +from types import ModuleType + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parents[1] +INPUT_ROOT = 'research/p104-native-channel/inputs/' + + +def need(condition, reason): + if not condition: + raise ValueError(reason) + + +def unique(pairs): + result = dict(pairs) + need(len(result) == len(pairs), 'duplicate JSON key') + return result + + +def read_json(path): + need(path.stat().st_size <= 2_000_000, 'JSON capacity') + data = path.read_bytes() + return json.loads(data, object_pairs_hook=unique) + + +def inputs(): + manifest = read_json(PACKAGE / 'SOURCES.json') + need(len(manifest['files']) <= 10, 'manifest capacity') + result = {} + for row in manifest['files']: + if row['usage'] != 'input': + continue + need(row['path'] in {INPUT_ROOT + 'LOWRANK-WITNESS.json', + INPUT_ROOT + 'P104-FIXTURE.json', + 'research/complex-local-word-ceiling/ceiling.py', + 'research/community-frontier1094-audit/ASSEMBLY.json'}, 'declared input') + path = ROOT / row['path'] + need(path.stat().st_size <= 2_000_000, 'source capacity') + data = path.read_bytes() + need(hashlib.sha256(data).hexdigest() == row['sha256'], 'source hash') + result[Path(row['path']).name] = data + need(len(result) == 4, 'four authenticated inputs') + return result + + +def span(basis): + need(len(basis) <= 9, 'frame dimension') + result = {0} + for vector in basis: + need(type(vector) is int and 0 < vector < 512, 'binary vector') + result |= {x ^ vector for x in tuple(result)} + need(len(result) == 1 << len(basis), 'independent frame basis') + return frozenset(result) + + +def data_paths(witness): + need(len(witness['program']) == 4058, '4058 frozen events') + paid = Counter() + paths = {f'{kind}{i}': [span(witness['initial_frames'][f'{kind}{i}'])] + for kind in 'XY' for i in range(104)} + for event in witness['program']: + op, dst = event[:2] + need(op in {'add', 'copy', 'zero', 'erase', 'transport'}, 'known event') + if op in {'add', 'copy'}: + need(not dst.startswith('X') and not event[2].startswith('Y'), + 'immutable X and unread Y') + if op in {'zero', 'erase'}: + need(not dst.startswith(('X', 'Y')), 'no data lifetime reset') + if op == 'transport': + paid[event[4]] += 1 + if op == 'transport' and dst in paths: + before, after = span(event[2]), span(event[3]) + need(paths[dst][-1] == before < after, 'nested data path') + need(event[4] == len(event[3]) - len(event[2]), 'transport rank') + paths[dst].append(after) + for name, frames in paths.items(): + need(len(frames) <= 10, 'at most nine data jumps') + need(frames[-1] == span(witness['final_frames'][name]), 'final data frame') + need(paid == {1: 1074, 2: 58, 3: 86, 4: 104, 5: 48, 6: 24, 7: 8, 8: 8}, + 'original channel transport profile') + return paths + + +def root_ports(fixture): + roots = set() + for i, j in combinations(range(8), 2): + for sign in (-1, 1): + row = [0] * 8 + row[i], row[j] = 2, 2 * sign + roots.add(tuple(row)) + for signs in product((-1, 1), repeat=7): + if signs.count(-1) % 2 == 0: + roots.add((1, *signs)) + removed = fixture['section4_explicit_P104'] + ports = sorted(roots - {tuple(v) for v in removed['F0'] + removed['C']}) + need(len(roots) == 120 and len(ports) == 104, 'P104 port order') + return ports + + +def geometry(witness, fixture): + paths, ports = data_paths(witness), root_ports(fixture) + lines = [paths[f'X{s}'][0] for s in range(104)] + hyper = [paths[f'Y{t}'][-1] for t in range(104)] + need(all(len(v) == 2 for v in lines) and all(len(v) == 256 for v in hyper), + 'line and hyperplane endpoints') + need(len(set(lines)) == len(set(hyper)) == 104, 'distinct endpoints') + need(all(len(paths[f'X{s}'][-1]) == 512 for s in range(104)) + and all(paths[f'Y{t}'][0] == {0} for t in range(104)), 'FULL and ZERO') + labels = [next(v for v in line if v) for line in lines] + normals = [] + for frame in hyper: + choices = [a for a in range(1, 512) + if all((v & a).bit_count() % 2 == 0 for v in frame)] + need(len(choices) == 1, 'unique hyperplane normal') + normals.append(choices[0]) + for alphabet in (labels, normals): + need(any(all((q & a).bit_count() % 2 for q in alphabet) + for a in range(1, 512)), 'affine odd alphabet') + demands = set() + for t, left in enumerate(ports): + for s, right in enumerate(ports): + gram4 = sum(a * b for a, b in zip(left, right, strict=True)) + need(gram4 % 4 == 0, 'integral Gram entry') + need((labels[s] in hyper[t]) == (gram4 % 8 == 4), 'root/frame binding') + if 8 * int(t == s) != gram4: + demands.add((t, s)) + need(len(demands) == 4992, 'correction demand count') + return paths, labels, hyper, normals, demands + + +def residual_sets(geo): + paths, labels, hyper, normals, demands = geo + arrivals, departures = [], [] + for t in range(104): + arrivals.append([labels[s] for s in range(104) if (t, s) in demands + and not any(labels[s] in v for v in paths[f'Y{t}'][:-1]) + and hyper[t] not in paths[f'X{s}']]) + for s in range(104): + departures.append([normals[t] for t in range(104) if (t, s) in demands + and not any(len(v) > 2 and v <= hyper[t] + for v in paths[f'X{s}'])]) + need(all(hyper[t] not in paths[f'X{s}'] for t, s in demands), 'no direct bypass') + need(all(paths[f'X{s}'][0] not in paths[f'Y{t}'] + for t in range(104) for s in range(104)), 'no target line bypass') + return arrivals, departures + + +def endpoint_census(residuals, annihilators): + rows = [] + for points, normal in zip(residuals, annihilators, strict=True): + need(len(points) == len(set(points)) <= 48, 'distinct residual labels') + need(len(span_basis(points)) == 8, 'residual span has dimension eight') + need(all((p & normal).bit_count() % 2 == 0 for p in points), 'ambient endpoint') + candidates = [(sum((p & a).bit_count() % 2 == 0 for p in points), a) + for a in range(1, 512) if a != normal] + maximum, witness = max(candidates) + rows.append({'residual': len(points), 'proper_max': maximum, 'witness': witness}) + return rows + + +def span_basis(points): + basis = {} + for point in points: + value = point + for bit in range(8, -1, -1): + if value & (1 << bit): + if bit in basis: + value ^= basis[bit] + else: + basis[bit] = value + break + return basis + + +def support_weight(dimension): + return 0 if dimension == 0 else min(1 << (dimension - 1), 30) + + +def history_weights(jumps): + need(0 < len(jumps) <= 9 and all(type(r) is int and r > 0 for r in jumps) + and sum(jumps) == 9, 'positive composition of nine') + before = arrival = departure = 0 + for jump in jumps: + after = before + jump + if after == 8: + arrival = support_weight(before) + if before == 1: + departure = support_weight(9 - after) + before = after + return arrival, departure + + +def profiles(): + rows = [] + for cheap, unit, verdict in [(329, 71, False), (335, 71, False), (253, 147, True)]: + support = cheap + 30 * unit + need((support >= 4656) == verdict, 'support screen verdict') + need(387 <= cheap + unit <= 482 and cheap + 64 * unit >= 4680, + 'old count and crossing screens') + rows.append({'cheap': cheap, 'unit': unit, 'lifetimes': cheap + unit, + 'span_total': cheap + 7 * unit, 'support_total': support, + 'cut_capacity': cheap + 64 * unit, + 'ideal_idle_mass': 4344 - 9 * (cheap + unit), + 'support_rows_pass': verdict}) + return rows + + +def budget_controls(sources, profiles_to_price): + # Run only the authenticated self-contained cost engine, never adjacent .pyc. + cost = ModuleType('credited_cost_engine') + engine_path = ROOT / 'research/complex-local-word-ceiling/ceiling.py' + # Fixed SHA256-authenticated code only; this excludes source-adjacent caches. + exec(compile(sources['ceiling.py'], str(engine_path), 'exec'), cost.__dict__) # noqa: S102 + assembly = json.loads(sources['ASSEMBLY.json'], object_pairs_hook=unique) + saving = Fraction(assembly['complex_lower']) + need(saving == Fraction(67018507072324140917, 40000000000000000000000), + 'selected primitive saving') + base = {1: 1074, 2: 58, 3: 86, 4: 104, 5: 48, 6: 24, 7: 8, 8: 8} + for row in profiles_to_price: + profile = Counter(base) + profile[1] += 2 * row['cheap'] + 9 * row['unit'] + profile[7] += row['cheap'] + _, upper = cost.relax(profile, 73, 832, 9, 56, saving) + need(upper < 1, 'favorable declared cost relaxation') + scale = 10**15 + rounded = -((-upper.numerator * scale) // upper.denominator) + row['moment_upper'] = f'{rounded // scale}.{rounded % scale:015d}' + return profiles_to_price + + +def calculate(): + sources = inputs() + witness = json.loads(sources['LOWRANK-WITNESS.json'], object_pairs_hook=unique) + fixture = json.loads(sources['P104-FIXTURE.json'], object_pairs_hook=unique) + geo = geometry(witness, fixture) + arrivals, departures = residual_sets(geo) + censuses = [endpoint_census(arrivals, geo[3]), endpoint_census(departures, geo[1])] + for census in censuses: + need(sum(row['residual'] for row in census) == 4656, 'residual demand sum') + need(Counter(row['proper_max'] for row in census) == {24: 12, 28: 24, 29: 24, 30: 44}, + 'proper-subspace capacity census') + weights = [] + for mask in range(256): + stops = [0] + [i for i in range(1, 9) if mask & (1 << (i - 1))] + [9] + jumps = [b - a for a, b in pairwise(stops)] + a, d = history_weights(jumps) + need(history_weights(jumps[::-1]) == (d, a), 'dual history reversal') + weights.append([a, d]) + need(history_weights([1, 7, 1]) == (1, 1), 'cheap carrier control') + need(history_weights([1] * 9) == (30, 30), 'unit-step control') + need(history_weights([8, 1]) == history_weights([1, 8]) == (0, 0), 'empty visits') + need(history_weights([1, 1, 6, 1]) == (2, 30), 'asymmetric endpoint control') + return {'arrival_endpoints': censuses[0], 'departure_endpoints': censuses[1], + 'required_per_orientation': 4656, 'proper_capacity': 30, + 'history_weights': weights, 'profiles': budget_controls(sources, profiles())} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--emit', action='store_true', help='print recomputed receipt') + args = parser.parse_args() + result = calculate() + if not args.emit: + expected = read_json(PACKAGE / 'RESULT.json') + need(json.dumps(result, sort_keys=True) == json.dumps(expected, sort_keys=True), + 'typed receipt equality') + print(json.dumps(result, sort_keys=True, indent=2)) + print('PASS_P104_ENDPOINT_SUPPORT required=4656 capacity=30 rejected=406 control=400') + + +if __name__ == '__main__': + main()