The file src/27-fields/generation.py of the validation package of the paper 27-fld, rendered with an anchor per line; the file itself is beside this page.
1# framed-rational status: EXACT -- integer / modular-F_p / cyclotomic arithmetic; no float in any asserted check (float, if present, only formats an exact rational for display).2"""3The fermion generation as the spinor of the internal frame.45Internal frame V = C^3 (colour, the rank-3 Hermitian frame) (+) C^2 (isospin,6the rank-2 spinor frame), a rank-5 module. Hypercharge Y is the unique7traceless generator distinguishing the colour block from the isospin block:8 colour index Y = -1/3 , isospin index Y = +1/2 (so Tr Y = 3(-1/3)+2(1/2)=0).910One generation is the spinor of V, i.e. the exterior algebra:11 16 (SO(10) spinor) = Lambda^0 (+) Lambda^2 (+) Lambda^4 ~ 1 (+) 10 (+) 5bar.12We build Lambda^1*(=5bar) and Lambda^2(=10) from the fundamental weights and read13off (colour, isospin, Y) of every piece, then verify against the Standard Model:14charges Q=T3+Y, anomaly cancellation, and sin^2(theta_W)=3/8. Exact rationals.15"""16from fractions import Fraction as Fr17from itertools import combinations1819half = Fr(1, 2)2021# ---- the fundamental 5 = C^3(colour) (+) C^2(isospin) ----------------------22# each basis vector: (kind, T3, Y). colour: 3 of them; isospin: 2 of them.23five = []24for c in range(3):25 five.append(("colour", Fr(0), Fr(-1, 3))) # colour triplet, SU(2) singlet26five.append(("iso", +half, Fr(1, 2))) # isospin up27five.append(("iso", -half, Fr(1, 2))) # isospin down2829def is_colour(i): return five[i][0] == "colour"30def is_iso(i): return five[i][0] == "iso"3132# ---- Lambda^1 conjugate = 5bar (negate weights) ---------------------------33fivebar = [(k, -t, -y) for (k, t, y) in five]3435# ---- Lambda^2(5) = 10 (antisymmetric pairs; weights add) ------------------36lam2 = []37for i, j in combinations(range(5), 2):38 _, ti, yi = five[i]; _, tj, yj = five[j]39 cc = (is_colour(i), is_colour(j))40 if cc == (True, True): rep = "(3bar,1)" # antisym 2 colour -> 3bar41 elif cc == (False, False): rep = "(1,1)" # antisym 2 isospin -> singlet42 else: rep = "(3,2)" # colour x isospin43 lam2.append((rep, ti + tj, yi + yj))4445# ---- classify the 5bar and the 10 into Standard-Model fields ---------------46def classify():47 print(" 5bar = Lambda^1*(5):")48 cb = [x for x in fivebar if x[0] == "colour"]49 ib = [x for x in fivebar if x[0] == "iso"]50 print(f" (3bar,1) Y={cb[0][2]} -> d^c [colour-3 part]")51 print(f" (1,2) Y={ib[0][2]}, T3={[x[1] for x in ib]} -> L (lepton doublet)")52 print(" 10 = Lambda^2(5):")53 reps = {}54 for rep, t3, y in lam2:55 reps.setdefault((rep, y), []).append(t3)56 for (rep, y), t3s in reps.items():57 name = {"(3,2)": "Q (quark doublet)", "(3bar,1)": "u^c", "(1,1)": "e^c"}[rep]58 print(f" {rep:8s} Y={str(y):>5} T3={sorted(set(t3s))} x{len(t3s)//len(set(t3s)) if len(set(t3s))>1 else len(t3s)} -> {name}")5960# ---- assemble the full generation (16) as (mult, T3-list, Y) ---------------61# colour-dim x isospin-multiplicity gives the Weyl count of each field62GEN = [63 ("Q (3,2,+1/6)", 3, [+half, -half], Fr(1, 6)),64 ("u^c(3bar,1,-2/3)", 3, [Fr(0)], Fr(-2, 3)),65 ("d^c(3bar,1,+1/3)", 3, [Fr(0)], Fr(1, 3)),66 ("L (1,2,-1/2)", 1, [+half, -half], Fr(-1, 2)),67 ("e^c(1,1,+1)", 1, [Fr(0)], Fr(1)),68 ("nu^c(1,1,0)", 1, [Fr(0)], Fr(0)),69]7071def checks():72 nWeyl = sum(cdim * len(t3s) for _, cdim, t3s, _ in GEN)73 sumY = sum(cdim * len(t3s) * y for _, cdim, t3s, y in GEN)74 sumY3 = sum(cdim * len(t3s) * y**3 for _, cdim, t3s, y in GEN)75 sumT3sq = sum(cdim * sum(t**2 for t in t3s) for _, cdim, t3s, y in GEN)76 sumQsq = sum(cdim * sum((t + y)**2 for t in t3s) for _, cdim, t3s, y in GEN)77 print(" electric charges Q = T3 + Y:")78 for name, cdim, t3s, y in GEN:79 qs = sorted(set(t + y for t in t3s))80 print(f" {name:18s} Q in {[str(q) for q in qs]} (x{cdim} colour)")81 print(f"\n Weyl fermion count : {nWeyl} (15 + nu^c = 16 = SO(10) spinor)")82 print(f" gauge-grav anomaly Sum Y : {sumY} (must be 0)")83 print(f" cubic anomaly Sum Y^3 : {sumY3} (must be 0)")84 print(f" Tr(T3^2)={sumT3sq}, Tr(Q^2)={sumQsq}")85 print(f" sin^2(theta_W) = Tr(T3^2)/Tr(Q^2) : {sumT3sq/sumQsq} = {float(sumT3sq/sumQsq):.4f}")868788if __name__ == "__main__":89 print("=" * 70)90 print("THE FERMION GENERATION AS THE SPINOR OF THE INTERNAL FRAME")91 print("=" * 70)92 print("\ninternal frame V = C^3(colour, Y=-1/3) (+) C^2(isospin, Y=+1/2),"93 " Tr Y = 0")94 print("generation = spinor of V = exterior algebra: 16 = 1 (+) 5bar (+) 10\n")95 classify()96 print()97 checks()98 print("=" * 70)99 print("All hypercharges are weight-sums of the fundamental (-1/3, +1/2);")100 print("anomalies cancel; sin^2(theta_W)=3/8 follows once the content is fixed.")101 print("=" * 70)102