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
143 changes: 143 additions & 0 deletions research/disjoint-frame-unions/BENCHMARK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"assignment_seed": 88,
"clock": "time.perf_counter",
"fresh_processes": true,
"implementation_sha256": {
"accelerator.py": "4b90cdf10e864d6a477c43ded3b3025c38cdf82f6c819b0a055795c31ddd9a02",
"benchmark.py": "1d16e3aaacb572fa8fab4185450e6c7d3280713b9c76d0937b173a26c2fb259a",
"verify.py": "b46d9c15f5583af2ef0b57f838a332ea841370483a503db730a588db94c1a02b"
},
"machine": "arm64",
"median_wall_seconds": {
"baseline": 5.014369041193277,
"propagated": 3.492928333580494
},
"note": "Local descriptive timings, not a speed threshold. Each complete audit includes source admission and byte-identical certificate comparison.",
"pairs": 5,
"platform": "macOS-27.0-arm64-arm-64bit-Mach-O",
"python": "3.14.4 (main, Apr 7 2026, 13:13:20) [Clang 21.0.0 (clang-2100.0.123.102)]",
"samples": [
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "baseline",
"pair": 0,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 5.00602824985981,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 5.052189417183399
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "propagated",
"pair": 0,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 3.446310624945909,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 3.4948033336549997
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "propagated",
"pair": 1,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 3.4012637501582503,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 3.4544588746502995
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "baseline",
"pair": 1,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 4.777637083083391,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 4.826718332711607
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "baseline",
"pair": 2,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 4.923342291731387,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 4.979373416397721
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "propagated",
"pair": 2,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 3.4429724160581827,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 3.492928333580494
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "propagated",
"pair": 3,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 3.608594875317067,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 3.6696084160357714
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "baseline",
"pair": 3,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 4.974850708153099,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 5.029562917072326
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "baseline",
"pair": 4,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 4.961562791839242,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 5.014369041193277
},
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "propagated",
"pair": 4,
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 3.373905540909618,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS",
"wall_seconds": 3.427934500388801
}
],
"speedup": 1.4355774188052695,
"status": "PASS_IDENTICAL_COMPLETE_CERTIFICATES"
}
53 changes: 53 additions & 0 deletions research/disjoint-frame-unions/CLAIM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Verification engineering, seed 88

- OS assignment: `secrets.randbelow(100)` returned **88** on 2026-10-13.
- Base: `2921874911956718fcaaaf9396fe8267b3cfa9f0` (freshly fetched main).
- Claim: 2026-10-13 16:44 UTC. Expected finish: 17:20 UTC (13:20 Eastern),
reserving the final quarter for verification and handoff.
- Object: the historical `DisjointTensor.frame_data` target-coordinate unions.
- Method: propagate exact unions along the same reverse DAG traversal as the
unchanged reachable-target bitsets. Compare all three returned maps with
the original, run both frame orientations, and compare complete certificates.
- Deliverable: additive opt-in adapter, differential/negative controls, pinned
sources, paired fresh-process timings, and one focused tooling PR; no new kappa.
- No pinned issues existed; the two open issues were unrelated. Claim is local.

Initial narrow candidates were Fano-completion reachability, subset-core ledger
replay, and point-cancellation neighbor checks. Their complete certificates all
finished below 0.25 seconds, so none justified optimization. One evidence-driven
pivot selected the disjoint-tensor frame traversal: profiling the actual complete
historical h=26 audit spent 2.34 of 8.53 instrumented seconds in `frame_data`.
These exploratory instrumented timings are not the benchmark result.

Seed 88 also fixes randomized topological-DAG cases, output permutations and
mutation positions. The object and mechanism distinguish this contribution from
existing optimizations; the seed is not itself a novelty claim.

Overlap review read the 714-open-PR snapshot through #1019, the review ledger,
selected #942 certificate/review/construction, local claims and relevant negative
results. #950 considered and declined this traversal, choosing central-factor
packing instead. #863 and #981 change historical root contraction/traversal
choices; neither changes `frame_data`. #756 changes balanced-Fano enumeration,
#778 changes single-intersection Gram construction, #976 changes historical
rational rank, and #1006 changes T37 occupancy. None supplies this code.
No closed mathematical search is reopened.

Current selected conditional kappa at this base is 0.001661960547713947 from
#942, with #890/#869/#870/#858 ancestry and unchanged #589 on #555. This tooling
contribution concerns an older finite supplier and does not alter that frontier
or its inherited all-size/compiler, realization, hosting, precision/tape,
analytic or bit-interface assumptions.

## Result

Completed: the complete historical audit is 1.435577x faster in five alternating
fresh-process pairs, with byte-identical complete receipts in all ten runs.
All map entries/order, two physical orientations, independent BFS graph cases,
and failure controls pass. `make verify-tests` passes 661 tests in 96 modules
plus 20 patch checks. See README.md, BENCHMARK.json and VALIDATION.md.
Final review found no competing frame-union implementation among 737 open PRs
through #1042; #1029/#1041 are distinct U8 phase-recipe tools. No coordination
issue was pinned. Source exploration ended before the final verification and
handoff phase. The only additions are this optional package.

Submitted contribution: [PR #1044](https://github.com/CrocSwap/integer-mult-bounds/pull/1044).
25 changes: 25 additions & 0 deletions research/disjoint-frame-unions/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Attribution and license

This contribution is by Stephan Arrington (@steph4n-gh), with substantial
OpenAI Codex assistance in implementation, experiment design, testing,
mathematical explanation and packaging. A separately tasked Codex worker wrote
the breadth-first graph oracle and reviewed the adapter. This is not independent
human peer review. New material is under the repository's Apache-2.0 license.

The unchanged disjoint-tensor construction, original frame-data verifier,
phase checks, complete historical audit, and dirty-restoration tests are Douglas
R. Colkitt's work, preserved at source commit
`1a74950ce5074b848243ba89d8022fbadba66105`. Their precise base-source hashes are
in SOURCES.json. The adapter retains the original descendant and source-union
calculations and rectangle guard, replacing only target-union computation.

The opt-in source-admission, complete-certificate comparison and alternating
fresh-process benchmark follow Ross Richardson's incorporated PR950 package,
`research/central-factor-packed/`, credited for that reproducibility pattern.
No packed coefficient kernel is used here. Existing source notices and upstream
Apache-2.0 material are unmodified.

Concurrent PR863 by Curtis Dransfield and PR981 by @ToikY change root
contraction/traversal recipes for this historical supplier. They are related
construction research, not dependencies or this verifier optimization. Their
source pins are not imported or represented as reviewed by this contribution.
131 changes: 131 additions & 0 deletions research/disjoint-frame-unions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Exact target unions for the historical disjoint-tensor audit

This opt-in adapter replaces repeated reachable-target enumeration with exact
union propagation in `DisjointTensor.frame_data`. At h=26 it preserves all three
maps on **60,372 active nodes**, including **9,206,600 reachable-target
memberships**, and reproduces the **entire original historical certificate byte
for byte**. The complete audit still checks integer coefficients, reversible
embedding, both physical frame orientations, exact small residual bases,
operation invoices, rational inequalities, guard slack and its original finite
parameter screens.

This is verification tooling: no new construction, kappa, search result, or
multiplication runtime claim. The selected conditional result at the pinned base
is PR942's **0.001661960547713947**. Historical bound strings in the reproduced
certificate describe an earlier supplier.

Five sequential alternating fresh-process pairs on macOS arm64 / Python 3.14.4
measured median complete-audit wall time **5.014369 s → 3.492928 s (1.435577×)**.
Every one of the ten runs reproduced the same full certificate. The measurement
includes source admission, construction, scalar/frame checks, accounting and
receipt comparison. BENCHMARK.json retains all samples, environment and code
hashes. Timings describe this historical audit, not the selected frontier replay;
there is no performance pass threshold. No other task-local tests or benchmarks
were running during the measurement.

## Reproduce

Python 3.11+ and the standard library suffice. From the repository root:

```sh
python3 -I -B research/disjoint-frame-unions/verify.py
```

Expected status: `PASS_DISJOINT_FRAME_UNIONS`, with
`scope: complete_historical_audit` and receipt SHA256
`3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1`.
This compares the complete original certificate, including every source hash,
against the committed fixture; no fields are removed or normalized away.

Additional reproducible checks:

```sh
python3 -I -B research/disjoint-frame-unions/test_unions.py
python3 -I -O -B research/disjoint-frame-unions/test_unions.py
python3 -I -B research/disjoint-frame-unions/test_replay.py
python3 -I -B research/disjoint-frame-unions/verify.py --engine baseline
python3 -I -B research/disjoint-frame-unions/benchmark.py --pairs 5 --output /tmp/disjoint-frame-unions.json
```

Use a new benchmark output path. Full inherited audit replay rejects `-O` to
preserve inherited assertions. The new graph kernel and its independent tests
also pass with assertions disabled; this is a distinct, narrower claim.

## Equivalence argument

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

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

Define F(A) as the OR of T_i over indices in A. Then F(empty)=0 and
F(A union B)=F(A) OR F(B). The original reverse topological pass initializes
D at output nodes, then unions each child's D into each parent. The adapter
initializes U at those same output nodes and propagates it alongside D.
Induction in the identical reverse topological order gives U(v)=F(D(v)) at
every node. Multiple outputs on one node and multiple paths to one output are
handled by OR's idempotence. Target masks are actual output keys, not the
positions of those keys in the sorted output list.

The reachable-target bitsets are retained in full: later `bit_count` calls
still see exactly the same D. Source unions and the nonempty/disjoint rectangle
checks are unchanged. All three dictionaries preserve the original insertion
order. The adapter assumes exactly the original graph contract: active nodes
are closed under parents and topologically numbered. It is not a new DAG
validator; the original full audit's acyclicity, support, coefficient and
embedding checks remain in place.

The old loop performs one target-mask lookup for every reachable-target
membership (9,206,600 at h26). The replacement does one ground-mask OR per
active parent edge. Python integers are unbounded; no hash, floating estimate,
truncated bitmap or probabilistic acceptance is substituted for the exact sets.
The full descendant bitset propagation and all later frame checks remain.

This is a written equivalence argument plus finite independent controls, not a
formal proof of the full multiplication theorem.

## Coverage and failures

`test_unions.py` contains eight tests, including five original historical tests
run under a scoped adapter installation. It compares ordered contents of all
three maps at h26, both full physical orientations, and exact small residual
bases. A separately implemented breadth-first graph oracle checks 88 seeded
arbitrary DAGs plus explicit small controls. Cases include aliased outputs,
multiple-coordinate target masks, output insertion permutations, repeated
children, an empty graph, and a 300-input graph with gaps in its active set.
The BFS oracle is intentionally confined to small graphs; the h26 comparison
uses the unmodified original implementation over every map entry.

Four graph corruptions must retain the original explicit failure: source/target
overlap, zero target union, an active node without an output path, and an alias
that introduces overlap. The historical tests additionally cover corrupted
coefficients/supports and all independent dirty inputs under both signed
invocation directions.

`test_replay.py` checks altered/missing source files, changed adapter bytes,
changed or incomplete result fields, restoration after an audit exception,
rejection of optimized full replay, and preservation of an existing output.
The finite test domain and seed are fixed; no search or impossibility claim is
made. The stopping rule is those tests plus five alternating benchmark pairs.

## Pins and scope

Exact base: `2921874911956718fcaaaf9396fe8267b3cfa9f0`.
`SOURCES.json` binds 40 inherited files, including the original construction,
all imported audit modules, fixture, tests, proof references and upstream files.
Each inherited file hash was compared to its Git blob at that base. It also
binds the new executable adapter, replay, tests and benchmark. Source admission
precedes repository imports; unexpected imported repository scripts are rejected.

The wrapper temporarily changes only `DisjointTensor.frame_data` and restores
it even if the audit fails. No original source, certificate, source manifest,
`upstream/` file or selected record is edited. This avoids invalidating existing
consumers' immutable source pins, including the related PR950 package. Running
the default repository commands does not automatically opt into this adapter.

All inherited all-size/compiler, common-label/mutable-source, hosting,
precision/tape, analytic and bit-interface assumptions remain. See NOTICE.md
for predecessor attribution and AI disclosure, CLAIM.md for scope selection,
and VALIDATION.md for the exact completed checks and remaining limitations.
10 changes: 10 additions & 0 deletions research/disjoint-frame-unions/RELOCATION.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"base_commit": "2921874911956718fcaaaf9396fe8267b3cfa9f0",
"engine": "propagated",
"receipt_sha256": "3f2b37542f9581f9d3238cccfce19fd3e2964c89ec4af4ff047fb8041f5c3cd1",
"scope": "complete_historical_audit",
"seconds": 3.3845524583011866,
"source_files": 40,
"source_manifest_sha256": "c413bf530a588b406b2f29e4ca0b82ca6f9612c0562a706609d0034c0d864ec4",
"status": "PASS_DISJOINT_FRAME_UNIONS"
}
Loading