Skip to content

Compress final #4610 scalar word by 151 ADDs per orientation - #5350

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
ahrazzle:research/cao-scalar-compression-20261023
Oct 23, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
ahrazzle:research/cao-scalar-compression-20261023

Conversation

@ahrazzle

Copy link
Copy Markdown
Contributor

Change and mathematical scope

Apply Cinna Davis's #4692 scalar compressor to Cao Yifan's final #4610 word, excluding the helper-628 triangle that worsens the recursive invoice. This removes 151 scalar ADD macros per orientation and reduces the conservative real scalar allowance by 1,216 per native call: forward 158120 → 156904, backward 158168 → 156952.

Every chronological per-owner Fourier climb, all 408 independent helper boundaries, main boundaries, native maps, phases and owned operations are preserved. The complete paid profile remains {1:2201,2:412,3:510,4:127,5:40,8:8}, so κ is unchanged. This is an exact scalar construction, not a measured runtime speedup, full multiplication theorem or selected-result update.

Two bounded numerical frame/helper/native-map searches found no paid improvement. These floating MILP results are not exact ceilings or universal obstructions.

Task and overlap

  • Base: canonical main ff3cc58e370d0f678e529246f8c73e8094e18fcf, rechecked before submission.
  • Explicit donor assignment. Scope key: final-pr4610/broader-scalar-compression/paid-profile-preservation. The target was a paid-moment gain. The achieved result is a scalar reduction with the same invoice. Scope and stopped routes are in TASK.json.
  • Cinna Davis's work supplies the broader compressor and rewrite identities. Cao Yifan's work supplies the final native word. Cao P16: remove 34 commuting inverse ADDs with dual 632-column replay (no new kappa) #5265 already removes the 34-ADD commuting inverse-pair subset. This package claims no priority for those identities or that subset.
  • Parallel Certify no gain in a joint productive-helper/native fusion family #5301 applies the commuting equal-ADD rule to the same final word and removes 98 scalar events per orientation. It then proves an exact no-gain certificate for its specified binary joint helper/native family.
  • This package applies the broader repeated rewrite, including triangles with the helper-628 exception, to remove 151 macros. Its floating optimization screens do not replace or extend the exact symbolic certificate in the parallel work.
  • The unfiltered 152-deletion rewrite splits one H4 into two H2 jobs and loses. Excluding that triangle retains 151 deletions without changing the invoice.
  • All predecessor files are pinned by SHA-256 at the base in SOURCES.json. The canonical native-word payload is cfcd36b40326d7a5815e1db5313444379b3fb756b27d5201c561574c085cc0dd.

Validation

CPython 3.12.14, Linux x86-64. Standard library only for the positive result:

python3 -B research/cao-trace-retiming-20261023/verify.py
python3 -O -B research/cao-trace-retiming-20261023/verify.py

Passed: both retained exact interpreters on all 632 arbitrary-input columns in both directions, owned-center cleanup, identical chronological transports and paid profile, prefix bounds below the retained 2^192 envelope, corrupt-sign rejection, source hashes and deterministic receipt comparison. The default verifier is read-only.

Optional discovery used SciPy 1.17.0 / NumPy 2.3.5. Commands and both frozen search receipts are included. No new complete controller/compiler/BIT/outer-ledger replay or all-size supplier admission is claimed.

Credit

Prepared with substantial OpenAI Codex assistance. Author-checked, not yet independently reviewed.

Credit Cao Yifan / @intqwq, Cinna Davis / @1337isnot1337 (also the #4470 work), and @Chrisbryan17. Credit also @flyingviper, @Dugongue, @zxv, and Jacob Alan Sussman / @jacobalansussman and all retained native, Clifford, compiler and analytic sources. Source notices and Apache-2.0 licensing are preserved.

Open next questions

The README identifies a concrete next step: legally replace one chronological owner dependency while preserving arbitrary-input action, then check whether a #5179 forcing path disappears. Repeated optimization of the unchanged model is not justified by these negative results.

Automated posting by agentic team with human oversight.

Preserve the complete paid profile and credit the retained compressor.
Include exact replay and bounded negative search records.
Prepared with substantial OpenAI Codex assistance.
@jwr404

jwr404 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Independent review (James Reed, with Claude Code). Head 9bdd01dd0d3142517f5268285a9fb4ce35469172.

Verdict: the rewrite identities are sound, and the exact replay passes. There is one packaging gap: the result isn't registered, so hosted CI never replayed it.

Rewrite identities (construct.py::triangles)

With add(t, s, c) meaning t += c·s (as in the sample events, e.g. ['add', ['L',273], ['L',115], -1, 1]):

  • source_update. a += αb; b += βy; a −= αb gives b += βy, a −= αβ·y, which equals [B, add(a, y, −αβ)]. Order is irrelevant because y is untouched. ✓
  • target_update. a += αb; x += βa; a −= αb gives x += βa + αβ·b, which equals [add(x, a, β), add(x, b, αβ)]. ✓

The two scans ensure that no event between i and k touches {a, b, x, y} other than B. The scan breaks at phases, a 180-event window bounds it, and the frame-nesting condition spaces[first] ⊆ spaces[middle] ⊆ spaces[last] is the #4692 legality condition, retained. The ('L', 628) exclusion is visible and justified by the unchanged paid profile.

Replay

I copied the package into a canonical-main checkout (ff3cc58e3) and ran python3.12 -I -B …/verify.py. It printed PASS backward 1216, PASS forward 1216 and PASS_DETERMINISTIC_CAO_TRACE_RECEIPT in about 10 s:

  • all 632 arbitrary-input columns pass in both directions under both retained interpreters;
  • every climb, warp, centre and phase is unchanged;
  • the paid profile is unchanged;
  • the sign-corruption control is rejected.

Event counts from construct(): scalar macros 17,453 → 17,302 and ADD events 16,089 → 15,938 per direction, so exactly 151 removed.

Issues

  1. No VERIFY.json. scripts/check_research_commit.py --package research/cao-trace-retiming-20261023 reports missing or external file: …/VERIFY.json. The package is not registered, and the green hosted check is only the planner. Adding a VERIFY.json with the verify.py command (~10 s) would put the replay under CI.
  2. Allowance arithmetic. 151 removed ADDs at 8 each is 1,208, but the reported saving is 1,216 per direction. Please state where the extra 8 comes from in real_scalar_allowance (e.g. a frame or denominator term), so the per-macro accounting is checkable from the README.
  3. The equivalence evidence relies on the two retained interpreters (trace_cao_rows, trace_cao_literal). That's fine, but the README should say they are retained rather than new implementations. The docstring does; the README could too.

No change to κ, consistent with the unchanged paid profile.

@Mister-Meeseeks
Mister-Meeseeks merged commit 3b785d5 into CrocSwap:main Oct 23, 2026
ahrazzle added a commit to ahrazzle/integer-mult-bounds that referenced this pull request Oct 23, 2026
Reviewer feedback on PR CrocSwap#5350 (jwr404):
- Add VERIFY.json (status ready, verify.py command, SOURCES inputs) so
  scripts/check_research_commit.py passes and hosted CI replays the package.
- README: allowance accounting. Per direction the rewrite deletes 205 ADD
  events (allowance 1,812) and inserts 54 (allowance 596); net -151 events,
  net saving 1,216. The flat-8 estimate (1,208) misses the coefficient-size
  difference of +8.
- README: state both exact interpreters are retained predecessor
  implementations.

No code or result change. verify.py replay still passes deterministically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants