Does light charge the quons? › Files cited on the page › the trials

check_29th_findings.py

In the investigation at sim/matter_light/check_29th_findings.py · last changed in commit 18036a6, 23 November 2026 · 9,038 bytes · runnable copies in the scripts zip


#!/usr/bin/env python3
"""The author seat's check of the 29th reviewer's main findings on trial 23 (F1 to F5, F7, F12), before folding them in.

Run 1 (kept as check_29th_findings_out_run1.txt) had the far-field sum of F3 with the wrong sign; the rest is unchanged.
Not a trial: nothing new is claimed. Own code; nothing is imported from the reviewer's scripts or the trial's.
The lattice law (F3) is derived here by a different route: plane by plane, with the in-plane sums from Epstein zeta
functions, along the cube axis only (S = 0). The reviewer summed smeared dipoles in three dimensions.
"""
import math
import subprocess

import mpmath as mp
from scipy.integrate import quad

mp.mp.dps = 30
hbar, c, eV = 1.054571817e-34, 299792458.0, 1.602176634e-19
eps0, me, e = 8.8541878128e-12, 9.1093837015e-31, 1.602176634e-19
alpha = 1 / 137.035999084
hbarc = hbar * c / eV                         # eV m
PC = 3.0856775814913673e16
H0, OM = 67.4e3 / (1e6 * PC), 0.3153          # the lock's inputs
G = 6.67430e-11


def H(z):
    return H0 * math.sqrt(OM * (1 + z) ** 3 + 1 - OM)


print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip())

print("\n== F1. The redshift carries photons through level 1's resonance ==")
w1 = 511e3 * eV / hbar
for zr in (0.0, 0.903):
    h_tau1 = 2 * H(zr) / (math.pi * w1)
    print(f" z_r = {zr:5.3f}: seen at {511/(1+zr):6.1f} keV; tau at h1 = 4.82e-20: {math.pi/2*4.82e-20*w1/H(zr):.2e}; "
          f"tau = 1 at h1 = {h_tau1:.2e}, kappa = {math.sqrt(h_tau1/0.5):.2e} (h_full 0.5) or {math.sqrt(h_tau1):.2e} (1)")
# the same from the oscillator strength of a line: tau = (pi e^2/(4 pi eps0 m c)) N lam/H, with h1 = N e^2/(eps0 m w1^2)
h1 = 4.82e-20
N = h1 * eps0 * me * w1**2 / e**2
tau = math.pi * e**2 / (4 * math.pi * eps0 * me * c) * N * (2 * math.pi * c / w1) / H(0.0)
print(f" second route (Gunn-Peterson, line of unit strength): tau = {tau:.3e} at z_r = 0")
# third route: the two roots at the crossing, (1 - h)u^2 - 2u + 1 = 0 with u = (w/w1)^2 and ck = w1
for h in (1e-4, 1e-8):
    u1, u2 = [(1 + s * mp.sqrt(h)) / (1 - mp.mpf(h)) for s in (1, -1)]
    n2 = lambda u: 1 - h + h / (1 - u)
    print(f" h = {h:.0e}: splitting/w1 = {float(mp.sqrt(u1)-mp.sqrt(u2)):.6e} (sqrt h = {math.sqrt(h):.6e}); "
          f"roots satisfy u n^2 = 1 to {float(max(abs(u*n2(u)-1) for u in (u1, u2))):.1e}")

print("\n== F2. Limit (a) is for a delay ==")
print(" sources/grb090510.txt Table 2: (a) to (d) 'Valid for sn' = 1, i.e. v < c; (e) either sign; (f) -1. Level 1 makes the high photon early.")


def shift(E):                                  # n_g - 1 of level 1 per unit share
    x2 = (E / 511e3) ** 2
    return 0.5 * x2 * (3 - x2) / (1 - x2) ** 2


adv = quad(lambda z: (shift(0.1e6 * (1 + z)) - shift(28e9 * (1 + z))) / H(z), 0, 0.903, epsrel=1e-10)[0]
for lab, dt in (("(e) 10 ms", 0.010), ("(f) 19 ms", 0.019), ("0.859 s, limit (a), not for an advance", 0.859)):
    print(f" {lab}: h1 < {dt/adv:.3e}")
print(f" advance per unit share {adv:.4e} s")

print("\n== F3. The (kd)^2 law of a lattice of dipoles, along a cube axis (S = 0), plane by plane ==")


def Z(s):                                      # sum over the square lattice of |m|^-s, the origin left out
    s = mp.mpf(s)
    b = mp.mpf(4) ** (-s / 2) * (mp.zeta(s / 2, mp.mpf(1) / 4) - mp.zeta(s / 2, mp.mpf(3) / 4))
    return 4 * mp.zeta(s / 2) * b


def inv_alpha(kd, m, p_over_s, shifted):
    """d^3/alpha (Gaussian) for a wave of wavenumber m k on planes p apart; d^3 = s^2 p = 1."""
    s = (1 / mp.mpf(p_over_s)) ** (mp.mpf(1) / 3)
    p = p_over_s * s
    k, q = mp.mpf(kd), mp.mpf(m) * mp.mpf(kd)
    g0 = 2 * mp.pi / s
    inv = lambda a: g0 ** (-a) * Z(a)          # regularized sum of g^-a
    S_inv = inv(1) + k**2 / 2 * inv(3) + 3 * k**4 / 8 * inv(5)
    S_kap = inv(-1) - k**2 / 2 * inv(1) - k**4 / 8 * inv(3)
    plane = (k**2 * S_inv - S_kap) / 2 * 2 * mp.pi / s**2
    far = 2 * mp.pi * k / s**2 * mp.sin(k * p) / (mp.cos(k * p) - mp.cos(q * p))
    near = mp.mpf(0)
    for n in range(1, 24):
        for i in range(-9, 10):
            for j in range(-9, 10):
                if i == 0 and j == 0:
                    continue
                g2 = g0**2 * (i * i + j * j)
                kap = mp.sqrt(g2 - k**2)
                if kap * n * p > 60:
                    continue
                ph = (-1) ** (n * (i + j)) if shifted else 1
                near += 2 * mp.cos(q * n * p) * (k**2 - g2 / 2) * ph * mp.exp(-kap * n * p) / kap
    return far + plane + near * 2 * mp.pi / s**2


static = -(2 * mp.pi) ** 2 * Z(-1) / 2
print(f" check: static in-plane sum of the square lattice {float(static):.6f} (half of sum 1/R^3 = 9.03362/2 = 4.51681, from memory)")
FG = {"simple cubic": (mp.mpf(1), False), "body-centred": (mp.mpf(1) / 2, True), "face-centred": (1 / mp.sqrt(2), True)}
REV = {"simple cubic": (-1.891532, 0.164847), "body-centred": (-1.925641, -0.294623), "face-centred": (-1.925521, -0.298704)}
for name, (ps, sh) in FG.items():
    B = {}
    for m2 in (2, 4):
        m = mp.sqrt(m2)
        cm = 4 * mp.pi / 3 * (mp.mpf(m2) + 2) / (m2 - 1)
        v = [(inv_alpha(x, m, ps, sh) - cm) / mp.mpf(x) ** 2 for x in (0.02, 0.04)]
        B[m2] = (4 * v[0] - v[1]) / 3          # remove the next order, (kd)^4
    b2 = (B[4] - B[2]) / 2
    b1 = B[2] - 2 * b2
    print(f" {name:13s}: b1 = {float(b1):.6f}, b2 = {float(b2):.6f}  (the reviewer {REV[name][0]}, {REV[name][1]}); "
          f"beta(S=0) = {float(-b2/(4*mp.pi)):.5f}; 3R = {float(-3*b1/(8*mp.pi)):.5f}; "
          f"n_g - 1 at f = 1/4: {float(3*mp.mpf(9)/16*(b1+4*b2)/(8*mp.pi)):.5f} (kd)^2")

T2 = quad(lambda z: (1 + z) ** 2 / H(z), 0, 0.903)[0]
T1 = quad(lambda z: (1 + z) / H(z), 0, 0.903)[0]
T0 = quad(lambda z: 1 / H(z), 0, 0.903)[0]
print(f" T0, T1, T2 = {T0:.4e}, {T1:.4e}, {T2:.4e} s")
print("\n== F7. The scalar law n_g - 1 = (kd)^2/8 by each weighting ==")
for lab, T in (("T1", T1), ("T2", T2)):
    row = [math.sqrt(8 * dt / T) * hbarc / E for dt, E in ((0.859, 28e9), (0.010, 28e9), (0.010, 31e9))]
    print(f" {lab}: (a) 28 GeV {row[0]:.3e} m; (e) 28 GeV {row[1]:.3e} m; (e) 31 GeV {row[2]:.3e} m")
d = math.sqrt(8 * 0.010 / T2) * hbarc / 28e9
print(f" density at the T2 (e) 28 GeV spacing {d**-3:.2e} per m^3; at 3.0e-27 m {3.0e-27**-3:.2e}")

print("\n== F4. Evenness, by the photon ==")
fs = 0.25
LF = ((1 / fs + 2) / 3) ** 2
rows = (("28 GeV, GRB 090510, c T0", 28e9, c * T0), ("1.42 PeV, 1.4 kpc", 1.42e15, 1400 * PC))
for lab, E, L in rows:
    k = E / hbarc
    S = lambda a: 6 * math.pi / (k**4 * (1 - fs) ** 2 * LF * a**3 * L)
    rho = hbar * k**5 * (1 - fs) ** 2 * LF * L / (12 * math.pi * c)
    print(f" {lab}: S below {S(2.3e-26):.2e} (2.3e-26 m), {S(3.0e-27):.2e} (3.0e-27), {S(1.69e-28):.2e} (1.69e-28); "
          f"density needed (sound at c) {rho:.2e} kg/m^3")
for lab, E2 in (("(e) 2.69e20 eV", 2.688e20), ("(a) 2.62e19 eV", 2.620e19)):
    a = (4 * math.pi * alpha / 7.5) ** (1 / 3) * hbarc / E2
    m = 10 * E2 * eV / c**2
    print(f" classical edge, hold {lab}: a = {a:.3e} m, m = {m:.2e} kg, density {m/a**3:.2e} kg/m^3")
k = 1.42e15 / hbarc
a = 1.69e-28
m = 10 * 2.688e20 * eV / c**2
S = hbar * k / (2 * m * c)
mu = k**4 * 0.5625 * LF * a**3 * S / (6 * math.pi)
print(f" 1.42 PeV at the (e) edge: S = {S:.2e}, mean free path {1/mu:.3g} m against {1400*PC:.2e} m")

print("\n== F5. Free electrons against hydrogen atoms at 589.3 nm ==")
w = 2 * math.pi * c / 589.3e-9
pe = e**2 / (2 * eps0 * me * w**2)
a0 = 5.29177210903e-11
pH = 4.5 * 4 * math.pi * a0**3 / 2
print(f" per electron -{pe:.4e} m^3, per atom +{pH:.4e} m^3: zero at n_e/n_H = {pH/pe:.4f}; "
      f"the trial's 1e6 atoms with its own 3e4 electrons: {1e6*pH-3e4*pe:.3e}")

print("\n== F12. Rounding ==")
for n1 in (2.7e-4, 2.7e-9, 2.7e-13):
    d_n2 = n1 * (2 + n1) / (1 + n1) ** 2
    print(f" photons per formation length at n - 1 = {n1:.1e}: {2*math.pi*alpha*(1/300e-9-1/600e-9)*d_n2*589.3e-9/n1:.6f}")
print(f" intergalactic n - 1 = {0.25*pH:.4e}")

print("\n== F4, the kinematics (added after the reviewer's evenness_edge_out.txt): one zero-point sound quantum made, sound at b c ==")
# k = k' + q with k - k' = b |q|. Summed over the surviving fraction r = k'/k instead of the angle (u = 1 - cos):
# u = K (1-r)^2/r with K = (1-b^2)/(2 b^2); |q|/k = (1-r)/b; rate ~ r^3 (|q|/k)/b (1 + cos^2) |d(k'+b q)/dk'|^-1 du.
for b in ("0.01", "0.1", "0.5", "0.9", "0.999999"):
    b = mp.mpf(b)
    K = (1 - b * b) / (2 * b * b)
    A = 1 + 2 * b * b / (1 - b * b)
    rmin = 1 / (A + mp.sqrt(A * A - 1))

    def f(r):
        u = K * (1 - r) ** 2 / r
        q = (1 - r) / b
        slope = 1 + b * ((r - 1 + u) / q)          # d(k' + b q)/dk' at fixed angle, q^2 = (1-r)^2 + 2 r u
        dudr = K * (1 - r * r) / r**2
        return r**3 * (q / b) * (1 + (1 - u) ** 2) / slope * dudr
    D = mp.mpf(3) / 8 * mp.quad(f, [rmin, (rmin + 1) / 2, 1])
    print(f" b = {float(b):.6f}: D = {float(D):.6g}")
print(" by hand at b -> 1: (3/8) * 2 * int r^2 (1-r)^2 dr = (3/4)(1/30) = 1/40")