diff --git a/research/p104-full-chart-joint/PROOF.md b/research/p104-full-chart-joint/PROOF.md new file mode 100644 index 0000000000..8441e150a3 --- /dev/null +++ b/research/p104-full-chart-joint/PROOF.md @@ -0,0 +1,151 @@ +# Completing the persistent bank once reduces the matched repair from 3N to 2N + +## Exact same prepared physical boundary + +This is a refinement of PR3978, head48e2e44d8785be8204d8c4b719850332f4f9abe0. +Its exact PROOF and RESULT are exported unchanged in inputs/. The proposed +chronological global producer remains unproved. We change only the repair at +that predecessor's explicitly prepared cut, with fixed named X/Y owners and +the same two dirty helper banks. No new payload code, changed source input, +free bank exchange or improved global caller is asserted. + +Write A_r=A tensor I, A_c=I tensor A for the canonical P104 A=G/2, and +N=104^2=10816. Let U(Q)=[[I,Q],[0,I]], S(Q)=[[I,0],[Q,I]], and +M=U(-A_c)S(A_r). As in3978, original physical input (x,y) is normalized by +u=T^-1 x, with T=diag(C_Uij), K=T^-1, F=C_I and Gphys=diag(F,FK). +The prepared input is Gphys M(u,y); the required output is Gphys J(u,y), +where J=[[0,-I],[I,0]]. This retains the original input tags. It does not +replace the physical source x by the logical normalized source u. + +The common-coordinate compensator is + + C = J M^-1 = [[A_r,A_r A_c-I],[I,A_c]] + = U(A_r-I) S(I) U(A_c-I). + +Set D_T=diag(I,T), D_K=diag(I,K). The predecessor's exact physical map is + + Cphys = D_K C D_T + = U((A_r-I)T) S(K) U((A_c-I)T). + +The new word executes the LEFT expression in chronological order: +(1) apply T in place to every persistent Y; (2) execute the three scalar +layers of C in the common F chart; (3) apply K in place to every resulting Y. +Because T(FK)=F and K F=FK, the entrance and exit charts match literally. +The original Y payload need not survive until step3: C is intentionally a +mixed two-bank map. The proof uses only TK=KT=I and the common F commutation; +A_r/A_c are not commuted through T. Both dirty banks are untouched by this +repair. Completion of their preceding paths is still a prepared-cut premise. + +The free noncommutative checker verifies the matched endpoint, including +Gphys and diag(K,I) on the original physical input. A separate implementation +compares all columns of old and new maps at varying noncommuting Gaussian +charts. Omitting either boundary conversion or exchanging their order fails. + +## Exact boundary primitives and phases + +The canonical native certificate supplies the104 odd distinct physical root +labels r_i. The line generators u_ij=r_i tensor r_j are10816 distinct norm-one +81-bit labels. For nonzero u choose a set-bit pivot p, e=2^p, and define + + P_u(a)=a + a_p (u+e) over F2. + +P_u is an involutive invertible binary basis map and P_u(e)=u. Its address +permutation has zero phase. With the retained positive one-coordinate C_p, + + T_u=P_u C_p P_u, + K_u=X_u P_u C_p P_u. + +The finite f=1 formula C_u=((1+i)I+(1-i)X_u)/2 verifies the exact phase: +C_u^2=X_u and C_u^-1=X_u C_u. This formula is used only as a bounded +operator check, not as an implementation that expands a large native child. +The independent checker compares every Gaussian matrix column for all seven +nonzero three-bit u, both directions, and rejects a global phase mutation. +The primary checks P_u^2=I on all81 basis vectors for every actual product +line (876096 binary basis checks). + +For f parallel address columns the implementation lifts the outer basis +permutation as P_u tensor I_f and RETAINS one positive C_f child on the +p-coordinate block. The inverse uses the corresponding translation monomial +on all f columns. Tensoring the exact operator identity establishes this +ideal native recipe without expanding2^f terms. Each conversion acts on the +same full physical array volume as3978's copied transform; there is no small- +volume donor shortcut. Binary basis permutation, translation, scalar and +control passes remain paid physical work. This algebraic lifting is not +signed-floor, precision, recovery or recursive supplier admission. + +## Complete matched operation invoice + +In each upper scalar layer Q=A_axis-I has4992 signed half coefficients per +fiber and zero diagonal. For each donor in the persistent Y bank: halve it, +perform all signed unit additions to the distinct X bank, and double it back +before advancing to the next donor. The lower layer is one X-to-Y unit add +per data position. The second upper layer reads the updated Y fields. No +new initialization, private copy or erasure is needed. All donor rescalings +are restored; the intended mixed endpoint is still C, not the original Y. +Exact integer rows check every208 local input column of this word, and the +separate Gaussian checker executes both upper rescaling words around the +lower layer, with an unrestored-donor failure control. + +| Primitive | PR3978 copied route | New persistent full-chart route | +|---|---:|---:| +| Positive rank-one transforms |32448 = 3N|21632 = 2N| +| Unit array ADD/SUB |1049152|1049152| +| Halves |21632 on dead private donors|21632 on persistent donors| +| Restoring doubles |0|21632| +| Private initialization/copy/erase |32448 each|0| +| Peak additional private arrays |1|0| + +Thus the positive-child rank bill decreases by10816, exactly one third of +that particular predecessor route. This is a matched prepared-cut operation +comparison, not a scalar/runtime optimum or a lower bound on arbitrary native +factorizations. The explicit new boundary recipes additionally have43264 +binary basis permutation passes and10816 inverse translation passes, without +claiming those are physical-cost minima. All scalar additions and rescalings +remain finite paid work, not zero because they carry no positive child rank. + +In the declared chart ledger, the new entrance T contributes+N persistent +progress and the final K contributes-N. Net progress remains zero, just as +3978's repair. The in-place route therefore cannot claim the initial lift as +new endpoint progress while dropping the final descent from its bill. + +## Complete conditional gate and stop + +Retain3978/3954's named global hypotheses:104 row and104 column bare calls, +m=81, W=36608 persistent roles, N initial rank-one anchors; each bare local +call has mass2368 and persistent progress at most2312, even granting the +unproved opposite orientation. All residual native rank tariff is at least +net persistent progress, ranks<=81 and equal physical-role volume1/W. +The most favorable bare bill is2966080 against capacity2965248. +Replacing only the old prepared-cut repair gives + + old lower bill = 2966080+32448 = 2998528, + new lower bill = 2966080+21632 = 2987712, + new excess = 22464 > 0. + +All omitted actual preparation, interstage alignment, wrappers, scalar passes, +routing/holding/control/tapes, finite-width/precision/recovery and admission +costs remain unknown nonnegative additions. For0<=a<1, (r/81)^(1-a)>=r/81, +so this favorable complete native gate still fails throughout that range. +Stop dependent native/global construction for the unchanged scaffold. +No selected-frontier or kappa update follows. + +A changed raw all-FULL producer, including the new late-delivery work, requires +its own chronological input/exit tags and progress bound. In particular, a +single-axis route returning F T^-1 x does not implement F x on the original +physical source. The apparent anchor credit cannot be claimed by renaming +that normalized field. No such changed producer is incorporated here. + +## Remaining obligation and credit + +The useful successor is an actual producer that permits one boundary pass to +be absorbed while retaining all original physical inputs, owner returns, +arbitrary dirty helpers and a favorable complete gate. Start with one shared +owner at an actual adjacent call boundary; do not infer availability from the +symbolic prepared cut. This study supplies a cheaper target repair only. + +The comparison and original compensator retain Chris R/Clear1nsight's3978 +credit, following3954/3940/3882 and the canonical copied-center caller. +Rohan Arun/#1972 owns the native-word/dirty source, Chafik Boukhalfa/#1991 its +native realization, Adam Gall/#1940 delivery, and the underlying E8, compiler, +phase and caller authors retain the attribution listed in README. Prepared +with substantial OpenAI Codex multi-agent assistance. Apache-2.0. diff --git a/research/p104-full-chart-joint/README.md b/research/p104-full-chart-joint/README.md new file mode 100644 index 0000000000..0437409f2c --- /dev/null +++ b/research/p104-full-chart-joint/README.md @@ -0,0 +1,76 @@ +# A matched full-chart optimization of P104 joint compensation + +Completing the persistent Y bank once, doing all three scalar layers in a +common full chart, and restoring its terminal chart reduces PR3978's prepared- +cut positive-child bill from **32448 to 21632**, while eliminating all private +copies and temporary arrays. Both words implement the exact same physical +operator with the same original input tags and arbitrary dirty helpers. +The new word adds 21632 restoring doubles, with the same 1049152 unit array additions. +This is a reduction in native child count and private storage; scalar work +remains paid. + +The identity is D_K C D_T=Cphys, where D_T=diag(I,T), D_K=diag(I,T^-1) and +C=U(A_r-I)S(I)U(A_c-I). See [PROOF.md](PROOF.md) for chronological charts, +phase-exact retained native-child recipes, restricted scope, full primitive +invoice and conditional gate. [RESULT.json](RESULT.json) records the checks. +This combines global chart completion with elementary operator factorization. + +The improvement is local to the **same explicitly prepared physical cut** as +[PR3978](https://github.com/CrocSwap/integer-mult-bounds/pull/3978), exact head +48e2e44d8785be8204d8c4b719850332f4f9abe0. Its unchanged proof/result are exported +with hashes/Git blobs. No actual chronological P104 producer, opposite native +orientation or global interstage alignment is supplied. Under the inherited +named complete invoice, the excess decreases from 33280 to 22464 and still fails. +No native optimum, runtime gain, supplier or new kappa is claimed. + +## Reproduce and verification scope + +Standard-library Python 3.12: + + python3.12 -B scripts/research_package.py --package research/p104-full-chart-joint + python3.12 -B scripts/check_research_commit.py --package research/p104-full-chart-joint --check-source-history + +VERIFY.json declares bounded checks. The primary validates exact ordered +noncommutative identities, original physical input tags, all 208 local donor +columns, canonical 104 physical labels and 10816 tensor lines, and both +rank-one boundary recipes on 876096 binary basis vectors. The separate checker +compares 32 Gaussian columns and 8 arbitrary dirty columns, executes the literal +in-place scalar word, compares 56 finite native columns and rejects physical +order, donor-restoration and phase faults. Finite f=1 formulas are only checks; +the general-f implementation retains one C_f child, not an exponential scalar +expansion. Signed-floor and recursive admission remain separate obligations. +Actual normal/optimized CLI controls validate private fixtures before rejecting +receipt/source/predecessor mutations. These are scoped checks, not human or +proof-assistant certification. + +## Selection and overlap + +User-assigned changed scope under revision 6 `p104-side-correction`, base +20ecf2891d80b5acf18d980b2164fb44ea7faa90. The coordinator refreshed 702 open PR +bodies including drafts, live handoffs and canonical main at the new round; +worker checked the current source/head and repository helper. Canonical claim: +https://github.com/CrocSwap/integer-mult-bounds/pull/3954#issuecomment-6263112891 +Discussion/closed-diff coverage is bounded. The raw-full caller, source-tag and +other parallel studies are distinct. No frozen predecessor or frontier file +is modified. + +## Open next questions + +TASK.json asks whether one actual producer/consumer boundary can absorb a +conversion without changing original physical source identity, helper returns +or the complete gate. First bind named owners and exact entrance/exit charts. +Remaining blockers include the missing prepared producer, interstage alignment, +native orientation/phase, physical scalar/routing/control/tape costs and +finite-width/precision/recovery/all-size admission. Stop expansion under the +unchanged failed gate; a common full chart alone does not erase source tags. + +## Credit + +Chris R/Clear1nsight owns PR3978's original compensator and copied route, following +PR3954/3940/3882/3943. Retain Rohan Arun/#1972, Chafik Boukhalfa/#1991, +Adam Gall/#1940,1337isnot1337/#3894, ToikY/#3956/#3966/#3996, and 3961/3962/3965 +for their distinct boundary, coverage and copy audits. Retain Josie Elliston, +Sagar Thakrar, Douglas Colkitt, Dominik Scholz and the canonical E8/native/ +Clifford/compiler/caller source lineage. New matched optimization prepared for +Chris R/Clear1nsight with substantial OpenAI Codex multi-agent assistance. +Apache-2.0. Selected frontier unchanged. diff --git a/research/p104-full-chart-joint/RESULT.json b/research/p104-full-chart-joint/RESULT.json new file mode 100644 index 0000000000..c4af2274f4 --- /dev/null +++ b/research/p104-full-chart-joint/RESULT.json @@ -0,0 +1,153 @@ +{ + "schema_version": 1, + "scope": "same prepared physical cut as PR3978; actual producer unproved", + "n": 104, + "N": 10816, + "native_boundary_certificate": { + "physical_labels": [ + 386, + 391, + 405, + 431, + 445, + 440, + 426, + 351, + 304, + 290, + 295, + 309, + 346, + 357, + 31, + 32, + 79, + 93, + 88, + 74, + 37, + 26, + 127, + 224, + 223, + 176, + 162, + 167, + 181, + 218, + 229, + 122, + 261, + 494, + 385, + 406, + 446, + 425, + 454, + 468, + 289, + 310, + 345, + 331, + 358, + 372, + 283, + 94, + 73, + 38, + 52, + 25, + 11, + 100, + 115, + 134, + 148, + 251, + 236, + 196, + 211, + 188, + 174, + 161, + 182, + 217, + 203, + 230, + 244, + 155, + 140, + 121, + 107, + 4, + 19, + 59, + 44, + 67, + 81, + 262, + 276, + 379, + 324, + 339, + 316, + 302, + 475, + 460, + 419, + 433, + 398, + 481, + 502, + 82, + 301, + 434, + 397, + 482, + 501, + 487, + 392, + 439, + 296, + 87 + ], + "product_line_count": 10816, + "binary_basis_checks": 876096, + "recipe": "P_u C_p P_u; inverse X_u P_u C_p P_u", + "rank_per_direction": 1, + "recipe_phase": 0 + }, + "old_route": { + "positive_rank_one_copy_transforms": 32448, + "unit_array_adds": 1049152, + "private_donor_halves": 21632, + "private_initializations": 32448, + "private_copies": 32448, + "private_erasures": 32448, + "peak_additional_private_arrays": 1, + "persistent_helper_changes": 0 + }, + "new_route": { + "positive_rank_one_transforms": 21632, + "unit_array_adds": 1049152, + "persistent_donor_halves": 21632, + "persistent_donor_doubles": 21632, + "private_initializations": 0, + "private_copies": 0, + "private_erasures": 0, + "peak_additional_private_arrays": 0, + "binary_basis_permutation_passes": 43264, + "inverse_translation_passes": 10816, + "persistent_helper_changes": 0, + "net_persistent_chart_progress": 0 + }, + "native_rank_saved": 10816, + "gate": { + "bare_lower_bill": 2966080, + "capacity": 2965248, + "old_joint_lower_bill": 2998528, + "new_joint_lower_bill": 2987712, + "new_excess": 22464 + }, + "selected_frontier_changed": false, + "global_producer_constructed": false +} diff --git a/research/p104-full-chart-joint/SOURCES.json b/research/p104-full-chart-joint/SOURCES.json new file mode 100644 index 0000000000..020d64d690 --- /dev/null +++ b/research/p104-full-chart-joint/SOURCES.json @@ -0,0 +1,64 @@ +{ + "schema_version": 1, + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0" + }, + { + "path": "notes/copied-centers-complex.tex", + "usage": "input", + "git_blob": "fddd7bc7f2a2f749ba6eada19d153bf9243ee31c", + "sha256": "18eac6d5c5755e53230c0c12a633f38b6ce9666ef0322c1aff79394f2952af72" + }, + { + "path": "research/p104-native-channel/NATIVE-RECIPES.json.gz", + "usage": "input", + "git_blob": "ab129678c2df4f0d39b02b88457d02c37de0d9b6", + "sha256": "a1c4d83d3d5fe1338e99b59272e8cf5d43244c33888597da340b2aa7fef5b3e8" + }, + { + "path": "research/p104-native-channel/PROOF.md", + "usage": "input", + "git_blob": "a69311b74f74a2f8e8f411c1451baacd9bacddce", + "sha256": "5d743145d389ffdfaffc66096fa7e32c7155b18f73d74755403151d0435bb94c" + }, + { + "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" + } + ], + "source_exports": [ + { + "path": "inputs/pr3978-RESULT.json", + "sha256": "5cf5e65cdb41beb5e8a4f1ff548397f025c3dbf392ff21510f7d5d9a4642a8f5", + "upstream_head": "48e2e44d8785be8204d8c4b719850332f4f9abe0", + "upstream_path": "research/p104-joint-compensation/RESULT.json", + "upstream_git_blob": "0dd1377cc72f143b7f6df6080b3c0c227243db42" + }, + { + "path": "inputs/pr3978-PROOF.md", + "sha256": "d153927613353df6aeed4cffecc20c56f2ba5f3617d6b2eff576385b841a05a9", + "upstream_head": "48e2e44d8785be8204d8c4b719850332f4f9abe0", + "upstream_path": "research/p104-joint-compensation/PROOF.md", + "upstream_git_blob": "49a562177fc3f9cb54bd69fdc39bc1a428190b18" + } + ] +} diff --git a/research/p104-full-chart-joint/TASK.json b/research/p104-full-chart-joint/TASK.json new file mode 100644 index 0000000000..e8ec662ee9 --- /dev/null +++ b/research/p104-full-chart-joint/TASK.json @@ -0,0 +1,88 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "priority_revision": 6, + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "original_card": { + "id": "p104-side-correction", + "question": "Can the proposed P104 joint endpoint flags be realized by a chronological correction program with coefficients, dirty restoration and an affordable complete bill?", + "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", + "research/p104-joint-unit-flags/README.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 revision-6 family record and #2981 static joint flags, alongside the reviewed #1991 channel. #2981 is an author-checked source archive, not an independently validated executable correction or a refutation of program-level lifetime floors.", + "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": "After checking live handoffs, pin one named collection from #2981 and attach acquisition/delivery times, source dependencies and coefficient requirements. Test legal access and arbitrary dirty restoration; price any completion against the full channel/endpoint/hosting allowance. Stop with the exact missing implication or a scoped counterexample rather than expanding the static cover census.", + "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.", + "Repeating the 208-flag static matching or calling a static nested cover a chronological correction program. Independent audit of that certificate is distinct and remains useful." + ], + "overlap_terms": [ + "P104", + "I-G/2", + "side correction", + "native channel", + "1972", + "1991", + "2586", + "endpoint transport", + "physical dual", + "relay composition", + "2981", + "joint unit flags", + "acquisition delivery", + "static nesting" + ], + "existing_checks": [ + { + "scope": "PR #2981 reports static joint endpoint flags and a matching of 208 departure and arrival flags; archival intake is not independent verification.", + "evidence": "research/p104-joint-unit-flags/README.md", + "remaining": "Independent flag check and a chronological coefficient program with dirty restoration and a complete cost.", + "status": "author-checked", + "source_commit": "3d24b92d8ba057b57cb2d480170ec407520e6882", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Optimize PR3978 at its exact prepared physical cut by completing persistent Y once and restoring once around all three scalar layers.", + "scope_change_reason": "Explicit user-directed next round; changes the local implementation while preserving the predecessor operator, physical input tags and all-role endpoint.", + "bottleneck_link": "Tests a concrete boundary-conversion reduction with a matched complete operation invoice; rejects unchanged global expansion despite local savings.", + "budget_minutes": 60, + "stop_rule": "Retain the matched local improvement; stop dependent expansion when the full conditional native gate fails.", + "outcome": "partial", + "evidence": "PROOF.md; RESULT.json; verify.py; independent.py; test_controls.py", + "author": "Chris R / Clear1nsight, with OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex multi-agent research, authoring and checks; no human or proof-assistant review claimed.", + "open_questions": [ + { + "question": "Can an actual chronological producer absorb a boundary conversion while preserving original physical source tags and the favorable complete gate?", + "why_it_matters": "The local10816 native saving still leaves22464 excess in the unchanged scaffold.", + "first_step": "Bind one shared physical owner across the real adjacent call, including its actual entrance, terminal chart and arbitrary dirty contributions.", + "blocked_by": "Actual prepared producer, opposite orientation, interstage alignment, physical-cost and all-size admission remain unproved." + } + ] +} diff --git a/research/p104-full-chart-joint/VERIFY.json b/research/p104-full-chart-joint/VERIFY.json new file mode 100644 index 0000000000..55d706b463 --- /dev/null +++ b/research/p104-full-chart-joint/VERIFY.json @@ -0,0 +1,45 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "notes/copied-centers-complex.tex", + "research/p104-native-channel/NATIVE-RECIPES.json.gz", + "research/p104-native-channel/PROOF.md", + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "research/p104-native-channel/inputs/P104-FIXTURE.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Matched ordered physical operator, input tags,208donor columns,10816 actual rank1 recipes and complete invoice" + }, + { + "argv": [ + "{python}", + "-B", + "-O", + "{package}/independent.py" + ], + "timeout_seconds": 180, + "checks": "Independent Gaussian all-column and literal scalar/native checks with physical and phase controls" + }, + { + "argv": [ + "{python}", + "-B", + "-O", + "{package}/test_controls.py" + ], + "timeout_seconds": 180, + "checks": "Actual normal/optimized CLI baseline then receipt/source/predecessor failures" + } + ] +} diff --git a/research/p104-full-chart-joint/independent.py b/research/p104-full-chart-joint/independent.py new file mode 100644 index 0000000000..4078a8cde1 --- /dev/null +++ b/research/p104-full-chart-joint/independent.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python3 +"""Separate literal Gaussian-integer matrix replay; no producer imports.""" +import itertools +from fractions import Fraction as Q + +Z=(0,0);ONE=(1,0);I=(0,1) +def need(ok,msg): + if not ok:raise ValueError(msg) +def add(x,y):return x[0]+y[0],x[1]+y[1] +def mul(x,y):return x[0]*y[0]-x[1]*y[1],x[0]*y[1]+x[1]*y[0] +def neg(x):return -x[0],-x[1] +def zero(n):return [[Z for _ in range(n)] for _ in range(n)] +def eye(n): + a=zero(n) + for i in range(n):a[i][i]=ONE + return a +def mm(a,b): + n=len(a);out=zero(n) + for i in range(n): + for k in range(n): + if a[i][k]!=Z: + for j in range(n): + if b[k][j]!=Z:out[i][j]=add(out[i][j],mul(a[i][k],b[k][j])) + return out +def sub(a,b):return [[add(x,neg(y)) for x,y in zip(r,s)] for r,s in zip(a,b)] +def upper(a): + n=len(a);out=eye(2*n) + for i in range(n):out[i][n:]=a[i] + return out +def lower(a): + n=len(a);out=eye(2*n) + for i in range(n):out[n+i][:n]=a[i] + return out +def blockdiag(a,b): + n=len(a);out=zero(2*n) + for i in range(n):out[i][:n]=a[i];out[n+i][n:]=b[i] + return out + +def main(): + # Rational rank-one Gram with the SAME minimal polynomial A(A-13I)=0. + v=[1,2,2,2];n=16;A=zero(n);B=zero(n) + for i,j,k,l in itertools.product(range(4),repeat=4): + if j==l:A[4*i+j][4*k+l]=(v[i]*v[k],0) + if i==k:B[4*i+j][4*k+l]=(v[j]*v[l],0) + E=eye(n);T=zero(n);K=zero(n) + for j in range(n):T[j][j]=ONE if j%3==0 else I;K[j][j]=ONE if j%3==0 else neg(I) + need(mm(A,T)!=mm(T,A) and mm(B,T)!=mm(T,B),'varying physical charts') + M=mm(upper([[neg(x) for x in r] for r in B]),lower(A)) + J=zero(2*n) + for j in range(n):J[j][n+j]=(-1,0);J[n+j][j]=ONE + G=blockdiag(E,K);Gi=blockdiag(E,T) + raw=mm(G,M);target=mm(G,J) + factors=[upper(mm(sub(A,E),T)),lower(K),upper(mm(sub(B,E),T))] + correction=mm(mm(factors[0],factors[1]),factors[2]) + need(mm(correction,raw)==target,'old literal Gaussian columns') + scalar=mm(mm(upper(sub(A,E)),lower(E)),upper(sub(B,E))) + staged=mm(mm(blockdiag(E,K),scalar),blockdiag(E,T)) + need(staged==correction,'new full-chart path equals old3N on every column') + need(mm(staged,raw)==target,'same tagged physical input and endpoint') + need(mm(scalar,blockdiag(E,T))!=staged,'missing post-drop fault') + need(mm(blockdiag(E,K),scalar)!=staged,'missing pre-lift fault') + # Simulate donor rescaling explicitly: half, coefficient doubled ADD, restore. + def word_upper(state,q,restore=True): + out=[list(r) for r in state] + for j in range(n): + donor=n+j;out[donor]=[(Q(a,2),Q(b,2)) for a,b in out[donor]] + for i in range(n): + c=q[i][j];twice=(2*c[0],2*c[1]) + if c!=Z:out[i]=[add(x,mul(twice,y)) for x,y in zip(out[i],out[donor])] + if restore:out[donor]=[(2*a,2*b) for a,b in out[donor]] + return out + start=blockdiag(E,T) + run=word_upper(start,sub(B,E));run=mm(lower(E),run);run=word_upper(run,sub(A,E));run=mm(blockdiag(E,K),run) + need(run==staged,'literal donor restoration word') + bad=word_upper(start,sub(B,E),False);bad=mm(lower(E),bad);bad=word_upper(bad,sub(A,E));bad=mm(blockdiag(E,K),bad) + need(bad!=staged,'unrestored donor fault') + # Independent compensator by undoing raw shears then applying target. + inverse=mm(lower([[neg(x) for x in r] for r in A]),upper(B)) + need(correction==mm(mm(target,inverse),Gi),'independent inverse construction') + # Extended all-role operator fixes arbitrary dirty columns, no cleared helpers. + helpers=8;extended=eye(2*n+helpers) + for i in range(2*n):extended[i][:2*n]=correction[i] + need(all(extended[i][j]==(ONE if i==j else Z) for i in range(2*n,2*n+helpers) for j in range(2*n+helpers)),'dirty returns') + need(all(extended[i][j]==Z for i in range(2*n) for j in range(2*n,2*n+helpers)),'dirty isolation') + need(mm(factors[0],factors[2])!=correction,'missing middle fails') + wrong=upper(mm(T,sub(B,E))) + need(mm(mm(factors[0],factors[1]),wrong)!=correction,'wrong physical order fails') + need(mm(correction,M)!=target,'missing chart preparation fails') + # One/two arbitrary triangular layers have an identity diagonal block. + for x,y in itertools.product((upper(A),lower(A)),(upper(B),lower(B))): + q=mm(x,y) + tl=[r[:n] for r in q[:n]];br=[r[n:] for r in q[n:]] + need(tl==E or br==E,'two layer invariant') + # Literal C_u recipes on all eight addresses for all seven nonzero3-bit u. + def perm(mapping): + out=zero(8) + for j,k in enumerate(mapping):out[k][j]=ONE + return out + def cu(u,inverse=False): + out=zero(8);a=(Q(1,2),Q(-1 if inverse else 1,2));b=(Q(1,2),Q(1 if inverse else -1,2)) + for j in range(8):out[j][j]=a;out[j^u][j]=b + return out + for u in range(1,8): + p=(u&-u).bit_length()-1;e=1<

=r/81, so this favorable native bound also fails every +such moment. No runtime total or all-size supplier is claimed. + +More generally, for a legitimately changed local profile with mass M_loc and +persistent progress cap P_loc, put d=M_loc-P_loc. Under the same global +endpoint/initial-credit hypotheses its necessary zero-parameter gate is +C_joint < N-208d. A hypothetical d=0 profile would allow less than 10816 repair +units, while this explicit 3N route still fails by 21632. No such profile or +prepared producer is established here. A different completed local endpoint +must rebind its progress and physical preparation, not inherit P_loc=2312. + +If a genuinely changed bare implementation saves s rank units per call with +the SAME persistent progress and ownership assumptions, specialization gives +C_joint < 208s-832 before any further costs. For s=7 this +requires C_joint<624; the present route does not meet it. This is a diagnostic +for changed proposals, not evidence that such a saving or producer exists. +Stop dependent native construction for the present contract. The useful next +step is a producer/repair fusion that changes that actual bill and supplies the +missing physical chronological cut, rather than applying the spectral rank as +a native tariff or treating the three-layer word as inexpensive by default. diff --git a/research/p104-full-chart-joint/inputs/pr3978-RESULT.json b/research/p104-full-chart-joint/inputs/pr3978-RESULT.json new file mode 100644 index 0000000000..0dd1377cc7 --- /dev/null +++ b/research/p104-full-chart-joint/inputs/pr3978-RESULT.json @@ -0,0 +1,63 @@ +{ + "schema_version": 1, + "status": "scoped_conditional_rejection", + "n": 104, + "N": 10816, + "m": 81, + "W": 36608, + "gram_rank": 8, + "gram_eigenvalues": [ + 0, + 13 + ], + "sectors": [ + { + "a": 0, + "b": 0, + "multiplicity": 9216, + "det_C_minus_I": 2 + }, + { + "a": 0, + "b": 13, + "multiplicity": 768, + "det_C_minus_I": -11 + }, + { + "a": 13, + "b": 0, + "multiplicity": 768, + "det_C_minus_I": -11 + }, + { + "a": 13, + "b": 13, + "multiplicity": 64, + "det_C_minus_I": -24 + } + ], + "rank_C_minus_I": 21632, + "minimum_fixed_owner_shear_layers": 3, + "native_channel_mass": 2368, + "persistent_progress_cap": 2312, + "joint_route": { + "positive_rank_one_copy_transforms": 32448, + "unit_array_adds": 1049152, + "private_donor_halves": 21632, + "private_initializations": 32448, + "private_copies": 32448, + "private_erasures": 32448, + "peak_additional_private_arrays": 1, + "persistent_helper_changes": 0 + }, + "gate": { + "remaining_progress_lower_mass": 2473536, + "capacity": 2965248, + "bare_lower_mass": 2966080, + "free_joint_repair_excess": 832, + "constructed_joint_lower_mass": 2998528, + "constructed_joint_excess": 33280 + }, + "frontier_changed": false, + "native_complete_caller_constructed": false +} diff --git a/research/p104-full-chart-joint/test_controls.py b/research/p104-full-chart-joint/test_controls.py new file mode 100644 index 0000000000..207415428a --- /dev/null +++ b/research/p104-full-chart-joint/test_controls.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +"""Actual CLI baseline-before-fault controls, including read-only export copies.""" +from pathlib import Path +import json,shutil,subprocess,sys,tempfile +HERE=Path(__file__).resolve().parent;ROOT=HERE.parents[1] +def need(ok,msg): + if not ok:raise ValueError(msg) +def main(): + faults=('false_saving','float','boolean','duplicate','source_changed','source_missing','predecessor_changed') + total=0 + for fault in faults: + with tempfile.TemporaryDirectory(prefix='full-chart-control-') as td: + root=Path(td);p=root/'research/p104-full-chart-joint' + shutil.copytree(HERE,p,ignore=shutil.ignore_patterns('__pycache__','*.pyc')) + for x in root.rglob('*'):x.chmod(0o755 if x.is_dir() else 0o644) + for name in json.loads((HERE/'VERIFY.json').read_text())['inputs']: + dst=root/name;dst.parent.mkdir(parents=True,exist_ok=True);shutil.copyfile(ROOT/name,dst) + def run(opt): + return subprocess.run([sys.executable,'-I','-B',*opt,'-X','pycache_prefix='+str(root/'cache'),str(p/'verify.py')],cwd=root,capture_output=True,text=True,timeout=40) + for opt in ([],['-O']): + good=run(opt);need(good.returncode==0,'positive fixture '+fault+good.stderr[-300:]);total+=1 + receipt=p/'RESULT.json';x=json.loads(receipt.read_text()) + if fault=='false_saving':x['native_rank_saved']+=1;receipt.write_text(json.dumps(x)) + if fault=='float':x['new_route']['positive_rank_one_transforms']=21632.0;receipt.write_text(json.dumps(x)) + if fault=='boolean':x['new_route']['private_copies']=False;receipt.write_text(json.dumps(x)) + if fault=='duplicate':receipt.write_text(receipt.read_text().replace('{','{"schema_version":1,',1)) + source=root/'research/p104-native-channel/NATIVE-RECIPES.json.gz' + if fault=='source_changed':source.write_bytes(source.read_bytes()+b' ') + if fault=='source_missing':source.unlink() + if fault=='predecessor_changed': + q=p/'inputs/pr3978-RESULT.json';q.write_bytes(q.read_bytes()+b' ') + for opt in ([],['-O']): + bad=run(opt);need(bad.returncode!=0,'fault accepted '+fault);need('PASS full-chart' not in bad.stdout,'false pass '+fault);total+=1 + print('PASS controls: '+str(total)+' actual CLI runs, seven faults after positive baselines, normal and optimized') +if __name__=='__main__':main() diff --git a/research/p104-full-chart-joint/verify.py b/research/p104-full-chart-joint/verify.py new file mode 100644 index 0000000000..a81771542f --- /dev/null +++ b/research/p104-full-chart-joint/verify.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python3 +"""Matched full-chart joint compensation. Apache-2.0; polynomial helpers adapted from PR3978.""" +import argparse +from collections import Counter +import gzip,hashlib,itertools,json +from pathlib import Path +HERE=Path(__file__).resolve().parent;ROOT=HERE.parents[1] +def need(ok,msg): + if not ok:raise ValueError(msg) +def read(path): + def unique(items): + d={} + for k,v in items: + need(k not in d,'duplicate JSON key');d[k]=v + return d + return json.loads(path.read_text(),object_pairs_hook=unique) +def canon(x):return json.dumps(x,sort_keys=True,separators=(',',':'))+'\n' +def authenticate(): + pins=read(HERE/'SOURCES.json') + for r in pins['files']: + if r['usage']!='input':continue + p=ROOT/r['path'];need(not p.is_symlink(),'source symlink');b=p.read_bytes() + need(hashlib.sha256(b).hexdigest()==r['sha256'],'source hash '+r['path']) + need(hashlib.sha1(b'blob '+str(len(b)).encode()+b'\0'+b).hexdigest()==r['git_blob'],'source blob') + for r in pins['source_exports']: + b=(HERE/r['path']).read_bytes();need(hashlib.sha256(b).hexdigest()==r['sha256'],'predecessor export hash') + need(hashlib.sha1(b'blob '+str(len(b)).encode()+b'\0'+b).hexdigest()==r['upstream_git_blob'],'predecessor blob') +# Free associative algebra in A,B,T,K, with only TK=KT=1. +# A and B are deliberately NOT commuted in these identities. +def poly(letter=None): return {(() if letter is None else (letter,)):1} +def plus(*args): + out=Counter() + for p in args: + for w,c in p.items():out[w]+=c + return {w:c for w,c in out.items() if c} +def neg(p):return {w:-c for w,c in p.items()} +def times(p,q): + out=Counter() + for w,c in p.items(): + for v,d in q.items(): + stack=[] + for z in w+v: + if stack and (stack[-1],z) in [('T','K'),('K','T')]:stack.pop() + else:stack.append(z) + out[tuple(stack)]+=c*d + return {w:c for w,c in out.items() if c} +def mm(a,b):return [[plus(*(times(a[i][k],b[k][j]) for k in range(2))) for j in range(2)] for i in range(2)] +def upper(x):return [[poly(),x],[{},poly()]] +def lower(x):return [[poly(),{}],[x,poly()]] + +def algebra(): + I,A,B,T,K=[poly(x) for x in (None,'A','B','T','K')] + C=[[A,plus(times(A,B),neg(I))],[I,B]] + DT=[[I,{}],[{},T]];DK=[[I,{}],[{},K]] + scalar=mm(mm(upper(plus(A,neg(I))),lower(I)),upper(plus(B,neg(I)))) + need(scalar==C,'three common-chart scalar layers') + new=mm(mm(DK,scalar),DT) + old=mm(mm(upper(times(plus(A,neg(I)),T)),lower(K)),upper(times(plus(B,neg(I)),T))) + need(new==old,'same ordered prepared-cut operator') + M=mm(upper(neg(B)),lower(A));J=[[{},neg(I)],[I,{}]] + G=[[I,{}],[{},K]];entrance=[[K,{}],[{},I]] + need(mm(mm(mm(new,G),M),entrance)==mm(mm(G,J),entrance),'same physical input tags and target') + need(mm(scalar,DT)!=new,'missing final inverse rejected') + need(mm(DK,scalar)!=new,'missing entrance lift rejected') + need(mm(mm(DT,scalar),DK)!=new,'swapped boundary transforms rejected') + +def geometry(): + roots=set() + for i,j in itertools.combinations(range(8),2): + for s in (-1,1): + r=[0]*8;r[i]=2;r[j]=2*s;roots.add(tuple(r)) + for s in itertools.product((-1,1),repeat=7): + if s.count(-1)%2==0:roots.add((1,)+s) + f=read(ROOT/'research/p104-native-channel/inputs/P104-FIXTURE.json')['section4_explicit_P104'] + ports=sorted(roots-{tuple(r) for r in f['F0']+f['C']});need(len(ports)==104,'P104 ports') + a2=[[sum(x*y for x,y in zip(r,s))//4 for s in ports] for r in ports] + need(all(a2[i][i]==2 for i in range(104)),'unit Gram diagonal') + off=[(i,j,a2[i][j]) for i in range(104) for j in range(104) if i!=j and a2[i][j]] + need(len(off)==4992 and all(c in (-1,1) for i,j,c in off),'signed half support') + # Actual in-place half/add/restore word, all208 local input columns. + rows=[[2*(i==j) for j in range(208)] for i in range(208)] + counts=Counter() + for j in range(104): + donor=104+j;need(all(v%2==0 for v in rows[donor]),'exact donor half') + rows[donor]=[v//2 for v in rows[donor]];counts['half']+=1 + for i in range(104): + c=a2[i][j] if i!=j else 0 + if c:rows[i]=[x+c*y for x,y in zip(rows[i],rows[donor])];counts['add']+=1 + rows[donor]=[2*v for v in rows[donor]];counts['double']+=1 + expected=[[2*(i==j) if j<104 else a2[i][j-104]-2*(i==j-104) for j in range(208)] for i in range(104)] + need(rows[:104]==expected,'all upper-layer source columns') + need(rows[104:]==[[2*(104+i==j) for j in range(208)] for i in range(104)],'all donor columns restored') + return counts + +def native_boundaries(): + cert=json.loads(gzip.decompress((ROOT/'research/p104-native-channel/NATIVE-RECIPES.json.gz').read_bytes())) + entries={r['register']:r for r in cert['endpoint_adapters'] if r['position']=='entry'} + labels=[entries['X'+str(i)]['normal'] for i in range(104)] + need(len(set(labels))==104 and all(0>i)&1)*b<<(9*i) for i in range(9)) for a in labels for b in labels] + need(len(set(lines))==10816 and all(u.bit_count()%2 for u in lines),'distinct norm-one product lines') + count=0 + for u in lines: + pivot=(u&-u).bit_length()-1;e=1<>pivot)&1 else 0) + need(P(e)==u,'basis image') + for j in range(81): + x=1<21632; private0; gap22464') +if __name__=='__main__':main()