Skip to content

Optimize cyclic-deferred frames and phase-aware role compilation (kappa = 1.11513943837e-4) - #133

Closed
Th0rgal wants to merge 7 commits into
CrocSwap:mainfrom
Th0rgal:research/optimized-deferred-frames
Closed

Th0rgal wants to merge 7 commits into
CrocSwap:mainfrom
Th0rgal:research/optimized-deferred-frames

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Oct 9, 2026

Copy link
Copy Markdown

Summary

Extends the research/cyclic-deferred package on top of eumemic's PR #117 complex DAG (inputs/complex-dag.json.gz, retained byte-for-byte with SHA-256 3c034d0aae388ef567a454826f4f48b26fd8a94c71e8ffed4835271b349a783b) and PR #114's saturated-frame / literal reflection audit package, advancing the conditional exponent saving from PR #114's $\kappa = 1.09281094468 \times 10^{-4}$ (109281094468 / 10^15) to:

$$\kappa = 1.11513943837 \times 10^{-4} = \frac{111513943837}{10^{15}} > 2^{-14}$$

with complex saving:

$$a_{\text{complex}} = \frac{111538935}{10^{12}} = 1.11538935 \times 10^{-4}$$

(+2,233,838 grid points on $a_{\text{complex}}$ over PR #114's 109305097 / 10^12, and +6.72% over PR #117's $\kappa = 1.044939 \times 10^{-4}$). Supersedes PR #114, PR #117, PR #118, and PR #120 while preserving all physical ledgers, literal forward/reflected scalar-charge audits, and upstream attributions.

Also fixes a bug in PR #114's research/cyclic-deferred/complex_deferred.py (line 557 wrote json.dumps(out, indent=1) instead of indent=2, causing verify.py to fail in test_controls.py with Source hash mismatch: complex-profile.json after regeneration).


Technical Contributions

All four improvements operate purely on the $\mathbb{F}_2$ frame assignment, role-compilation schedule, and deferred readout selection on the unchanged PR #117 graph ($h = 24, v = 2024, c = 91770, q = 8120, \text{links} = 71185, R = 28705, W = 124390992, \text{total_rank} = 71647349312$):

  1. Radical-Complement Initial Frame Lifting (U2):

    • In PR Shared completed cores and physical frames: conditional κ = 1.23988197806e-4 #114, whenever the top-down orthogonal kernel intersection $W_x = \ker(K_x) \cap \bigcap_{t \in \text{succ}(x)} U_t$ at an addition node $x$ had a non-zero symplectic radical, U[x] was dropped all the way down to the elementary label envelope $E_x = \text{envelope}(x)$ (dropping 51,781 of the 91,770 addition nodes).
    • Because $E_x \subseteq W_x$ is always nondegenerate over $\mathbb{F}_2$, we decompose $W_x = E_x \oplus (W_x \cap E_x^\perp)$ and extract a maximal nondegenerate direct complement $C_x = \text{sat_nonsingular_part}(W_x \cap E_x^\perp)$, setting $U_x = E_x \oplus C_x$. This keeps $E_x \subseteq U_x \subseteq W_x$ nondegenerate and nested while lifting 69,450 addition nodes prior to placement and expanding initial copy-role candidate subspaces.
  2. Phase-Aware Role Compilation & Target-Reach Sacrifice Ordering:

    • In the role compiler, a copy role $f$ created by ('copy', piv, f, x) at node $x$ is dragged into Phase 1 (touched) whenever piv is subsequently touched by a Phase-1 operation (either via a later copy at $x$ or via free[0] at a descendant of $x$).
    • Partitioning free(x) into centre-reaching uses (yes_c) and non-centre-reaching uses (non_c), assigning k0 = non_c[0] (chosen as the use in non_c with the largest target reach $|\text{u_reach}|$) to piv, emitting yes_c copies first, and emitting non_c[1:] copies last (after all Phase-1 operations on piv at $x$):
      • Reduces phase_one_ops from 18,844 to 16,353 (-2,491),
      • Reduces phase_one_roles (touched) from 13,555 to 11,064 (-2,491),
      • Expands copy-role deferral candidates from 6,385 to 8,876 (+39.0%), and
      • Cuts the mean target reach of copy-role candidates in half from 8.67 to 4.36.
  3. Lazy Effective-Target Placement & Exact-Moment Local Search:

    • Replaces static one-shot candidate ordering with a lazy priority queue weighted by $2^{\dim(X)} / (r \cdot r_{\text{eff}})$, where $r_{\text{eff}}(s, X) = |{t \in \text{reach}(s) : X \notin \text{byT_set}[t]}|$ counts targets not already carrying the exact subspace $X$, re-inserting candidates whenever intersection shrinks $\dim(X)$ or $r_{\text{eff}}$.
    • Follows placement with cached steepest-ascent local search under the exact moment objective, pruning or snapping down net-negative singleton and small-cluster target-front levels (4,464 deferred roles retained with total dimension 59,912).
  4. Bidirectional & Plateau-Peeling Frame Sweeps (optimize_U_for_placed):

    • For any role $s$, the internal steps along holds[s] partition $h - \dim(\sigma_s)$ into positive increments $\Delta_i$. Since $t \mapsto t \ln(m/t)$ is strictly concave (subadditive), intermediate steps strictly between adjacent frames split one larger step into smaller steps and increase the moment.
    • Alternating bottom-up and top-down sweeps over $U_x \in [L_x, W_x]$ with directional $\Delta c = 0$ tie-breaking and connected-component plateau peeling collapses redundant intermediate role-chain steps while maintaining all $\mathbb{F}_2$ nondegeneracy and nesting invariants.

Comparison Across Cyclic / Deferred Witnesses

Witness Additions $c$ Links Roles $R$ Phase-1 Roles Deferred Roles Complex Saving $a_{\text{complex}}$ Certified $\kappa$
PR #117 (eumemic) 91,770 71,185 28,705 13,555 2,000 104,515,000 / 10^12 1.044939e-4
PR #114 (eumemic) 91,770 71,185 28,705 13,555 4,706 109,305,097 / 10^12 1.09281094468e-4
This PR 91,770 71,185 28,705 11,064 4,464 111,538,935 / 10^12 1.11513943837e-4

Verification

python3 -B research/cyclic-deferred/verify.py
python3 -B research/cyclic-deferred/test_controls.py
python3 -B research/cyclic-deferred/certificate.py

All 16 negative controls in test_controls.py, the isolated full regeneration in verify.py, the $\mathbb{Z}/(2^{61}-1)$ arbitrary-scratch replay, and the literal forward/reflected scalar-charge audit in reflection_audit.py pass with assertions enabled.


Attribution & Provenance

icekylinx and others added 7 commits October 9, 2026 07:11
…78e-5

Under PR104's opposite-bank rule every residual is one child, so deferred
readouts pay on both networks. Bit: Swapnil Jain's round-seven deferred word,
unchanged (stopped saving 1.2402e-4). Complex: PR104's h=24 network with lifted
binary frames and deferred readouts on 8,893 of 44,918 roles (8.58628e-5).
Replay with arbitrary scratch, exact F2 frame checks, exact moments and the
47-constraint assembly give kappa = 429239/5000000000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Thank you @Th0rgal. This contribution is now recorded on main in the scoped reconciliation review and contributor credits.

Contribution: Radical complements, phase-aware roles, lazy deferral and plateau pricing.

Review and limits: Exact-head CI evidence; whole-profile accounting, not additive local savings.

The complete original source, proof/research notes, notices and relevant replay/CI evidence are retained through the pinned source archive. The review distinguishes fresh runs, exact-head historical CI and prior integration evidence. Closing this historical PR as reconciled; its obsolete headline does not replace the current selected bound, and draft/retracted claims retain their explicit qualifications.

Reviewed head: 2c97e8ab1578d05d0aacf03903f458b088c7dd50. Publication: b84ba67156a01f9c2cb34fe1e3cb1dcdeab00d9c.

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.

5 participants