Does light charge the quons? › Files cited on the page › check_models_fable/

check_models.py

In the investigation at sim/models_AB/check_models_fable/check_models.py · last changed in commit 5394780, 16 November 2026 · 14,819 bytes · the folder as a zip


"""Twelfth independent review (Fable 5.1, effort max), 16 November 2026: reproduction of the key numbers of trials 9 (Model A)
and 10 (Model B) with code written independently of sim/models_AB/model_A.py and model_B.py, from the locks' formulas.
Run: ~/aspden-review-venv/bin/python3 check_models.py
"""
import numpy as np
from scipy import integrate, constants as K
from scipy.linalg import eigh_tridiagonal

c, hbar, e, eps0, mu0, me = K.c, K.hbar, K.e, K.epsilon_0, K.mu_0, K.m_e
alpha_C = e**2 / (4*np.pi*eps0*hbar*c)          # CODATA alpha (scipy)
alpha_P = 1/137.035999178                        # PDG 2024 eq. 10.11
hbarc_eVm = hbar*c/e
mec2_eV = me*c**2/e
print(f"alpha^-1 CODATA(scipy) = {1/alpha_C:.9f}; PDG = {1/alpha_P:.9f}; ratio-1 = {alpha_P/alpha_C-1:.3e}")

# ============ Model A, Q1: one-loop Delta alpha at MZ ============
print("\n=== A.Q1 one-loop Delta alpha(MZ^2) ===")
def dalpha_num(s, m, NcQ2, a=alpha_P):
    # (2a/pi) NcQ2 int_0^1 x(1-x) ln|1 - x(1-x) s/m^2| dx  (numerical, scipy quad, splitting at the log's zeros)
    r = s/m**2
    f = lambda x: x*(1-x)*np.log(abs(1 - r*x*(1-x)))
    pts = []
    if r > 4:
        b = np.sqrt(1-4/r); pts = [(1-b)/2, (1+b)/2]
    val, err = integrate.quad(f, 0, 1, points=pts or None, limit=400)
    return 2*a/np.pi*NcQ2*val
def dalpha_closed(s, m, NcQ2, a=alpha_P):
    # closed form of the real part, s > 4 m^2:  (a/3pi) NcQ2 [ -5/3 - 4m^2/s + (1 + 2m^2/s) beta ln((1+beta)/(1-beta)) ]
    x = 4*m**2/s; b = np.sqrt(1-x)
    return a/(3*np.pi)*NcQ2*(-5/3 - x + (1 + x/2)*b*np.log((1+b)/(1-b)))
ME, MMU, MTAU, MZ, MT = 0.51099895, 105.6583755, 1776.86, 91187.6, 172500.0   # MeV
s = MZ**2
sh = {}
for nm, m, ncq2 in (("e",ME,1),("mu",MMU,1),("tau",MTAU,1)):
    sh[nm] = dalpha_num(s, m, ncq2)
    print(f"  {nm:>3}: numeric {sh[nm]:.6f}   closed form {dalpha_closed(s,m,ncq2):.6f}   large-s {alpha_P/(3*np.pi)*(np.log(s/m**2)-5/3):.6f}")
sh["top"] = dalpha_num(s, MT, 3*(2/3)**2)
print(f"  top: numeric {sh['top']:.3e}   small-s form -(2a/pi)(4/3)(s/m^2)/30 = {-(2*alpha_P/np.pi)*(4/3)*(s/MT**2)/30:.3e}")
DA5, DA3 = 0.02783, 0.006030
tot = sh["e"]+sh["mu"]+sh["tau"]+sh["top"]+DA5
inv_aMZ = (1/alpha_P)*(1-tot)
print(f"  leptons {sh['e']+sh['mu']+sh['tau']:.6f}; all {tot:.5f} -> {100*tot:.2f}% ; 1/alpha(MZ) = {inv_aMZ:.3f}; Z3(MZ) = {1-tot:.5f}")
print(f"  (without the top's -{abs(sh['top']):.1e}: {100*(tot-sh['top']):.2f}%)")
# light quarks' perturbative running between 2 GeV and MZ (to judge the 'charm and bottom [lumped]' row)
lq = alpha_P/(3*np.pi)*2*(np.log(MZ**2/2000**2) - 5/3)
cb = dalpha_num(s, 1270.0, 3*(2/3)**2) + dalpha_num(s, 4180.0, 3*(1/3)**2)
print(f"  u,d,s one-loop running 2 GeV->MZ (sum NcQ^2 = 2): {lq:.4f}; one-loop c+b at MZ (m_c 1.27, m_b 4.18 GeV): {cb:.4f}; DA5-DA3 = {DA5-DA3:.4f}")

# ============ A.Q2 running above MZ ============
print("\n=== A.Q2 one-loop QED running above MZ ===")
def inv_alpha(L):
    l = np.log(L/MZ)
    return inv_aMZ - (2/(3*np.pi))*((20/3)*l + (4/3)*max(0.0, np.log(L/MT)))
MPL = 1.220890e22   # MeV
for nm, L in (("MZ",MZ),("1 TeV",1e6),("1e16 GeV",1e19),("Planck",MPL)):
    ia = inv_alpha(L); print(f"  {nm:>9}: 1/alpha {ia:8.3f}  f=Z3 {ia*alpha_P:.4f}  1-f {1-ia*alpha_P:.4f}")
from scipy.optimize import brentq
LL = np.exp(brentq(lambda l: inv_alpha(MZ*np.exp(l)), 1, 200))*MZ
print(f"  Landau pole: {LL/1e3:.3e} GeV = {LL/MPL:.3e} Planck masses")
iaP = inv_alpha(MPL)
for mx in (1e6, 1e19):
    print(f"  extra unit-charge Dirac species of mass {mx/1e3:.0e} GeV for f = 0 at the Planck mass: {iaP*(3*np.pi/2)/np.log(MPL/mx):.1f}")

# ============ A.Q3 tolerances ============
print("\n=== A.Q3 delta = h/s ===")
for nm, sv in (("e",sh["e"]),("mu",sh["mu"]),("tau",sh["tau"]),("light hadrons",DA3),("DA5-DA3",DA5-DA3)):
    print(f"  {nm:>14}: s {sv:.5f}  delta(e) {6.2e-20/sv:.2e}  delta(f) {1.2e-19/sv:.2e}")
# speed change for mismatch delta: v^2/c^2 = (1 - s(1-delta))/(1 - s) -> check first order s*delta/2
sv, dl = 0.0174, 1e-6
print(f"  check: exact dv/c for s={sv}, delta={dl}: {np.sqrt((1-sv*(1-dl))/(1-sv))-1:.4e} vs s*delta/2 = {sv*dl/2:.4e}")

# ============ A.Q4 Minkowski relations ============
print("\n=== A.Q4 Minkowski relations (c = 1) ===")
rng = np.random.default_rng(7)
def worst_residual(eps, mu, N=2000, vmin=0.0, vmax=0.9):
    worst, least = 0, np.inf
    for _ in range(N):
        E, B = rng.normal(size=3), rng.normal(size=3)
        v = rng.normal(size=3); v *= rng.uniform(vmin, vmax)/np.linalg.norm(v)
        # unknowns D, H:  D + v x H = eps (E + v x B);  B - v x E = mu (H - v x D)  ->  H + v x D ... solve 6x6
        def cx(a): return np.array([[0,-a[2],a[1]],[a[2],0,-a[0]],[-a[1],a[0],0]])
        M = np.zeros((6,6)); M[:3,:3] = np.eye(3); M[:3,3:] = cx(v); M[3:,3:] = mu*np.eye(3); M[3:,:3] = -mu*cx(v)
        rhs = np.concatenate([eps*(E + np.cross(v,B)), B - np.cross(v,E)])
        D, H = np.split(np.linalg.solve(M, rhs), 2)
        r = max(np.linalg.norm(D-eps*E)/np.linalg.norm(eps*E), np.linalg.norm(H-B/mu)/np.linalg.norm(B/mu))
        worst, least = max(worst, r), min(least, r)
    return worst, least
for kap in (1.37, 2.0, 10.0):
    print(f"  kappa={kap}: matched worst {worst_residual(kap, 1/kap)[0]:.1e};  mu*1.01 least (|v|>=0.1) {worst_residual(kap, 1.01/kap, vmin=0.1)[1]:.1e}")
# analytic: D=eps E, B=mu H satisfy the relations iff (1/mu - eps) v x B = 0 and (1 - eps mu) v x E = 0
print("  analytic: substituting D=eps E, B=mu H leaves (1/mu - eps)(v x B) = 0 and (1 - eps mu)(v x E) = 0: both vanish iff eps mu = 1 (c=1)")

# ============ A.Q5 Aspden's orbit field ============
print("\n=== A.Q5 orbit field, Heisenberg-Euler, LEP, GW170817, Breit-Wheeler ===")
d = 6.37403e-13; r = 0.302916*d; m0 = 0.0407813*me; n = 1/d**3
HOm_eV = 510.999e3; Om = HOm_eV*e/hbar
E_orb = n*e*2*r/eps0; E_orb2 = m0*Om**2*r/e
E_c = me**2*c**3/(e*hbar)
print(f"  E_orb = n e 2r/eps0 = {E_orb:.4e} V/m; m0 Omega^2 r/e = {E_orb2:.4e}; E_c = {E_c:.4e}; E_orb/E_c = {E_orb/E_c:.5f}")
a0 = e*E_orb/(me*Om*c)
print(f"  quiver a0 = eE/(m Omega c) = {a0:.4f}; Keldysh gamma = 1/a0 = {1/a0:.1f}; ponderomotive U_p = a0^2 m c^2/4 = {a0**2*mec2_eV/4:.1f} eV")
x = E_orb/E_c
k = alpha_C/(90*np.pi)*x**2
n_perp, n_par = 4*k, 7*k
print(f"  HE (static-field formulas): n_perp-1 = {n_perp:.3e}; n_par-1 = {n_par:.3e}; birefringence {n_par-n_perp:.3e}")
# cross-check the standard magnetic birefringence coefficient: Delta n = 3 (alpha/90pi)(B/B_c)^2 -> known 4.0e-24 /T^2
B_c = me**2*c**2/(e*hbar)
print(f"  check standard: Delta n per T^2 in a magnetic field = {3*alpha_C/(90*np.pi)/B_c**2:.3e} (literature ~4.0e-24 T^-2)")
# with c20 of Battesti-Rizzo: 2 alpha^2 hbar^3/(45 m^4 c^5) times energy density eps0 E^2
c20 = 2*alpha_C**2*hbar**3/(45*me**4*c**5)
print(f"  c20 eps0 E^2 / ((alpha/90pi)(E/Ec)^2) - 1 = {c20*eps0*E_orb**2/k - 1:.1e} (one alpha); with PDG alpha in c20 only: {(2*alpha_P**2*hbar**3/(45*me**4*c**5))*eps0*E_orb**2/(alpha_P/(90*np.pi)*x**2) - 1:.2e}")
LEP = 1.2e-11
print(f"  LEP: n_perp-1 / 1.2e-11 = {n_perp/LEP:.0f}; Cherenkov threshold gamma = {1/np.sqrt(2*n_perp):.0f} -> {mec2_eV/np.sqrt(2*n_perp)/1e9:.2f} GeV")
D26 = 26*K.parsec*1e6
dt = n_perp*D26/c
print(f"  GW170817: delay over 26 Mpc = {dt:.3e} s = {dt/K.year:.1f} yr; n_perp-1 / 3e-15 = {n_perp/3e-15:.2e}")
print(f"  birefringence / 1e-37 = {(n_par-n_perp)/1e-37:.1e}")
r_e = K.physical_constants["classical electron radius"][0]
def sigma_BW(s_m2):
    if s_m2 <= 4: return 0.0
    b = np.sqrt(1-4/s_m2)
    return (np.pi*r_e**2/2)*(1-b**2)*((3-b**4)*np.log((1+b)/(1-b)) - 2*b*(2-b**2))
w = HOm_eV/mec2_eV
print(f"  threshold with one zero-momentum quantum of energy hbar Omega: E_gamma >= (4-w^2)/(2w) m c^2 = {(4-w**2)/(2*w)*mec2_eV/1e6:.4f} MeV")
n_f = eps0*E_orb**2/2/(HOm_eV*e)
print(f"  n_f = eps0 E^2/(2 hbar Omega) = {n_f:.3e} m^-3")
for Eg in (1.0, 10.0, 1000.0, 31000.0):
    s_ = (2*Eg*1e6*HOm_eV + HOm_eV**2)/mec2_eV**2
    sg = sigma_BW(s_)
    print(f"  E_gamma {Eg:8.1f} MeV: s/m^2 {s_:11.3f}  sigma {sg:.3e} m^2  mfp {1/(n_f*sg):.3e} m")
# Breit-Wheeler asymptote check
S = 1e8; print(f"  BW asymptote check at s/m^2=1e8: {sigma_BW(S):.4e} vs 4 pi r_e^2 (ln s - 1)/s = {4*np.pi*r_e**2*(np.log(S)-1)/S:.4e}")

# ============ Model B ============
print("\n=== B variant i ===")
m0c2 = m0*c**2/e
gam = 1/np.sqrt(1-0.25)
L = gam*m0*(c/2)*r/hbar
print(f"  L = gamma m0 (c/2) r = {L:.5f} hbar; de Broglie wavelength h/p = {2*np.pi*hbar/(gam*m0*c/2):.3e} m vs circumference 2 pi r = {2*np.pi*r:.3e} m (ratio {2*np.pi*hbar/(gam*m0*c/2)/(2*np.pi*r):.1f})")
a_L1 = hbar/(gam*m0*c/2)
print(f"  radius for L = hbar at c/2: {a_L1:.4e} m = {a_L1/d:.2f} d")
hw_p = 361.331e3; hw_E = hw_p/np.sqrt(3)
u = np.sqrt(hbar/(2*m0*(hw_E*e/hbar)))
print(f"  hbar omega_E = {hw_E/1e3:.3f} keV; u_min = sqrt(hbar/(2 m0 omega_E)) = {u:.4e} m = {u/d:.3f} d; p_zp = hbar/u = {hbar/u*c/e/1e3:.1f} keV/c vs m0 c = {m0c2/1e3:.2f} keV/c")
# Jensen check with a toy spectrum: three branches with w^2 summing to wp^2: mean(1/w) >= sqrt(3)/wp
rng2 = np.random.default_rng(1)
W2 = rng2.dirichlet(np.ones(3), size=20000)   # fractions of wp^2 across three branches at random k
print(f"  Jensen check (random 3-branch spectra): mean(1/w)*wp = {np.mean(1/np.sqrt(W2)):.3f} >= sqrt(3) = {np.sqrt(3):.3f}")
a_ws = (3/(4*np.pi*n))**(1/3); aB = 4*np.pi*eps0*hbar**2/(m0*e**2); rs = a_ws/aB
print(f"  a_WS = {a_ws:.4e} m ({a_ws/d:.3f} d); a_B*(quon) = {aB:.4e} m = {aB/d:.0f} d; r_s = {rs:.4e}")
for crit in (106, 160):
    print(f"  r_s = {crit}: mass at Aspden's spacing {m0c2*crit/rs/1e9:.2f} GeV; spacing with his m0 {d*crit/rs:.3e} m; density ratio (crit/rs)^3 = {(crit/rs)**3:.1e}")
print(f"  with eps_b = eps0/4 (Coulomb 4x stronger): r_s = {4*rs:.2e}")
# relativistic regime: Coulomb/kinetic at ultrarelativistic density ~ alpha
print(f"  ultrarelativistic limit: Coulomb e^2/(4 pi eps0 d) / (hbar c/d) = alpha = {alpha_C:.4f} -> never crystallizes")
# post hoc spin: uniform ball, radius b = q^2/(3 m0 c^2), rim at c/2
b = e**2/(4*np.pi*eps0)/(3*m0*c**2)
print(f"  quon radius b = {b:.3e} m; uniform-ball spin L = (2/5) m0 b (c/2) = {0.4*m0*b*c/2/hbar:.2e} hbar")

print("\n=== B hydrogen numerics (independent grid: 6000 points, box 120 a0, Numerov-free 3-point FD) ===")
N, R = 6000, 120.0
h = R/N; rg = h*np.arange(1, N+1)
def solve(l):
    return eigh_tridiagonal(1/h**2 + l*(l+1)/(2*rg**2) - 1/rg, -0.5/h**2*np.ones(N-1))
E0, U0 = solve(0); E1, U1 = solve(1)
u1 = U0[:,0]/np.sqrt(np.sum(U0[:,0]**2))
Rn = U1.T @ (rg*u1) / np.sqrt(np.sum(U1**2, axis=0))
dE = E1 - E0[0]
pol = 2*np.sum(Rn**2/3/dE); f12 = 2*dE[0]*Rn[0]**2/3; fsum = np.sum(2*dE*Rn**2/3); r2 = np.sum(u1**2*rg**2)
print(f"  E_1s = {E0[0]:.6f}; E_2p = {E1[0]:.6f}; alpha_pol = {pol:.4f} (9/2); f(1s->2p) = {f12:.5f} (exact 0.41620); sum f = {fsum:.5f}; <r^2> = {r2:.5f}")
# exact f(1s->2p) = 2^13/3^9 * ... known closed form: f_12 = 0.4162
print(f"  exact f_12 from closed form 2^14/3^10 ... = {2**14/3**10*1.5:.5f}")   # f = (2^14/3^10)*(3/2)? check below

print("\n=== B variant iii ===")
mu_a = m0*me/(m0+me)
a_e = 4*np.pi*eps0*hbar**2/(mu_a*e**2); Ry_mu = mu_a*e**4/(2*(4*np.pi*eps0)**2*hbar**2)/e
print(f"  iii(a): reduced mass {mu_a/me:.5f} m_e; Bohr radius {a_e:.4e} m = {a_e/d:.0f} d; binding {Ry_mu:.4f} eV")
print(f"  iii(b): {'f':>6} {'s':>6} {'eps_int':>8} {'form':>7} {'a/d':>7} {'mu MeV':>8} {'E_x keV':>8} {'v/c':>7} {'ratio R':>9}")
for f in (0.25, 0.085):
    s_ = 1-f
    for bind in ("eps_b","eps0"):
        ei = f*eps0 if bind=="eps_b" else eps0
        for form in ("dilute","CM"):
            n_alpha = s_*eps0 if form=="dilute" else 3*f*eps0*(1-f)/(1+2*f)
            a = (n_alpha/n/(18*np.pi*ei))**(1/3)
            mu_k = 4*np.pi*ei*hbar**2/(e**2*a)
            Ex = (3/8)*e**2/(4*np.pi*ei*a)/e
            v = alpha_C*eps0/ei
            beta = e**2*3*a**2/(6*mu_k); al_e = 18*np.pi*ei*a**3
            print(f"          {f:6.3f} {s_:6.3f} {bind:>8} {form:>7} {a/d:7.4f} {mu_k*c**2/e/1e6:8.1f} {Ex/1e3:8.3f} {v:7.4f} {beta/(c**2*al_e):9.3e}")
print("\n=== B variant iv, v ===")
k4 = 8*np.pi*gam*alpha_C
print(f"  iv: a/d for s=0.75: {(0.75/k4)**(1/3):.3f}; s_max at a=d/2: {k4/8:.4f}; E_x at a=d/2 = hbar c/d = {hbarc_eVm/d/1e3:.1f} keV; m c^2 = {2*hbarc_eVm/(gam*d/2)/1e6:.3f} MeV")
print(f"  v: 361.331/sqrt(0.75) = {361.331/np.sqrt(0.75):.1f} keV; 510.999/sqrt(0.75) = {510.999/np.sqrt(0.75):.1f} keV")
print(f"  circular orbit at c/2, random orientation: R = v^2/(6c^2) = {0.25/6:.4f}")
print(f"  speed change s(1-R)/2: {0.75*(1-0.25/6)/2:.3f} (c/2 orbit), {0.75*(1-9.47e-5)/2:.3f} (H-like)")

print("\n=== B: E_r,min and the level ===")
LY = K.light_year if hasattr(K,'light_year') else 9.4607304725808e15
L_eff = 21.2e9*9.4607304725808e15
def ermin(s_, dt): return 28e9*np.sqrt(1.5*s_*L_eff/(c*dt))
print(f"  U15 check s=1, (a): {ermin(1.0,0.859):.3e} eV")
for s_ in (0.75, 0.99):
    for lim, dt in (("a",0.859),("e",0.010)):
        Er = ermin(s_, dt)
        dh = (2*np.pi*alpha_C/s_)*hbarc_eVm/Er
        dH = (3/8)*alpha_C*(18*np.pi/s_)**(1/3)*hbarc_eVm/Er
        mc2 = 4*np.pi*alpha_C*hbarc_eVm**3/(s_*dh**3*Er**2)
        lev = np.log(d/dh)/np.log(3)
        print(f"  s={s_:4.2f} ({lim}): E_r,min {Er:.3e} eV; d_max harmonic {dh:.3e} m, H-like {dH:.3e} m; Aspden/d_max {d/dh:.2e}; log3 = {lev:.2f} -> level {int(np.ceil(lev))}; carrier {mc2/1e9:.2e} GeV")
# harmonic constraint at Aspden's spacing and at level 29
for nm, dd in (("Aspden", d), ("level 29", d/3**29)):
    print(f"  harmonic carrier that fits its cell at {nm} (d={dd:.2e}): E_x <= (2 pi alpha/0.75) hbar c/d = {(2*np.pi*alpha_C/0.75)*hbarc_eVm/dd:.2e} eV")
# the '10^27 times lighter' chat statement: E_x ~ 1/sqrt(m) at fixed share
print(f"  mass ratio to lift 417 keV to 2.62e19 eV at fixed share: (2.62e19/4.172e5)^2 = {(2.62e19/4.172e5)**2:.1e}")

print("\n=== section 9.20 item 9 table ===")
bq = 2.3e-14
hw_spin = hbar*(c/2)/bq/e
print(f"  spin energy hbar c/(2b) at b=2.3e-14 m: {hw_spin/1e6:.2f} MeV; rim speed to follow 31 GeV: {31e9/hw_spin*0.5:.0f} c; for 3.0e19 eV: {3.0e19/hw_spin*0.5:.1e} c")
print("\n=== section 9.12 item 4: a unit-charge species from ~1 MeV up ===")
print(f"  electron-like species shifts 1/alpha(MZ) by {-sh['e']/alpha_P:.2f}; with room +-0.02 the per-level strength bound is {0.02/(sh['e']/alpha_P):.3f} (one level) or {0.02/(6*1.75*(sh['e']/alpha_P)):.4f} (six levels, 7.3's -10.5)")
print("\n=== section 9.19 Mainland-Mulligan ===")
print(f"  (6 mu0/pi)(8 e^2/hbar)^2 = {6*mu0/np.pi*(8*e**2/hbar)**2:.3e} F/m; /eps0 - 1 = {6*mu0/np.pi*(8*e**2/hbar)**2/eps0-1:.4f}; self-consistent 1/alpha = sqrt(6144 pi) = {np.sqrt(6144*np.pi):.1f}")
print("\n=== Aspden's orbit: radiation condition ===")
print(f"  Omega/c = {Om/c:.3e} m^-1 = {Om/c*d:.3f}/d; smallest reciprocal vector 2 pi/d = {2*np.pi/d:.3e} m^-1 -> {'no' if Om/c < 2*np.pi/d else 'YES'} radiating G != 0 component")