Skip to content
Merged
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
2 changes: 1 addition & 1 deletion certificates/disjoint-tensor-compression.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
"scripts/binary_phase_frames.py": "4148cfa313cf050ed25296e8db36d35871520b8318fd086c7d1facf0c6af67d7",
"scripts/complex_compression.py": "9b6f758a5985ba5d9fdd726fe6556b3d3b4bd9d98aaf8ba06a7bb58093c4c504",
"scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3",
"scripts/experiments/disjoint_tensor.py": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1"
"scripts/experiments/disjoint_tensor.py": "23763a4b6086fb3d19f9282fff5c118f53fa52e7a7f17da1bde990bd4cf8b6ac"
},
"status": "IMPROVED FINITE COMPLEX NETWORK; NO NEW MULTIPLICATION KAPPA",
"upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"
Expand Down
2 changes: 1 addition & 1 deletion certificates/dyadic-central-factor.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"scripts/complex_compression.py": "9b6f758a5985ba5d9fdd726fe6556b3d3b4bd9d98aaf8ba06a7bb58093c4c504",
"scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3",
"scripts/experiments/complex_centers.py": "3744396587d729253d80980f6310b56e7bf0ea21b165bd178d0d6d4c49faf2e2",
"scripts/experiments/disjoint_tensor.py": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1",
"scripts/experiments/disjoint_tensor.py": "23763a4b6086fb3d19f9282fff5c118f53fa52e7a7f17da1bde990bd4cf8b6ac",
"scripts/general_network_guard.py": "790a2064449afdbffd6dbd4adbcf4a28eaf41931ce7134e4a4e8766f3764270c"
},
"status": "COMPLEX INTERFACE HEADROOM; RETAINED KAPPA 2^-31",
Expand Down
2 changes: 1 addition & 1 deletion certificates/parity-side.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"docs/research/parity-side.md": "75de20f8dcd3d1a2e2d19bc087eda50a6cc77027651f48198868426a80cd12f2",
"scripts/audit_parity_side.py": "7cbdd405ce11fa6f7ffcbef3811174f8685ad4640e9330176601d3b3d3e95390",
"scripts/binary_phase_frames.py": "4148cfa313cf050ed25296e8db36d35871520b8318fd086c7d1facf0c6af67d7",
"scripts/experiments/disjoint_tensor.py": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1",
"scripts/experiments/disjoint_tensor.py": "23763a4b6086fb3d19f9282fff5c118f53fa52e7a7f17da1bde990bd4cf8b6ac",
"scripts/experiments/mixed_point_circuit.py": "f509362b5031976a22af351fd158ae0b4520fa4f286a5176ec37023d672a7ddc",
"scripts/experiments/parity_phase_repair.py": "1f76f3b96ed556ed901835bd101d0e2588c997d2ed39bdfca097f0187aa86d40",
"scripts/experiments/parity_side.py": "1363ebf82d4c39e458e7bede8253688271008374db70ed4284df84253c8d092b"
Expand Down
2 changes: 1 addition & 1 deletion certificates/ternary-side.json
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@
"scripts/audit_ternary_side.py": "5e86566eee32031e1829d26ea17a7372e4802e2f7d76a2caa3ae16de3ab072c1",
"scripts/certify.py": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e",
"scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3",
"scripts/experiments/disjoint_tensor.py": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1",
"scripts/experiments/disjoint_tensor.py": "23763a4b6086fb3d19f9282fff5c118f53fa52e7a7f17da1bde990bd4cf8b6ac",
"scripts/experiments/prime_core.py": "080a89a2c91505b509068698542843c9d7af3cdec01b5c88972107dc9c688c62",
"scripts/experiments/rank_product_core.py": "7a91c1188c5d42e864a5d2e42397b09c435b526ae4f4210c44bf615de488708e",
"scripts/experiments/shared_core.py": "d3c59b61229956cb54ae1ef9145ed213abdf1ae743929de145a77c43656f01a8",
Expand Down
13 changes: 13 additions & 0 deletions research/disjoint-tensor-frame-unions/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Notice — disjoint-tensor frame unions

Douglas R. Colkitt authored the disjoint-tensor compression screen, the
`DisjointTensor` recurrence, embedding and original `frame_data` /
`verify_frames` checkers consumed by this tooling package.

Stephan Arrington’s `research/disjoint-frame-unions/` (#1044) proved the exact
target-union propagation algebra as an opt-in adapter with identical
historical-certificate bytes. This package promotes that algebra into the
default production `DisjointTensor.frame_data` path, with identical
`verify_frames` receipts and updated source pins only.

Prepared by Wentao Li with substantial AI assistance, under Apache-2.0.
112 changes: 112 additions & 0 deletions research/disjoint-tensor-frame-unions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Faster DisjointTensor.frame_data with identical frame receipts

**Tooling improvement; no new kappa.** At base
`0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`, merged
[CrocSwap/integer-mult-bounds#2001](https://github.com/CrocSwap/integer-mult-bounds/pull/2001)
left `DisjointTensor.verify_frames` / `frame_data` as an explicit next question
after shipping closed-form verify support masks. Profiling on the historical
full-size circuit (`h=26`, 60372 active nodes) shows about 1.8 of 2.2 seconds
of `verify_frames` inside the per-node reachable-target bit enumeration in
`frame_data`.

[CrocSwap/integer-mult-bounds#1044](https://github.com/CrocSwap/integer-mult-bounds/pull/1044)
already proved exact target-union propagation as an **opt-in** adapter under
`research/disjoint-frame-unions/`. Production `scripts/experiments/disjoint_tensor.py`
still used the historical bit loop. This change promotes the same algebra into
the default path, keeps every descendant bitset, source union and rectangle
`require`, and leaves `verify_frames` receipts fieldwise identical. Only the
source pin for `scripts/experiments/disjoint_tensor.py` changes inside the four
certificates that bind that file.

## Reproduce

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

```sh
python3.12 -I -B research/disjoint-tensor-frame-unions/verify.py
python3.12 -I -O -B research/disjoint-tensor-frame-unions/verify.py
python3.12 -B scripts/research_package.py --package research/disjoint-tensor-frame-unions
python3.12 -I -B research/disjoint-tensor-frame-unions/benchmark.py --rounds 5
```

Expected:

```text
PASS_DISJOINT_TENSOR_FRAME_UNIONS frame_cases=6 map_cases=6 certs=4 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/disjoint-tensor-frame-unions outcome=completed
PASS_IDENTICAL_DISJOINT_TENSOR_FRAME_UNION_RECEIPTS
```

Default verify is read-only. Full `make verify`, selected cold replay, Lean, and
multiplication-theorem obligations were not rerun for this isolated
historical-checker change.

## Result

On Linux / CPython 3.12.3 (Linux-6.12.94+-x86_64-with-glibc2.39), five
alternating fresh-process pairs timing only `DisjointTensor(26).verify_frames`
(construction excluded) gave median wall time **2.232 → 0.465 seconds (4.80×)**.
Timing is host-descriptive and is not a correctness gate; all samples and
environment pins are in [RESULT.json](RESULT.json). Every frame receipt matches
the baseline checker fieldwise (`distinct_nontrivial_transitions`,
`frame_types`, flags).

## Equivalence

For a node \(v\) let \(D(v)\) be its set of reachable output indices. If output
\(i\) has ground-coordinate mask \(T_i\), the historical loop computes

```text
U(v) = OR_{i in D(v)} T_i
```

by walking bits of \(D(v)\). Define \(F(A)=\mathrm{OR}_{i\in A} T_i\). Then
\(F(\emptyset)=0\) and \(F(A\cup B)=F(A)\lor F(B)\). Initializing \(U\) at the
same output nodes as \(D\) and propagating \(U\) alongside \(D\) in the identical
reverse topological order yields \(U(v)=F(D(v))\) at every node. An XOR-of-mask
mutant cancels overlapping paths and is rejected by the package controls.
Rectangle checks still use `require`, so admission stays enforced under `-O`.

## Open next questions

1. **Question:** Should `DisjointTensor.verify`'s `dag_sha256` `json.dumps` path
get a hand-rolled formatter like the mixed-point / SharedPoint digests?
**Why it matters:** After support masks and frame_data, `json.dumps` remains a
secondary share of verify.
**First step:** Profile the post-mask verify residual and compare a
hand-rolled `[[i,args,str(support)]]` encoder against the committed digest.
**Blocked by:** Out of this session’s stop rule.

2. **Question:** Can `research/disjoint-frame-unions` drop its opt-in monkeypatch
now that production `frame_data` matches the accelerator?
**Why it matters:** The adapter is redundant on main, but its
byte-for-byte historical certificate claim is a separate provenance object.
**First step:** Diff accelerator vs production and decide whether that
package becomes a pure historical replay fixture.
**Blocked by:** Do not reopen #1044’s certificate fixture in this PR.

## Overlap and credit

Closest priors (different objects or delivery):
[CrocSwap/integer-mult-bounds#756](https://github.com/CrocSwap/integer-mult-bounds/pull/756),
[CrocSwap/integer-mult-bounds#1044](https://github.com/CrocSwap/integer-mult-bounds/pull/1044)
(opt-in exact union propagation; this package promotes it to production),
[CrocSwap/integer-mult-bounds#1793](https://github.com/CrocSwap/integer-mult-bounds/pull/1793),
[CrocSwap/integer-mult-bounds#1861](https://github.com/CrocSwap/integer-mult-bounds/pull/1861),
[CrocSwap/integer-mult-bounds#1922](https://github.com/CrocSwap/integer-mult-bounds/pull/1922),
[CrocSwap/integer-mult-bounds#1984](https://github.com/CrocSwap/integer-mult-bounds/pull/1984),
[CrocSwap/integer-mult-bounds#1994](https://github.com/CrocSwap/integer-mult-bounds/pull/1994),
[CrocSwap/integer-mult-bounds#2001](https://github.com/CrocSwap/integer-mult-bounds/pull/2001)
(support masks + open `verify_frames` / `frame_data` question this answers).
Open [CrocSwap/integer-mult-bounds#2100](https://github.com/CrocSwap/integer-mult-bounds/pull/2100)
updates `ternary_side.py` inside `certificates/ternary-side.json`; this PR only
rewrites the `disjoint_tensor.py` pin in that shared JSON.
Open [CrocSwap/integer-mult-bounds#1861](https://github.com/CrocSwap/integer-mult-bounds/pull/1861)
updates `binary_phase_frames.py` inside `certificates/parity-side.json`; shared
JSON should carry both pins on merge.

Douglas R. Colkitt authored the disjoint-tensor checkers. Stephan Arrington’s
#1044 supplied the opt-in union algebra. Prepared by Wentao Li
([VictorLiwentao](https://github.com/VictorLiwentao),
[@Is__Victor](https://x.com/Is__Victor)) with substantial AI assistance, under
Apache-2.0.
50 changes: 50 additions & 0 deletions research/disjoint-tensor-frame-unions/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"environment": {
"executable": "/usr/bin/python3.12",
"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]"
},
"fixture": "DisjointTensor(26).verify_frames only (construction excluded)",
"median_baseline_seconds": 2.231777176000037,
"median_optimized_seconds": 0.4646116810000649,
"median_ratio": 4.8035322125267985,
"no_new_kappa": true,
"rounds": 5,
"samples": [
{
"baseline_seconds": 2.132552615999998,
"optimized_seconds": 0.4646116810000649,
"ratio": 4.589967715425778,
"round": 0
},
{
"baseline_seconds": 2.1409860709999293,
"optimized_seconds": 0.44430533499996727,
"ratio": 4.818726903200671,
"round": 1
},
{
"baseline_seconds": 2.231777176000037,
"optimized_seconds": 0.44960231200002454,
"ratio": 4.9638916803433055,
"round": 2
},
{
"baseline_seconds": 2.450227195000025,
"optimized_seconds": 0.6052943949999872,
"ratio": 4.047992539233866,
"round": 3
},
{
"baseline_seconds": 2.325545840000018,
"optimized_seconds": 0.49189761000002363,
"ratio": 4.727703068124089,
"round": 4
}
],
"source_sha256": {
"baseline": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1",
"production": "23763a4b6086fb3d19f9282fff5c118f53fa52e7a7f17da1bde990bd4cf8b6ac"
},
"status": "PASS_IDENTICAL_DISJOINT_TENSOR_FRAME_UNION_RECEIPTS"
}
84 changes: 84 additions & 0 deletions research/disjoint-tensor-frame-unions/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"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": "certificates/disjoint-tensor-compression.json",
"usage": "provenance",
"git_blob": "a24b0c9af473414fa87efa5a8d2b643d93e6fd01",
"sha256": "899950c322069ebf5a561a321c987906f8c11a592ca229143840901e4e370dd6"
},
{
"path": "certificates/ternary-side.json",
"usage": "provenance",
"git_blob": "b2c1b793e7cb7e4d358b66bfd021d01c85371e19",
"sha256": "2ec667c52babb2a25820e8305538ef16399ab2ea12441d2e8130cc8e3fa13614"
},
{
"path": "certificates/dyadic-central-factor.json",
"usage": "provenance",
"git_blob": "5bd4e583cd61b0e5183d74799e886afb57690960",
"sha256": "3f46000e645c338a583e0f2ab669a7c681980743d03335548eeb838072f1d458"
},
{
"path": "certificates/parity-side.json",
"usage": "provenance",
"git_blob": "bcc1a78412d297424db1727f49636598206b9392",
"sha256": "44ab9d7b781a28228498aa0e73229c700eac4a3a3cf93ffe8f82f52f8c52226c"
},
{
"path": "scripts/experiments/disjoint_tensor.py",
"usage": "provenance",
"git_blob": "b842d0a8d4f0f782a1f0bef171f5f2cd96878e58",
"sha256": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1"
},
{
"path": "scripts/audit_disjoint_tensor.py",
"usage": "provenance",
"git_blob": "08cb8184abcb7f81434395871152e4902df8cf84",
"sha256": "477db540e972b82751fac6a3a6d6e38fb4141e967261b1f9c260e2c686479a78"
},
{
"path": "scripts/exclusion_circuit.py",
"usage": "provenance",
"git_blob": "b0e2f3e03d7de791ca936dfd92cee2134c7dd4f5",
"sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3"
},
{
"path": "scripts/binary_phase_frames.py",
"usage": "provenance",
"git_blob": "c8e4fa71fe60550324f9e43c1dd5ad6d9bf4e2f4",
"sha256": "4148cfa313cf050ed25296e8db36d35871520b8318fd086c7d1facf0c6af67d7"
},
{
"path": "scripts/certify.py",
"usage": "provenance",
"git_blob": "a773311b726fd1ef98a056f6f76010e872d7908a",
"sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e"
},
{
"path": "research/disjoint-frame-unions/accelerator.py",
"usage": "provenance",
"git_blob": "e4bdd7e3aeb11b86e627b1227249188e4a1157ef",
"sha256": "4b90cdf10e864d6a477c43ded3b3025c38cdf82f6c819b0a055795c31ddd9a02"
},
{
"path": "research/disjoint-tensor-support-masks/TASK.json",
"usage": "provenance",
"git_blob": "4c6d696123cbc21e08595d0b93ef4c97260d4cae",
"sha256": "5fe0c79417e7ac42b903db01774f788affff6f2f4b8f58dcbc55d1cda454665f"
}
]
}
70 changes: 70 additions & 0 deletions research/disjoint-tensor-frame-unions/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"schema_version": 1,
"task_id": "replay-runtime",
"priority_revision": 3,
"base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2",
"chooser_seed": "a4f19c82e6b0357d9148e2c0b5d67a31",
"original_card": {
"id": "replay-runtime",
"question": "Can one measured replay bottleneck be sped up without dropping coverage?",
"starting_points": [
"scripts/run_isolated_tests.py",
"scripts/verify_replay_coverage.py",
"certificates/selected-result.json"
],
"methods": [
"Profile one isolated replay and optimize the measured bottleneck.",
"Design source-bound reuse with explicit dependency invalidation and negative controls."
],
"acceptance_gate": "Report before/after wall time on the same fixture, retained checks and invalidation behavior.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read the selected reproduction command and choose a single replay stage for profiling.",
"scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay."
},
"first_experiment": "Measure one unchanged fixture, preserve check coverage, and test one optimization with invalidation controls.",
"bottleneck_link": "Faster trustworthy replays increase review throughput and let mechanism candidates be checked sooner.",
"allowed_variations": [
"Profile one stage or design one source-bound cache boundary."
],
"scope_change_triggers": [
"Skipping coverage or comparing different fixtures to claim speedup."
],
"overlap_terms": [
"replay runtime",
"cache invalidation",
"isolated tests"
]
},
"scope_status": "refined",
"actual_scope": "Can scripts/experiments/disjoint_tensor.py:DisjointTensor.frame_data replace its per-node reachable-target bit enumeration with equivalent exact target-union propagation (as proved opt-in in research/disjoint-frame-unions / #1044) so verify_frames receipts, descendant bitsets, source unions and rectangle require() checks stay fieldwise identical on the historical h=26 circuit?",
"scope_change_reason": "The catalogue card asks for one measured replay bottleneck with before/after wall time and retained checks. Expertise override selected verifier-engineering after merged #2001 left DisjointTensor.verify_frames / frame_data as an explicit open question; profiling named the historical bit-enumeration loop in frame_data (~1.8s of ~2.2s verify_frames on h=26) as the next unclaimed hot path. The #1044 opt-in adapter is not the default production path.",
"bottleneck_link": "Side result on review throughput: disjoint-tensor-compression, ternary-side, dyadic-central-factor and parity-side certificates call DisjointTensor.verify_frames. A faster identical frame_data does not change kappa or the binding complex supplier.",
"budget_minutes": 60,
"stop_rule": "Ship an equivalence-preserving production frame_data change with frozen baseline, identical verify_frames receipts on the historical h=26 circuit, updated source pins only on the four binding certificates, registered replay and a measured before/after median. Do not invent kappa, do not touch ternary_side.py / audit_joint_frames.py, and do not run the selected cold frontier replay.",
"outcome": "completed",
"evidence": "PASS_DISJOINT_TENSOR_FRAME_UNIONS via research/disjoint-tensor-frame-unions/verify.py (also under -O); PASS_IDENTICAL_DISJOINT_TENSOR_FRAME_UNION_RECEIPTS via benchmark.py; four certificates differ from base only in the scripts/experiments/disjoint_tensor.py source pin.",
"author": "Wentao Li",
"github": "VictorLiwentao",
"email": "wentaol4@illinois.edu",
"ai_assistance": "Substantial AI assistance for orientation, overlap search, profiling, implementation, packaging, benchmarking and writing. Not independent human peer review.",
"open_questions": [
{
"question": "Should DisjointTensor.verify's dag_sha256 json.dumps path get a hand-rolled formatter like the mixed-point / SharedPoint digests?",
"why_it_matters": "After support masks and frame_data, json.dumps remains a secondary share of DisjointTensor.verify (~0.4s on h=26); a byte-identical encoder would be a different object.",
"first_step": "Profile the post-mask verify residual and compare a hand-rolled [[i,args,str(support)]] encoder against the committed dag_sha256.",
"blocked_by": "Out of this session's stop rule; frame_data / verify_frames was the measured bottleneck."
},
{
"question": "Can research/disjoint-frame-unions drop its opt-in monkeypatch now that production frame_data matches the accelerator?",
"why_it_matters": "The historical complete-audit package still swaps DisjointTensor.frame_data at runtime; that adapter is redundant once main carries the same algebra, but its certificate byte-for-byte claim is a separate provenance object.",
"first_step": "Diff accelerator.frame_data against production and decide whether the opt-in package becomes a pure historical replay fixture.",
"blocked_by": "Out of this session's stop rule; do not reopen #1044's certificate fixture."
}
]
}
Loading
Loading