From b9ea9def949f9d71d59e21294d0e6cfbe0692a73 Mon Sep 17 00:00:00 2001 From: Nick Petalas Date: Fri, 16 Oct 2026 12:01:24 +0100 Subject: [PATCH] feat(research): certify P104 endpoint geometry and two-type budget --- .../p104-endpoint-geometric-budget/README.md | 219 ++++++++ .../RESULT.json | 522 ++++++++++++++++++ .../SOURCES.json | 36 ++ .../p104-endpoint-geometric-budget/TASK.json | 181 ++++++ .../VERIFY.json | 34 ++ .../decisions.tsv | 6 + .../geometry.py | 115 ++++ .../test_verify.py | 83 +++ .../p104-endpoint-geometric-budget/verify.py | 144 +++++ 9 files changed, 1340 insertions(+) create mode 100644 research/p104-endpoint-geometric-budget/README.md create mode 100644 research/p104-endpoint-geometric-budget/RESULT.json create mode 100644 research/p104-endpoint-geometric-budget/SOURCES.json create mode 100644 research/p104-endpoint-geometric-budget/TASK.json create mode 100644 research/p104-endpoint-geometric-budget/VERIFY.json create mode 100644 research/p104-endpoint-geometric-budget/decisions.tsv create mode 100644 research/p104-endpoint-geometric-budget/geometry.py create mode 100644 research/p104-endpoint-geometric-budget/test_verify.py create mode 100644 research/p104-endpoint-geometric-budget/verify.py diff --git a/research/p104-endpoint-geometric-budget/README.md b/research/p104-endpoint-geometric-budget/README.md new file mode 100644 index 0000000000..9a0b7e19fa --- /dev/null +++ b/research/p104-endpoint-geometric-budget/README.md @@ -0,0 +1,219 @@ +# P104 separate endpoint geometry and two-history budget + +PR2909's endpoint-count curve is attainable by actual subspace unions at each +endpoint separately. Within its two history types, the unique cheapest helper +multiplicities at every positive saving are zero cheap helpers and 208 +unit-step helpers. Under PR2675's declared transport and ideal-idle screen, +that profile has moment about **0.9988962438816702** at the selected complex +saving. Its relaxed root satisfies the exact rational bracket + +```text +0.002104152801941 < a_two_type < 0.002104152801942. +``` + +This closes the separate-endpoint subspace-union and pricing questions in +[PR2909](https://github.com/CrocSwap/integer-mult-bounds/pull/2909). It does not +construct a correction network. An individual flag's ability to contain labels +does not establish that a helper acquires those labels from the actual sources. +Source/target flags are chosen independently in this relaxation. + +## Contract and predecessor scope + +Retain the fixed PR1972/1991 P104 channel and the X-only monotone model from +PR2353, PR2614 and PR2896/2909. The correction adds `I-G/2` to unread Y, +reads immutable X along their frozen paths, and uses new helpers with +source-independent dirty inputs at ZERO, increasing frames, restoration at +FULL, and equal-frame rational operations. Original helper/private reads, +source writes, target feedback and descending transports are excluded. +Reinitialization starts a new lifetime. These restrictions belong to the +audited route, rather than every possible P104 construction. + +The two helper types are dimension jumps + +```text +cheap: (1,7,1) +unit-step: (1,1,1,1,1,1,1,1,1). +``` + +At target hyperplane H, a cheap helper's last proper frame is a line, while a +unit helper's is dimension seven. Dually, at source line L, a cheap helper's +first superframe is dimension eight, while a unit helper's is dimension two. +The departure normal spaces are proper subspaces of the eight-dimensional +annihilator `L^perp`. These are the separate endpoint covering sets considered +here. Specifying those sets supplies no source acquisition or coefficients. + +PR2909 proves the necessary count relaxation with endpoint demands d and +one-unit capacities b. Both orientations have these types: + +| d | b | d-b | Number of endpoints | +|---:|---:|---:|---:| +| 36 | 24 | 12 | 12 | +| 44 | 28 | 16 | 24 | +| 45 | 30 | 15 | 8 | +| 46 | 29 | 17 | 24 | +| 47 | 30 | 17 | 24 | +| 48 | 30 | 18 | 12 | + +Its 192-unit threshold at a 400-helper budget is retained. This package adds +geometric attainment in the separate covering problem and optimizes its price. + +## Affine-complement lemma + +Let D span an eight-dimensional binary space H. Suppose a linear functional q +takes value one on every point of D. Choose a proper hyperplane `ker(f)` +maximizing `b = |D intersect ker(f)|`. Since `0 < b < |D|`, f is neither zero +nor q on H. Therefore both `ker(f)` and `ker(f+q)` are genuine dimension-seven +subspaces of H. On D, `f+q = f+1`, so their intersections with D are disjoint +and cover D. They have sizes b and d-b. This proves exact two-subspace coverage, +beyond the inequality `d <= 2b`. + +Every chosen dimension-seven arrival frame extends to a complete unit-step +flag inside H, followed by FULL. A demanded singleton extends to a cheap +line/H/FULL flag. On departure, a dimension-seven normal space V in `L^perp` +gives a dimension-two frame `V^perp` containing L, extendible to a unit flag. +A singleton normal n gives the cheap superframe `ker(n)` containing L. +These flag extensions prove endpoint incidence only. They do not join the +opposite endpoints or prove information can be gathered along the flags. + +The checker verifies the lemma's hypotheses and explicit covers at all 104 +arrival and 104 departure endpoints. It reconstructs residual sets from the +original 4,058-event word, ordered root Gram matrix and chronological data +paths. A second finite algorithm enumerates all pairs of restricted proper +hyperplanes without using q or the complement formula. It confirms the +one-plane optimum b and two-plane optimum d at every endpoint. + +For zero, one and two unit helpers at an endpoint, the exact remaining number +of singleton cheap carriers is consequently d, d-b and zero. The marginals b +and d-b decrease. Sorting all 208 marginals gives PR2909's complete curve +`C_min(U)`, now with actual endpoint subspace unions attaining it. +No extra helpers improve an endpoint after two units. Every positive marginal +is at least twelve, so + +```text +C_min(U) >= 12*(208-U) for 0 <= U <= 208. +``` + +## Cheapest two-history profile + +Use PR2675's fixed template `m=73`, `W=832/9`, centre charge 56, total paid +rank mass 6712 and ideal idle rank 51. The whole original channel has profile + +```text +1074 H1 + 58 H2 + 86 H3 + 104 H4 + 48 H5 + 24 H6 + 8 H7 + 8 H8. +``` + +Its rank mass is 2368. Every added lifetime consumes nine more rank units, +leaving `4344-9*(C+U)` idle rank units. Hence `C+U <= 482`. Idle packing is +fractional and favorable. Native ADDs, owners, routing, precision, tape and +all other physical charges are unknown and additional. + +For `c_r(a)=(r/73)^(1-a)`, replace the nine units of ideal idle used by each +helper. Its excess prices are + +```text +q_c = 2*c_1 + c_7 - 9*c_51/51 +q_u = 9*c_1 - 9*c_51/51. +``` + +Both are positive for `a>0`, since their jumps have ranks below 51. Moreover + +```text +q_c = 73^(a-1) * [2*(1-51^(-a)) + 7*(7^(-a)-51^(-a))] +q_u = 73^(a-1) * 9*(1-51^(-a)), +q_u < (9/2)*q_c < 12*q_c. +``` + +For U below 208, at least `12*(208-U)` cheap helpers are required. Their +excess over the 208-unit price is at least +`(208-U)*(12*q_c-q_u) > 0`. For U above 208, the extra units have positive +price. At U=208 any cheap helper also costs extra. Thus `(C,U)=(0,208)` is +the unique minimizing multiplicity pair for every positive a in this model. +Geometric assignments are not unique. At a=0 all equal-mass profiles tie. + +The minimizing profile has `H1=2946` and the other original counts unchanged, +local rank mass 4240 and idle rank mass 2472, giving ideal `H51=824/17`. +Each unit flag has relaxed capacity 64 at all seven internal cuts, so 208 +units also pass the earlier aggregate crossing rows. This does not assign +their actual subspaces at those cuts. + +The pinned exact rational interval evaluator checks the selected moment and +strict root signs stated above. Every rank is below 73 and every profile count +is nonnegative, so the moment strictly increases with a. The root is the +supremum for this two-type, separate-endpoint, ideal-idle relaxation. It is not +an admitted primitive exponent or kappa, nor an optimum over all 256 histories. +For example, `(1,1,5,1,1)` has the same endpoint-adjacent dimensions and cheaper +transport, but different internal cut capacities. It is outside this optimization. + +## Reproduction and evidence + +Python 3.12, standard library only, from the repository root: + +```sh +python3.12 -B scripts/research_package.py --package research/p104-endpoint-geometric-budget +``` + +The marker is `PASS_P104_ENDPOINT_GEOMETRIC_BUDGET endpoints=208 units=208`. +`verify.py --emit` prints the complete recomputed receipt without changing files. +RESULT.json records endpoint curves, a digest of explicit cover witnesses, +the optimizing counts and exact rational moment intervals. The verifier +authenticates both inputs and the interval module before importing that module. +It runs no optimizer or predecessor executable. + +Four behavioral groups cover a literal affine example, failure without the odd +section hypothesis, wrong endpoint containment, invalid frames/counts, a strict +competing price, duplicate JSON keys, optimized Git-free replay, source rejection +before import and typed receipt corruption. Pair enumeration independently +checks covers but shares reconstructed demand sets. Interval arithmetic is +inherited from Douglas Colkitt's ceiling module. A separate internal audit +checked all 208 covers through the pinned predecessor's implementation and +reproduced the root interval. Evidence is author-checked, without independent +human or formal-kernel review. Environment and commands are in TASK.json. + +## Open next questions + +Can the 208 unit lifetimes, or a named alternative involving other histories, +jointly acquire and deliver the demanded coefficients in chronological order? +First specify actual nested source/target flags and dependency paths at the +original cuts, then check coefficients and dirty restoration before native +lowering. Separate endpoint covers and aggregate crossing counts do not supply +that joint realization. A candidate also needs the entire consumer, ownership, +idle, routing and precision bill. The selected cold replay is unrun because +this contribution changes no selected construction or frozen input. + +Family decision: finish this interface and cost audit and stop. The optimistic +screen passes. It admits no supplier and justifies no further construction +campaign with unknown costs set to zero. + +## Attribution and engineering notes + +Nick Petalas. Apache-2.0. Substantial AI assistance and internal review are +disclosed in TASK.json, without a claim of independent human review. +Credit Nick Petalas/PR2909/2896 for the demand curve and residual capacities, +Hiroki Kumazaki/PR2889/2353 for endpoint spans and the monotone contract, +Arham Tahir/PR2675/2682 for the coupled price model, ywz65/PR2614 for source +departure handling, Sagar Thakrar's mixer handoff, and Philippe Van Velzen's +relay construction and window bill. Retain Rohan Arun/PR1972, Chafik +Boukhalfa/PR1991, Adam Gall/PR1940, Josie Elliston/PR1071, Ali Romman/PR1125 +and the geometry/native lineage. Inspected heads are in TASK.json. +No predecessor package is copied or changed. + +Build the Lever shaped the executable cover and price certificate. Prove It +Works required original-input reconstruction, exhaustive pair checks and +rejecting controls. Unslop guided the prose. Finite bounds are 104 endpoints +per orientation, 512 points/functionals, at most 255 distinct restricted planes, +65,025 plane pairs per endpoint, 209 count states, 4,058 events and 23 feasible +minimal price profiles. New functions are below 60 lines. + +Power of Ten rule 3 deviation: Python allocates managed objects during checking. +Fixed domains and 2 MB JSON bounds limit live collections; temporary exports +have scoped cleanup on every exit. A fixed-capacity implementation would be +needed for a resident checker. Rule 1/2 deviation in the unchanged interval +module: recursive logarithms and adaptive series preserve source binding. +Calls here use ranks at most 73, precision 256 and `a<=1/100`; the chain has +at most 73 frames and atanh/Taylor tails terminate within 100/100 terms in this +domain. Registered commands have time bounds. A bounded iterative port needs +a separate source-bound equivalence audit. Rule 8/9 deviation: importlib loads +exactly one authenticated interval module; Python dispatch and unittest remain. +The source-before-import control checks that boundary. Warning-as-error +compilation, lint and optimized replay are recorded in TASK.json. Repository-wide +tooling and inherited mathematical assumptions are unchanged. diff --git a/research/p104-endpoint-geometric-budget/RESULT.json b/research/p104-endpoint-geometric-budget/RESULT.json new file mode 100644 index 0000000000..0a389a416c --- /dev/null +++ b/research/p104-endpoint-geometric-budget/RESULT.json @@ -0,0 +1,522 @@ +{ + "geometry": { + "arrival": { + "endpoint_types": [ + [ + 36, + 24, + 12 + ], + [ + 44, + 28, + 24 + ], + [ + 45, + 30, + 8 + ], + [ + 46, + 29, + 24 + ], + [ + 47, + 30, + 24 + ], + [ + 48, + 30, + 12 + ] + ], + "minimum_cheap_by_units": [ + 4656, + 4626, + 4596, + 4566, + 4536, + 4506, + 4476, + 4446, + 4416, + 4386, + 4356, + 4326, + 4296, + 4266, + 4236, + 4206, + 4176, + 4146, + 4116, + 4086, + 4056, + 4026, + 3996, + 3966, + 3936, + 3906, + 3876, + 3846, + 3816, + 3786, + 3756, + 3726, + 3696, + 3666, + 3636, + 3606, + 3576, + 3546, + 3516, + 3486, + 3456, + 3426, + 3396, + 3366, + 3336, + 3307, + 3278, + 3249, + 3220, + 3191, + 3162, + 3133, + 3104, + 3075, + 3046, + 3017, + 2988, + 2959, + 2930, + 2901, + 2872, + 2843, + 2814, + 2785, + 2756, + 2727, + 2698, + 2669, + 2640, + 2612, + 2584, + 2556, + 2528, + 2500, + 2472, + 2444, + 2416, + 2388, + 2360, + 2332, + 2304, + 2276, + 2248, + 2220, + 2192, + 2164, + 2136, + 2108, + 2080, + 2052, + 2024, + 1996, + 1968, + 1944, + 1920, + 1896, + 1872, + 1848, + 1824, + 1800, + 1776, + 1752, + 1728, + 1704, + 1680, + 1662, + 1644, + 1626, + 1608, + 1590, + 1572, + 1554, + 1536, + 1518, + 1500, + 1482, + 1464, + 1447, + 1430, + 1413, + 1396, + 1379, + 1362, + 1345, + 1328, + 1311, + 1294, + 1277, + 1260, + 1243, + 1226, + 1209, + 1192, + 1175, + 1158, + 1141, + 1124, + 1107, + 1090, + 1073, + 1056, + 1039, + 1022, + 1005, + 988, + 971, + 954, + 937, + 920, + 903, + 886, + 869, + 852, + 835, + 818, + 801, + 784, + 767, + 750, + 733, + 716, + 699, + 682, + 665, + 648, + 632, + 616, + 600, + 584, + 568, + 552, + 536, + 520, + 504, + 488, + 472, + 456, + 440, + 424, + 408, + 392, + 376, + 360, + 344, + 328, + 312, + 296, + 280, + 264, + 249, + 234, + 219, + 204, + 189, + 174, + 159, + 144, + 132, + 120, + 108, + 96, + 84, + 72, + 60, + 48, + 36, + 24, + 12, + 0 + ], + "minimum_positive_marginal": 12 + }, + "cover_witness_sha256": "6ddd891e6db94bc7bcbc13469f4c93b605632ffe43098f5ad49a575e1aa6994c", + "departure": { + "endpoint_types": [ + [ + 36, + 24, + 12 + ], + [ + 44, + 28, + 24 + ], + [ + 45, + 30, + 8 + ], + [ + 46, + 29, + 24 + ], + [ + 47, + 30, + 24 + ], + [ + 48, + 30, + 12 + ] + ], + "minimum_cheap_by_units": [ + 4656, + 4626, + 4596, + 4566, + 4536, + 4506, + 4476, + 4446, + 4416, + 4386, + 4356, + 4326, + 4296, + 4266, + 4236, + 4206, + 4176, + 4146, + 4116, + 4086, + 4056, + 4026, + 3996, + 3966, + 3936, + 3906, + 3876, + 3846, + 3816, + 3786, + 3756, + 3726, + 3696, + 3666, + 3636, + 3606, + 3576, + 3546, + 3516, + 3486, + 3456, + 3426, + 3396, + 3366, + 3336, + 3307, + 3278, + 3249, + 3220, + 3191, + 3162, + 3133, + 3104, + 3075, + 3046, + 3017, + 2988, + 2959, + 2930, + 2901, + 2872, + 2843, + 2814, + 2785, + 2756, + 2727, + 2698, + 2669, + 2640, + 2612, + 2584, + 2556, + 2528, + 2500, + 2472, + 2444, + 2416, + 2388, + 2360, + 2332, + 2304, + 2276, + 2248, + 2220, + 2192, + 2164, + 2136, + 2108, + 2080, + 2052, + 2024, + 1996, + 1968, + 1944, + 1920, + 1896, + 1872, + 1848, + 1824, + 1800, + 1776, + 1752, + 1728, + 1704, + 1680, + 1662, + 1644, + 1626, + 1608, + 1590, + 1572, + 1554, + 1536, + 1518, + 1500, + 1482, + 1464, + 1447, + 1430, + 1413, + 1396, + 1379, + 1362, + 1345, + 1328, + 1311, + 1294, + 1277, + 1260, + 1243, + 1226, + 1209, + 1192, + 1175, + 1158, + 1141, + 1124, + 1107, + 1090, + 1073, + 1056, + 1039, + 1022, + 1005, + 988, + 971, + 954, + 937, + 920, + 903, + 886, + 869, + 852, + 835, + 818, + 801, + 784, + 767, + 750, + 733, + 716, + 699, + 682, + 665, + 648, + 632, + 616, + 600, + 584, + 568, + 552, + 536, + 520, + 504, + 488, + 472, + 456, + 440, + 424, + 408, + 392, + 376, + 360, + 344, + 328, + 312, + 296, + 280, + 264, + 249, + 234, + 219, + 204, + 189, + 174, + 159, + 144, + 132, + 120, + 108, + 96, + 84, + 72, + 60, + 48, + 36, + 24, + 12, + 0 + ], + "minimum_positive_marginal": 12 + } + }, + "price": { + "cheap": 0, + "feasible_minimal_profiles": 23, + "idle_rank_mass": 2472, + "local_rank_mass": 4240, + "root_bracket": [ + "2104152801941/1000000000000000", + "1052076400971/500000000000000" + ], + "root_moments": [ + [ + "57896044618658081919639916733460792261064266965718583817505982389223504130055/57896044618658097711785492504343953926634992332820282019728792003956564819968", + "115792089237316163839279833466921584522128533931437167635011964778447008260147/115792089237316195423570985008687907853269984665640564039457584007913129639936" + ], + [ + "57896044618658231106900800789237331349881156227252892927885103777633010097833/57896044618658097711785492504343953926634992332820282019728792003956564819968", + "115792089237316462213801601578474662699762312454505785855770207555266020195703/115792089237316195423570985008687907853269984665640564039457584007913129639936" + ] + ], + "selected_moment": [ + "57832141505183156463547113320474650185541087669288292628584326164149739826601/57896044618658097711785492504343953926634992332820282019728792003956564819968", + "115664283010366312927094226640949300371082175338576585257168652328299479653241/115792089237316195423570985008687907853269984665640564039457584007913129639936" + ], + "units": 208 + } +} diff --git a/research/p104-endpoint-geometric-budget/SOURCES.json b/research/p104-endpoint-geometric-budget/SOURCES.json new file mode 100644 index 0000000000..76ef372b9a --- /dev/null +++ b/research/p104-endpoint-geometric-budget/SOURCES.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "base_commit": "5a0dc2c0f4685b02bef7776bc196c7c1231cbac1", + "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/complex-local-word-ceiling/ceiling.py", + "usage": "input", + "git_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "sha256": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + }, + { + "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" + } + ] +} diff --git a/research/p104-endpoint-geometric-budget/TASK.json b/research/p104-endpoint-geometric-budget/TASK.json new file mode 100644 index 0000000000..9ed2cc138e --- /dev/null +++ b/research/p104-endpoint-geometric-budget/TASK.json @@ -0,0 +1,181 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "priority_revision": 5, + "base_commit": "5a0dc2c0f4685b02bef7776bc196c7c1231cbac1", + "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": "Prove geometric attainment of PR2909 separate endpoint count curves, then certify the cheapest two-history transport/ideal-idle profile and its root bracket.", + "scope_change_reason": "The live handoff has advanced from aggregate support and endpoint saturation to actual subspace unions and a priced candidate. This audit closes precisely those two obligations without constructing a correction.", + "bottleneck_link": "P104 changes the binding complex supplier structure. This result decides whether the named two-history endpoint contract itself adds an obstruction or an unaffordable optimistic price; both tests pass, leaving joint chronological acquisition and the full physical bill open.", + "budget_minutes": 60, + "stop_rule": "Stop after one source-bound separate-endpoint proof and cost certificate, controls, review and PR. Do not expand into native construction or treat omitted costs as zero.", + "outcome": "completed", + "evidence": "Written affine-complement and excess-price proofs, all 208 reconstructed endpoint covers, exhaustive pair-union oracle, 23 feasible minimal count-profile price comparisons and strict rational root signs.", + "author": "Nick Petalas", + "ai_assistance": "Substantial AI assistance in mathematical analysis, implementation, verification and prose, including one scoped internal mathematical audit and an artifact review. No independent human or formal-kernel review is claimed.", + "open_questions": [ + { + "question": "Can a named helper profile jointly acquire and deliver all residual coefficients along actual source/target flags in chronological order?", + "why_it_matters": "Separate endpoint covers pass and the two-type optimum is affordable in the optimistic screen. Joint acquisition and restoration, rather than this marginal covering count, remain the potential obstruction.", + "first_step": "Pin 208 concrete unit flags or a different fully priced history profile; assign actual source/target dependencies at the original seven cuts and test exact coefficients and dirty restoration.", + "blocked_by": "No simultaneous flag assignment, acquisition network, owner/routing schedule, native precision or complete consumer bill is supplied." + } + ], + "selection": { + "seed": "7a620f905ed9d66b1097015e0e9b6c5f", + "track": "complex-mechanisms", + "scope_key": "72dfbf0708467ad34793" + }, + "predecessors": [ + { + "pr": 2909, + "head": "4f394cfd3244b336e59b7adaded883277b66b637", + "author": "Nick Petalas", + "role": "endpoint count curve and remaining geometric/price handoff" + }, + { + "pr": 2675, + "head": "ad889658a5586099132c6d7f38374df9a9d20bca", + "author": "Arham Tahir", + "role": "complete original channel and ideal-idle model" + } + ], + "claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2245#discussioncomment-18971211", + "entry_overlap": { + "open_prs": { + "fetched_at": "2026-10-16T10:52:15.424057+00:00", + "complete_pagination": true, + "records": 496 + }, + "discussions": { + "fetched_at": "2026-10-16T10:52:41.370130+00:00", + "complete_pagination": true, + "records": 1590 + } + }, + "freshness": { + "upstream_commit": "d98c98262f3079e9e773906e4606372c61e25738", + "priority_revision": 5, + "checked_at": "2026-10-16T11:00:51.588785+00:00", + "relevant_change": "No change in AGENTS, autoresearch, task catalogue/family guidance, selected record, three live inputs or package replay runner." + }, + "environment": { + "system": "macOS arm64", + "commands": [ + "python3.12 -B scripts/research_package.py --package research/p104-endpoint-geometric-budget", + "python3.14 -O -Werror -B research/p104-endpoint-geometric-budget/verify.py", + "uvx ruff check research/p104-endpoint-geometric-budget", + "python3.12 -Werror -B -m py_compile research/p104-endpoint-geometric-budget/geometry.py research/p104-endpoint-geometric-budget/verify.py research/p104-endpoint-geometric-budget/test_verify.py" + ], + "verification_status": "Registered Python 3.12 replay completed; all four optimized behavioral groups pass. Optimized Python 3.14 receipt replay, Ruff and warning-as-error compilation pass.", + "python_registered": "CPython 3.12.15", + "python_optimized": "CPython 3.14.8", + "ruff": "0.17.1" + }, + "limits": [ + "Separate endpoint subspace unions only, not a correction program.", + "Two named history types only; no bound over all 256 histories.", + "Inherited interval arithmetic is not independently reimplemented.", + "No full selected cold replay, native lowering, physical hosting, precision or all-size proof.", + "No new supplier or selected kappa." + ], + "review": { + "mathematical_audit": { + "agent": "endpoint_contract_audit", + "status": "completed", + "result": "All 208 actual covers and the root interval reproduced through pinned predecessor geometry; scope warnings incorporated." + }, + "artifact_review": { + "agent": "artifact_review", + "status": "completed", + "result": "No actionable defects found. Optimized Python 3.14 replay and four behavioral groups passed; inherited intervals and selected cold replay not independently reimplemented." + } + }, + "predecessor_sources": [ + { + "commit": "4f394cfd3244b336e59b7adaded883277b66b637", + "path": "research/p104-endpoint-saturation/README.md", + "git_blob": "60ba24f5e5baa59fe035cbf0b2af1a92d5ea3442", + "sha256": "fa9e758384019b8401f9e835dfea74ff0e89350928d1e741535d125b453b566f", + "usage": "inspected proof/model provenance; not imported or copied" + }, + { + "commit": "ad889658a5586099132c6d7f38374df9a9d20bca", + "path": "research/p104-coupled-profile-budget/README.md", + "git_blob": "7c4f6ed510cdb7538a03838c3a9e8ebf241c3995", + "sha256": "f137703f9dd308d8f9a32e8622e4404a6f61b783c6bd84bdc03daa1b824315c1", + "usage": "inspected proof/model provenance; not imported or copied" + } + ], + "final_overlap": { + "searched_at": "2026-10-16T11:00:38.105334+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-16T10:59:39.495953+00:00", + "complete_pagination": true, + "records": 496 + }, + "discussions": { + "fetched_at": "2026-10-16T11:00:09.637361+00:00", + "complete_pagination": true, + "records": 1593 + }, + "closed_prs": { + "fetched_at": "2026-10-16T11:00:37.964517+00:00", + "complete_pagination": true, + "records": 2117 + } + }, + "warnings": [], + "limits": "Remote PR scope includes open and closed/merged titles and bodies, with separate coverage and timestamps. State changes are deduplicated by latest PR update; snapshots are not atomic. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "assessment": "Nearest match is the credited PR2909 handoff and our own claim. No other geometric-attainment/two-type price follow-up found; unpublished work and arbitrary diffs remain outside coverage." + } +} diff --git a/research/p104-endpoint-geometric-budget/VERIFY.json b/research/p104-endpoint-geometric-budget/VERIFY.json new file mode 100644 index 0000000000..a3c942508d --- /dev/null +++ b/research/p104-endpoint-geometric-budget/VERIFY.json @@ -0,0 +1,34 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/complex-local-word-ceiling/ceiling.py", + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "research/p104-native-channel/inputs/P104-FIXTURE.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-Werror", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Original-input reconstruction, all 208 actual covers, exhaustive pair oracle, complete typed receipt and exact price/root intervals" + }, + { + "argv": [ + "{python}", + "-O", + "-Werror", + "-B", + "{package}/test_verify.py" + ], + "timeout_seconds": 120, + "checks": "Four behavioral groups, affine-hypothesis failure, invalid domains, strict competing price, optimized Git-free replay, source-before-import and typed receipt corruption" + } + ] +} diff --git a/research/p104-endpoint-geometric-budget/decisions.tsv b/research/p104-endpoint-geometric-budget/decisions.tsv new file mode 100644 index 0000000000..9e273f0718 --- /dev/null +++ b/research/p104-endpoint-geometric-budget/decisions.tsv @@ -0,0 +1,6 @@ +timestamp phase decision reason evidence result +2026-10-16T10:59:11.157363+00:00 orientation Take PR2909 geometric/price handoff Current priority 5 and live completion of prior endpoint tasks 496 open PRs and 1590 Discussion records fully paginated; selected baseline passes One scoped interface audit +2026-10-16T10:59:11.157363+00:00 proof Use affine-complement construction and symbolic price dominance Actual endpoint unions were the missing implication; minimum marginal 12 exceeds q_unit/q_cheap < 9/2 208 original-input covers, pair oracle and internal mathematical audit 208 unit multiplicities minimize two-type price +2026-10-16T10:59:11.157363+00:00 scope Retain separate orientations and two types Flag containment does not prove source acquisition; other histories can be cheaper Internal audit counterexample history (1,1,5,1,1) No circuit or general-history optimality claim +2026-10-16T11:00:51.588785+00:00 verification Accept checked certificate Registered replay and two scoped internal audits pass CPython 3.12.15 package; CPython 3.14.8 optimized replay; 4 behavioral groups; Ruff 0.17.1; warning-as-error compilation Exact local result only; no supplier/frontier change +2026-10-16T11:01:18.743313+00:00 submission Retain the original scientific base Refreshed main has unchanged relevant guidance, inputs and replay runner Main d98c98262; fully paginated 496 open PRs, 2117 closed PRs and 1593 Discussion records; no warnings No conflicting follow-up found; prepare focused PR diff --git a/research/p104-endpoint-geometric-budget/geometry.py b/research/p104-endpoint-geometric-budget/geometry.py new file mode 100644 index 0000000000..f49752bcfc --- /dev/null +++ b/research/p104-endpoint-geometric-budget/geometry.py @@ -0,0 +1,115 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Reconstruct the fixed P104 endpoint sets and actual two-plane covers.""" + +from collections import Counter +from itertools import combinations, product + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def parity(a, b): + return (a & b).bit_count() % 2 + + +def span(basis): + require(len(basis) <= 9, 'frame dimension') + points = {0} + for vector in basis: + require(type(vector) is int and 0 < vector < 512 and vector not in points, + 'independent binary basis') + points |= {point ^ vector for point in tuple(points)} + return frozenset(points) + + +def reconstruct(witness, 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)) + roots |= {(1, *s) for s in product((-1, 1), repeat=7) if s.count(-1) % 2 == 0} + puncture = fixture['section4_explicit_P104'] + ports = sorted(roots - {tuple(v) for v in puncture['F0'] + puncture['C']}) + require(len(roots) == 120 and len(ports) == 104, 'ordered P104 roots') + names = [f'{kind}{i}' for kind in 'XY' for i in range(104)] + paths = {name: [span(witness['initial_frames'][name])] for name in names} + paid = Counter() + require(len(witness['program']) == 4058, 'frozen word length') + for event in witness['program']: + if event[0] != 'transport': + continue + _, name, before, after, rank = event + paid[rank] += 1 + if name in paths: + old, new = span(before), span(after) + require(paths[name][-1] == old < new and rank == len(after) - len(before), + 'chronological monotone data frames') + paths[name].append(new) + for name in names: + require(paths[name][-1] == span(witness['final_frames'][name]), 'final frame') + return ports, paths, dict(paid) + + +def residuals(ports, paths): + sources = [paths[f'X{s}'] for s in range(104)] + targets = [paths[f'Y{t}'] for t in range(104)] + require(all(len(p[0]) == 2 and len(p[-1]) == 512 for p in sources), 'X endpoints') + require(all(p[0] == {0} and len(p[-1]) == 256 for p in targets), 'Y endpoints') + labels = [next(iter(p[0] - {0})) for p in sources] + normals = [] + for path in targets: + dual = [n for n in range(1, 512) if all(not parity(n, v) for v in path[-1])] + require(len(dual) == 1, 'target normal') + normals.append(dual[0]) + require(len(set(labels)) == len(set(normals)) == 104, 'distinct endpoints') + arrival, departure = [set() for _ in range(104)], [set() for _ in range(104)] + demands = 0 + for t, left in enumerate(ports): + for s, right in enumerate(ports): + gram = sum(a * b for a, b in zip(left, right, strict=True)) + require((labels[s] in targets[t][-1]) == (gram % 8 == 4), 'Gram/frame binding') + if gram == 8 * int(t == s): + continue + demands += 1 + require(targets[t][-1] not in sources[s] and sources[s][0] not in targets[t], + 'no direct endpoint bypass') + if not any(labels[s] in v for v in targets[t][:-1]): + arrival[t].add(labels[s]) + if not any(len(v) > 2 and v <= targets[t][-1] for v in sources[s]): + departure[s].add(normals[t]) + require(demands == 4992, 'correction support') + return {'arrival': (arrival, normals), 'departure': (departure, labels)} + + +def plane_cover(points, normal): + """Return an explicit maximum plane and its affine complement.""" + require(0 < len(points) <= 48 and 0 not in points, 'residual domain') + require(all(not parity(v, normal) for v in points), 'endpoint containment') + odd = [q for q in range(1, 512) if all(parity(v, q) for v in points)] + require(bool(odd), 'odd affine section') + candidates = [f for f in range(1, 512) if f != normal] + f = max(candidates, key=lambda a: sum(not parity(a, v) for v in points)) + q, g = odd[0], f ^ odd[0] + require(g not in (0, normal), 'complement proper') + endpoint = {v for v in range(512) if not parity(v, normal)} + first = {v for v in endpoint if not parity(v, f)} + second = {v for v in endpoint if not parity(v, g)} + require(len(first) == len(second) == 128, 'two dimension-seven subspaces') + left, right = points & first, points & second + require(not left & right and left | right == points, 'disjoint exact cover') + require(0 < len(left) < len(points), 'residual spans endpoint') + return {'demand': len(points), 'capacity': len(left), 'q': q, 'f': f, 'g': g} + + +def pair_oracle(points, normal): + """Enumerate distinct restricted planes, without the affine construction.""" + ordered = sorted(points) + masks = {sum(1 << i for i, v in enumerate(ordered) if not parity(v, f)) + for f in range(1, 512) if f != normal} + maximum = max(mask.bit_count() for mask in masks) + union = max((a | b).bit_count() for a in masks for b in masks) + return maximum, union diff --git a/research/p104-endpoint-geometric-budget/test_verify.py b/research/p104-endpoint-geometric-budget/test_verify.py new file mode 100644 index 0000000000..0208598b4c --- /dev/null +++ b/research/p104-endpoint-geometric-budget/test_verify.py @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Behavioral and publication-boundary controls for the endpoint certificate.""" + +import json +import os +import shutil +import subprocess +import sys +import tempfile +import unittest +from fractions import Fraction as Q +from pathlib import Path + +import geometry +import verify + + +class CertificateTests(unittest.TestCase): + def test_affine_cover_and_missing_hypothesis(self): + points = {1 << k for k in range(8)} + row = geometry.plane_cover(points, 256) + self.assertEqual((row['demand'], row['capacity']), (8, 7)) + self.assertEqual(geometry.pair_oracle(points, 256), (7, 8)) + # 1+2+3=0 prevents a functional taking value one on all three. + with self.assertRaisesRegex(ValueError, 'odd affine section'): + geometry.plane_cover(points | {3}, 256) + with self.assertRaisesRegex(ValueError, 'endpoint containment'): + geometry.plane_cover(points | {256}, 256) + + def test_price_and_domain(self): + verify.sources() + module = verify.interval_module() + lo, hi = verify.moment(module, 0, 208, verify.SELECTED) + self.assertTrue(Q('0.9988962438816701') < lo <= hi < Q('0.9988962438816703')) + self.assertGreater(verify.moment(module, 12, 207, verify.SELECTED)[0], hi) + for cheap, units in ((-1, 208), (0, 483), (0, 208.0)): + with self.assertRaises(ValueError): + verify.moment(module, cheap, units, verify.SELECTED) + + def test_duplicate_input_and_frame_rejection(self): + with self.assertRaisesRegex(ValueError, 'duplicate JSON key'): + json.loads('{"x":1,"x":2}', object_pairs_hook=verify.unique) + with self.assertRaisesRegex(ValueError, 'independent binary basis'): + geometry.span([1, 2, 3]) + + def test_optimized_git_free_export_and_corruption(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + package = root / 'research/p104-endpoint-geometric-budget' + shutil.copytree(verify.PACKAGE, package, ignore=shutil.ignore_patterns('__pycache__')) + manifest = verify.read_json(verify.PACKAGE / 'SOURCES.json') + for entry in manifest['files']: + if entry['usage'] == 'input': + target = root / entry['path'] + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(verify.ROOT / entry['path'], target) + env = dict(os.environ, PYTHONPYCACHEPREFIX=str(root / 'cache')) + command = [sys.executable, '-O', '-Werror', '-B', str(package / 'verify.py')] + good = subprocess.run(command, check=False, cwd=root, env=env, text=True, + capture_output=True, timeout=60) + self.assertEqual(good.returncode, 0, good.stderr) + self.assertIn('endpoints=208 units=208', good.stdout) + result_path = package / 'RESULT.json' + original = result_path.read_bytes() + receipt = json.loads(original) + receipt['price']['units'] = 208.0 + result_path.write_text(json.dumps(receipt), encoding='utf-8') + bad = subprocess.run(command, check=False, cwd=root, env=env, text=True, + capture_output=True, timeout=60) + self.assertNotEqual(bad.returncode, 0) + self.assertIn('complete typed receipt', bad.stderr) + result_path.write_bytes(original) + source = root / 'research/complex-local-word-ceiling/ceiling.py' + source.write_text('raise RuntimeError("MUST_NOT_IMPORT")\n', encoding='utf-8') + bad = subprocess.run(command, check=False, cwd=root, env=env, text=True, + capture_output=True, timeout=60) + self.assertNotEqual(bad.returncode, 0) + self.assertIn('input hash', bad.stderr) + self.assertNotIn('RuntimeError: MUST_NOT_IMPORT', bad.stderr) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/p104-endpoint-geometric-budget/verify.py b/research/p104-endpoint-geometric-budget/verify.py new file mode 100644 index 0000000000..32ce4260fe --- /dev/null +++ b/research/p104-endpoint-geometric-budget/verify.py @@ -0,0 +1,144 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Check separate endpoint geometric attainability and its two-history bill.""" + +import argparse +import hashlib +import importlib.util +import json +from collections import Counter +from fractions import Fraction as Q +from pathlib import Path + +from geometry import pair_oracle, plane_cover, reconstruct, require, residuals + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parents[1] +BASE = {1: 1074, 2: 58, 3: 86, 4: 104, 5: 48, 6: 24, 7: 8, 8: 8} +SELECTED = Q(67018507072324140917, 40000000000000000000000) +ROOT_LO, ROOT_HI = Q('0.002104152801941'), Q('0.002104152801942') +TYPES = [(36, 24, 12), (44, 28, 24), (45, 30, 8), + (46, 29, 24), (47, 30, 24), (48, 30, 12)] + + +def unique(pairs): + result = dict(pairs) + require(len(result) == len(pairs), 'duplicate JSON key') + return result + + +def read_json(path): + require(path.stat().st_size <= 2_000_000, 'JSON size bound') + return json.loads(path.read_text(encoding='utf-8'), object_pairs_hook=unique) + + +def sources(): + manifest = read_json(PACKAGE / 'SOURCES.json') + for record in manifest['files']: + if record['usage'] != 'input': + continue + data = (ROOT / record['path']).read_bytes() + require(hashlib.sha256(data).hexdigest() == record['sha256'], 'input hash') + return (read_json(ROOT / 'research/p104-native-channel/inputs/LOWRANK-WITNESS.json'), + read_json(ROOT / 'research/p104-native-channel/inputs/P104-FIXTURE.json')) + + +def interval_module(): + spec = importlib.util.spec_from_file_location( + 'p104_ceiling', ROOT / 'research/complex-local-word-ceiling/ceiling.py') + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def minimum_cheap(records): + require(len(records) == 104, '104 endpoints') + marginals = [] + for row in records: + d, b = row['demand'], row['capacity'] + require(0 < b < d <= 2 * b, 'decreasing positive marginals') + marginals.extend((b, d - b)) + marginals.sort(reverse=True) + remaining = sum(row['demand'] for row in records) + curve = [remaining] + for marginal in marginals: + remaining -= marginal + curve.append(remaining) + require(curve[-1] == 0, 'complete geometric coverage') + return curve, min(marginals) + + +def geometry_receipt(witness, fixture): + ports, paths, paid = reconstruct(witness, fixture) + require(paid == BASE, 'whole original channel price') + receipt, all_rows = {}, [] + for orientation, (sets, normals) in residuals(ports, paths).items(): + rows = [] + for points, normal in zip(sets, normals, strict=True): + row = plane_cover(points, normal) + require(pair_oracle(points, normal) == (row['capacity'], row['demand']), + 'independent pair union optimum') + rows.append(row) + types = sorted((d, b, count) for (d, b), count in Counter( + (r['demand'], r['capacity']) for r in rows).items()) + require(types == TYPES, 'predecessor endpoint types') + curve, marginal = minimum_cheap(rows) + require(sum(r['demand'] for r in rows) == 4656 and marginal == 12, + 'demand and smallest marginal') + receipt[orientation] = {'endpoint_types': types, 'minimum_cheap_by_units': curve, + 'minimum_positive_marginal': marginal} + all_rows.append(rows) + receipt['cover_witness_sha256'] = hashlib.sha256( + json.dumps(all_rows, sort_keys=True).encode()).hexdigest() + return receipt + + +def moment(module, cheap, units, a): + require(type(cheap) is int and type(units) is int and min(cheap, units) >= 0, + 'nonnegative integer helper counts') + require(cheap + units <= 482 and 0 <= a <= Q(1, 100), 'price domain') + profile = BASE | {1: BASE[1] + 2 * cheap + 9 * units, 7: BASE[7] + cheap} + return module.relax(profile, 73, 832, 9, 56, a) + + +def price_receipt(module, geometry): + curve = geometry['arrival']['minimum_cheap_by_units'] + feasible = [(c, u) for u, c in enumerate(curve) if u + c <= 482] + selected = moment(module, 0, 208, SELECTED) + require(selected[1] < 1, 'selected optimistic price passes') + # Independent finite price check supports the all-positive-a written proof. + for c, u in feasible: + if (c, u) != (0, 208): + require(moment(module, c, u, SELECTED)[0] > selected[1], + 'unique selected-price optimizer') + below, above = moment(module, 0, 208, ROOT_LO), moment(module, 0, 208, ROOT_HI) + require(below[1] < 1 < above[0], 'strict rational root bracket') + return {'cheap': 0, 'units': 208, 'local_rank_mass': 4240, 'idle_rank_mass': 2472, + 'feasible_minimal_profiles': len(feasible), + 'selected_moment': [str(v) for v in selected], + 'root_bracket': [str(ROOT_LO), str(ROOT_HI)], + 'root_moments': [[str(v) for v in pair] for pair in (below, above)]} + + +def compute(): + witness, fixture = sources() + geometry = geometry_receipt(witness, fixture) + return {'geometry': geometry, 'price': price_receipt(interval_module(), geometry)} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--emit', action='store_true') + args = parser.parse_args() + result = compute() + encoded = json.dumps(result, sort_keys=True, indent=2) + if args.emit: + print(encoded) + return + expected = json.dumps(read_json(PACKAGE / 'RESULT.json'), sort_keys=True, indent=2) + require(encoded == expected, 'complete typed receipt') + print('PASS_P104_ENDPOINT_GEOMETRIC_BUDGET endpoints=208 units=208 ' + 'root=(0.002104152801941,0.002104152801942) no_new_kappa') + + +if __name__ == '__main__': + main()