Skip to content

Reduce exact observable-mask preparation time by 89.76% (no κ) - #6466

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w8-1102e-causal-window-rank
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w8-1102e-causal-window-rank

Conversation

@petalas

@petalas petalas commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Scoped algorithmic proof, exact finite conformance and local performance evidence. The observable-connector planner of Hanson Sun / PR1523 can use a weighted hypercube distance transform with path ranks and backpointers. Every cost table, lexicographic witness, output correction and restored endpoint is preserved on the declared common domain.

at each prescribed observation
  sweep the d hypercube coordinates
  impose the same reader defect and price
  rank whole path prefixes by (predecessor rank, final mask)
return all original tables and the same restored witness

For m stages and N=2^d masks, preparation uses O((m+1)dN) arithmetic operations and label comparisons, with O((m+1)N) storage. This replaces the dense O(mN^2) predecessor scan. The executable supports 1<=d<=8, m<=256 and positive integer prices of at most 256 bits; the written algorithmic proof covers all finite d>=1 and m>=0.

On the explicit eight-coordinate, 64-stage changing-source workload, five alternating fresh-process pairs reduce median complete preparation from 0.361382 s to 0.036996 s, or 89.76%. Ranges are 0.360885--0.376054 s and 0.035862--0.038021 s. Both sides produce the identical 58-price plan, 16,640 table entries and complete 616-gate word. The timed region includes process startup, source authentication, demands, solve, word emission, every observation, full inverse, invoice and result digest. Profiled preparation spends 99.48% in the baseline solver. Other processes were active; the interleaved ranges are disjoint.

The new implementation and proof were produced by Nick Petalas. Credit Hanson Sun / bbMisk for the recurrence, typed dirty-connector contract, original consumer and witnesses; retain woklerx / PR1439, mightyOil / PR1203, Hanson Sun / PR1246, Sagar Thakrar / PR1199 and PR1227, and Ross Richardson's connector lineage. Hypercube transforms and path ranking are classical. The temporal-gauge distance sweeps in PR1259, PR1270, PR1380 and PR1397 are credited precedents on other state spaces; their code is not imported. This contributes the observable-mask implementation, full witness preservation and complete preparation evidence.

Evidence

  • Before: 4,129,024 enumerated dense predecessor candidates on the performance workload. After: 131,072 directed hypercube slots, plus filtering and sorting, all included in complete timing.
  • All 12,288 exhaustive two-coordinate transforms agree on 49,152 labels with direct minimization, including unreachable states and all path-rank permutations.
  • Every one of 6,226 successful planner returns reached by the unchanged PR1523 consumer agrees in full, including all tables; all three planner rejections, the complete certificate and fourteen original controls remain identical. These establish compatibility of the new implementation, not a new mathematical audit of PR1523.
  • Twelve complete preparation comparisons cover connector-only and paid-output modes, changing restored sources, every observation and the full inverse. Eleven invalid-domain and five further semantic/integrity controls pass, including maximum supported resources and source corruption.
  • Local CPython 3.12.15 warning-strict normal and optimized commands pass in 1.20 s and 1.41 s. The registered pair passes in 2.81 s total. Package metadata/pins, syntax/function-size inspection, whitespace, and committed-byte/source-history checking pass. The publication preflight authenticates 24 files at 6c768ab715c63e4de8969845ebc5aff149c6de13.

The proof, generated source-bound result, raw timing pairs and separate profiles are in research/observable-hamming-transform/. Exact reproduction from the worktree root, standard library only:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/observable-hamming-transform
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/observable-hamming-transform/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/observable-hamming-transform/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/observable-hamming-transform --check-source-history

Other machines may substitute their CPython 3.12 path. Expected markers are PASS_OBSERVABLE_HAMMING_TRANSFORM, PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. benchmark.py prints five new alternating pairs; performance thresholds are absent from CI.

Limitations and unrun obligations

This improves preparation on one explicit abstract-interface workload. It supplies no new query optimum, gate saving, physical supplier, kappa or multiplication theorem. The emitted data program is identical. Small state spaces can incur extra setup overhead. No selected caller, physical frames, ownership, routing, precision, compiler or complete supplier funding is supplied. The predecessor has no stage/price-bit caps; implementation equivalence is claimed on the stated common bounded domain.

Independent human and formal proof-kernel review are unclaimed. Selected source-binding orientation passed; the selected scientific cold replay, Lean and all-size native builds were not run. Only the new isolated package changes. The selected frontier and all predecessor sources remain unchanged.

Open next questions

  1. Bind one actual source-versioned native caller to the observation and complete-price interface, then charge preparation, retained tables, routing, frames and every recursive call. A pinned caller is the missing first step.
  2. Determine when sparse reachable-state preparation beats dense sweeps. Start with identical complete workloads and preserve every lexicographic tie; no automatic dispatch threshold is supplied here.

Related open work

  • PR6427 studies closed fixed-weight parity tours with unchanged sources and a chosen visit order. This evaluates prescribed chronological observable demands with changing sources; their numerical optima are not compared. The live search found no other open PR on this correction-mask planner. Refreshed after CI: no additional same-planner work was found among the fifteen account PRs opened since the advance CLAIM.

CI notes

Both hosted checks, plan and replay (research/observable-hamming-transform), passed at 6c768ab715c63e4de8969845ebc5aff149c6de13 in run 41550936651. The completed checks were confirmed with gh pr checks. All registered and direct commands also passed locally. Hosted replay certifies the declared check coverage; the performance measurements remain local evidence and independent scientific review is unclaimed.

Canonical main was refreshed before publication and remains 7c49fe32c55de02c2c873655c804b16e4c3fef0a, priority revision 8, selected PR6030. Advance CLAIM. Live reservations, Discussion claims, current-main object/formula searches, recent account work and open/merged PR bodies were checked. Historical arbitrary diffs and unpublished work remain coverage limits.

Merge Danger

Door: two-way. This adds one isolated research package.

Blast Radius: package. No shared implementation, selected result, frozen evidence or predecessor file changes.

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.

1 participant