Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
336 changes: 168 additions & 168 deletions research/bit-frame-closure-basis/BENCHMARK.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions research/bit-frame-closure-basis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,5 @@ Profile one pinned PR933 or PR1345 transport checker to see whether closure is
also a material cost there. Its mutable-state and rank contracts must be
checked before reuse. This package supplies no speed or correctness claim for
those checkers; `TASK.json` records that first step and its blockers.

After production promotion of `frameopt.close` (`research/bit-frame-closure-production/`), the historical pairwise `frameopt.py` digest remains pinned as **provenance** only. Live CI inputs no longer include that path; the adapter still loads the working-tree checker and replaces `close` for the basis engine.
2 changes: 1 addition & 1 deletion research/bit-frame-closure-basis/SOURCES.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
{
"path": "research/bit589-frame-optimum/frameopt.py",
"usage": "input",
"usage": "provenance",
"git_blob": "1622844ff90529c47e539f502c92b4f2371524e9",
"sha256": "d18d5ed96a6d3146b2141b9bdd29900dd612defdcd5ebc7040542064ec89f237"
},
Expand Down
1 change: 0 additions & 1 deletion research/bit-frame-closure-basis/VERIFY.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"python": "3.12",
"requirements": [],
"inputs": [
"research/bit589-frame-optimum/frameopt.py",
"research/bit589-frame-optimum/verify.sh",
"research/complex-k492-owner-repair/vendor/multicold/engines/base_two_moment.py",
"research/e8-bit-p111-tuned/data/bitE8mut-p111.json.gz",
Expand Down
2 changes: 1 addition & 1 deletion research/bit-frame-closure-basis/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
TUNED = "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz"
BASE_WORD = "research/e8-bit-p111-tuned/data/bitE8mut-p111.json.gz"
INPUTS = {
CHECKER, TUNED, BASE_WORD,
TUNED, BASE_WORD,
"research/bit589-frame-optimum/verify.sh",
"research/complex-k492-owner-repair/vendor/multicold/engines/base_two_moment.py",
}
Expand Down
20 changes: 20 additions & 0 deletions research/bit-frame-closure-production/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Attribution and license

Prepared by Wentao Li ([VictorLiwentao](https://github.com/VictorLiwentao),
[@Is__Victor](https://x.com/Is__Victor), wentaol4@illinois.edu) with substantial
AI assistance for orientation, overlap search, profiling, production wiring,
packaging, benchmarking and writing. Not independent human peer review.
Apache-2.0; see the repository root `LICENSE`.

The one-basis modular closure algorithm and its Hadamard-guard equivalence
argument were introduced by **Ross Richardson** in the opt-in adapter
`research/bit-frame-closure-basis/` (merged as
[CrocSwap/integer-mult-bounds#1666](https://github.com/CrocSwap/integer-mult-bounds/pull/1666);
see that package's NOTICE.md and PROOF.md). This package wires an equivalent
`close` into the production `research/bit589-frame-optimum/frameopt.py` path
used by `research/bit589-frame-optimum/verify.sh`.

The original PR886 frame-only optimum checker, live-line catalogue and paid
profile accounting are by **Seth Burkart**, as refined during maintainer
integration of the bit589 frame-optimum package. Upstream material retains its
own source notices and license.
95 changes: 95 additions & 0 deletions research/bit-frame-closure-production/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Production one-basis closure for the PR886 bit-frame checker

**Tooling improvement; no new kappa.** At base
`0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`,
`research/bit589-frame-optimum/frameopt.py:close` still rebuilt a modular
elimination for every candidate live line. Ross Richardson's opt-in adapter
`research/bit-frame-closure-basis/` (merged [#1666](https://github.com/CrocSwap/integer-mult-bounds/pull/1666))
already proved an exact one-basis reduction with identical receipts. This
package wires that equivalent `close` into the **production** source used by
`research/bit589-frame-optimum/verify.sh`.

Every receipt field, all three stdout digests in
`research/bit-frame-closure-basis/EXPECTED.json`, the degraded positive control
and the `PASS_BIT589_FRAME_OPTIMUM` marker are unchanged. Selected frontier
untouched.

## Reproduce

Python **3.12**, standard library only, from the repository root:

```sh
python3.12 -I -B research/bit-frame-closure-production/verify.py
python3.12 -I -O -B research/bit-frame-closure-production/verify.py
python3.12 -B scripts/research_package.py --package research/bit-frame-closure-production
python3.12 -I -B research/bit-frame-closure-production/benchmark.py --rounds 5
```

Expected:

```text
PASS_BIT_FRAME_CLOSURE_PRODUCTION cases=['pr589', 'pr555', 'degraded'] corruption=... certs=0 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/bit-frame-closure-production outcome=completed
PASS_IDENTICAL_BIT_FRAME_CLOSURE_PRODUCTION_RECEIPTS
```

Default verify is read-only. Timing is host-descriptive and is not a
correctness gate. On Linux / CPython 3.12.3, five alternating fresh-process
pairs gave median **pr589 17.298 → 3.213 s (5.383×)** and **complete three-case
suite 47.744 → 8.904 s (5.362×)**. Samples are retained in
[`RESULT.json`](RESULT.json).

## Why the one-basis close is equivalent

For a nonempty mask `M` and live lines `L_i`, the historical checker returns

```text
({i : rank_p(S ∪ {L_i}) = rank_p(S)}, rank_p(S)) where S = {L_i : i ∈ M}.
```

The production path builds one increasing-pivot echelon basis of `span_p(S)`
and admits each remaining live line exactly when its residual is zero. That is
the same membership predicate over the fixed prime field
`p = 2147483647`. The module-level Hadamard guard
`B^d < p^2` still justifies that modular rank equals rational rank on this
line table. The empty-mask result remains `(0, 0)`. Full details are in
`research/bit-frame-closure-basis/PROOF.md`.

## Overlap and credit

Closest priors:

- [Ross Richardson / bit-frame-closure-basis](../bit-frame-closure-basis/) —
opt-in one-basis adapter (#1666); this package is the production wiring.
- [CrocSwap/integer-mult-bounds#756](https://github.com/CrocSwap/integer-mult-bounds/pull/756)
— identical-receipt tooling quality bar.
- Open leave-alone tooling on other objects (#1922 joint frames, #2054/#2150
shared/mixed-point, #2100 ternary, #2117 DisjointTensor.frame_data, #2194
production verify_factor, #2210 production leech_minor, #2231 sparse-fusion
orbits, #2239 joint-dual replay, #1861 parity-side) was not reopened. Fresh
overlap refresh over 475 open PRs found no competing production rewrite of
`frameopt.close`.

Seth Burkart authored the PR886 frame-only optimum checker. Ross Richardson
authored the one-basis algorithm. Prepared by Wentao Li
([VictorLiwentao](https://github.com/VictorLiwentao),
[@Is__Victor](https://x.com/Is__Victor)) with substantial AI assistance, under
Apache-2.0.

## Open next questions

1. **Question:** Should `research/bit-frame-closure-basis/` note that production
now ships the same one-basis close?
**Why it matters:** That package's source-admission pins expect the
historical pairwise `frameopt.py` bytes.
**First step:** Add a one-line status note without editing pinned evidence.
**Blocked by:** Maintainer preference on touching incorporated historical
packages.

2. **Question:** Should `research/r439-resynth-frame-seed10` refresh its
`frameopt.py` SHA-256 after this equivalence-preserving rewrite?
**Why it matters:** That package binds working-tree bytes; leaving the old
pin keeps this tooling PR focused.
**First step:** Dedicated provenance follow-up after confirming receipt
identity.
**Blocked by:** Pin repair outside this tooling change.
142 changes: 142 additions & 0 deletions research/bit-frame-closure-production/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"ai_assistance": "Substantial AI assistance for orientation, overlap search, profiling, production wiring, packaging, benchmarking and writing. Not independent human peer review.",
"base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2",
"complete_three_case_suite": {
"median_baseline_seconds": 47.74427043100013,
"median_optimized_seconds": 8.903693554000256,
"median_ratio": 5.36229938074964,
"rounds": 5,
"samples": [
{
"baseline_seconds": 50.23534307199998,
"optimized_seconds": 9.116682268999966,
"order": [
"baseline",
"optimized"
],
"ratio": 5.51026586095014,
"round": 0
},
{
"baseline_seconds": 48.14631975800012,
"optimized_seconds": 9.367295856000055,
"order": [
"optimized",
"baseline"
],
"ratio": 5.139831227510642,
"round": 1
},
{
"baseline_seconds": 47.708987005000154,
"optimized_seconds": 8.903693554000256,
"order": [
"baseline",
"optimized"
],
"ratio": 5.358336595441949,
"round": 2
},
{
"baseline_seconds": 47.74427043100013,
"optimized_seconds": 8.554956250000032,
"order": [
"optimized",
"baseline"
],
"ratio": 5.580890075387581,
"round": 3
},
{
"baseline_seconds": 46.38257842299981,
"optimized_seconds": 8.464688658000341,
"order": [
"baseline",
"optimized"
],
"ratio": 5.479537440418632,
"round": 4
}
],
"scope": "suite"
},
"engines": {
"baseline": "research/bit-frame-closure-production/baseline.py",
"optimized": "research/bit589-frame-optimum/frameopt.py"
},
"environment": {
"cpu_affinity_set": false,
"executable": "/usr/bin/python3.12",
"implementation": "CPython",
"os_caches_flushed": false,
"platform": "Linux-6.12.94+-x86_64-with-glibc2.39",
"python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]"
},
"no_new_kappa": true,
"pr589_only": {
"median_baseline_seconds": 17.29837664899992,
"median_optimized_seconds": 3.21332176299984,
"median_ratio": 5.383331619069105,
"rounds": 5,
"samples": [
{
"baseline_seconds": 18.543131178000067,
"optimized_seconds": 3.0485810260001927,
"order": [
"baseline",
"optimized"
],
"ratio": 6.082544967594013,
"round": 0
},
{
"baseline_seconds": 17.29837664899992,
"optimized_seconds": 3.248697127000014,
"order": [
"optimized",
"baseline"
],
"ratio": 5.324712022315845,
"round": 1
},
{
"baseline_seconds": 16.61269226399986,
"optimized_seconds": 3.075237322000021,
"order": [
"baseline",
"optimized"
],
"ratio": 5.402084627795678,
"round": 2
},
{
"baseline_seconds": 17.327575813000067,
"optimized_seconds": 3.21332176299984,
"order": [
"optimized",
"baseline"
],
"ratio": 5.39241852855211,
"round": 3
},
{
"baseline_seconds": 16.734536901000183,
"optimized_seconds": 3.42617271600011,
"order": [
"baseline",
"optimized"
],
"ratio": 4.884323788713413,
"round": 4
}
],
"scope": "pr589"
},
"predecessor": "research/bit-frame-closure-basis/",
"source_sha256": {
"baseline.py": "d18d5ed96a6d3146b2141b9bdd29900dd612defdcd5ebc7040542064ec89f237",
"research/bit-frame-closure-basis/closure.py": "febc46cb43be709684bb51e48bc2c849b63f02809e2bf5bb461c62d55953c4fd",
"research/bit589-frame-optimum/frameopt.py": "0cbcda715cfb9f9b17c8e2bd30f90f34fa08e3d467f262e6ba4837b20d17eced"
},
"status": "PASS_IDENTICAL_BIT_FRAME_CLOSURE_PRODUCTION_RECEIPTS"
}
66 changes: 66 additions & 0 deletions research/bit-frame-closure-production/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"schema_version": 1,
"base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2",
"files": [
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "e8870e5917057d59b730eb14721a778639eca050",
"sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7"
},
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11",
"sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32"
},
{
"path": "research/bit589-frame-optimum/frameopt.py",
"usage": "provenance",
"git_blob": "1622844ff90529c47e539f502c92b4f2371524e9",
"sha256": "d18d5ed96a6d3146b2141b9bdd29900dd612defdcd5ebc7040542064ec89f237"
},
{
"path": "research/bit589-frame-optimum/verify.sh",
"usage": "input",
"git_blob": "4352170bc26141d630140647c2181f142289dd55",
"sha256": "eb69e2482686dd61f7727d58dc0ecd0aec5d34739b5d9b887f3c0b54c16f1c52"
},
{
"path": "research/bit-frame-closure-basis/closure.py",
"usage": "input",
"git_blob": "df194142ca53d1d42938ec0525f71aea6b02a109",
"sha256": "febc46cb43be709684bb51e48bc2c849b63f02809e2bf5bb461c62d55953c4fd"
},
{
"path": "research/bit-frame-closure-basis/PROOF.md",
"usage": "provenance",
"git_blob": "a086311e8af31c8a597c304e88fcff128f577c2b",
"sha256": "9c15c9f57ee3e8950dbc40235a9567d344507fcec9e50a69712150d59c50ae7b"
},
{
"path": "research/bit-frame-closure-basis/EXPECTED.json",
"usage": "input",
"git_blob": "c8703852e7a02b1daa050ef250b468769ede73a7",
"sha256": "dac0e71d005bf700444f866209f588fef2a276ea6ce2cf17b6279e7881a5647e"
},
{
"path": "research/bit-frame-closure-basis/README.md",
"usage": "provenance",
"git_blob": "e01fa237b7926fba0e9d94c0acd13ff228cf1490",
"sha256": "f98c95c5e9efc5c2383b459d5053837e72a47a927d36e759be7ad2fc942fc2ba"
},
{
"path": "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz",
"usage": "input",
"git_blob": "85a4499bf9e4911a705d50567a2c2ef6cf23739a",
"sha256": "e3e301e62bc2b41dbf1ceac0acf3d35824ebeab1848c5a2142d4577b109da52f"
},
{
"path": "research/e8-bit-p111-tuned/data/bitE8mut-p111.json.gz",
"usage": "input",
"git_blob": "bdbb95aa970647bd52895c120b494f0f591f3f87",
"sha256": "1bc3c53d4baf4927c6a00c339ea3975516471a48074d4d97c6addaded2a4d858"
}
]
}
Loading