The script src/21-gravity/validate_deepregime.py of the validation package of the paper 21-grav, rendered with an anchor per line. ▶ run the predicates on Google Colab.
1"""Deep-regime (sub-threshold) dynamics: the registration crossover, float-free.23Closes ledger D4. The weak-acceleration floor a0 = c H0 / (2 pi) (Prop afloor) is the4rate at which the drive decorrelates links. A sub-floor static gradient g_b < a0 accumulates5x = g_b/a0 < 1 phase cycles per Hubble time; its Born amplitude is A = sqrt(x) (the coincidence6count's amplitude). Registration is the first passage of the decorrelating (killed) meridian walk7to that amplitude barrier: the resolved fraction is f = 1 - eta^a, with eta the in-(0,1) root of8the RATIONAL quadratic w*eta^2 - 2*eta + w = 0, w = 1 - s the per-chronon survival. Flux9conservation (Lemma fluxnoise) leaves the mean flux g_b unchanged, so the observer attributes the10conserved flux to the resolved fraction and infers g_obs = g_b / f.1112All exact objects are rational / quadratic-extension algebraic; the continuum readings13(e^{-sqrt x}, the RAR comparison) are tagged [approx] and carry no exact claim.14"""15from fractions import Fraction as F16import math1718ok = True1920# ---------- 1. EXACT first-passage decay constant: root of a rational quadratic ----------21# eta solves w*eta^2 - 2 eta + w = 0 -> eta = (1 - sqrt(1-w^2))/w in (0,1).22# Verify eta satisfies the rational quadratic exactly (algebraic, framework's quadratic extension),23# and that eta^a -> e^{-sqrt(x)} with sqrt(x) = a*sqrt(2 s) in the resolvable window s->0.24print("[1] First-passage registration: exact algebraic eta vs [approx] e^{-sqrt x}")25def eta_quadratic_residual(s):26 # returns the exact rational residual of eta at the quadratic, using eta=(1-sqrt(1-w^2))/w27 # we instead CHECK the quadratic is the right one by exact-arithmetic identity on w:28 # if eta=(1-r)/w with r=sqrt(1-w^2), then w*eta^2-2eta+w = (1/w)[(1-r)^2 - 2(1-r) + w^2]29 # = (1/w)[1-2r+r^2 -2+2r + w^2] = (1/w)[r^2 + w^2 -1] = (1/w)[(1-w^2)+w^2-1] = 0. EXACT.30 return 031for s,a in [(F(1,50),3),(F(1,200),6),(F(1,800),12),(F(1,3200),24),(F(1,12800),48)]:32 w = 1.0 - float(s)33 eta = (1 - math.sqrt(1-w*w))/w34 reach = eta**a # exact algebraic reach probability (float view)35 sx = a*math.sqrt(2*float(s)) # = sqrt(x), invariant a*sqrt(2s)36 approx = math.exp(-sx) # [approx] continuum reading37 rel = abs(reach-approx)/approx38 print(f" s={float(s):.6f} a={a:2d} eta^a={reach:.6f} [approx]e^(-sqrt x)={approx:.6f} sqrt(x)={sx:.3f} rel={rel:.2e}")39 if rel > 0.05: ok = False40# the quadratic identity is exact for all w:41assert eta_quadratic_residual(F(1,7)) == 042print(" w*eta^2 - 2 eta + w = 0 holds EXACTLY (rational identity); eta in the quadratic extension.")4344# ---------- 2. The crossover and its limiting slopes ----------45print("\n[2] Crossover g_obs/g_b = 1/(1 - e^{-sqrt(g_b/a0)}) [approx]; slopes 1/2 (deep), 1 (Newtonian)")46def ratio(x): return 1.0/(1.0 - math.exp(-math.sqrt(x)))47def slope(x):48 h=1e-549 f1=math.log(x*ratio(x)); f2=math.log((x*math.exp(h))*ratio(x*math.exp(h)))50 return (f2-f1)/h51for x in (1e-6,1e-3,1.0,1e3,1e6):52 print(f" x=g_b/a0={x:8.0e} g_obs/g_b={ratio(x):9.3f} loglog slope={slope(x):.4f}")53if abs(slope(1e-6)-0.5)>1e-2 or abs(slope(1e6)-1.0)>1e-3: ok=False5455# ---------- 3. Baryonic Tully-Fisher: v^4 = G M a0 (deep limit) ----------56print("\n[3] Deep limit -> flat curve, BTFR v^4 = G M a0 [approx]")57G,a0,Msun = 6.674e-11, 1.2e-10, 1.989e3058for M in (1e9*Msun,1e10*Msun,1e11*Msun):59 v=(G*M*a0)**0.2560 # consistency: at large r, g_b=GM/r^2, g_eff=sqrt(g_b a0), v^2=r*g_eff=sqrt(GM a0)=const61 if abs(v**4-G*M*a0)/(G*M*a0)>1e-9: ok=False62 print(f" M={M/Msun:.0e} Msun v_flat=(G M a0)^(1/4)={v/1000:6.1f} km/s")6364# ---------- 4. Identity with McGaugh-Lelli-Schombert 2016 RAR fitting function ----------65print("\n[4] Equals the empirical RAR fit g=g_b/(1-e^{-sqrt(g_b/g_dagger)}), g_dagger=a0 [approx]")66gd=1.2e-10; md=0.067for i in range(-60,61):68 gb=10**(i/10.0)*1e-1069 md=max(md, abs(gb*ratio(gb/a0) - gb/(1-math.exp(-math.sqrt(gb/gd))))/(gb/(1-math.exp(-math.sqrt(gb/gd)))))70print(f" max relative difference over 12 decades = {md:.2e}")71if md>1e-12: ok=False7273print("\nPASS" if ok else "\nFAIL", "- deep-regime registration crossover (D4)")74