The file src/28-flavour/quark_amp.py of the validation package of the paper 28-flav, rendered with an anchor per line; the file itself is beside this page.
1#!/usr/bin/env python32# -*- coding: utf-8 -*-3"""4The quark Koide amplitude excess r - sqrt2 (ledger lead). Leptons (colourless) have r=sqrt2;5the quarks have r_d=1.55, r_u=1.76 > sqrt2. Test that this excess is COLOUR-structural:6 (down) the Georgi-Jarlskog colour Clebsch (N_c=3) dressing the lepton spectrum into the down7 spectrum shifts the Koide value Q from 2/3 to ~0.745 ~ observed Q_d -> r_d-sqrt2 IS the8 colour (GJ) dressing, the same N_c=3 of M7;9 (up) r_u^2 ~ 3, the cube-root (colour/cubic) diagonal, vs the lepton r^2=2, the quarter-turn10 (four-fold) diagonal. NATIVE (framed-rational): r^2 = N(1-zeta_n), the finite-field norm11 = the INTEGER 2 (n=4) or 3 (n=3) in F_p; the sqrt2,sqrt3 = 2 sin(pi/n) are continuum12 readings, one rung up.13"""14import numpy as np, sympy as sp15PASS,FAIL="PASS","FAIL"; res=[]16def ck(t,c,d=""): res.append((t,bool(c))); print(f"[{PASS if c else FAIL}] {t}: {d}")17def Qr(m):18 m=np.array(m,float); sm=np.sqrt(m); Q=m.sum()/sm.sum()**2; return Q, np.sqrt(6*Q-2)1920# data21me,mmu,mtau=0.51099895,105.6583755,1776.8622md,ms,mb=4.67,93.4,4180.023mu,mc,mt=2.16,1270.0,172570.024s2,s3=np.sqrt(2),np.sqrt(3)2526print("="*70); print("(0) the amplitudes"); print("="*70)27Ql,rl=Qr([me,mmu,mtau]); Qd,rd=Qr([md,ms,mb]); Qu,ru=Qr([mu,mc,mt])28Qu_pole,ru_pole=Qr([mu,1670.0,mt]) # pole charm mass (T23: the scheme band)29print(f" scheme (T23): Q_u = {Qu:.4f} in the working MSbar scheme (m_c(m_c)), {Qu_pole:.4f} with the pole charm mass; band 0.83-0.89; 5/6 = 0.8333 is the framed value")30print(f" leptons: Q={Ql:.4f} r={rl:.4f} (=sqrt2={s2:.4f})")31print(f" down : Q={Qd:.4f} r={rd:.4f} (excess r-sqrt2={rd-s2:.3f})")32print(f" up : Q={Qu:.4f} r={ru:.4f} (excess r-sqrt2={ru-s2:.3f})")3334print("\n"+"="*70); print("(1) DOWN: the excess is the GJ colour Clebsch (N_c=3) on the leptons")35print("="*70)36# Georgi-Jarlskog at unification: m_e=m_d/3, m_mu=3 m_s, m_tau=m_b => down = leptons dressed37# by the colour Clebsch (3, 1/3, 1). Compute the Koide value of the dressed lepton spectrum.38Qd_gj,rd_gj=Qr([3*me, mmu/3, mtau])39print(f" GJ-dressed leptons (3 m_e, m_mu/3, m_tau): Q={Qd_gj:.4f}, r={rd_gj:.4f}")40print(f" observed down : Q={Qd:.4f}, r={rd:.4f}")41ck("1.gj_colour", abs(Qd_gj-Qd)<0.03,42 f"colour (GJ, N_c=3) dressing shifts Q 2/3 -> {Qd_gj:.3f} ~ observed Q_d={Qd:.3f} "43 f"({100*abs(Qd_gj-Qd)/Qd:.0f}%): r_d-sqrt2 is the colour dressing")4445print("\n"+"="*70); print("(2) UP: r_u ~ sqrt3 = 2 sin(pi/3), the cube-root/colour diagonal")46print("="*70)47print(f" r_u = {ru:.4f} vs sqrt3 = 2 sin(pi/3) = {s3:.4f} ({100*abs(ru-s3)/s3:.1f}%)")48# robustness to the (uncertain) light up-quark mass49rng=np.random.default_rng(0); rus=[]50for _ in range(5000):51 mU=rng.uniform(1.5,2.7); mC=rng.uniform(1180,1350); mT=rng.uniform(171000,174000)52 rus.append(Qr([mU,mC,mT])[1])53print(f" over m_u,m_c,m_t ranges: r_u = {np.median(rus):.3f} "54 f"[{np.percentile(rus,16):.3f},{np.percentile(rus,84):.3f}] -- robust (m_u barely enters)")55ck("2.up_sqrt3", abs(ru-s3)/s3<0.03, f"r_u={ru:.3f} ~ sqrt3={s3:.3f}: the cube-root colour diagonal")5657print("\n"+"="*70)58print("(3) the diagonal over FRAMED RATIONALS: r^2 = N(1-zeta_n) = 2, 3 [integers in F_p]")59print("="*70)60# the NATIVE statement (1-algebra): the amplitude r^2 is the finite-field norm N(1-zeta_n) of61# (1 - finite n-th root): quarter-turn (i, i^2=-1) -> 2 (Q=2/3); cube root (omega^2+omega+1=0)62# -> 3 (Q=5/6). Integers in F_p. The 'sqrt2, sqrt3, 2 sin(pi/n)' are continuum readings.63for p in [17,53,89]:64 i_=next(x for x in range(1,p) if (x*x+1)%p==0)65 N1mi=((1-i_)*(1+i_))%p66 nq=next(m for m in range(2,p) if pow(m,(p-1)//2,p)==p-1)67 mul=lambda A,B:((A[0]*B[0]+A[1]*B[1]*nq)%p,(A[0]*B[1]+A[1]*B[0])%p)68 def order(A):69 o=1;X=A70 while X!=(1,0):X=mul(X,A);o+=171 return o72 om=next((u,v) for u in range(p) for v in range(1,p) if order((u,v))==3)73 a1=((1-om[0])%p,(-om[1])%p); a2=((1-om[0])%p,(om[1])%p)74 N1mw=mul(a1,a2)75 print(f" p={p}: N(1-i)={N1mi}=2 (four-fold, r^2=2, Q=2/3, sqrt2); "76 f"N(1-omega)={N1mw[0]}=3 (three-fold/colour, r^2=3, Q=5/6, sqrt3)")77 res.append((f"3.framed_p{p}", N1mi==2%p and N1mw==(3%p,0)))78ck("3.pattern", all(c for t,c in res if t.startswith("3.framed")),79 "r^2 = N(1-zeta_n) = 2 (four-fold/colourless), 3 (three-fold/colour): integers in F_p")8081print("\n"+"="*70)82print("CONCLUSION: the quark amplitude excess r-sqrt2 is COLOUR, not a free parameter.")83print(" Down: the GJ colour Clebsch (N_c=3, = M7) dresses the lepton spectrum, Q 2/3->0.745.")84print(" Up: r_u ~ sqrt3 = 2 sin(pi/3), the cube-root colour diagonal (cf lepton sqrt2=2sin(pi/4)).")85print(" So r folds into the colour structure; r-sqrt2 is forced (down) / a sqrt3 lead (up).")86n=sum(1 for _,c in res if c); print(f"\nchecks: {n}/{len(res)} pass")87for t,c in res:88 if not c: print(" FAILED",t)89