Algorithm boxes (complete forms)

Notation: F is the discrete Fourier transform; · a Fourier coefficient; the 2/3 rule zeroes the top third of wavenumbers (dealiasing). These are the complete pseudocode forms of the in-body algorithm boxes. Each is written so that a reader, or an AI, can re-implement the result directly from this appendix—without opening the bundle—and reach the stated tolerance. [LOCK]

Notation: F is the discrete Fourier transform; · a Fourier coefficient; the 2/3 rule zeroes the top third of wavenumbers (dealiasing).

These are the complete pseudocode forms of the in-body algorithm boxes. Each is written so that a reader, or an AI, can re-implement the result directly from this appendix—without opening the bundle—and reach the stated tolerance. Notation: \mathcal F is the discrete Fourier transform; \hat\cdot a Fourier coefficient; the 2/3 rule zeroes the top third of wavenumbers (dealiasing).

Pillar I — 2D Euler/Navier–Stokes invariants

Input: grid N, viscosity \nu, band-limited initial vorticity \omega_0, time T, domain L=2\pi.\\ Steps:

  1. Build wavenumbers k_x,k_y; k^2=k_x^2+k_y^2; inverse k^{-2} (zero at \mathbf k{=}0); dealias mask |k_{x,y}|\le\frac23\max|k|.
  2. Stream function \hat\psi=\hat\omega/k^2; velocity u=\mathcal F^{-1}(ik_y\hat\psi), v=\mathcal F^{-1}(-ik_x\hat\psi).
  3. Nonlinear term N(\hat\omega)=-\mathcal F\!\big(u\,\omega_x+v\,\omega_y\big)\cdot\text{mask}.
  4. Time step by integrating-factor RK4 using the exact viscous factor e^{-\nu k^2\,dt} (so the linear part is integrated exactly).
  5. Each step record E=\tfrac12\!\int|u|^2 and Z=\tfrac12\!\int\omega^2.
Output: series E(t),Z(t); for \nu{=}0 the drifts dE/E_0,\,dZ/Z_0; for \nu{>}0 the ratio |dE/dt+2\nu Z|/(2\nu Z).\\ pass: \nu{=}0\Rightarrow|dE/E_0|,|dZ/Z_0|\le10^{-5}; \nu{>}0\Rightarrow budget ratio \le10^{-4} and Z(t) monotone non-increasing.

Pillar II — the RCCI capacity identity

Input: published audit samples, each a tuple (N,r,\varphi,s,L).\\ Steps:

  1. For each sample compute the predicted count from the identity N_\star\,r^2=\varphi\,s\,L^2, i.e. N_\star=\varphi s L^2/r^2.
  2. Residual \Delta=|N-N_\star| (and the analogous residuals of any derived metric reported in the audit).
Output: \max_{\text{samples}}\Delta and the metric residuals.\\ pass: identity reproduced to \le10^{-15} (machine precision); derived-metric residuals \le2.83\times10^{-12}.

Pillar III — length selection and the one-half law

Input: dispersion offsets \mu, curvature \varepsilon, hyper-diffusion \sigma over a range (linear part), and a Swift–Hohenberg field (nonlinear part).\\ Steps:

  1. Linear growth rate \lambda(k)=\mu+\varepsilon k^2-\sigma k^4.
  2. Maximize: \lambda'(k)=0\Rightarrow k_\star=\sqrt{\varepsilon/2\sigma}, independent of \mu; selected length L_\star=2\pi/k_\star.
  3. Sweep \sigma/\varepsilon; fit slope of \log L_\star vs \log(\sigma/\varepsilon).
  4. (Nonlinear) integrate Swift–Hohenberg to a steady pattern; measure the dominant wavenumber.
Output: k_\star(\sigma/\varepsilon) and the fitted exponent \hat\beta.\\ pass: k_\star independent of \mu; \hat\beta\to\frac12 (0.46\!\to\!0.50 refining the grid); the nonlinear pattern locks at k_\star (matching DNS \hat\beta\approx0.501).

Pillar IV — budget closure and Onsager saturation

Input: injection I, viscous coefficient a\nu, binding coefficient b, range of \nu.\\ Steps:

  1. Evolve dE/dt=I-a\nu E-bE to steady state E_\star=I/(a\nu+b).
  2. Split dissipation: viscous \eps_\nu=a\nu E_\star, binding \eps_{\rm bind}=bE_\star.
  3. Check closure \eps_\nu+\eps_{\rm bind}=I; track \eps_{\rm bind}/I as \nu\to0.
Output: budget residual |{\eps_\nu+\eps_{\rm bind}-I}|; ratio \eps_{\rm bind}/I vs \nu.\\ pass: residual \approx0 for all \nu; \eps_{\rm bind}/I\to0.998 as \nu\to0 (anomaly). A naive contact-merger closure leaves a residual \approx0.49 (the gate).

Pillar IV — events carry the flux (Burgers Duchon–Robert)

Input: viscosity \nu, grid N, time T; decaying Burgers from u=\sin x.\\ Steps:

  1. Integrate spectral Burgers (IF-RK4, 2/3 dealiasing) until a shock forms.
  2. Locate the shock (steepest descent, \arg\max(-u_x)); measure the jump \Delta u across it.
  3. Viscous dissipation \int\eps_\nu=\int\nu u_x^2.
  4. Duchon–Robert flux density \Pi_\ell(x)=\tfrac14\!\int \phi_\ell'(r)\,[u(x{+}r){-}u(x)]^3\,dr with a Gaussian filter \phi_\ell, at an inertial scale \ell\!\sim\!8\,dx.
  5. Concentration: fraction of \int|\Pi_\ell| within \pm0.15 of the shock.
Output: \int\eps_\nu, the event flux (\Delta u)^3/12, the concentration fraction.\\ pass: \int\eps_\nu\approx(\Delta u)^3/12 (to \sim10\%), \nu-independent, with \sim100\% of the flux at the shock.

Pillar IV — 2D NS flux concentrates on events (multid_flux.py)

Input: grid N, viscosity \nu, time T, filter scale \ell; band-limited random vorticity (energy near k\!\sim\!8).\\ Steps:

  1. Evolve 2D NS (vorticity, IF-RK4, 2/3 dealiasing) to a filamented snapshot.
  2. Gaussian-filter at \ell: \hat{\bar\omega}=\hat\omega\,e^{-k^2\ell^2/2}; recover \bar u,\bar v,\bar\omega via the stream function.
  3. Subfilter vorticity flux \sigma_j=\overline{u_j\omega}-\bar u_j\,\bar\omega (filter the product, subtract the product of filtered fields).
  4. Local enstrophy flux \Pi=-(\sigma_x\partial_x\bar\omega+\sigma_y \partial_y\bar\omega); palinstrophy density g^2=|\nabla\bar\omega|^2.
  5. Sort cells by g^2 (events first); cumulate the positive flux \Pi_+; read the top-20\% fraction, the area carrying half, and \mathrm{corr}(\Pi,g^2). Repeat for N=192,256,320 at fixed physical \ell.
Output: top-20\% forward-flux fraction; half-flux area fraction; \mathrm{corr}(\Pi,g^2); their stability in N.\\ pass: top-20\%\approx60\%, half-flux area \approx1216\%, \mathrm{corr}\approx0.28, stable across N — the events carry the inter-scale flux to the small scale.

Pillar IV — 3D NS energy flux concentrates on strain events (ns3d.py)

Input: grid N, viscosity \nu, step dt, forcing energy E_f, filter \ell; random divergence-free IC.\\ Steps:

  1. Evolve 3D NS (velocity/rotational form, IF-RK4, 2/3 dealias), holding the energy in |k|\!\in\![1,2] at E_f (low-k forcing), until developed: the velocity-derivative skewness \langle(\partial_x u)^3\rangle/\langle(\partial_x u)^2\rangle^{3/2}\to\approx-0.5.
  2. Gaussian-filter at \ell; form the subfilter stress \tau_{ij}=\overline{u_iu_j}-\bar u_i\bar u_j and the filtered strain \bar S_{ij}=\tfrac12(\partial_i\bar u_j+\partial_j\bar u_i).
  3. Local energy flux \Pi=-\sum_{ij}\tau_{ij}\bar S_{ij}; strain density |\bar S|^2=\sum_{ij}\bar S_{ij}^2.
  4. Sort cells by |\bar S|^2 (events first); cumulate the positive flux; read the forward fraction, the top-20\% share, the half-flux volume, and \mathrm{corr}(\Pi,|\bar S|^2). Repeat for N=64,80,96,128 at fixed physical \ell.
Output: forward fraction; \langle\Pi\rangle/\eps; top-20\% share; half-flux volume; correlation; convergence in N.\\ pass: inviscid energy conserved to \sim10^{-16} (solver check); \langle\Pi\rangle>0, 9495\% forward; top-20\%\approx6066\%, half-flux volume \approx1014\%, \mathrm{corr}\approx0.80, converged across N.

Event RG — the \Pi_L plateau (event_rg.py)

Input: exponents \alpha,\psi,\chi; coarse-graining factor \lambda; steps; initial (L,\eps_{\rm bind},\sigma_{\rm eff})=(1,1,1).\\ Steps:

  1. Each step record \Pi_L=L^{1+\alpha}\eps_{\rm bind}/\sigma_{\rm eff}.
  2. Coarse-grain: L\leftarrow\lambda L, \eps_{\rm bind}\leftarrow\lambda^{-\chi}\eps_{\rm bind}, \sigma_{\rm eff}\leftarrow\lambda^{\psi}\sigma_{\rm eff}.
  3. Gap g=(1+\alpha)-\psi-\chi.
Output: the \Pi_L sequence and g.\\ pass: g=0\Rightarrow\Pi_L constant (plateau, fixed point); g>0\Rightarrow\Pi_L grows; g<0\Rightarrow\Pi_L decays. Measured: 1.0\to1.0, 1.0\to7.5, 1.0\to0.18.

Mechanism M — forced co-rotation, merger, pumping (corotation.py)

(M1) Frustration \to co-rotation. Build the contact graph of a square and a triangular lattice; greedy two-colour it (counter-rotation attempt); count frustrated edges.\\ pass: square =0 (bipartite \Rightarrow counter-rotate, net 0); triangular =48 (not bipartite \Rightarrow co-rotate forced).\\ (M2) Co-rotation \to larger rotation. 2D Navier–Stokes; two strongly overlapping Gaussian vortices, same or opposite sign; integrate; count connected strong-vorticity blobs (|\omega|>0.4\max).\\ pass: same-sign \to1 (merged); opposite \to2.\\ (M3) Rotation \to through-flow. Ekman spiral W(z)=W_\infty(1-e^{-(1+i)z/\delta}), \delta=\sqrt{\nu/\Omega}; radial inflow transport M=\int(W_\infty-\mathrm{Re}\,W)\,dz; fit \log M vs \log\Omega.\\ pass: slope -1/2 (M\propto\sqrt{\nu/\Omega}), measured -0.500.

G-Q — the 81{+}1 lattice-with-inflow (lattice_inflow.py)

Input: 3D lattice \#\{R^2\le6\}=81 co-rotating cells +1 nozzle; planar disk slice \{x^2+y^2\le6\} for the Biot–Savart test; rotation \Omega, \nu.\\ Steps:

  1. Net circulation around a loop enclosing the disk cells, for co-rotating signs and for an alternating control.
  2. d{=}3: net radial flux of a regular divergence-free field through an enclosing sphere =0 (Gauss + regularity, no external source).
  3. d{=}2: axial through-flux Q_z=2\pi R\,M fed by the Ekman radial inflow M (open rotation axis).
Output: circulations; Q_{3D}; Q_{2D}.\\ pass: co-rotating circulation adds (=21) vs control (\approx0); Q_{3D}=0 (nozzle closes); Q_{2D}>0 (sustained). The dimensional split matches E3, so the falsification test passes.

Universality U1–U3 (universality.py)

(U1) Burgers anomalous dissipation. Integrate Burgers at several \nu; record \int\eps_\nu. pass: \int\eps_\nu saturates (\nu-indep, \sim6\% spread).\\ (U2) Capacity identity in dimension d. For d=2,3,4,5 form N v_{\rm eff} and \phi V_{\rm core} from a packed core. pass: |Nv_{\rm eff}-\phi V_{\rm core}|\le10^{-16} (identity, dimension-general).\\ (U3) Reaction–diffusion selection. Two-species dispersion; locate the fastest-growing mode k_\star. pass: k_\star matches the extremum-selection prediction to 68\%.

Extensibility E1–E4 (extensibility.py, rigid_shell.py)

(E1) Genome = fluid. Condensate identity N v_{\rm eff}=\phi V_{\rm core} in d{=}3; droplet preferred size at jamming \phi^\ast\approx0.64. pass: residual =0.\\ (E2) Droplet = length selection. Rayleigh–Plateau dispersion of a liquid column; maximize growth. pass: k_\star a=0.697, \lambda_\star=9.01\,a.\\ (E3) Plane breathes, sphere closes. Planar continuity u_r=-Ar\Rightarrow w=2Az (axial outflow); spherical u_r\propto1/R^2 (no axis). pass: 2D sustains, 3D closes.\\ (E4) Rigid shell. \#\{R^2\le6\}=81=3^4, R^2=7 empty (Legendre), so 82=81{+}1; n-fold rate \nu_n=n\,\pi^{2(n-1)}; quantum length D triangulated three ways. pass: D spread 0.039\%; relative spread of L_\star narrows 3.4\%{\to}1.8\% as coordination grows.

Marginal substrate — relaxed moduli and the fluidity intercept (marginal_fluidity.py)

setup: 3D bidisperse (50{:}50, ratio 1.4) harmonic spheres, V(r)=\tfrac12(1-r/\sigma_{ij})^2 for r<\sigma_{ij}, periodic box V{=}1; N\in\{128,256\}, \phi\in[0.650,0.720] (7 values) \times 4 seeds.\\ minimize: L-BFGS \to FIRE \to L-BFGS to residual force <10^{-7}. backbone: iteratively remove rattlers (contacts <d{+}1); z=2N_c/N_{\rm bb}.\\ moduli (analytic, FD-verified): affine (Born) shear G_{\rm Born}=\sum_b\,[\,V''\,(n_xn_y r)^2+V'\,r\,n_y^2(1-n_x^2)\,]/V; bulk B=\sum_b V'' r^2/(d^2V)+\tfrac{d-1}{d}P with virial pressure P; mismatch \Xi=-\partial^2E/\partial\gamma\,\partial\xv assembled per bond.\\ non-affine (the trap and its avoidance): never form an eigendecomposition pseudoinverse—near the margin the soft modes make \Xi^{\mathsf T}H^{+}\Xi over-subtract through near-zero 1/\omega^2 weights. Instead pin d DOF of the most-coordinated backbone particle, Cholesky-factor the reduced positive-definite H, solve, apply 2 iterative-refinement steps; then G_{\rm rel}=G_{\rm Born}-\Xi^{\mathsf T}H^{+}\Xi/V with 0\le G_{\rm rel}\le G_{\rm Born} by construction. Keep negative accepted values if any occur (no clamping).\\ acceptance (physical, untuned): jammed (P>10^{-12}), positive-semidefinite (Cholesky succeeds), residual force <10^{-7}.\\ fit: pooled G_{\rm rel}=a\,(z-z_0); bootstrap (3000\times) CI for z_0. pass: CI \ni 2d; \langle G_{\rm rel}\rangle monotone in z; B finite at the lowest-z quartile; c^2=B_{\rm rel}/\rho size-independent.\\ result: z_0=5.99, CI [5.49,6.29]\ni6 (n{=}56); quartile means 4.04\to12.39; c^2 spread 0.4\%; softening \langle B_{\rm rel}/B_{\rm Born}\rangle=0.711; 56/56 accepted, 0 negative.

Rotation unjams; forced-radius attractor (unjam_inflow.py)

packings: as above, N{=}128, \phi\in\{0.652,\dots,0.720\} (5 values) \times 3 seeds.\\ rigid rotation: extension per bond under \mathbf u=\theta\,\hat{\mathbf z}\times\rv is \hat{\mathbf n}\cdot(\hat{\mathbf z}\times\rv)\equiv0; measured \le2.8\times10^{-17}. PASS\\ shear reserve: per extending bond the breaking strain is \gamma_b=\mathrm{ov}_b/(n_xn_y r)_b; track the distribution (q_{05}, median) across the \phi ensemble against pressure. pass: q_{05} ratio 5.9\times, \mathrm{corr}(\log q_{05},\log P)=0.96, \mathrm{corr}(\log\mathrm{med},\log P)=0.99 (the single first break is extreme-value noise: reported, not gated).\\ attractor: integrate \dot x=\alpha x^{-5}-x^{-4} (RK4) from x_0\in\{0.2,0.5,1,2,5\} with inherited \alpha=2/\pi. pass: all \to x^\star=\alpha to 10^{-15}; F'(x^\star)=-(\pi/2)^5=-9.5631.

Transition class — the G-SOC rules land on DP (transition_dp.py, 3 stages)

model: 1D ring; reserve x from the pseudogap (1{+}\theta)x^{\theta} (\theta{=}0.45, flagged); inactive site unjams if \lambda\,n_{\rm act}\,U>x; active re-jams w.p. q{=}0.35; toggled sites redraw x. All-inactive is absorbing.\\ stage 1: slope-matched bisection (L{=}30k, T{=}4k), then curvature-minimised refine (L{=}80k, T{=}20k): \lambda_c{=}1.2544, \delta{=}0.158.\\ stages 2–3: spreading (R{=}512, T{=}6k): \theta_s windows 0.382{\to}0.356{\to}0.335, \delta'{=}0.105, hyperscaling sum 0.662 vs d/z{=}0.6326; lifetimes \nu_\parallel{=}1.637 (0\% censored); activity correlation (fit M_2{-}1): a{=}0.482{\pm}0.011 vs 2\beta/\nu_\perp{=}0.504.\\ pass: five for five on DP (1{+}1d); mean-field (\delta{=}1) and compact-DP (\delta{=}0.5) excluded. SOC avalanche \tau: cutoff >10^6 at 0.35\% below threshold, thin statistics — reported, not gated.