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

charge_sweep.py

In the investigation at sim/matter_light/check_trial23_fable/charge_sweep.py · last changed in commit 18036a6, 23 November 2026 · 5,836 bytes · the folder as a zip


#!/usr/bin/env python3
"""Trial 23, level 2: the sweep of the charge (the brief: 'Sweep the spacing and the charge; they are bounds, not values').

29th reviewer (Fable 5.2, maximum effort), post hoc, own code. Nothing is imported from the trial.
The formulas are the blind addendum's (BLIND_RESULTS.md, section 3, Q5):
  share      h2 = N q^2/(eps0 m w2^2), N = 1/a^3                       [M: one charged oscillator per cell; S: its polarizability]
  xi         = E2 a/(hbar c)                                             (the spacing in units of the hold's reduced wavelength)
  alpha_q    = q^2/(4 pi eps0 hbar c)                                    (the charge's own coupling; 1/137.036 for q = e)
  m c^2/E2   = 4 pi alpha_q/(h2 xi^3)                                    [D]
  (x_zp/a)^2 = h2 xi/(8 pi alpha_q)   (zero-point reach per axis)        [D]
  U_C/E2     = alpha_q/xi             (two neighbours' Coulomb energy)   [D]
  r_cl/a     = alpha_q hbar c/(m c^2 a) (the charge's classical radius)  [D]
The 'classical edge' is the lock's VB3 criterion m c^2 = 10 E2.
"""
import math
import subprocess
import sys

hbar = 1.054571817e-34
c = 299792458.0
eV = 1.602176634e-19
eps0 = 8.8541878128e-12
G = 6.67430e-11          # CODATA 2018, from memory
MPC = 3.0856775814913673e22
ALPHA = 1 / 137.035999084  # CODATA 2018, from memory
H0 = 67.4e3 / MPC        # the lock's input
RHO_CRIT = 3 * H0**2 / (8 * math.pi * G)
RHO_PLANCK = c**5 / (hbar * G**2)
hbarc = hbar * c / eV    # eV m

checks = [0, 0]


def check(ok, text, detail=""):
    checks[1] += 1
    checks[0] += bool(ok)
    print(f"   CHECK {'pass' if ok else 'FAIL'}: {text} {detail}")


def row(E2, h2, alpha_q, xi):
    a = xi * hbarc / E2
    q_over_e = math.sqrt(alpha_q / ALPHA)
    mc2_over_E2 = 4 * math.pi * alpha_q / (h2 * xi**3)
    m = mc2_over_E2 * E2 * eV / c**2
    reach = math.sqrt(h2 * xi / (8 * math.pi * alpha_q))
    coul = alpha_q / xi
    rcl = alpha_q / (xi * mc2_over_E2)
    rho = m / a**3
    zp = 1.5 * E2 * eV / (c**2 * a**3)
    return a, q_over_e, mc2_over_E2, m, reach, coul, rcl, rho, zp


def main():
    head = subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip()
    print("Trial 23, level 2: the sweep of the charge. 29th reviewer, post hoc, own derivation.")
    print(f"git HEAD: {head} ; python {sys.version.split()[0]}")
    print(f"critical density {RHO_CRIT:.3e} kg/m^3 ; Planck density {RHO_PLANCK:.3e} kg/m^3 ; hbar c = {hbarc:.6e} eV m")
    h2 = 0.75

    print("\n1. The classical edge (m c^2 = 10 holds) for each charge, f = 0.25 (h2 = 0.75)")
    print("   Larger charge: the edge moves to coarser spacing and the charge sits closer to its site,")
    print("   but its coupling passes 1 and its neighbours' Coulomb energy reaches the hold itself.")
    for lab, E2 in (("hold 2.688e20 eV (limit (e), 31 GeV)", 2.688e20), ("hold 2.620e19 eV (limit (a), 28 GeV)", 2.620e19)):
        print(f"\n   {lab}")
        print("   " + f"{'coupling':<11}{'q/e':<9}{'xi edge':<10}{'spacing (m)':<13}{'m (kg)':<12}{'reach/a':<9}{'U_C/hold':<10}"
              f"{'r_cl/a':<10}{'rho (kg/m^3)':<14}{'of Planck':<11}{'zero-point/critical':<20}")
        for aq in (ALPHA, 0.03, 0.1, 0.3, 1.0, 3.0, 10.0, 40.74):
            xi = (4 * math.pi * aq / (10 * h2)) ** (1 / 3)
            a, qe, r, m, reach, coul, rcl, rho, zp = row(E2, h2, aq, xi)
            print("   " + f"{aq:<11.4g}{qe:<9.3f}{xi:<10.4f}{a:<13.3e}{m:<12.3e}{reach:<9.3f}{coul:<10.3g}{rcl:<10.3g}"
                  f"{rho:<14.3e}{rho / RHO_PLANCK:<11.2e}{zp / RHO_CRIT:<20.2e}")
            if abs(aq - ALPHA) < 1e-12 and E2 == 2.688e20:
                check(abs(xi - 0.2304) < 2e-4 and abs(a / 1.691e-28 - 1) < 2e-3 and abs(reach - 0.971) < 2e-3,
                      "q = e: the edge is the blind addendum's (xi 0.2304, 1.691e-28 m, reach 0.971 of the spacing)",
                      f"({xi:.4f}, {a:.3e} m, {reach:.3f})")
                check(abs(r - 10) < 1e-9, "the edge is where m c^2 = 10 holds", f"({r:.6f})")

    print("\n2. At the trial's two spacings: the charge that makes m c^2 = 10 holds, and what it costs")
    print("   " + f"{'row':<40}{'xi':<9}{'q/e':<9}{'coupling':<10}{'m (kg)':<12}{'reach/a':<9}{'U_C/hold':<10}{'r_cl/a':<10}")
    got = {}
    for lab, E2, a in (("(a): 2.620e19 eV at 2.3e-26 m", 2.620e19, 2.3e-26), ("(e): 2.688e20 eV at 3.0e-27 m", 2.688e20, 3.0e-27),
                       ("mixed: 2.620e19 eV at 3.0e-27 m", 2.620e19, 3.0e-27), ("(e) hold at 1.7e-28 m", 2.688e20, 1.7e-28)):
        xi = E2 * a / hbarc
        aq = 10 * h2 * xi**3 / (4 * math.pi)
        a_, qe, r, m, reach, coul, rcl, rho, zp = row(E2, h2, aq, xi)
        got.setdefault(lab[:3], (qe, aq))   # run 1 overwrote the "(e)" key with the last row; the first row of each name is the one meant
        print("   " + f"{lab:<40}{xi:<9.3f}{qe:<9.2f}{aq:<10.3g}{m:<12.3e}{reach:<9.3f}{coul:<10.3g}{rcl:<10.3g}")
    check(abs(got["(a)"][0] - 48.25) < 0.1 and abs(got["(e)"][0] - 74.72) < 0.3,
          "the trial's 48 e (coupling 17) and 75 e (coupling 41) are reproduced",
          f"({got['(a)'][0]:.2f} e, {got['(a)'][1]:.2f}; {got['(e)'][0]:.2f} e, {got['(e)'][1]:.2f})")

    print("\n3. With q = e at the trial's two spacings: m c^2/hold (the trial's VB3 column)")
    for lab, E2, a in (("(a): 2.620e19 eV at 2.3e-26 m", 2.620e19, 2.3e-26), ("(e): 2.688e20 eV at 3.0e-27 m", 2.688e20, 3.0e-27),
                       ("mixed: 2.620e19 eV at 3.0e-27 m", 2.620e19, 3.0e-27)):
        xi = E2 * a / hbarc
        a_, qe, r, m, reach, coul, rcl, rho, zp = row(E2, h2, ALPHA, xi)
        print(f"   {lab:<40} xi = {xi:<8.3f} m c^2/hold = {r:<10.3e} reach/a = {reach:<8.3f} zero-point/critical = {zp / RHO_CRIT:.1e}")

    print(f"\nChecks: {checks[0]} of {checks[1]} pass.")


if __name__ == "__main__":
    main()