diff --git a/research/t74-low-alias-width-cap/.gitattributes b/research/t74-low-alias-width-cap/.gitattributes new file mode 100644 index 0000000000..55585fe7cb --- /dev/null +++ b/research/t74-low-alias-width-cap/.gitattributes @@ -0,0 +1,3 @@ +# Preserve immutable predecessor bytes, including their original CRLFs. +inputs/pr2269-profile.json -text +vendor/fine_moment.py -text diff --git a/research/t74-low-alias-width-cap/DUAL.json b/research/t74-low-alias-width-cap/DUAL.json new file mode 100644 index 0000000000..78c68d193c --- /dev/null +++ b/research/t74-low-alias-width-cap/DUAL.json @@ -0,0 +1,31 @@ +{ + "threshold": "1687/1000000", + "widths": [ + 4, + 5, + 7, + 8, + 9 + ], + "bin_ranks": [ + 8, + 16, + 32, + 48 + ], + "width_dual": [ + "-228236103/25000000", + "-1343546827/100000000", + "-41110861/2500000", + "-92751877/10000000", + "-2106031/1000000" + ], + "bin_dual": [ + "927517769/100000000", + "927518269/50000000", + "15802841/800000", + "2013151321/100000000" + ], + "nomination": "SciPy 1.18.1 HiGHS LP; rational values independently checked without an optimizer", + "scope": "The nine dual coefficients, not a claimed solver optimum, certify a lower bound for every fractional or integral bin-pattern fill." +} diff --git a/research/t74-low-alias-width-cap/EXPECTED.json b/research/t74-low-alias-width-cap/EXPECTED.json new file mode 100644 index 0000000000..87c9fafb32 --- /dev/null +++ b/research/t74-low-alias-width-cap/EXPECTED.json @@ -0,0 +1,121 @@ +{ + "base_local_profile": { + "1": 2303, + "2": 527, + "3": 386, + "4": 125, + "5": 37, + "8": 8 + }, + "bin_stock": { + "8": 49728, + "16": 33152, + "32": 33152, + "48": 33152 + }, + "certificate": { + "idle_excess_lower": "13046275623523/12500000", + "idle_rank_mass": 1310688, + "minimum_dual_slack": "2982005137012993616995276977512984337111102433539022540949786277131937317759423/298067099828113436400702288375330353620096533402916918235114966158064956211200000000", + "moment_lower": "361143563212572845663320428160260725376432459922360795930034746234224238825915053571942181/361143540040701756966826009151852544635137708521376515040056307544211482214400000000000000", + "moment_margin": "23171871088696494419008408180741294751400984280889978438690012756611515053571942181/361143540040701756966826009151852544635137708521376515040056307544211482214400000000000000", + "pattern_count": 1163, + "threshold": "1687/1000000", + "total_rank_mass": 4816512 + }, + "controls": [ + { + "control": "undercharged invoice", + "rejection": "reported local profile" + }, + { + "control": "missing width-9 helper", + "rejection": "reported widths" + }, + { + "control": "nonmonotone gate", + "rejection": "nonmonotone or absent role" + }, + { + "control": "incorrect warp image", + "rejection": "warp image" + }, + { + "control": "duplicate call", + "rejection": "call permutation" + }, + { + "control": "altered bin inventory", + "rejection": "bin inventory" + }, + { + "control": "overstated dual", + "rejection": "infeasible dual: capacity 8, counts (0, 0, 0, 1, 0)" + }, + { + "control": "unsupported stronger cap", + "rejection": "infeasible dual: capacity 16, counts (0, 0, 0, 0, 1)" + } + ], + "dual_sha256": "b7fa099301a15fc063bab2250c6df6fc7d013cfabefabd47d3952544738559b5", + "extra_local_profile": { + "1": 2287, + "2": 535, + "3": 386, + "4": 125, + "5": 37, + "8": 8 + }, + "helper_widths": { + "4": 4, + "5": 4, + "7": 36, + "8": 84, + "9": 272 + }, + "parent_moment_upper": "115788991414551557320708956685517179801733884676017139230412352184045355420363/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "schema": 1, + "scope": "Fixed PR2339 words, 666 calls, unsplit helpers, unchanged PR2269 bin stock; arbitrary fractional patterns and free chronology.", + "sources": { + "repository": "CrocSwap/integer-mult-bounds", + "schema": 1, + "sources": [ + { + "commit": "bf1742aee4d855efb8bbd44a8419eddb33a679e5", + "encoding": "identity", + "path": "inputs/word80-base.json.gz", + "sha256": "61290abffd8c8225e0abb3958c1506674e256de688fc4cdf358bbe7c981df493", + "upstream_path": "research/t74-low-alias-borrowing/words/BORROW-WORD-80base.json.gz" + }, + { + "commit": "bf1742aee4d855efb8bbd44a8419eddb33a679e5", + "encoding": "identity", + "path": "inputs/word80-extra.json.gz", + "sha256": "1dd2d6f2ae5b5a27b5f89fb830203f0cca7a78d0323a7845e85e1e80f8f6d1a5", + "upstream_path": "research/t74-low-alias-borrowing/words/BORROW-WORD-80extra.json.gz" + }, + { + "commit": "b479fc5567bc09ab9185bffe89b62594f36d74e5", + "encoding": "gzip", + "path": "inputs/pr2269-plan.json.gz", + "sha256": "5acf889dcd38741677635372fa32313f3e27ecc03aa480125c3ce70027c6b763", + "uncompressed_sha256": "bf1abd33c8ba946371cae37e021747343ef6603a31297bcc962197cc23f535e2", + "upstream_path": "research/gmx-t74-borrow43/new/PLAN.json" + }, + { + "commit": "b479fc5567bc09ab9185bffe89b62594f36d74e5", + "encoding": "identity", + "path": "inputs/pr2269-profile.json", + "sha256": "50fcc0960a47f6d35064d3b55ea6dcb4cebbd305aec215c8034f626718595538", + "upstream_path": "research/gmx-t74-borrow43/new/PROFILE.json" + }, + { + "commit": "002304ef01c4416a127916169ae6d94c1bee052b", + "encoding": "identity", + "path": "vendor/fine_moment.py", + "sha256": "bdfc492be6a663b219d76beff444db14bd67bb53c7c8ec4086ab0f56e48323c0", + "upstream_path": "research/t74-joint-owner-hillclimb/vendor/fine_moment.py" + } + ] + } +} diff --git a/research/t74-low-alias-width-cap/INPUTS.json b/research/t74-low-alias-width-cap/INPUTS.json new file mode 100644 index 0000000000..4fb737e557 --- /dev/null +++ b/research/t74-low-alias-width-cap/INPUTS.json @@ -0,0 +1,42 @@ +{ + "schema": 1, + "repository": "CrocSwap/integer-mult-bounds", + "sources": [ + { + "path": "inputs/word80-base.json.gz", + "upstream_path": "research/t74-low-alias-borrowing/words/BORROW-WORD-80base.json.gz", + "commit": "bf1742aee4d855efb8bbd44a8419eddb33a679e5", + "sha256": "61290abffd8c8225e0abb3958c1506674e256de688fc4cdf358bbe7c981df493", + "encoding": "identity" + }, + { + "path": "inputs/word80-extra.json.gz", + "upstream_path": "research/t74-low-alias-borrowing/words/BORROW-WORD-80extra.json.gz", + "commit": "bf1742aee4d855efb8bbd44a8419eddb33a679e5", + "sha256": "1dd2d6f2ae5b5a27b5f89fb830203f0cca7a78d0323a7845e85e1e80f8f6d1a5", + "encoding": "identity" + }, + { + "path": "inputs/pr2269-plan.json.gz", + "upstream_path": "research/gmx-t74-borrow43/new/PLAN.json", + "commit": "b479fc5567bc09ab9185bffe89b62594f36d74e5", + "sha256": "5acf889dcd38741677635372fa32313f3e27ecc03aa480125c3ce70027c6b763", + "uncompressed_sha256": "bf1abd33c8ba946371cae37e021747343ef6603a31297bcc962197cc23f535e2", + "encoding": "gzip" + }, + { + "path": "inputs/pr2269-profile.json", + "upstream_path": "research/gmx-t74-borrow43/new/PROFILE.json", + "commit": "b479fc5567bc09ab9185bffe89b62594f36d74e5", + "sha256": "50fcc0960a47f6d35064d3b55ea6dcb4cebbd305aec215c8034f626718595538", + "encoding": "identity" + }, + { + "path": "vendor/fine_moment.py", + "upstream_path": "research/t74-joint-owner-hillclimb/vendor/fine_moment.py", + "commit": "002304ef01c4416a127916169ae6d94c1bee052b", + "sha256": "bdfc492be6a663b219d76beff444db14bd67bb53c7c8ec4086ab0f56e48323c0", + "encoding": "identity" + } + ] +} diff --git a/research/t74-low-alias-width-cap/NOTICE.md b/research/t74-low-alias-width-cap/NOTICE.md new file mode 100644 index 0000000000..4d40fbc449 --- /dev/null +++ b/research/t74-low-alias-width-cap/NOTICE.md @@ -0,0 +1,28 @@ +# Source notice + +New work: Jeremy Diviney, with substantial OpenAI Codex assistance, Apache-2.0. + +All bundled sources come from CrocSwap/integer-mult-bounds under the repository's +Apache-2.0 contribution terms. Exact commits, upstream paths and byte hashes +are in INPUTS.json. + +- inputs/word80-{base,extra}.json.gz: unchanged PR2339 words by Sagar Thakrar, + with Claude Code assistance; borrowing and compensation by Cinna Davis + (PR2226), T74 adaptation by Jeremy Kothe (PR2269), and their credited lineage. +- inputs/pr2269-plan.json.gz: compressed copy of Jeremy Kothe's PR2269 plan; + the original uncompressed bytes are preserved exactly. +- inputs/pr2269-profile.json: unchanged PR2269 attained profile. +- vendor/fine_moment.py: unchanged PR2322 directed integer moment engine, + submitted by Vlado Vojdanovski; base-two directed-enclosure lineage retained + in that package and the repository. Runtime precision constants are set by + this package's verifier, which retains the same series and tail formulas. + +verify.py's cost-invoice traversal follows PR2322 generate_words.py:paid_profile, +reimplemented with explicit GF(2)^9 subspace sets. The bin-pattern weak-duality +argument is standard linear programming; no novelty is claimed for that method. +The contribution is its exact, source-bound application to this fixed interface. + +The original repository notice and PR2322 generator lineage notice are retained +verbatim at vendor/UPSTREAM-NOTICE and vendor/GENERATOR-NOTICE.txt. These are +source attribution, not claims that all of those packages are replayed here. +Apache-2.0 is included at vendor/LICENSE for standalone source exports. diff --git a/research/t74-low-alias-width-cap/README.md b/research/t74-low-alias-width-cap/README.md new file mode 100644 index 0000000000..59d36ad132 --- /dev/null +++ b/research/t74-low-alias-width-cap/README.md @@ -0,0 +1,205 @@ +# Whole-helper packing cap for PR2339 on the T74 bin stock + +**Scoped negative result; no new κ.** For either pinned 400-helper word of +[PR2339](https://github.com/CrocSwap/integer-mult-bounds/pull/2339), or any mixture +of them across the 666 T74 calls, the primitive exponent satisfies +**b < 0.0016870** if helpers remain unsplit and the PR2269 bin inventory is +unchanged. This is below PR2269's attained primitive endpoint and the conditional +κ = 0.001697065994108880 claimed in +[PR2349](https://github.com/CrocSwap/integer-mult-bounds/pull/2349) +(head `bb2486ec93c099afe9acd93442f13864b566296a`, observed 2026-10-15 UTC). +These open-PR claims are not the maintainer-selected frontier. + +The cap permits **arbitrary fractional combinations of legal integer bin +patterns**, with no chronology, owner-family or physical-port coupling +restrictions. It therefore excludes every integral owner assignment in this +fixed model, including a different call order with the same bin inventory. +The certificate does not need an optimal LP solution or an attainable packing. + +PR2339 correctly labels its favorable rank-48 cap (about 0.001747958372) and +calibrated prices as bounds/models, not a κ claim. That cap forgets whole helper +widths and actual bin counts. This package supplies a tighter cost check for +its unchanged T74 parent. It does not refute PR2339's local circuit or its +more permissive cap. + +## Literal cost interface + +`verify.py` independently recounts the frame invoice using explicit subsets of +GF(2)^9. It checks monotone climbs, private cut-copy descents, invertible handoff +maps and terminal climbs. Its implementation follows the accounting rule of +PR2322's `paid_profile`, using a different subspace representation. It does not +prove the scalar payload, cleanup semantics or phases. + +The resulting profiles and widths are: + +| Input | Rank/count inventory | Rank mass per call | +|---|---|---:| +| extra local calls | 1:2287, 2:535, 3:386, 4:125, 5:37, 8:8 | 5264 | +| base local calls | 1:2303, 2:527, 3:386, 4:125, 5:37, 8:8 | 5264 | +| helpers, either word | 4:4, 5:4, 7:36, 8:84, 9:272 | 3408 | + +For 0 < b < 1, let p = 1-b and c_r = (r/73)^p, with c_0 = 0. +The base word costs 16c_1 - 8c_2 = 8c_1(2-2^p) > 0 more than extra. +Using extra for all 666 calls is thus a favorable lower envelope for any mixture. +Both words have exactly the same helper widths and mass. + +The pinned PR2269 plan contains 74 replicas, 18 windows per replica and 112 +ports per window. Recounting the window ranks gives: + +| Bin capacity R | Number B_R | +|---|---:| +| 8 | 49728 | +| 16 | 33152 | +| 32 | 33152 | +| 48 | 33152 | + +There are 3,580,416 bin rank units. The 666 copies of the helper inventory +consume 2,269,728, leaving 1,310,688 idle units. Adding the local rank mass gives +4,816,512 = 73 × 66,304 - 23,680. W = 66,304 is the parent live dimension. +Window contents are pinned and checked for basic structural consistency; +rederiving the parent from its scalar schedule is outside this scoped proof. + +## Exact dual proof + +Fix b = 1687/1000000. For 0 ≤ r ≤ 48 define + + f_b(r) = (73 c_r - r)/b, + f_b(0) = 0. + +For capacity R, an integer pattern is a nonnegative vector n indexed by +s ∈ {4,5,7,8,9}, with Σ_s s n_s ≤ R. Its idle remainder is +r = R - Σ_s s n_s. The verifier enumerates all **1,163** patterns, including +empty bins, and checks the rational coefficients y_s, z_R in `DUAL.json` satisfy + + z_R + Σ_s n_s y_s ≤ f_b(r). + +Every comparison uses a directed rational **lower** enclosure of f_b(r). +Multiplying these inequalities by any nonnegative fractional pattern counts +and summing gives + + Σ_idle f_b(r) ≥ D = Σ_s (666 N_s)y_s + Σ_R B_R z_R, + +provided the helper and bin count equalities hold. This is weak duality; neither +numerical optimizer correctness nor optimality is an assumption. Fractional +pattern counts relax integrality of the number of bins of each type, while +helpers remain whole within each pattern. + +Consequently the native recurrence moment obeys + + M(b) ≥ [666 Σ_r local_count_r c_r + + (1,310,688 + bD)/73] / 66,304. + +The exact lower endpoint is stored in `EXPECTED.json`. It exceeds 1 by +approximately **6.41624964026 × 10^-8**. Every positive child has rank below 73, +so each term (r/73)^(1-b) increases with b. Thus M(b) > 1 for every +b ≥ 0.0016870 in the recurrence's range: the admissible endpoint is strictly +below the stated cap. Additional costs cannot repair this failure. + +The directed engine is the unchanged `fine_moment.py` from PR2322. This verifier +sets its grid to 2^-256, with 100 logarithm terms and 96 exponential terms. +The finite series retain their explicit outward tail bounds. These constants +are ample for this coarse separation; no decimal arithmetic is used in the +proof. Floats appear only in the printed diagnostic margin. + +As a non-vacuous positive control, the pinned *attained* PR2269 global profile +has an exact upper moment below 1 at the same b. Eight mutations reject an +undercharged local invoice, a missing width-9 helper, a nonmonotone gate, a bad +warp image, duplicate calls, altered bin stock, an overstated dual and an +unsupported stronger cap. Checks remain active under `python -O`. + +## Reproduce + +No network, optimizer or third-party Python package is required: + +```sh +python3 -I -O -B research/t74-low-alias-width-cap/verify.py +python3 -I -B research/t74-low-alias-width-cap/check_export.py +``` + +Expected: `PASS_T74_LOW_ALIAS_WIDTH_CAP 1687/1000000 patterns 1163 ... rejecting_controls 8` +and `PASS_T74_WIDTH_CAP_EXPORT controls 4`. + +The package also registers its commands for the repository replay hook: + +```sh +python3 scripts/research_package.py --package research/t74-low-alias-width-cap --check-only +python3.12 scripts/research_package.py --package research/t74-low-alias-width-cap +``` + +`--record NEW_PATH` regenerates the exact receipt and refuses overwrite. Normal +verification compares every field to `EXPECTED.json` and writes nothing. +`check_export.py` verifies a standalone, read-only source copy outside Git, and +rejects a changed input, a changed expected result and receipt overwrite. The +registered metadata check needs Git history for `SOURCES.json` provenance; +the mathematical verifier and export check do not. + +`INPUTS.json` pins every bundled predecessor input by commit, upstream path +and SHA-256. The PR2269 plan is stored as deterministic gzip to reduce size; +its original uncompressed digest is checked too. Package-local `.gitattributes` +preserves CRLF bytes in the two immutable text inputs. `SOURCES.json` records the +historical selected record and task catalogue, not a claim of selection. +SciPy 1.18.1 / HiGHS was used to nominate nine dual coefficients during search. +The submitted certificate independently validates the nominated rationals. + +## Scope and limits + +This result fixes the two literal PR2339 words, their full helper lifetimes, +666 calls, m = 73, W = 66,304 and the tabulated bin stock. Splitting helpers, +changing their initial/final contract, changing local kernels, mixing other +providers or changing the parent capacity inventory is outside the claim. +No full multiplication theorem, new κ, native supplier admission or global +stock/precision contract is established here. The cap concerns the primitive +recurrence b; applying it to an outer κ requires that outer construction's +inherited b-to-κ relationship. + +## Open next questions + +1. **Can an anticipatory alias keep its lender narrow?** The 32 low aliases + reduce helper count, but increase the number of width-9 lifetimes. Seek a + local factorization with the same compensation identity and a smaller exit + width. First derive a candidate's invoice and apply this pattern bound before + attempting a full native build. The unresolved part is a realizable changed + local contract. +2. **Can a different parent stock fit the wide helpers cheaply?** Search legal + stage/controller changes that redistribute capacities while charging their + changed coverage and local costs. Recompute the pattern certificate for each + stock before scheduling. A hypothetical inventory alone is not a parent + construction. +3. **Which partial low-alias subsets can clear the packing gate?** Optimize + subset choice together with width-pattern costs, rather than helper count. + This certificate does not exclude partial subsets. First enumerate exact + per-alias profile/width changes and solve a relaxation, then verify promising + combined words and their physical owners. Interactions between aliases and + overlapping lender lifetimes remain the main constraint. + +Structured scope, stopping criteria and these questions are in `TASK.json`. + +## Attribution + +Jeremy Diviney, with substantial OpenAI Codex assistance: independent cost +recount, scoped dual bound, exact certificate and controls. The inputs and +method lineage remain credited to their authors: + +- Sagar Thakrar / `thakrarsagar`, PR2339: the two 400-helper words and their + favorable model prices, with Claude Code assistance. +- Cinna Davis / `1337isnot1337`, PR2226: anticipatory dirty borrowing and the + low-alias compensation mechanism, with OpenAI Codex assistance. +- Jeremy Kothe / `jeremykothe2`, PR2269: the T74 parent plan and attained profile, + following the supplier lineage documented there; PR2312 and PR2349 are later + improvements, not inputs to this proof. +- Vlado Vojdanovski, PR2322: the literal frame-invoice accounting + implementation used as a reference and the bundled directed moment engine. + Its numerical-engine lineage includes Douglas Colkitt's exact moment checks + and the subsequent base-two/fixed-grid contributors credited by PR2322. + +Ali Romman's [PR1129](https://github.com/CrocSwap/integer-mult-bounds/pull/1129) +and the incorporated [R480 pattern-dual audit](../selected-t16-pattern-dual/README.md) +previously apply this same 1,163-pattern relaxation to a different fixed helper +inventory. The present result applies the established method to PR2339's changed +widths; neither the relaxation nor weak duality is claimed as new. + +The concurrent [PR2359](https://github.com/CrocSwap/integer-mult-bounds/pull/2359) +independently audits PR2322's four-role raw ledger using explicit span sets. +It studies different words and does not address the PR2339 packing cap here. + +New contributions are Apache-2.0. See `NOTICE.md` for bundled source provenance. diff --git a/research/t74-low-alias-width-cap/SOURCES.json b/research/t74-low-alias-width-cap/SOURCES.json new file mode 100644 index 0000000000..392737aa2a --- /dev/null +++ b/research/t74-low-alias-width-cap/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "e8870e5917057d59b730eb14721a778639eca050", + "sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7" + } + ] +} diff --git a/research/t74-low-alias-width-cap/TASK.json b/research/t74-low-alias-width-cap/TASK.json new file mode 100644 index 0000000000..153c99fa66 --- /dev/null +++ b/research/t74-low-alias-width-cap/TASK.json @@ -0,0 +1,112 @@ +{ + "schema_version": 1, + "task_id": "complex-new-helper-inventory", + "priority_revision": 4, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "original_card": { + "id": "complex-new-helper-inventory", + "question": "Can a new local cost interface change the deficit-to-recursive-cost ratio beyond current packing?", + "starting_points": [ + "research/complex-local-word-ceiling/README.md", + "research/heterogeneous-owner-assembly/README.md", + "certificates/selected-result.json", + "research/selected-k8-unrestricted-ends/README.md" + ], + "methods": [ + "Propose a changed helper inventory and derive an optimistic exact moment.", + "Design a small completed instance and independently verify its endpoint and rank bill." + ], + "acceptance_gate": "A new physically realizable contract outside the frozen catalogue whose per-call profile, screened with ceiling.ceiling(), beats the selected word's packing ceiling; a lower cap does not establish identical circuitry or order attainable optima, and is insufficient to pass the stronger-budget target under this model.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin.", + "bottleneck_link": "Packing of the selected word is capped at +0.87% (ceiling model); only a lower local excess spend or a changed coverage law raises the cap.", + "allowed_variations": [ + "Narrow to one changed boundary or helper type with explicit counts.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Mixing only providers already inside the pinned catalogue.", + "Only changing helper terminal subspaces and monotone frames within the fixed scalar word, entrances and cleanup contract already covered by #1995/#2013." + ], + "overlap_terms": [ + "helper inventory", + "heterogeneous-owner", + "mutable leaver" + ] + }, + "scope_status": "refined", + "actual_scope": "Exact whole-helper pattern cap for the two fixed PR2339 low-alias words on the unchanged PR2269 T74 bin inventory.", + "scope_change_reason": "The changed helper inventory passed the permissive rank-48 screen but lost after whole widths and actual bin counts were included. Refine the contribution to a source-bound negative result and reusable cost gate, not the card's stronger construction acceptance gate.", + "bottleneck_link": "Removing low helpers widens surviving lenders; the resulting integer-width packing loss overwhelms the local rank savings on this parent stock.", + "budget_minutes": 60, + "stop_rule": "Stop this fixed-word/stock route once a rational pattern dual proves a cap below the attained parent. Do not spend a full global cold replay on a candidate that fails this favorable gate.", + "outcome": "negative-result", + "evidence": "EXPECTED.json: all 1163 dual inequalities checked by directed exact arithmetic; b < 0.0016870; eight rejecting controls and attained-parent positive control. Source-only export checks pass.", + "author": "Jeremy Diviney, with OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance with research, implementation, proof text, exact verification and packaging. SciPy 1.18.1 HiGHS used only to nominate rational duals; verification uses Python standard-library exact arithmetic.", + "open_questions": [ + { + "question": "Can an anticipatory alias keep its lender narrow?", + "why_it_matters": "The wide lender inventory causes the packing loss.", + "first_step": "Derive a changed local invoice and screen the width-pattern relaxation before native synthesis.", + "blocked_by": "A realizable compensation and exit contract with narrower retained lenders." + }, + { + "question": "Can a different parent bin inventory fit the wide helpers cheaply?", + "why_it_matters": "The certificate fixes the PR2269 inventory.", + "first_step": "Derive legal controller changes and their charged stock, then recertify the relaxed cost.", + "blocked_by": "A valid coverage and cost derivation for the changed parent." + }, + { + "question": "Can a partial low-alias subset clear the packing gate?", + "why_it_matters": "The full eighty-alias certificate does not exclude subsets.", + "first_step": "Optimize exact subset profile/width changes jointly with bin patterns, then check the combined word.", + "blocked_by": "Alias interactions and overlapping lender lifetimes." + } + ], + "submission_overlap": { + "searched_at": "2026-10-15T06:23:25.097466+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-15T06:19:15.033476+00:00", + "complete_pagination": true, + "records": 564 + }, + "discussions": { + "fetched_at": "2026-10-15T06:23:25.017758+00:00", + "complete_pagination": true, + "records": 1078 + } + }, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "scope": "Focused application to fixed PR2339 words; credit prior R480 pattern dual work in PR1129 and research/selected-t16-pattern-dual. No novelty claim for weak duality or the 1163-pattern domain.", + "focused_followup": { + "searched_at": "2026-10-15T06:26:01.898193+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-15T06:26:01.836928+00:00", + "complete_pagination": true, + "records": 569 + }, + "discussions": { + "fetched_at": "2026-10-15T06:23:25.017758+00:00", + "complete_pagination": true, + "records": 1078 + } + }, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission." + }, + "latest_manual": "Read PR2359 at 2d648618f33f51e37700f47abb424bd14ad35e16: independent PR2322 raw-frame audit, different words and no PR2339 packing bound. PR2339 remains bf1742aee4d855efb8bbd44a8419eddb33a679e5; PR2349 is latest observed conditional kappa claim." + } +} diff --git a/research/t74-low-alias-width-cap/VERIFY.json b/research/t74-low-alias-width-cap/VERIFY.json new file mode 100644 index 0000000000..521f2e533e --- /dev/null +++ b/research/t74-low-alias-width-cap/VERIFY.json @@ -0,0 +1,30 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 60, + "checks": "Literal frame invoice and widths, pinned parent bins, exact rational dual, attained parent and eight mathematical rejection controls." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/check_export.py" + ], + "timeout_seconds": 60, + "checks": "Standalone read-only export, no-clobber, input and receipt tamper rejection." + } + ] +} diff --git a/research/t74-low-alias-width-cap/check_export.py b/research/t74-low-alias-width-cap/check_export.py new file mode 100644 index 0000000000..73a62e723a --- /dev/null +++ b/research/t74-low-alias-width-cap/check_export.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +"""Verify source-only read-only replay, evidence binding and no-clobber.""" +import hashlib +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile + +ROOT = Path(__file__).resolve().parent + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def snapshot(root): + return {str(p.relative_to(root)): hashlib.sha256(p.read_bytes()).hexdigest() + for p in root.rglob('*') if p.is_file()} + + +def replay(root, *args): + return subprocess.run([sys.executable, '-I', '-O', '-B', str(root/'verify.py'), *map(str, args)], + cwd=root.parent, capture_output=True, text=True, timeout=30) + + +def main(): + with tempfile.TemporaryDirectory(prefix='t74-width-cap-') as temp: + dst = Path(temp)/'standalone' + shutil.copytree(ROOT, dst, ignore=shutil.ignore_patterns('__pycache__', '*.pyc')) + before = snapshot(dst) + for path in dst.rglob('*'): + path.chmod(0o555 if path.is_dir() else 0o444) + dst.chmod(0o555) + try: + result = replay(dst) + need(result.returncode == 0, result.stdout+result.stderr) + need(snapshot(dst) == before, 'read-only replay changed source') + finally: + dst.chmod(0o755) + for path in dst.rglob('*'): + path.chmod(0o755 if path.is_dir() else 0o644) + result = replay(dst, '--record', dst/'EXPECTED.json') + need(result.returncode != 0 and 'receipt already exists' in result.stderr, 'overwrite accepted') + need(snapshot(dst) == before, 'overwrite changed receipt') + source = dst/'inputs/pr2269-profile.json' + old = source.read_bytes(); source.write_bytes(old+b' ') + result = replay(dst) + need(result.returncode != 0 and 'source digest' in result.stderr, 'altered input accepted') + source.write_bytes(old) + receipt = dst/'EXPECTED.json' + changed = json.loads(receipt.read_text()); changed['certificate']['moment_lower'] = '2' + receipt.write_text(json.dumps(changed)) + result = replay(dst) + need(result.returncode != 0 and 'receipt mismatch' in result.stderr, 'altered expected result accepted') + print('PASS_T74_WIDTH_CAP_EXPORT controls 4') + + +if __name__ == '__main__': + main() diff --git a/research/t74-low-alias-width-cap/inputs/pr2269-plan.json.gz b/research/t74-low-alias-width-cap/inputs/pr2269-plan.json.gz new file mode 100644 index 0000000000..45a832a85f Binary files /dev/null and b/research/t74-low-alias-width-cap/inputs/pr2269-plan.json.gz differ diff --git a/research/t74-low-alias-width-cap/inputs/pr2269-profile.json b/research/t74-low-alias-width-cap/inputs/pr2269-profile.json new file mode 100644 index 0000000000..3e103605dd --- /dev/null +++ b/research/t74-low-alias-width-cap/inputs/pr2269-profile.json @@ -0,0 +1 @@ +{"1":1584738,"2":337002,"3":286065,"4":84246,"5":28785,"7":150,"8":5328,"48":24479} diff --git a/research/t74-low-alias-width-cap/inputs/word80-base.json.gz b/research/t74-low-alias-width-cap/inputs/word80-base.json.gz new file mode 100644 index 0000000000..c5953dfdb0 Binary files /dev/null and b/research/t74-low-alias-width-cap/inputs/word80-base.json.gz differ diff --git a/research/t74-low-alias-width-cap/inputs/word80-extra.json.gz b/research/t74-low-alias-width-cap/inputs/word80-extra.json.gz new file mode 100644 index 0000000000..852868543e Binary files /dev/null and b/research/t74-low-alias-width-cap/inputs/word80-extra.json.gz differ diff --git a/research/t74-low-alias-width-cap/vendor/GENERATOR-NOTICE.txt b/research/t74-low-alias-width-cap/vendor/GENERATOR-NOTICE.txt new file mode 100644 index 0000000000..b075f7180e --- /dev/null +++ b/research/t74-low-alias-width-cap/vendor/GENERATOR-NOTICE.txt @@ -0,0 +1,129 @@ +Generator for PR2312 width exchange plus coherent four-handoff transformation +========================================================================== + +generate_words.py is new portable code prepared with substantial AI +assistance, under the repository Apache-2.0 license. It directly transforms +the pinned PR2312 width-exchange BORROW-WORDs and regenerates cleanup. The existing source +builder is not copied or imported at runtime. The independent native chain, +rather than the generator or its hashes, proves all-column circuit correctness +and exact physical Clifford phases. + +PR2312 width exchange is credited to Jeremy Kothe (@jeremykothe2), with +AI assistance: alias 651 is re-lent from lender 530 and alias 653 is dropped, +freeing register 554 for cold restoration and changing two width-8 helpers +to width 7. The exact frame re-solve of both borrowed words and the owner +fill for that source width inventory retain the source's credit to Jeremy +Kothe, with AI assistance. This generator consumes the resulting complete +source words; it does not reapply their kernels or width exchange. + +Consumed PR2312 source head: + fb76f799ccf078f51780076ebed3fd26b1db11c0 +Package: + research/gmx-t74-borrow43-width-exchange +Manifest SHA-256: + c545968fb8cf6e550b82ba631e92fd756484db75e621aee211347749cff55313 + +The two helper-donor kernels at pivots 518 and 506 are retained from +PR2302. Their kernel shape is credited to mdumitrean (PR1625); their search, +exact pricing and frame re-solve are credited to Jeremy Kothe +(@jeremykothe2), with AI assistance, as stated by the source. The PR2302 +source and this necessary derivative generator were prepared with AI +assistance. This generator composes the four block-616 handoffs after those +kernels, preserving all kernel scalar gates and their re-solved frames. + +Predecessor PR2302 source head: + d520b92d7bf18efcb7d84f12757face6fe9541f1 +Package: + research/gmx-t74-borrow43-k518-506 +Manifest SHA-256: + 74634d13d27026e2867973b58dfef5e31958d92c54454b29e52292b7fc2e1f0d + +WildIdeas is credited for the exact frame refits retained from PR2288. +The source's additional frame-solver credit to Jeremy Kothe, with AI +assistance, is retained. The predecessor's full credit and licensing notice +is reproduced below. + +Anticipatory dirty borrowing is credited first to Cinna Davis +(@1337isnot1337), PR2226, with substantial OpenAI Codex assistance. The +retired-register K_G handoff and inverse-reverse FULL cleanup with proper-ended +private zero buffers derive from that construction and its PR2288 realization. +PR2288 source head: 614c74a63b0f6d4a24c7740d7ddb90d37861b3c7. + +This code is licensed under Apache-2.0, inherited from the repository. +The original repository LICENSE and NOTICE remain in the predecessor source; +the consumed package NOTICE is reproduced verbatim below, along with the +additional PR2226 notice. The PR2312 and PR2302 package NOTICE files are byte-identical to the +PR2288 package NOTICE reproduced here. + +--- PR2288 package NOTICE (verbatim) --- + +Anticipatory dirty borrowing: PR2226 (Cinna Davis / 1337isnot1337, with substantial OpenAI Codex assistance) is credited first. Its alias rule, changed-reference K_G handoffs, initial compensation and exact free-operator replay (vendored under new/code/borrow/vendor, see new/code/borrow/NOTICE-PR2226.md) are applied here to the T74 pivot-566+554 words; the native lowering, window-exact owner fill and independent audit of the borrow words are new in this package. Bootstrap carried-cutoff repair: PR1956 (Josie Elliston); Lemma G label/adapter checks and X/Y/Z mutants: PR1964 (thakrarsagar), extended here with borrow warp/zero-buffer controls. + +New research prepared by Rohan Arun with substantial OpenAI Codex assistance. Apache-2.0. Parent words and build recipe method derive from Jeremy Kothe PR1274 and Rohan Arun PR1218, with lineage credited in README.md. All inherited mathematical qualifications are retained. +Additional pivot555 and567 composition by Rohan Arun with substantial OpenAI Codex assistance. + +T74 exact-fill owner construction by Rohan Arun with substantial OpenAI Codex assistance. + +PR1377 grid refinement credited to Jeremy Kothe. Outer witness refinement by Rohan Arun with OpenAI Codex assistance; construction unchanged. + +Pivot-566 kernel, words, edits, rebuild.py and rebind.py: PR1625 (mdumitrean). Endpoint/outer-witness stacking, fine_cache.py and oracle stage by jeremykothe2 with oh-my-pi assistance. + + +--- PR2226 native-chain notice (verbatim) --- + +# Credit: anticipatory dirty borrowing (PR2226) + +The construction realised by this native chain is **PR2226, "anticipatory dirty borrowing"**, by Cinna Davis +(@1337isnot1337), prepared with substantial OpenAI Codex assistance (Apache-2.0): the logical reference change +K_G of a lender register (a monomial Clifford: a permutation of the 512 columns with phase mod 4), the initial +compensation terms c K_G z, the early cold tail, the exact cold restoration and the private zero buffers of the +FULL-frame cleanup. `vendor/pr2226_operators.py`, `vendor/pr2226_replay.py` and `vendor/PR2226-NOTICE.md` are byte copies +of PR2226's `operators.py`, `replay.py` and `NOTICE.md`. `bw_gauss.py` is a port of `operators.py` (change, monomial, +apply_mono, coord, frame, check) and adds a decoder from a serialized `clifford_exact` monomial to its exact 512 x 512 +Gaussian matrix. + +What this chain adds (the P3 native realisation, with the Borrow campaign's explicit chronological BORROW-WORD as input): +warp events and zero buffers in `LOCAL-PROGRAMS`, warp recipes in `CLIFFORD-RECIPES.json` (lowered with the unchanged +`lower_child`, rank zero, then compared with the exact numpy column product), logical K_G recipes in +`RESIDUAL-ADAPTERS.json`, an independent local replay in both orientations that checks every warp product on all 512 +columns, and the negative controls listed in `INDEPENDENT-LOCAL-REPLAY.json`, `WRAPPER-CHECKS.json`, `WARP-RECIPE-CHECKS.json` +and `bw_tamper.py`. + +Lineage retained: icekylinx (PR425/433/514, scalar and wrapper machinery), DreamingOfClouds (PR458/484/593 hyperplane/cold-HPE +extensions), the clifford_exact compiler (vendor531), and the owners named in the package README. `vendor/clifford/clifford_exact.py` +is a byte copy. + + +Reproduction and equality +======================== + +Run: + python3 generate_words.py --source-root FETCHED_REPOSITORY --out NEW_DIRECTORY + +The generator checks the pinned source manifest and both consumed compressed +source-word hashes. It writes base.json.gz, extra.json.gz and GENERATION.json. +Canonical JSON hashes cover every output field, including frames, scalar +gates, operators, endpoints, cleanup and invoices. These hashes determine +regenerated circuit equality. The compressed container hashes are recorded +for provenance; Python/zlib changes can produce different gzip streams for +the same circuit. The OS header byte is normalized to 255. In the recorded generation +environment both output containers also exactly match the composed +word hashes. Recompression alone does not require repeating native phases. + +The four binary G maps are explicit construction constants, checked for +invertibility and the measured source-to-handoff chart identity on each run. +The native replay independently lowers their exact physical representatives. +Two old warp-basis representatives are rewritten only after verifying equal +GF(2) spans, preserving the frozen input serialization. No JSON patch file or +unrecorded local dependency is needed. + +Composition binding +=================== + +The source-manifest and source-word constants bind the consumed PR2312 +inputs. The canonical JSON target hashes cover every composed output field. +The literal base tag names PR2312 width exchange plus coherent joint616; +SOURCE_COMMIT and SOURCE_MANIFEST identify the consumed source. +This generation receipt does not establish native phases, owner admission, +or a new exponent; those require their separate independently replayed +native and global receipts. diff --git a/research/t74-low-alias-width-cap/vendor/LICENSE b/research/t74-low-alias-width-cap/vendor/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/t74-low-alias-width-cap/vendor/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/t74-low-alias-width-cap/vendor/UPSTREAM-NOTICE b/research/t74-low-alias-width-cap/vendor/UPSTREAM-NOTICE new file mode 100644 index 0000000000..59d8e0cf31 --- /dev/null +++ b/research/t74-low-alias-width-cap/vendor/UPSTREAM-NOTICE @@ -0,0 +1,415 @@ +A sharper exponent for integer multiplication +Copyright 2026 Douglas Colkitt + +This project includes unmodified source files from OpenAI's manuscript +"Integer multiplication below n log n" and its accompanying repository: +https://github.com/openai/math +Commit: adc7f1241b42e322a6451854ab7e4b4c146bf78a + +The original manuscript identifies OpenAI as its author. Its Apache-2.0 +license is retained at upstream/LICENSE. The exact source URLs and hashes +are recorded in upstream/manifest.json. Proposed modifications are supplied +as separate files under patches/; upstream source files remain unchanged. + +The original local research note, scripts, certificates, patches, and +documentation were prepared by Douglas Colkitt with assistance from OpenAI +Codex. The community release incorporates work by the contributors identified +in the notices below; it is not solely Douglas Colkitt's work. +This project is not an official OpenAI release or an OpenAI endorsement. + +Related contributions (not imported in this checkpoint): +Zhihao Chen (jacklightChen), PR #7, supplied an earlier ternary five-subset +motif, finite-alphabet transfer and a different compressed producer: +https://github.com/CrocSwap/integer-mult-bounds/pull/7 +The present checkpoint claims no priority for that motif. Related compressed +complex-network work was submitted by eumemic in PR #3: +https://github.com/CrocSwap/integer-mult-bounds/pull/3 +The pending contributions and their stronger bounds require their own review; +this notice does not represent adoption or verification of their claims. + +Additional community work, including parallel and superseded submissions, is +acknowledged in CONTRIBUTORS.md, with pinned submission metadata in +docs/research/contribution-snapshot.json. These acknowledgements do not imply +joint authorship of the checkpoint, incorporation of pending code, or verification +of submitted mathematical claims. Original source-specific notices remain in force. + +Community release (accepted by conditional maintainer audit): +The following original contributor notices apply to the imported PR #39 chain. +The preceding non-import statements describe the preserved 2^-30 checkpoint. + +Ternary five-subset construction and common-four-point resynthesis +Copyright 2026 Zhihao Chen (jacklightChen) + +This is Zhihao Chen's first submission of this specific construction to this +repository. Research, proof development, code and verification were prepared +with substantial assistance from GPT-6 Astra (OpenAI Codex), as identified by +the contributor. This is not independent review or an OpenAI endorsement. +Future research building on this contribution should explicitly acknowledge +Zhihao Chen (jacklightChen), cite the accompanying note and pull request, and +retain the preceding contributors' attribution. This notice records research +provenance; the repository's Apache-2.0 license remains unchanged. + +Dependencies retained from eumemic's Claude-assisted PRs #3 and #5: +https://github.com/CrocSwap/integer-mult-bounds/pull/3 +https://github.com/CrocSwap/integer-mult-bounds/pull/5 +PR #5 commit: d3d370c34937503bd3fa63c83d505a05e8e50893 +These include complex_circuit.py, complex_network.py, fast_gaussian.py, +their generators, construction notes and certificates. The Gaussian input +scaling proof is corrected in this derivative; see the modification notice below. +Aligned pairing also appears in Bortlesboat's PR #2. Retained totals and bank +sharing appear in dleen's PR #4 and cheaper retained centers in eumemic's PR #6. +Their results and ideas are credited separately from this new construction. + +Bulk recursion and controlled tensor basis, 8 October 2026 +Copyright 2026 icekylinx + +The new projector batching, controlled simultaneous basis, mixed-width tape +recursions, whole-residual complex recursion, and dependency-path precision +guard in the batched-23 proof package are contributed by icekylinx, developed +with substantial OpenAI GPT-6 Astra assistance. Review corrections and +repository integration were prepared with OpenAI Codex assistance. They build on the retained +PR #7 finite producers and the preceding contributions credited above. +The new package retains the repository's Apache-2.0 license and the original +authors' attribution. It is not an official OpenAI release or endorsement. + +Modification notice, 8 October 2026 (icekylinx): the retained fast Gaussian +proof now bounds shifted approximation error by F=2^ceil(1.14 alpha^2). +The P=34p precision budget and asymptotic exponent are unchanged. New batching +checks are integrated into make verify. Existing attribution and licenses +are retained. + +Partial-swap extension, 8 October 2026 +Copyright 2026 icekylinx + +The partial-swap framing, binary retained-total triple construction, +dependency-preserving positive labels and carrier reuse, unequal (25,23,57) +common basis, improved complex batching, and exact assembly are contributed +by icekylinx with substantial OpenAI GPT-6 Astra and Codex assistance. +This extension directly inherits PR #10, commit +62691e395a0458ce089a1c7b5d89e74291e95e29. The portable producer adapters +modify the retained paired-exclusion and shared-point implementations credited +above. The original licenses, attribution, and Gaussian correction are retained. + +Endpoint-gauge extension, 8 October 2026 +Copyright 2026 icekylinx + +The complementary auxiliary endpoint gauges, (32,30,40) controlled basis, +general nondegenerate binary phase residuals, retained-center complex producer, +updated path guard and exact assembly are contributed by icekylinx with +substantial OpenAI GPT-6 Astra and Codex assistance. This extension inherits +f2ab41aebad47861caf6316282c1793e5513845e and its PR #10 ancestry. New portable +adapters retain the paired-exclusion and shared-point contributions credited +above. Original licenses, notices and the Gaussian correction are retained. + +Structured-basis and semantic-bulk extension, 8 October 2026 +Copyright 2026 icekylinx + +The selected (32,30,36) bit construction, A1/A5 block refinements, fixed +middle-axis I+J profiles with bounded-minor CRT certificates, mixed dyadic +complex centers, complete data-front batching and circuit-specific assembly +are contributed by icekylinx with substantial OpenAI GPT-6 Astra and Codex +assistance. The immediate parent is ed90fd940279c336ebc45968631bdebfb087b505. + +The semantic/bulk compatibility argument, literal scalar charge, product row +stock and parameterization adapt Zhihao Chen (jacklightChen)'s PR #23, +commit 661ebabc1076c9f525d7ce4967c876b203fa9827. Translated complex endpoints +are adopted from the same contributor's PR #21, +commit 5ba6cf0bfb68f2be8d15610e7972207c50254d6a, following eumemic's source-frame +work and the earlier nested-basis contributions. + +Completed-child semantic precision, arbitrary-coordinate routing, phase-cell +Gaussian inversion and bulk tape transfer are credited to the RaD project +(hipotures), commit 45d9b60355872041f9275f77c057514def0d45bc, exposed through +PR #20 at 4f8d6c8272b5ff307a0da51df545ec3cd96a8b6e. Their selected proof +sources retain their separate CC0 license and original NOTICE under +references/semantic-bulk/rad20. The PR #23 source retains its recorded OpenAI +Codex assistance; RaD retains its recorded Codex and GPT-6.1-Sol Ultra +assistance. These are source attributions, not claims about this session's +runtime model. Related contributions by Rohan Arun and Aurel Prosz remain +acknowledged in the imported notices. No exclusive priority or additional +license condition is asserted. + +Copied retained-center extension, 8 October 2026 +Copyright 2026 icekylinx + +The copied retained-center schedule in both orientations, its complex-phase +transfer, the Wm-N+L rank budget, and the selected (25,23)/(28,28) composition +are contributed by icekylinx with substantial OpenAI GPT-6 Astra and Codex +assistance. This extension inherits PR #32 at +0ef3aeb61f55cc0b321ce6a0ef00acee25cefe52 and the preceding PR #10/#18/#24 work. + +The two-stage topology and paid copied-stream endpoint correction are due +to Aurel Prosz (Paureel), c82d09eb4781b68435e3fa3eb6beea72fa900fab, +through Zhihao Chen (jacklightChen)'s PR #29 unequal-axis composition, +9d963275075fa98f1da821e27757b238dafd6b3c. That source also credits Swapnil +Jain's two-stage development at ae405eb474d1486b2d8aef90139869f927f4836a. + +The contiguous corner method, incidence factorization and exact partition +certificates are due to Rohan Arun (PR #31), method commit +02f68f95369c39955c5ffcfddbd75cd83e26b305. The selected (25,23) certificate +specializes Dominik Scholz's parameterization (PR #33), +a499a345c040aa15b68e984a0904eadc485c7a7e. Their source notices and proof +snapshots are preserved in references/copied-centers. Historical OpenAI +Codex, GPT-6 Astra and Anthropic Claude Opus 5.5 assistance is credited to +the respective imported sources. Existing PR #21/#23 and RaD attribution, +licenses and the Gaussian correction remain in force. + +Copied centers with reversed (23,25) data corners, 2026-10-08 +Rohan Arun with substantial OpenAI Codex assistance supplies the composition, +exact dimension23 controls and cost/assembly integration. James Chang's PR34 +supplies the reversed boundary family; icekylinx's PR36 supplies copied retained +centers and the selected complex graph. The balanced assembly remains attributed +to RaD/hipotures and its PR34 specialization. Retain Dominik Scholz PR33, Rohan +Arun PR31, Zhihao Chen PR29/21/23, Paureel/Aurel Prosz, Swapnil Jain, icekylinx, +eumemic, Douglas Colkitt, OpenAI and all earlier notices and hypotheses. +This is not a claim of formal verification, new foundational rank identities, +global optimality or measured runtime speedup. + +Fixed middle basis with copied reversed corners (2026-10-08): +Rohan Arun, with substantial OpenAI Codex assistance. Composition and +simultaneous-basis proof retain icekylinx PR32/36, James Chang PR34, +Dominik Scholz PR35/38, Zhihao Chen, Paureel, Swapnil Jain, RaD/hipotures, +eumemic and all preceding attribution and licenses. See research/copied-fixed-reversed. + +Changed-graph composition with copied centers and fixed bases, 8 October 2026 +Prepared with OpenAI Codex assistance. +The new composition uses icekylinx PR36 copied centers and PR32 fixed-I+J +projectors/profiler, Dominik Scholz PR35 two fixed factors and CRT argument, +Zhihao Chen (jacklightChen) PR29/23 interfaces, Aurel Prosz (Paureel) and +Swapnil Jain's two-stage development, Rohan Arun PR25/31 corner methods, +Dominik Scholz PR33/38 dimension/composition work; James Chang (jamesyc) +PR34 reversed geometry and balanced transfer; Rohan Arun PR37/39/40 +reversed integration, modular data tests and both-fixed baseline; +RaD (hipotures) PR41 changed scalar DAGs, alternating point order and +independent role compiler; RaD balanced routing/bulk interfaces, and all +retained predecessors. +Complete attribution and the conditional proof boundary are recorded in +research/copied-fixed/PROOF.md; imported originals and source pins are retained. +Original Apache-2.0 and CC0 notices remain applicable. + +Community follow-up integration (PRs #49, #45 and #26), 8 October 2026: +Rohan Arun contributes weighted carrier matching and climbed summand/leave-one-out +orders (PRs #44/#47/#49), with Anthropic Claude assistance. The final construction +composes Chafik Boukhalfa's changed-graph checks, exact rational data recovery and +reordered exclusion sums (PRs #43/#46/#48, OpenAI Codex assistance) with RaD / +hipotures's alternating pair order and independent physical role compiler (#41). +All predecessor attribution and conditional proof interfaces remain in force. + +Alejandro Zarzuelo Urdiales contributes Gaussian parity and canonical arithmetic +proofs, finite tensor execution, profile precision accounting and mixed-center +reference checks (#45), with substantial OpenAI Codex assistance. See +research/gaussian-parity-synthesis/PROVENANCE.md for his full attribution. +Ryan S / princezuda contributes historical Lean certificate arithmetic, algebraic +frame/movement/guard lemmas and independent paired-circuit checks (#26). Original +source notices and historical snapshots are preserved. Neither formal package +claims a full formal proof of the multiplication algorithm or a new kappa. + +Joint frame compilation of skip-prefix strips + +The local compiler and exact finite witnesses were prepared by eumemic with +substantial OpenAI Codex assistance. Avi Eisenberg / ikeboy with Anthropic +Claude assistance supplied the unmodified PR #53 skip-prefix producer. +The pinned PR #48 pipeline is Chafik Boukhalfa's contribution, incorporating +Rohan Arun, RaD / hipotures, icekylinx, Dominik Scholz, James Chang, +Zhihao Chen, Aurel Prosz / Paureel, Swapnil Jain, eumemic, Douglas Colkitt, +OpenAI, David Harvey, Joris van der Hoeven and the earlier contributors +credited in the retained sources. See references/frame-compiler/pr48/NOTICE +and references/frame-compiler/pr53/NOTICE for their original attribution. +No authorship or review by those predecessors is claimed for this compiler. + +Joint dual-skip/frame-compiler composition (2026-10-08) +--------------------------------------------------- +Rohan Gupta / gupt1156 with Anthropic Claude assistance: PR55 dual-skip +scalar graph; original LICENSE and NOTICE are retained under +references/frame-compiler/pr55. eumemic with substantial OpenAI Codex +assistance: PR57 joint reversible frame compiler, serialized physical-word +replay and profile reconstruction. Chafik Boukhalfa with OpenAI Codex +assistance: this composition, independent integration and exact certificate. +Avi Eisenberg / ikeboy, Rohan Arun, RaD / hipotures, icekylinx, and all +predecessor authors retain the notices above and in pinned source files. +No original copyright or Apache-2.0 notice is removed. + +Ranked reclamation after the PR58 joint-dual composition (2026-10-08) +---------------------------------------------------------------- +Chafik Boukhalfa with OpenAI Codex assistance: prioritize retired physical +slots by descending current frame rank, retaining slot ID as the tie-breaker; +complete replay, exact profiles, comparison and adversarial controls. +The dedicated joint_dual_reclaim_compiler.py is derived from eumemic's PR57 +compiler. Its original shared compiler remains byte-identical. The PR55 +producer and all preceding attribution remain unchanged. The complete PR58 +comparison certificate and its original source/proof provenance are retained +under references/frame-compiler/pr58. + +Skip-prefix strip producer, 8 October 2026 +By Avi Eisenberg (ikeboy), with Anthropic Claude (Claude Opus 5.5) +assistance. The skip-prefix leave-one-out strip layout in +research/skip-strips/skip_graph.py is new. Everything else reuses Chafik +Boukhalfa's PR #43/#46/#48 research/copied-fixed pipeline, its verification +code, exact data recovery and support-order sorting, together with: +- Rohan Arun's PR #44 weighted carrier matching optimizer; +- RaD (hipotures) PR #41 alternating point order; +- every predecessor credited above. +Complete attribution and the conditional proof boundary are recorded in +research/skip-strips/PROOF.md. Original Apache-2.0 and CC0 notices remain +applicable. + +Local split-pair skip-prefix research continuation (2026-10-08) +Prepared with substantial OpenAI Codex assistance at the user's request. +New contribution: singleton/pair recursive partition refinement, finite summand +order and moment search, and verified composition with inherited paid clones. +Avi Eisenberg/ikeboy with Anthropic Claude assistance: PR53 skip-prefix strips. +Chafik Boukhalfa with OpenAI Codex assistance: PR54 original-envelope clone +specialization and PR43/46/48 checking interfaces. RaD/hipotures: PR51 +whole-chain/source-partition cloning and earlier producer/interfaces. +Rohan Arun: PR44 weighted matching and earlier fixed/reversed work, with all +stated historical AI assistance. All predecessor notices remain applicable. + +Original-envelope whole-chain clones on skip-prefix strips (research/skip-clones): +Chafik Boukhalfa, prepared with OpenAI Codex assistance. The complete-chain +source-partition clone operation is adapted from RaD / hipotures, PR #51, +with original envelopes retained here. The scalar base is Avi Eisenberg's +PR #53 skip-prefix layout, prepared with Anthropic Claude assistance. +All credited PR #43/#46/#48, PR #44 and earlier code/proof notices remain +in force. This extension is provided under the repository's Apache-2.0 terms. + +Community review checkpoint #50–#61, 8 October 2026 +Maintainer integration and independent arithmetic: Douglas Colkitt, with OpenAI Codex. +Avi Eisenberg / ikeboy: skip-prefix strip framework (#53), with Anthropic Claude. +Rohan Gupta / gupt1156: parallel order search (#50, stated Antigravity assistance) +and dual-suffix strips (#55, Anthropic Claude assistance). +Eumemic: equal-frame joint compilation and paid signal reclamation (#57), with Codex. +Chafik Boukhalfa: original-envelope paid clones (#54), composition (#58) and ranked +reclamation (#60), with Codex. Rohan Arun: order search (#52) and positive-frame +composition (#56), with Anthropic Claude and stated Codex validation assistance. +RaD / hipotures: enlarged frames, source partitions and paid whole-chain clones +(#51), with Codex. Rohan Garg / rohangar1: singleton/pair recursion and paid-clone +composition (#59), with Codex. Alejandro Zarzuelo Urdiales: exact parameter +refinement, scoped Lean arithmetic, matrix/parity and search tools (#61), with +his disclosed multi-tool and Codex assistance. +Parallel #50/#52 records are reviewed and credited without replacing the earlier +climbed-48 implementation; their exact commit history is retained. The separate +#51 witness is retained as research; its source-graph/negative-basis data proof +has not received the same full replay as #56's consumed compiler machinery. +See docs/research/community-round2-review.md for precise validation boundaries. +All earlier licenses, contributions and notices remain applicable. + +Interval strips and core-aware pair assembly + +The interval leave-one-out strips and the core-aware group-pair assembly in +research/pair-assembly were prepared by Avi Eisenberg / ikeboy with Anthropic +Claude assistance. They build on PR #53's skip-prefix pipeline and its +inherited PR #48 sources. The stacked witness in research/pair-assembly/frame +uses eumemic's PR #57 joint frame compiler unchanged; its driver and verifier +are adaptations of PR #57's skip_frame_compiler.py, skip_frame_compose.py and +verify_skip_frame.py. Original notices are retained. + +Stopped product-ring extension, 9 October 2026 +Copyright 2026 icekylinx + +The opposite-bank generic projector factorization, componentwise atom-ring +adapters, stopped recurrence and outer ordinary-interchange conversion, +aligned pair-star producer with rational centers, exact denominator-21 +grid and selected (23,23)/(24,24) composition are contributed by icekylinx +with substantial OpenAI GPT-6 Astra and Codex assistance. This extension +builds on merged PR #36, 11817ccacb564bb7f98789c20dc11d3fece207e3, and is +integrated on upstream main 56b66d58297deca1d7dd130247d720e960f77a37. + +The retained ordinary leaf uses the preceding projector, corner and +copied-center proofs. The selected two-stage topology retains Aurel Prosz +(Paureel), Swapnil Jain and Zhihao Chen's credits; the semantic assembly +retains PR #21/#23 and RaD's attribution. Paired producers, carrier matching, +original source notices and each imported license remain unchanged. + +Partial-gauge extension, 9 October 2026 +Copyright 2026 icekylinx + +The pair-first cube assembly, compatible backward frame enlargement, +partial source-gauge schedule and stopped whole-projector composition are +contributed by icekylinx with substantial OpenAI GPT-6 Astra and Codex +assistance, extending PR #104 at 948ce1510df750f4c18b96bdaef436a86f8bf834. + +The physical deferred bit word, reflected event accounting, fan-order +clarification and signed two-stage endpoint are adopted from Zhihao Chen +(jacklightChen), PR #97, e15350b66e4bf796153a68c240a6cc1b788abe3e, with +Codex assistance. Its deferred readouts, V leaves, lifted frames and frozen +witness originate in Swapnil Jain's 741e7aa078392553815df7926ee17ac5e25a8c38, +with the original Claude disclosure retained. Cyclic interval and core-aware +pair primitives build on Avi Eisenberg (ikeboy), PR #62, +ad0f25ff7b23cff7f08ad237c2254e6ecf74257e, with Anthropic Claude assistance. +Prior two-stage, copied-center, ordinary-leaf, semantic/bulk, routing and +precision credits remain in force. Imported source notices and licenses +are preserved under references/partial-gauge/; see SOURCES.json. + +Three-stage cover extension, 9 October 2026 +Copyright 2026 icekylinx + +The arbitrary-subspace Clifford frame theorem, three-stage Cayley geometry, +weighted q-adic GL cover, unit-lower weighted compiler, charged local-ring +fallback, uniform batching, internal row borrowing and exact composition +are contributed by icekylinx with substantial OpenAI GPT-6 Astra assistance. This +repository integration uses Codex assistance and extends +PR #115, cf60442983c153a3a0f5272ea4713f99eba13c86. + +The selected local complex DAG and support/label replay are adopted from +Copyright 2026 eumemic, PR #117, cbb05ce504d571546d9b7794c186a613c659c3bf, +with its original Apache-2.0 terms and Claude assistance disclosure. +The unchanged bit physical word retains Zhihao Chen (jacklightChen), +PR #97, and Swapnil Jain's underlying witness and assistance notices. +The prior opposite-bank, stopped ordinary-leaf, copied-center, topology, +semantic/bulk, precision and analytic credits remain applicable. +Original source notices and license bytes are preserved in +references/three-stage-cover/pr117/ and references/partial-gauge/. + +Paired-cube and shared-core extension, 9 October 2026 +Copyright 2026 icekylinx + +The paired-coordinate triple-cube identity, signed overlap channels, +original-source involution, coordinate-star centers, concrete frame/carrier +compiler, chronological source gauges, PR97 gauge-subset selection, +orthogonal cross-stage routing and exact supplier/assembly integration +are contributed by icekylinx with substantial OpenAI GPT-6 Astra assistance. +Repository integration uses Codex assistance and extends PR #130 at +6a9970a530119174507904e23592fd59ede19a5d. + +The substantial completed-core workspace-sharing principle is credited to +an664, PR #128, 530588a019b4a74f09180680c9e3961bf649ec89, with its reported +OpenAI Codex assistance. No source code, partition or serialized witness +from that PR is imported. The new routing and paired-motif integration +are described separately and claim no exclusive priority for broad sharing, +paired-coordinate, Fourier or carrier-matching ideas. + +Selected coarse queries restrict the retained eumemic PR #117 positive DAG; +its original Apache-2.0 and Claude assistance notices remain unchanged. +The bit word and original frames retain Zhihao Chen's PR #97 and Swapnil +Jain's frozen witness, notices and historical assistance disclosures. +Earlier generalized Clifford, three-stage, uniform weighted recursion, +ordinary-leaf, semantic/bulk, precision and analytic credits remain in force. +Source-specific license bytes are preserved under references/. + +October 9 recycled-bit integration: +DaysSky (#150), William Porter/hpst3r (#147), Thomas Marchand/Th0rgal (#146), +Rohan Gupta/gupt1156 (#148), James Chang/jamesyc (#124), SovereignSteak (#122). +The original notices and assistance disclosures are retained under research/, +including research/recycled-bit-integration/NOTICE. Andrew Barnes/Bortlesboat +(#101) repairs shared verifiers using rfu08's #64 counterexample. rfu08's +scoped finite and formal-transfer packages are included separately; they do +not establish the full multiplication theorem. Earlier and parallel credits +remain applicable. Douglas Colkitt integrated these with OpenAI Codex assistance. + +SovereignSteak PR151 independently supplies the matching gauge/recycling +composition and the selected 473/10^6 atom refinement; its original package +and assistance disclosure are retained under research/gauge-recycling/. + +October 9 coordinated-frame and completed-entrance-bank integration: +Dugongue PR186, 166a34d75e853e933855f0f7e940fe77c4bb6b8d, builds on +Chafik Boukhalfa/chafreaky's PR181, 7fb2194801e3a10f54772c7f0d5505035a4fc0ad, +and eumemic's PR168 v4, 4a3c769e5c5430e7114c4d3e099ff34664677f17. +The frozen package and prerequisite archive preserve all author, source-license +and assistance notices, including PR175's compiler optimization. DaysSky's +carrier closure, James Chang's terminal substitution and balanced assembly, +geckods' stopping refinements and all preceding framework credits remain. +Rohan Arun's PR185 bootstrap and chafreaky's PR182 bit refinement are reviewed +parallel contributions; their gains are not added to the selected witness. +Douglas Colkitt integrated the package and supplied the bank scheduling +supplement with OpenAI Codex assistance, under Apache-2.0. The all-size +interfaces remain conditional; finite verification is not full formalization. diff --git a/research/t74-low-alias-width-cap/vendor/fine_moment.py b/research/t74-low-alias-width-cap/vendor/fine_moment.py new file mode 100644 index 0000000000..9d7d774d62 --- /dev/null +++ b/research/t74-low-alias-width-cap/vendor/fine_moment.py @@ -0,0 +1,59 @@ +"""Higher-precision independent base-two moment enclosure (same algorithm as base_two_moment.py, finer constants), evaluated in directed-rounding +integer fixed point on the 2^-10239 grid (lower bounds: floor every non-negative intermediate; upper bounds: ceil every intermediate), which is +monotone and therefore sound; same enclosure semantics as the exact-rational original, far faster.""" +from fractions import Fraction as Q +from functools import lru_cache +try: + from gmpy2 import mpz # optional accelerator: identical integer results, much faster +except ImportError: + mpz = int +GRID = 1 << 10239 +LOG_TERMS = 3226 +EXP_TERMS = 1542 +def require(c, msg): + if not c: raise ValueError(msg) +def _cd(a, b): return -((-a)//b) +SH = 10239 +@lru_cache(None) +def log_unit(x): + require(1 <= x <= 2, "logarithm range") + z = (x-1)/(x+1) + p, q = mpz(z.numerator), mpz(z.denominator) + p2, q2 = p*p, q*q + pl = GRID*p//q; ph = _cd(GRID*p, q) # z^1 bounds + sl = sh = mpz(0) + for j in range(LOG_TERMS): + sl += pl//(2*j+1); sh += _cd(ph, 2*j+1) + pl = pl*p2//q2; ph = _cd(ph*p2, q2) # z^(2j+3) + # tail 2 z^(2N+1) / ((2N+1)(1-z^2)), rounded up; ph = z^(2N+1) upper bound + tail = _cd(2*ph*q2, (2*LOG_TERMS+1)*(q2-p2)) + return Q(int(2*sl), GRID), Q(int(2*sh+tail), GRID) +def log_bounds(x): + require(x >= 1, "logarithm range") + k = 0 + while x > 2: + x /= 2; k += 1 + lo, hi = log_unit(x) + l2, u2 = log_unit(Q(2)) + lo, hi = lo+k*l2, hi+k*u2 + return Q((lo*GRID).__floor__(), GRID), Q((hi*GRID).__ceil__(), GRID) +def exp_bounds(x): + """Outward enclosure of exp(x), 0 <= x < 1, on the 1/GRID grid: lower = partial sum through x^(EXP_TERMS-1)/(EXP_TERMS-1)! (positive terms), + upper = partial sum + 2*x^EXP_TERMS/EXP_TERMS! (tail <= that for x < 1).""" + require(0 <= x < 1, "exponential range") + xl = mpz(x.numerator)*GRID//x.denominator; xu = _cd(mpz(x.numerator)*GRID, x.denominator) + tl = th = mpz(GRID); sl = sh = mpz(GRID) + for j in range(1, EXP_TERMS): + tl = ((tl*xl) >> SH)//j; th = _cd(-((-th*xu) >> SH), j) + sl += tl; sh += th + tn = _cd(-((-th*xu) >> SH), EXP_TERMS) + return Q(int(sl), GRID), Q(int(sh+2*tn+2), GRID) +def moment(m, W, entries, saving): + lo = hi = Q(0) + for t, count in entries: + t, count = int(t), int(count) + require(0 < t < m and count > 0, "improper child") + l, u = log_bounds(Q(m, t)) + lo += Q(t*count, m*W)*exp_bounds(saving*l)[0] + hi += Q(t*count, m*W)*exp_bounds(saving*u)[1] + return Q((lo*GRID).__floor__(), GRID), Q((hi*GRID).__ceil__(), GRID) diff --git a/research/t74-low-alias-width-cap/verify.py b/research/t74-low-alias-width-cap/verify.py new file mode 100644 index 0000000000..fa9db8b30b --- /dev/null +++ b/research/t74-low-alias-width-cap/verify.py @@ -0,0 +1,259 @@ +#!/usr/bin/env python3 +"""Exact width-pattern dual certificate. No optimizer or network is used. + +Frame-invoice logic reimplemented from PR2322's paid_profile using explicit +GF(2)^9 subspace sets, rather than the producer's row-reduction implementation. +This checks the cost interface, not the scalar circuit's correctness. +""" +import argparse +import copy +import gzip +import hashlib +import importlib.util +import itertools +import json +from collections import Counter, defaultdict +from fractions import Fraction as Q +from functools import lru_cache +from pathlib import Path + +ROOT = Path(__file__).resolve().parent +WIDTHS = (4, 5, 7, 8, 9) +RANKS = (8, 16, 32, 48) +EXPECTED_STOCK = {8: 49728, 16: 33152, 32: 33152, 48: 33152} + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def read(path): + data = path.read_bytes() + return json.loads(gzip.decompress(data) if path.suffix == '.gz' else data) + + +def canonical(value): + # JSON round-trip normalizes integer inventory keys to strings before + # sorting, so in-memory recounts and parsed receipts have the same order. + return json.dumps(json.loads(json.dumps(value)), sort_keys=True, separators=(',', ':')) + + +@lru_cache(None) +def space(frame): + result = {0} + for x in frame: + need(type(x) is int and 0 < x < 512, 'invalid frame vector') + result |= {y ^ x for y in result} + return frozenset(result) + + +def dim(subspace): + return len(subspace).bit_length() - 1 + + +def mapped(columns, x): + result = 0 + for bit, column in enumerate(columns): + if (x >> bit) & 1: + result ^= column + return result + + +def invoice(word): + need([word['report'][k] for k in ('v', 'h', 'R')] == [112, 9, 480], 'word geometry') + ports = word['ports'] + need(len(ports) == len(set(ports)) == 112, 'ports') + removed = set(word['removed']) + need(len(removed) == len(word['removed']) == 80 and removed <= set(range(224, 704)), 'removed roles') + live = set(range(704)) - removed + cur = [space((p,)) for p in ports] + [space(())] * 592 + for role, frame in word['start_extra'].items(): + role = int(role) + need(role in live and role >= 224, 'helper entrance') + cur[role] = space(tuple(frame)) + initial = list(cur) + full = frozenset(range(512)) + ends = [full] * 112 + [frozenset(x for x in range(512) if (x & p).bit_count() % 2 == 0) for p in ports] + [full] * 480 + for role, frame in word['helper_final'].items(): + role = int(role) + need(role in live and role >= 224, 'helper exit') + ends[role] = space(tuple(frame)) + paid = Counter() + + def climb(role, frame): + need(role in live and cur[role] <= frame, 'nonmonotone or absent role') + degree = dim(frame) - dim(cur[role]) + if degree: + paid[degree] += 1 + cur[role] = frame + + def gate(event): + need(event[0] in ('add', 'scale'), 'unknown gate') + for role in event[1:3] if event[0] == 'add' else event[1:2]: + climb(role, space(tuple(event[-1]))) + + for event in word['A']: + gate(event) + levels = {int(t): space(tuple(f)) for t, f in word['target_levels'].items()} + need(all(cur[112+t] == levels.get(t, space(())) for t in range(112)), 'cut targets') + need(len(word['centers']) == len(word['center_frames']), 'cut center count') + for role, frame in zip(word['centers'], word['center_frames']): + frame = space(tuple(frame)) + need(cur[role] == frame, 'cut producer') + readers = {levels.get(e[1]-112, space(())) for e in word['cut'] if e[2] == role} + for reader in sorted(readers, key=lambda s: (-len(s), tuple(sorted(s)))): + need(reader <= frame, 'unnested private copy') + degree = dim(frame)-dim(reader) + if degree: + paid[degree] += 1 + frame = reader + warps = defaultdict(list) + for record in word['warps']: + need(0 <= record[0] <= len(word['B']), 'warp position') + warps[record[0]].append(record) + for position in range(len(word['B'])+1): + for _, role, columns, old, new in warps[position]: + old, new = space(tuple(old)), space(tuple(new)) + need(role in live and cur[role] == old, 'handoff source frame') + need(len(columns) == 9 and space(tuple(columns)) == full, 'singular warp') + need(frozenset(mapped(columns, x) for x in old) == new, 'warp image') + cur[role] = new + if position < len(word['B']): + gate(word['B'][position]) + for event in word['restore']: + gate(event) + for role in sorted(live): + climb(role, ends[role]) + widths = Counter(dim(ends[r])-dim(initial[r]) for r in live if r >= 224) + need(all(s > 0 for s in widths), 'nonpositive width') + need(dict(paid) == {int(k): v for k, v in word['report']['local_profile'].items()}, 'reported local profile') + need(dict(widths) == {int(k): v for k, v in word['report']['width_inventory'].items()}, 'reported widths') + return dict(sorted(paid.items())), dict(sorted(widths.items())) + + +def geometry(plan): + need((plan['M'], plan['live'], plan['deficit']) == (73, 66304, 23680), 'parent geometry') + order = [tuple(x) for x in plan['order']] + need(len(order) == 666 and set(order) == set(itertools.product(range(9), range(74))), 'call permutation') + need(set(plan['windows']) == {f'{r},{c}' for r in range(74) for c in range(18)}, 'window keys') + stock = Counter() + for rank, times in plan['windows'].values(): + need(rank in RANKS and len(times) == len(set(times)) and set(times) <= set(range(666)), 'window contents') + stock[rank] += 112 + need(dict(stock) == EXPECTED_STOCK, 'bin inventory') + return dict(sorted(stock.items())) + + +def power_engine(): + spec = importlib.util.spec_from_file_location('width_cap_moment', ROOT/'vendor/fine_moment.py') + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + # Same directed algorithm and explicit tails; this coarse bound needs no + # 3000-digit endpoint. Integer fallback suffices in the standard library. + module.SH = 256 + module.GRID = 1 << 256 + module.LOG_TERMS = 100 + module.EXP_TERMS = 96 + return module + + +def certify(local, inventory, stock, dual, engine): + b = Q(dual['threshold']) + need(0 < b < Q(1, 100), 'threshold range') + need(tuple(dual['widths']) == WIDTHS and tuple(dual['bin_ranks']) == RANKS, 'dual axes') + y = list(map(Q, dual['width_dual'])) + z = list(map(Q, dual['bin_dual'])) + need(len(y) == 5 and len(z) == 4, 'dual dimensions') + f_lower = {0: Q(0)} + for r in range(1, 49): + lo, _ = engine.moment(73, 1, [(r, 1)], b) + f_lower[r] = (73*lo-r)/b + slacks = [] + for R, price in zip(RANKS, z): + for counts in itertools.product(*(range(R//s+1) for s in WIDTHS)): + rem = R-sum(n*s for n, s in zip(counts, WIDTHS)) + if rem < 0: + continue + slack = f_lower[rem]-price-sum(n*v for n, v in zip(counts, y)) + need(slack >= 0, f'infeasible dual: capacity {R}, counts {counts}') + slacks.append(slack) + need(len(slacks) == 1163, 'pattern enumeration') + D = sum(666*inventory[s]*v for s, v in zip(WIDTHS, y)) + sum(stock[r]*v for r, v in zip(RANKS, z)) + idle_mass = sum(r*n for r, n in stock.items())-666*sum(s*n for s, n in inventory.items()) + local_mass = 666*sum(r*n for r, n in local.items()) + need(idle_mass >= 0 and local_mass+idle_mass == 73*66304-23680, 'rank mass') + local_lo, _ = engine.moment(73, 66304, [(r, 666*n) for r, n in local.items()], b) + lower = local_lo+(idle_mass+b*D)/(73*66304) + need(lower > 1, 'cap not established') + return dict(threshold=str(b), pattern_count=len(slacks), minimum_dual_slack=str(min(slacks)), idle_excess_lower=str(D), idle_rank_mass=idle_mass, total_rank_mass=local_mass+idle_mass, moment_lower=str(lower), moment_margin=str(lower-1)) + + +def rejected(label, action): + try: + action() + except ValueError as error: + return dict(control=label, rejection=str(error)) + raise ValueError('negative control passed: '+label) + + +def run(): + pins = read(ROOT/'INPUTS.json') + for entry in pins['sources']: + data = (ROOT/entry['path']).read_bytes() + need(hashlib.sha256(data).hexdigest() == entry['sha256'], 'source digest: '+entry['path']) + if 'uncompressed_sha256' in entry: + need(hashlib.sha256(gzip.decompress(data)).hexdigest() == entry['uncompressed_sha256'], 'uncompressed digest') + extra = read(ROOT/'inputs/word80-extra.json.gz') + base = read(ROOT/'inputs/word80-base.json.gz') + local, inventory = invoice(extra) + base_local, base_inventory = invoice(base) + need(inventory == base_inventory == {4: 4, 5: 4, 7: 36, 8: 84, 9: 272}, 'common widths') + delta = {r: base_local.get(r, 0)-local.get(r, 0) for r in set(base_local)|set(local)} + need({r: n for r, n in delta.items() if n} == {1: 16, 2: -8}, 'mixture envelope') + plan = read(ROOT/'inputs/pr2269-plan.json.gz') + stock = geometry(plan) + dual = read(ROOT/'DUAL.json') + engine = power_engine() + result = certify(local, inventory, stock, dual, engine) + parent = {int(k): v for k, v in read(ROOT/'inputs/pr2269-profile.json').items()} + _, parent_hi = engine.moment(73, 66304, list(parent.items()), Q(dual['threshold'])) + need(parent_hi < 1, 'attained parent positive control') + controls = [] + bad = copy.deepcopy(extra); bad['report']['local_profile']['1'] -= 1 + controls.append(rejected('undercharged invoice', lambda: invoice(bad))) + bad = copy.deepcopy(extra); bad['report']['width_inventory']['9'] -= 1 + controls.append(rejected('missing width-9 helper', lambda: invoice(bad))) + bad = copy.deepcopy(extra); bad['B'][0][-1] = [] + controls.append(rejected('nonmonotone gate', lambda: invoice(bad))) + bad = copy.deepcopy(extra); bad['warps'][0][4] = [] + controls.append(rejected('incorrect warp image', lambda: invoice(bad))) + bad = copy.deepcopy(plan); bad['order'][1] = bad['order'][0] + controls.append(rejected('duplicate call', lambda: geometry(bad))) + bad = copy.deepcopy(plan); bad['windows']['0,0'][0] = 48 + controls.append(rejected('altered bin inventory', lambda: geometry(bad))) + bad = copy.deepcopy(dual); bad['bin_dual'][0] = str(Q(bad['bin_dual'][0])+1) + controls.append(rejected('overstated dual', lambda: certify(local, inventory, stock, bad, engine))) + bad = copy.deepcopy(dual); bad['threshold'] = '1/1000' + controls.append(rejected('unsupported stronger cap', lambda: certify(local, inventory, stock, bad, engine))) + return dict(schema=1, scope='Fixed PR2339 words, 666 calls, unsplit helpers, unchanged PR2269 bin stock; arbitrary fractional patterns and free chronology.', sources=pins, dual_sha256=hashlib.sha256((ROOT/'DUAL.json').read_bytes()).hexdigest(), extra_local_profile=local, base_local_profile=base_local, helper_widths=inventory, bin_stock=stock, certificate=result, parent_moment_upper=str(parent_hi), controls=controls) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--record', type=Path, help='write a new receipt; refuses to overwrite') + args = parser.parse_args() + if args.record: + need(not args.record.exists(), 'receipt already exists') + result = run() + if args.record: + with args.record.open('x') as output: + output.write(json.dumps(result, sort_keys=True, indent=2)+'\n') + else: + need(canonical(result) == canonical(read(ROOT/'EXPECTED.json')), 'receipt mismatch') + c = result['certificate'] + print('PASS_T74_LOW_ALIAS_WIDTH_CAP', c['threshold'], 'patterns', c['pattern_count'], 'margin', float(Q(c['moment_margin'])), 'rejecting_controls', len(result['controls'])) + + +if __name__ == '__main__': + main()