Does light charge the quons? › Files cited on the page › the trials
graviton_levels.py
"""graviton_levels.py - trial 6 of the charging-quons work: Doug's graviton thought experiment (13 November 2026, morning).
Lock: papers/Lock_graviton_levels_2026-11-13.md, committed with this script before the run.
Levels [P, Doug]: level 1 is Aspden's quons; level k is N^(k-1) times finer, in register, each quon on a finer quon.
Energies [P, U44's rule]: E_k = N^(k-1) E_1, with E_1 = hbar Omega = 511 keV (reading R) or m0 c^2 = 20.84 keV (reading M).
Run: ~/aspden-review-venv/bin/python3 graviton_levels.py > graviton_levels_out.txt 2> graviton_levels_err.txt
"""
import ast, math, time
import numpy as np
from scipy.integrate import quad
from scipy.optimize import brentq
T0 = time.time()
# ---- inputs [A] ----
me_MeV = 0.51099895 # m_e c^2 (CODATA 2018)
rd = 0.75 * (8 / 1843) ** (1 / 6) # r/d (Part 1 U03)
m0_me = (4 / 9) * rd ** 2 # Aspden's (7.25): m0 / m_e
E1 = {"R": me_MeV, "M": m0_me * me_MeV} # MeV: the quon's rhythm energy hbar Omega (Part 1A W4); its rest energy m0 c^2
g_me, tau_me = 5062.318, 3484.94 # graviton and taon (working paper 7.1; Tutorial Notes 9, 16, 20)
g = g_me * me_MeV
a = 0.036135562 # b/d, Aspden's quon radius (Part 1 U05)
NSTAR = (3 / (8 * math.pi)) ** (1 / 3) / a
NS = (13, 14, 15)
WINDOWS = ((13, 15), (26, 30))
src = open("../lepton_photon/ladder_scan.py", encoding="utf-8").read() # U44's particle list, read unchanged
P = None
for node in ast.parse(src).body:
if isinstance(node, ast.Assign) and any(isinstance(t, ast.Name) and t.id == "P" for t in node.targets):
P = ast.literal_eval(node.value)
names = list(P)
PM = np.array([P[k] for k in names])
print("Trial 6: Doug's graviton thought experiment (lock papers/Lock_graviton_levels_2026-11-13.md)")
print(f" inputs: r/d = {rd:.7f}; m0 = {m0_me:.6f} m_e; E_1 (R) = {E1['R']:.6f} MeV, (M) = {E1['M']*1e3:.4f} keV")
print(f" graviton g = {g_me} m_e = {g:.4f} MeV; taon {tau_me} m_e = {tau_me*me_MeV:.4f} MeV; b/d = {a}; N* = {NSTAR:.4f}")
print(f" U44's particle list: {len(names)} particles, {PM.min():.3f} to {PM.max():.1f} MeV")
# ---- G-frame population [A] ----
mean_G = (2 * tau_me + g_me) / 3
cells = {"one heavy G-frame particle (2 tau : 1 g, mean %.1f m_e)" % mean_G: mean_G / m0_me,
"gravitons proper (one in three of them)": 3 * mean_G / m0_me,
"all the G-frame mass in gravitons (g / m0)": g_me / m0_me}
print("\nAspden's graviton population (m_g = m0 per cell): cells per particle, spacing in cells")
for k, v in cells.items():
print(f" {k:58s} {v:12.0f} {v ** (1 / 3):6.2f}")
# ---- G1: the sums against Aspden's graviton ----
rows, chk = [], 0.0
for key in ("R", "M"):
for N in NS:
for n in (2, 3, 4):
direct = sum(E1[key] * N ** k for k in range(n))
closed = E1[key] * (N ** n - 1) / (N - 1)
chk = max(chk, abs(direct - closed) / closed)
rows.append((key, N, n, "total", closed))
rows.append((key, N, n, "additional", closed - E1[key]))
print(f"\nG1. The sums (MeV) and their difference from Aspden's graviton ({g:.1f} MeV); closed form vs direct sum: {chk:.1e}")
print(" reading N levels total T_n vs g additional A_n vs g")
for key in ("R", "M"):
for N in NS:
for n in (2, 3, 4):
T = [r[4] for r in rows if r[:4] == (key, N, n, "total")][0]
A = [r[4] for r in rows if r[:4] == (key, N, n, "additional")][0]
print(f" {key} {N:3d} {n} {T:14.4f} {100*(T/g-1):+8.2f}% {A:14.4f} {100*(A/g-1):+8.2f}%")
print(" reference only, N* = %.4f (not a whole number):" % NSTAR)
for key in ("R", "M"):
print(" " + key + ": " + ", ".join(f"T_{n} = {E1[key]*(NSTAR**n-1)/(NSTAR-1):.4f}" for n in (2, 3, 4)) + " MeV")
hits1 = [r for r in rows if abs(r[4] / g - 1) < 0.01]
hits3 = [r for r in rows if abs(r[4] / g - 1) < 0.03]
print(f" within 1% of g: {len(hits1)}; within 3%: {len(hits3)}")
print(" the factor N_g that makes T_n = g (a smaller copy per level), and whether it lies in a window that works:")
for key in ("R", "M"):
for n in (2, 3, 4, 5):
Ng = brentq(lambda x: E1[key] * sum(x ** k for k in range(n)) - g, 1.000001, 1e7, xtol=1e-12, rtol=1e-14)
inw = any(lo <= Ng <= hi for lo, hi in WINDOWS)
print(f" {key}, {n} levels: N_g = {Ng:12.4f} in 13-15 or 26-30: {inw}")
# ---- G2: Aspden's graviton spacing ----
print("\nG2. Where level-1 and level-2 quons share a point")
print(" in register (whole N, each quon on a finer quon): at every quon, one per cell [D];"
" that is %.0f to %.0f times too many" % (min(cells.values()), max(cells.values())))
print(" a graviton at the centre of a level-1 cube: a level-2 quon is there in every cell for even N (14), and in none for odd N (13, 15)")
def n_in_direct(alpha):
R = int(math.floor(alpha))
x = np.arange(-R, R + 1)
X, Y, Z = np.meshgrid(x, x, x, indexing="ij")
return int(np.sum(X * X + Y * Y + Z * Z <= alpha * alpha))
def n_in_lines(alpha):
R, tot = int(math.floor(alpha)), 0
for x in range(-R, R + 1):
for y in range(-R, R + 1):
r2 = alpha * alpha - x * x - y * y
if r2 >= 0:
zz = int(math.floor(math.sqrt(r2)))
while (zz + 1) ** 2 <= r2:
zz += 1
while zz * zz > r2:
zz -= 1
tot += 2 * zz + 1
return tot
def hold(n, alpha):
return (n / (4 * math.pi / 3 * alpha ** 3) - 1) / 3
print(" for comparison, in register: " + ", ".join(
f"N = {N}: {n_in_direct(a*N)} finer quon inside, hold {hold(n_in_direct(a*N), a*N):+.4f}" for N in NS))
print(" out of register, N = p/q: shared points once every q cells along each axis (one per q^3 cells)")
print(" q p p/q spacing vs Aspden's n_in(p) direct by lines mean hold (n_in/y_f - 1)/3 quons at rest")
g2_ok, cnt_chk = False, True
for q in (46, 50, 67):
base = round(NSTAR * q)
p = next(c for dd in range(0, 50) for c in (base + dd, base - dd) if math.gcd(c, q) == 1)
alpha = a * p
n1, n2 = n_in_direct(alpha), n_in_lines(alpha)
cnt_chk &= (n1 == n2)
K = hold(n1, alpha)
rest = (1 + (q % 2 == 0)) ** 3
near = min(cells.values(), key=lambda v: abs(q / v ** (1 / 3) - 1)) ** (1 / 3)
ok = abs(q / near - 1) < 0.10 and K >= 0.0927 and rest == q ** 3
g2_ok |= ok
print(f" {q:3d} {p:4d} {p/q:8.4f} {q} cells vs {near:5.2f} {n1:9d} {n2:9d} {K:+.6f} {rest} of {q**3}")
# ---- G3: known particles ----
E = np.array([r[4] for r in rows])
rel = E[:, None] / PM[None, :] - 1
imin = np.argmin(np.abs(rel), axis=1)
off = rel[np.arange(len(E)), imin]
obs = {t: int(np.sum(np.abs(off) < t)) for t in (0.01, 0.03)}
print("\nG3. The 36 energies against U44's 30 particles")
print(" within 3% (seen before the lock, as disclosed):")
for i in np.argsort(np.abs(off)):
if abs(off[i]) < 0.03:
key, N, n, kind, val = rows[i]
print(f" {key}, N = {N}, {n} levels, {kind:10s} {val:10.3f} MeV {names[imin[i]]:8s} {P[names[imin[i]]]:10.3f} MeV {100*off[i]:+.2f}%")
rng = np.random.default_rng(13)
U = rng.uniform(-1, 1, 200000)
c1, c3 = [], []
for chunk in np.array_split(U, 50):
Es = E[None, :] * np.exp(chunk)[:, None]
r = np.abs(Es[:, :, None] / PM[None, None, :] - 1).min(axis=2)
c1.append(np.sum(r < 0.01, axis=1))
c3.append(np.sum(r < 0.03, axis=1))
c1, c3 = np.concatenate(c1), np.concatenate(c3)
p1, p3 = float(np.mean(c1 >= obs[0.01])), float(np.mean(c3 >= obs[0.03]))
print(f" within 1%: {obs[0.01]} energies (slid at random: mean {c1.mean():.2f}; at least as many in {100*p1:.1f}% of draws)")
print(f" within 3%: {obs[0.03]} energies (slid at random: mean {c3.mean():.2f}; at least as many in {100*p3:.1f}% of draws)")
# ---- G4: the energy budget ----
print("\nG4. Energy per cell with one shared point per cell, against Aspden's G-frame energy per cell (m0 c^2 = %.3f keV)" % (E1["M"] * 1e3))
for key in ("R", "M"):
print(" " + key + ": " + "; ".join(
f"N = {N}: " + ", ".join(f"T_{n}/m0c^2 = {E1[key]*(N**n-1)/(N-1)/E1['M']:.3g}" for n in (2, 3, 4)) for N in NS))
# ---- L: the levels needed (relay_requirements.py's rule, copied) ----
hbar = 1.054571817e-34; me = 9.1093837015e-31; c = 299792458.0; eV = 1.602176634e-19
hbarc_eVm = hbar * c / eV
mec2_eV = me * c ** 2 / eV
r = hbar / (2 * me * c)
d = r / (0.75 * (8 / 1843) ** (1 / 6))
z = 0.903; H0 = 67.4e3 / 3.0856775814913673e22; Om = 0.3153; OL = 1 - Om
hz = lambda x: np.sqrt(Om * (1 + x) ** 3 + OL)
T2 = quad(lambda x: (1 + x) ** 2 / hz(x), 0, z)[0] / H0
lim2 = 0.859 / T2
k28 = 28e9 / hbarc_eVm
Eres = 28e9 * np.sqrt(1.5 / lim2)
dmax = np.sqrt(8 * lim2) / k28
print(f"\nL. Levels needed (U44's numbering, level 0 = Aspden's lattice, d = {d:.3e} m): spacing below {dmax:.2e} m, energy above {Eres:.2e} eV")
def first_level(s):
kd = next(k for k in range(400) if d / s ** k < dmax)
kE = next(k for k in range(400) if s ** k * mec2_eV > Eres)
return kd, kE, max(kd, kE)
ref = {s: first_level(s)[2] for s in (2, 3, 4)}
print(f" check, s = 2, 3, 4: levels {ref[2]}, {ref[3]}, {ref[4]} (section 7.3, item 5: 46, 29, 23)")
for s in list(NS) + list(range(26, 31)):
kd, kE, k = first_level(s)
lf = [kk for kk in range(60) if 0.19e6 < s ** kk * mec2_eV < 0.694e9]
le = [kk for kk in range(60) if 0.19e6 < s ** kk * mec2_eV < 28e9]
print(f" N = {s:2d}: first level fine and prompt enough: {k} (spacing {d/s**k:.2e} m, energy {s**k*mec2_eV:.2e} eV);"
f" levels between 0.19 MeV and 0.694 GeV: {lf}; up to 28 GeV: {le}")
# ---- pass lines ----
print("\nChecks:")
print(f" (i) closed form vs direct sum {chk:.1e} (expected below 1e-12): {'pass' if chk < 1e-12 else 'MISS'}")
print(f" (ii) n_in direct = by lines: {'pass' if cnt_chk else 'MISS'}")
print(f" (iii) levels 46, 29, 23 for s = 2, 3, 4: {'pass' if (ref[2], ref[3], ref[4]) == (46, 29, 23) else 'MISS'}")
g1_ok = any(r[1] in NS for r in hits1)
g3_ok = p1 < 0.05
print("Support for the idea (all three needed):")
print(f" G1 a hit within 1% of g at N = 13 to 15: {g1_ok}")
print(f" G2 shared points at Aspden's spacing with a working hold and every quon at rest: {g2_ok}")
print(f" G3 matches within 1% above chance (p < 0.05): {g3_ok} (p = {p1:.3f})")
print(f" supported: {g1_ok and g2_ok and g3_ok}")
print(f"run time {time.time() - T0:.1f} s")