p35_hadrons.py — frc/ledgers

The ledger file frc/ledgers/p35_hadrons.py of Ground-State Light Hadron Spectroscopy over Finite Substrate, rendered with an anchor per line: the marked lines (# 35:C2 (p35010): a predicate and its accession key) are the checks that decide the predicates of the paper's predicate ledger — 34 of 34 checks passing; the predicates' theorems are the declarations of Hadrons in the core. ▶ run the predicates on Google Colab.

35-hadrons ledgerfrc/ledgers/p35_hadrons.py · 48.1 KBp35_hadrons.pyColab
1"""p35_hadrons — the ledger file of 35-hadrons (the 35-hadrons migration, 19 October 2026).23"Ground-State Light Hadron Spectroscopy over Finite Substrate" (Akhtman and Voether, preprint 2026). The paper's predicate4ledger is docs/35-hadrons/35-hadrons-ledger.json. This file binds its python-witnessed predicates to the framework: the table5of keys (generated from the ledger by ci/make_ledgers.py) and the checks of seven blocks. The exact checks call the hadrons6theme (frc/hadrons.py) over the interactions theme's colour field F_4, unitary frames, Haar moments and polynomials; the7readings of the PDG masses and of the finite operators' decimals call the chart theme (frc/chart_hadrons.py) and compare8them with rational bounds. Each check names the predicate(s) it witnesses (LEDGER) and carries a `# 35:XN (<key>)` marker9when it decides one (PREDICATES).1011The checks are EXACT or CHART, one kind per check. An EXACT check decides by finite-field, integer or rational arithmetic:12SU(3, F_2) over F_4 by frames with its centre and the colourless content of Λ•(3), the Weyl constant terms of SU(3), the13relations as zero polynomials over their parameters, the Casimir, spin and charge rationals, the admissible shells, and14Sturm's count of the finite confinement operator in Fractions; no float decides anything. A CHART check is a reading of15the PDG masses or of the finite operators' decimals, every float converted exactly before the comparison; its label carries16"[chart]". The paper's own classes were EXACT, MIXED, PROFINITE and CHART, one per package record (src/35-hadrons, fifteen17scripts and the figure script run by hadcommon.py): a MIXED record is an exact check here and a chart check, a PROFINITE18record an exact Sturm bracket and the chart's decimals. FAMILY names the package record each check reproduces, None for19the checks beyond the package (A5 the flavour cube, F1 the exact brackets). The figure script is not reproduced; the20package stays the paper's published witness until its release pins the framework.2122The Lean side: the theorems of the hadrons theme (lean/FrcCore/Theme/Hadrons.lean) over the interactions theme's colour23sector (Theme/Fields.lean), the readings on Mathlib (lean/FrcLedger/Theme/Hadrons.lean); the keys in Keys/Hadrons.lean of24both libraries, the certificates Ledgers/P35Hadrons.lean.2526The one Ω-hard scale √σ = 440 MeV enters once, declared in the chart data, and only the chart readings use it; the27electromagnetic coupling α is the imported constant. The shells 53, 173, 389, 1373 are the laboratory shells of the28discriminator; no numeral above Ω ∼ 10¹²³ is formed.2930    python3 -m frc.ledgers.p35_hadrons         every block, the census; exit 1 if a check fails (≈ 15 s, the Sturm count 9 s)31    python3 -m frc.ledgers.p35_hadrons B       one block (A to G)32    from frc.ledgers.p35_hadrons import R; R.predicate("35:C2")    one predicate: its blocks run once per session3334Blocks:  A  the colour frame: SU(3, F_2), its centre, the colourless content, the meson contraction, the moments   (35:C1, X2, C15, X1, X3, X7, P4, C18, C14, C6, C23, P5)35         B  the relations as identities: GMO, the spacing, the third difference, the links, CG, the vector nonet, the gap and the split   (35:C2, X4, C3, X5, C11, C12, C7, X10, X12, C16, C17)36         C  the colour–spin–charge arithmetic: the colour factor, the spin pattern, the Σ–Λ correlators, the charges   (35:C4, C5, X6, C9, X9, C13)37         D  the PDG confrontations                                                          (35:P1, P2, P8, C12, P6, C8, X8, C10, C22, X11, P7, P3, P9, P10, P11)38         E  the single scale: the admissible shells, the residual orders, the ratios at √σ (35:C23, Z1, C20, X13)39         F  the finite operators: the exact Sturm brackets, the Airy decimals, E₀, the forward landing   (35:C16, C17, C19)40         G  the electromagnetic magnitude                                                   (35:C21)4142Checks: 34, of them 18 EXACT and 16 CHART (D1–D10, E2, E3, F2, F3, F4, G1). The notebook frc/ledgers/p35_hadrons.ipynb43runs one predicate per cell, the cell's id its key (gate G13).44"""45import sys46from fractions import Fraction as Q47from math import comb4849from frc.registry import Registry50from frc import interactions as I51from frc import hadrons as H52from frc import chart_hadrons as CH5354# ---- generated by ci/make_ledgers.py from docs/35-hadrons/35-hadrons-ledger.json; edit the ledger, not this table ----55PAPER = "35-hadrons"56KEYS = {"A1": "p35001", "A2": "p35002", "A3": "p35003", "A4": "p35004", "A5": "p35005", "A6": "p35006", "A7": "p35007", "A8": "p35008", "A9": "p35009", "B1": "p35010", "B2": "p35011", "B3": "p35012", "B4": "p35013", "B5": "p35014", "C1": "p35015", "C2": "p35016", "C3": "p35017", "C4": "p35018", "C5": "p35019", "C6": "p35020", "C7": "p35021", "C8": "p35022", "C9": "p35023", "C10": "p35024", "C11": "p35025", "C12": "p35026", "C13": "p35027", "C14": "p35028", "C15": "p35029", "C16": "p35030", "C17": "p35031", "C18": "p35032", "C19": "p35033", "C20": "p35034", "C21": "p35035", "C22": "p35036", "C23": "p35037", "X1": "p35038", "X2": "p35039", "X3": "p35040", "X4": "p35041", "X5": "p35042", "X6": "p35043", "X7": "p35044", "X8": "p35045", "X9": "p35046", "X10": "p35047", "X11": "p35048", "X12": "p35049", "X13": "p35050", "P1": "p35051", "P2": "p35052", "P3": "p35053", "P4": "p35054", "P5": "p35055", "P6": "p35056", "P7": "p35057", "P8": "p35058", "P9": "p35059", "P10": "p35060", "P11": "p35061", "V1": "p35062", "V2": "p35063", "Z1": "p35065"}       # every row of the ledger: its label and its accession key57LEAN = {"C1": "core", "C2": "core, ml", "C3": "core, ml", "C4": "core, ml", "C5": "core, ml", "C6": "core, ml", "C7": "core, ml", "C8": "core, ml", "C9": "core, ml", "C10": "ml", "C11": "core, ml", "C12": "core, ml", "C13": "core, ml", "C14": "core, ml", "C15": "core", "C16": "core, ml", "C17": "core, ml", "C18": "core, ml", "C19": "core, ml", "C20": "core, ml", "C21": "core, ml", "C22": "ml", "C23": "core, ml", "X1": "core", "X2": "core", "X3": "core", "X4": "core, ml", "X5": "core, ml", "X6": "core, ml", "X7": "core", "X8": "core, ml", "X9": "core, ml", "X10": "core, ml", "X11": "ml", "X12": "core, ml", "X13": "core, ml", "P1": "core, ml", "P2": "core, ml", "P3": "core, ml", "P4": "core", "P5": "core", "P6": "core, ml", "P7": "ml", "P8": "core, ml", "P9": "core, ml", "P10": "core, ml", "P11": "core, ml"}       # the rows with a Lean declaration: the libraries whose key files prove them58# ---- end of the generated table ----5960LEAN_ONLY = ()                  # the predicates with a Lean declaration and no python check (gate G12): none6162# The paper's predicate ledger (predicates cited as 35:XN): the predicate(s) each check witnesses.63LEDGER = {64    "A1": "35:C1, 35:X2", "A2": "35:C15, 35:X1, 35:X3, 35:X7, 35:P4", "A3": "35:C18, 35:X12", "A4": "35:C14, 35:C6, 35:C23", "A5": "35:P5",65    "B1": "35:C2, 35:X4, 35:P1", "B2": "35:C3, 35:X5, 35:P2", "B3": "35:C11, 35:P8", "B4": "35:C12", "B5": "35:C7, 35:X10, 35:P6",66    "B6": "35:X12, 35:C18, 35:P9", "B7": "35:C16, 35:C17, 35:P10, 35:P11",67    "C1": "35:C4, 35:X6", "C2": "35:C5, 35:X6, 35:P3", "C3": "35:C9, 35:X9", "C4": "35:C13, 35:C8, 35:X8, 35:C21",68    "D1": "35:P1", "D2": "35:P2", "D3": "35:P8", "D4": "35:C12", "D5": "35:P6, 35:C8, 35:X8, 35:C9, 35:X9",69    "D6": "35:C10, 35:C22, 35:X11, 35:P7", "D7": "35:P3, 35:C6", "D8": "35:P9, 35:C18, 35:X12", "D9": "35:P10", "D10": "35:P11, 35:C16",70    "E1": "35:C23, 35:Z1, 35:C20, 35:X13", "E2": "35:C20", "E3": "35:X13, 35:C16, 35:C23",71    "F1": "35:C16", "F2": "35:C16", "F3": "35:C17", "F4": "35:C19",72    "G1": "35:C21, 35:C13",73}7475# the package record (had.<script>) each check reproduces; None for the two checks beyond the package76FAMILY = {77    "A1": "su3_singlet", "A2": "carrier_residue", "A3": "vector_nonet", "A4": "em_heavy_cmag", "A5": None,78    "B1": "su3f_relations", "B2": "su3f_relations", "B3": "su3f_second_order", "B4": "su3f_second_order", "B5": "isospin_cottingham",79    "B6": "vector_nonet", "B7": "confinement_completion",80    "C1": "hyperfine_charsum", "C2": "hyperfine_charsum", "C3": "isospin_cottingham", "C4": "em_heavy_cmag",81    "D1": "su3f_relations", "D2": "su3f_relations", "D3": "su3f_second_order", "D4": "su3f_second_order", "D5": "isospin_cottingham",82    "D6": "heavy_flavour", "D7": "hyperfine_charsum", "D8": "vector_nonet", "D9": "absolute_masses", "D10": "confinement_completion",83    "E1": "subhorizon_resolution", "E2": "subhorizon_resolution", "E3": "confinement_completion",84    "F1": None, "F2": "final_resolution", "F3": "confinement_closure", "F4": "forward_eigenvalues",85    "G1": "em_heavy_cmag",86}8788BLOCK = {"A": "the colour frame: SU(3, F_2) by frames, its centre, the colourless content of Λ•(3), the meson contraction, the Weyl moments",89         "B": "the relations as identities: Gell-Mann–Okubo, the spacing, the third difference, the links, Coleman–Glashow, the vector nonet, the gap and the split",90         "C": "the colour–spin–charge arithmetic: the colour factor, the spin pattern, the Σ–Λ correlators, the charge structure",91         "D": "the PDG confrontations: the relations, the hyperfine constant, the orderings, heavy flavour, the vector nonet, the anchored spectrum, the gap",92         "E": "the single scale: the admissible shells, the residual orders, the ratios at √σ",93         "F": "the finite confinement operators: the exact Sturm brackets, the Airy decimals, the baryon eigenvalue, the forward landing",94         "G": "the electromagnetic magnitude: α √σ against the lattice QED splitting"}9596# the deciding check of each witnessed predicate (the other checks that touch it are corroboration)97PREDICATES = {98    "35:C1": "A1", "35:C2": "B1", "35:C3": "B2", "35:C4": "C1", "35:C5": "C2", "35:C6": "A4", "35:C7": "B5", "35:C8": "D5",99    "35:C9": "C3", "35:C10": "D6", "35:C11": "B3", "35:C12": "B4", "35:C13": "C4", "35:C14": "A4", "35:C15": "A2", "35:C16": "F1",100    "35:C17": "F3", "35:C18": "A3", "35:C19": "F4", "35:C20": "E2", "35:C21": "G1", "35:C22": "D6", "35:C23": "E1",101    "35:X1": "A2", "35:X2": "A1", "35:X3": "A2", "35:X4": "B1", "35:X5": "B2", "35:X6": "C2", "35:X7": "A2", "35:X8": "D5",102    "35:X9": "C3", "35:X10": "B5", "35:X11": "D6", "35:X12": "B6", "35:X13": "E3",103    "35:P1": "D1", "35:P2": "D2", "35:P3": "D7", "35:P4": "A2", "35:P5": "A5", "35:P6": "D5", "35:P7": "D6", "35:P8": "D3",104    "35:P9": "D8", "35:P10": "D9", "35:P11": "D10",105    "35:Z1": "E1",106}107108R = Registry("35", "hadrons", LEDGER, PREDICATES, sources=[__file__])109110SHELLS = (53, 173, 389, 1373)                           # the laboratory shells of the discriminator111112113def _within(x, centre, tol):114    """|x − centre| < tol, x a float of the chart converted exactly."""115    return abs(Q(x) - Q(centre)) < Q(tol)116117118def _between(x, lo, hi):119    return Q(lo) < Q(x) < Q(hi)120121122def _pct(x, nd=2, sign=False):123    """x as a percentage string (the chart tier formats it: no float call in this tier, gate G09)."""124    return CH.fmt(Q(x) * 100, nd, sign)125126127def _f(x, nd=3, sign=False):128    return CH.fmt(x, nd, sign)129130131# ------------------------------------------------------------------------------------------------------------132# block A: the colour frame (35:C1, X2, C15, X1, X3, X7, P4, C18, X12, C14, C6, C23, P5)133@R.block("A", BLOCK["A"])134def block_A():135    """Block A — the colour frame over F_4: A1–A5 exact."""136    # A1 SU(3, F_2) over F_4 by orthonormal frames: 36 unit vectors, |U(3, 2)| = 648, |SU(3, 2)| = 216; g†g = I and det g = 1137    #    on every element; the centre is the three scalars I, wI, w²I (the cube roots of unity, Z_3 triality), by the full138    #    commutation table and as the commutant of diag(1, w, w²) and the permutation U₁139    F, G = H.colour_group()140    u3 = I.unitary_frames(F, 3, det_one=False)141    scal = H.colour_scalars(F); cen = H.centre(F, G)142    D1 = tuple(tuple(x if i == j else F.zero for j in range(3)) for i, x in enumerate([F.one, (0, 1), (1, 1)]))143    U1 = tuple(tuple(F.one if i + j == 2 else F.zero for j in range(3)) for i in range(3))144    com = H.commutant(F, G, [D1, U1])145    ok = I.unit_vectors(F, 3) == 36 and len(u3) == 648 and len(G) == 216 and H.hermitian_invariant(F, G)146    ok &= all(I.det(F, g) == F.one for g in G) and sorted(cen) == sorted(scal) and len(scal) == 3 and sorted(com) == sorted(scal)147    ok &= D1 in G and U1 in G and all(F.mul(x[0][0], F.mul(x[0][0], x[0][0])) == F.one for x in scal)148    # 35:C1 (p35015), 35:X2 (p35039)149    R.check("A1", "colour SU(3, F_2) built exactly over F_4 by orthonormal frames: 36 unit vectors, 648 frames (U(3, 2)), 216 of "150            "determinant one; g†g = I and det g = 1 on every element; the centre is the three scalars I, wI, w²I (Z_3, colour "151            "triality) by the full commutation table and as the commutant of diag(1, w, w²) and the permutation U₁: the "152            "colour-singlet baryon is the centre-neutral ε_abc invariant, triality 0", ok,153            f"|U| = {len(u3)}, |SU| = {len(G)}, centre {len(cen)} scalars, commutant {len(com)}")154155    # A2 the colourless content of Λ•(3): no nonzero vector fixed by the group on the fundamental (a quark has residue 0), none on156    #    Λ²(3) by the 2 × 2 minors and by the conjugate action (the diquark), det g = 1 on all (Λ³ = det, the baryon, residue 1):157    #    (1, 0, 0, 1); the dimensions 1, 3, 3, 1; the trialities of qqq and q q̄ are 0; the determinant is the only colourless158    #    escape, at k = N = 3: the proton is the minimal residue-1 colourless object159    content = H.colourless_content(F, G)160    ok = content == (1, 0, 0, 1) and [1, 3, 3, 1] == [comb(3, k) for k in range(4)]161    ok &= H.triality(3, 0) == 0 and H.triality(1, 1) == 0 and H.triality(1, 0) == 1 and H.triality(2, 0) == 2162    # 35:C15 (p35029), 35:X1 (p35038), 35:X3 (p35040), 35:X7 (p35044), 35:P4 (p35054)163    R.check("A2", "the baryon is the Carrier residue 1: the colourless content of Λ•(3) on SU(3, F_2) is (1, 0, 0, 1) — no nonzero "164            "vector of the fundamental fixed by the group (a quark has residue 0), none of Λ²(3) (the minors and the conjugate "165            "action agree; the diquark), det g = 1 on every element (Λ³ = det, the one invariant, baryon number); the only "166            "colourless escape is the determinant at k = N = 3, and the trialities of qqq and q q̄ are 0 while a quark's is 1: "167            "the baryon is three quarks and the proton the minimal residue-1 wrap, with no lighter B = 1 residue", ok,168            f"content {content}; fixed on 3: {content[1]}, on Λ²: {content[2]}")169170    # A3 the meson contraction: g†g = I on all 216 elements is the invariance of the Hermitian form on the basis pairs, so the q q̄171    #    contraction v^a w̄_a is the one-dimensional invariant of 3 ⊗ 3̄ = 1 ⊕ 8 (the singlet once, by the moments); triality172    #    1 + 2 ≡ 0, residue 1, B = 0; the residue series photon 2, gluon 0, baryon 1, meson 1173    E, c = H.weyl_moments()174    ok = H.hermitian_invariant(F, G) and c["singlet_3x3bar"] == 1 and H.triality(1, 1) == 0 and content[3] == 1175    # 35:C18 (p35032)176    R.check("A3", "the meson is the Carrier residue 1 with B = 0: g†g = I on every element of SU(3, F_2) is the invariance of the "177            "Hermitian form on the basis pairs, so the q q̄ contraction is the one invariant of 3 ⊗ 3̄ = 1 ⊕ 8 (one singlet, "178            "E[χχ̄] = 1), triality 1 + 2 ≡ 0; with the baryon's determinant (A2) the residue series closes: photon 2, gluon 0, "179            "baryon 1, meson 1", ok, f"E[χχ̄] = {E[(1, 1)]}, Hermitian form invariant on all {len(G)}")180181    # A4 the adjoint channel by the Weyl constant terms: E[χχ̄] = 1, E[χ²] = 0, the adjoint 8 = χχ̄ − 1 once in 3 ⊗ 3̄182    #    (E[χ²χ̄²] − E[χχ̄] = 1) and absent from 3 ⊗ 3 (E[χ³χ̄] − E[χ²] = 0); the single-plaquette coefficients c₁ = β/(2N²) = β/18183    #    (the fundamental, O(β)) and c_adj = β²/(2N)² = β²/36 (the adjoint, O(β²), one order finer than the tension)184    c1, cadj = H.character_coefficients(3)185    ok = c["adjoint_in_3x3bar"] == 1 and c["adjoint_in_3x3"] == 0 and c["singlet_3x3bar"] == 1 and c["singlet_3x3"] == 0186    ok &= c1 == Q(1, 18) and cadj == Q(1, 36) and E[(2, 2)] == 2 and E[(3, 1)] == 0187    # 35:C14 (p35028), 35:C6 (p35020)188    R.check("A4", "c_mag is the adjoint-channel plaquette sum: by the Weyl constant terms the adjoint 8 sits once in 3 ⊗ 3̄ "189            "(E[χ²χ̄²] − E[χχ̄] = 2 − 1 = 1) and is absent from 3 ⊗ 3 (E[χ³χ̄] − E[χ²] = 0 − 0), so the colour-magnetic coefficient "190            "enters at O(β²) with the leading coefficient β²/(2N)² = β²/36, one order finer than the tension's c₁ = β/(2N²) = β/18 "191            "of the fundamental channel; the dimensionless pattern is exact, the absolute A_light = √σ c_mag carries the Ω-hard "192            "scale (Z1)", ok, f"moments {dict((k, v) for k, v in E.items() if k in [(1, 1), (2, 0), (2, 2), (3, 1)])}; c₁ {c1} β, c_adj {cadj} β²")193194    # A5 the flavour cube 3 ⊗ 3 ⊗ 3 = 10 ⊕ 8 ⊕ 8 ⊕ 1 by the moments: one singlet (E[χ³] = 1), the adjoint twice (E[χ⁴χ̄] − E[χ³] = 2),195    #    Σ m² = E[χ³χ̄³] = 6 = 1 + 2² + 1 so the remaining ten dimensions are one irreducible; 27 = 10 + 8 + 8 + 1; the symmetric196    #    spin–flavour cube Sym³(6) has C(8, 3) = 56 = 10·4 + 8·2 states: no multiplet beyond the 8 and the 10 at leading order197    mults, dim27, dim56, split56 = H.flavour_cube()198    ok = mults == {"1": 1, "8": 2, "10": 1} and dim27 == 27 == 10 + 8 + 8 + 1 and dim56 == 56 == split56 and c["sum_sq_cube"] == 6199    # 35:P5 (p35055)200    R.check("A5", "no exotic light multiplets beyond the 8 and the 10 at leading wrap order: the flavour cube 3 ⊗ 3 ⊗ 3 is 10 ⊕ 8 ⊕ 8 ⊕ 1 "201            "by the Weyl constant terms (one singlet E[χ³] = 1, the adjoint twice E[χ⁴χ̄] − E[χ³] = 2, the squared multiplicities "202            "E[χ³χ̄³] = 6 = 1 + 4 + 1, so the remaining ten dimensions are one irreducible), 27 = 10 + 8 + 8 + 1; the symmetric "203            "spin–flavour cube Sym³(6) has 56 = 10·4 + 8·2 states", ok, f"multiplicities {mults}, Σm² = {c['sum_sq_cube']}, 56 = {split56}")204205206# ------------------------------------------------------------------------------------------------------------207# block B: the relations as identities (35:C2, X4, C3, X5, C11, C12, C7, X10, X12, C16, C17)208@R.block("B", BLOCK["B"])209def block_B():210    """Block B — the relations as zero polynomials over their parameters: B1–B7 exact."""211    # B1 Gell-Mann–Okubo: with M = M₀ + aY + b[I(I+1) − Y²/4] on the octet, 2N + 2Ξ − 3Λ − Σ is the zero polynomial in (M₀, a, b):212    #    the relation holds for every value of the scale and the breaking parameters213    g = H.gmo_vector()214    # 35:C2 (p35016), 35:X4 (p35041)215    R.check("B1", "Gell-Mann–Okubo ½(N + Ξ) = ¼(3Λ + Σ) is an exact scale-cancelling identity: with the octet operator "216            "M = M₀ + aY + b[I(I+1) − Y²/4] the combination 2N + 2Ξ − 3Λ − Σ is the zero polynomial in (M₀, a, b), so the "217            "relation holds for every scale and every breaking parameter — a derived sum rule of linear flavour breaking", g.is_zero(),218            f"2N + 2Ξ − 3Λ − Σ = {g}")219220    # B2 decuplet equal spacing: with M = α + β n_s both second differences Δ − 2Σ* + Ξ* and Σ* − 2Ξ* + Ω are zero polynomials221    d1, d2 = H.spacing_vectors()222    # 35:C3 (p35017), 35:X5 (p35042)223    R.check("B2", "the decuplet is equally spaced because the strange seed enters the wrap additively: with M = α + β n_s the two "224            "second differences Δ − 2Σ* + Ξ* and Σ* − 2Ξ* + Ω are zero polynomials in (α, β); the common spacing is "225            "β = (M_Ω − M_Δ)/3, one strange-seed wrap increment", d1.is_zero() and d2.is_zero(), f"{d1}, {d2}")226227    # B3 the third difference: in the linear-seed pairwise-hyperfine model (A_ij = A (m/m_i)(m/m_j), r = m/m_s, every decuplet pair228    #    +1/4) M_Δ − 3M_Σ* + 3M_Ξ* − M_Ω is the zero polynomial in (M₀, d, A, r)229    t = H.third_difference()230    # 35:C11 (p35025)231    R.check("B3", "the second-order decuplet relation M_Δ − 3M_Σ* + 3M_Ξ* − M_Ω = 0: in the linear-seed pairwise-hyperfine model "232            "(A_ij = A (m/m_i)(m/m_j), r = m/m_s, every decuplet pair S_i·S_j = +1/4) the third difference is the zero polynomial "233            "in (M₀, d, A, r), parameter-free", t.is_zero(), f"third difference = {t}")234235    # B4 the octet–decuplet hyperfine links: (M_Σ − M_Λ) − (2/3)[(M_Δ − M_N) − (M_Σ* − M_Σ)] and (M_Σ* − M_Σ) − (M_Ξ* − M_Ξ) are236    #    zero polynomials in the same model (the octet correlators −3/4, +1/4, −1 of block C)237    l1, l2 = H.hyperfine_links()238    # 35:C12 (p35026)239    R.check("B4", "the octet–decuplet hyperfine links M_Σ − M_Λ = (2/3)[(M_Δ − M_N) − (M_Σ* − M_Σ)] and M_Σ* − M_Σ = M_Ξ* − M_Ξ are "240            "parameter-free: both differences are zero polynomials in (M₀, d, A, r) of the linear-seed pairwise-hyperfine model, "241            "with the octet correlators S_u·S_d = −3/4 (Λ), +1/4 (Σ) and the strange coupling −1 (Σ), the decuplet pairs +1/4",242            l1.is_zero() and l2.is_zero(), f"{l1}, {l2}")243244    # B5 Coleman–Glashow: counting the d − u content, n − p = δ, Ξ⁻ − Ξ⁰ = δ, Σ⁻ − Σ⁺ = 2δ, so (n − p) + (Ξ⁻ − Ξ⁰) − (Σ⁻ − Σ⁺) is the245    #    zero polynomial in the one-body unit δ; the two-body electromagnetic term cancels in the same count246    cg = H.coleman_glashow()247    # 35:C7 (p35021), 35:X10 (p35047)248    R.check("B5", "Coleman–Glashow (n − p) + (Ξ⁻ − Ξ⁰) = Σ⁻ − Σ⁺ is an exact one-body identity: counting the d − u content, "249            "n − p = δ, Ξ⁻ − Ξ⁰ = δ, Σ⁻ − Σ⁺ = 2δ, so the combination is the zero polynomial in the one-body unit "250            "δ = δ_d − δ_u (the mass seed and the one-body electromagnetic self-energy together), the two-body term cancelling",251            cg.is_zero(), f"(n − p) + (Ξ⁻ − Ξ⁰) − (Σ⁻ − Σ⁺) = {cg}")252253    # B6 the vector nonet: with M = a + b n_s on the spin-1 nonet, 2M_K* − M_ρ − M_φ is the zero polynomial in (a, b); the same254    #    frame and the same colour-magnetic operator as the baryons (the spin shift common to the nonet)255    v = H.vector_spacing()256    # 35:X12 (p35049)257    R.check("B6", "the vector mesons space equally, 2M_K* = M_ρ + M_φ: with M = a + b n_s on the spin-1 nonet (the hyperfine a "258            "common shift) the combination 2K* − ρ − φ is the zero polynomial in (a, b), the vector analogue of the decuplet "259            "spacing on the same frame, with the meson residue 1 and B = 0 (A3)", v.is_zero(), f"2K* − ρ − φ = {v}")260261    # B7 the gap and the split: M_Λ − M_N − (m_s − m_l) is the zero polynomial with M_N = 3m_l − (3/4)v_ll and262    #    M_Λ = 2m_l + m_s − (3/4)v_ll (the strange quark hyperfine-decoupled in Λ, both correlator sums −3/4), and the spin split263    #    inverts: (M_N + M_Δ)/6 = λ_l, M_Δ − M_N = (3/2)λ_hf; every baryon's correlator sum is its multiplet's g_spin264    gap = H.gap_identity(); s1, s2 = H.spin_split()265    ok = gap.is_zero() and s1.is_zero() and s2.is_zero() and H.correlator_sums()266    R.check("B7", "the Λ–N gap is the strange constituent excess and the spin split inverts: M_Λ − M_N − (m_s − m_l) is the zero "267            "polynomial (both carry the hyperfine −(3/4)v_ll, the strange quark decoupled in Λ), (M_N + M_Δ)/6 − λ_l and "268            "(M_Δ − M_N) − (3/2)λ_hf are zero polynomials; every octet and decuplet correlator sum equals its multiplet's "269            "g_spin, −3/4 and +3/4", ok, f"gap {gap}, split {s1}, {s2}")270271272# ------------------------------------------------------------------------------------------------------------273# block C: the colour–spin–charge arithmetic (35:C4, X6, C5, P3, C9, X9, C13, C8, X8, C21)274@R.block("C", BLOCK["C"])275def block_C():276    """Block C — exact rational arithmetic: C1–C4."""277    # C1 the colour factor of the singlet: C₂(3) = (N² − 1)/(2N) = 4/3, C₂(1) = 0, Σ T_i·T_j = (0 − 3·4/3)/2 = −2, λ = 2T gives278    #    Σ λ_i·λ_j = −8, −8/3 per pair279    c2, sTT, sll, per = H.colour_factor()280    ok = c2 == Q(4, 3) and sTT == -2 and sll == -8 and per == Q(-8, 3)281    # 35:C4 (p35018)282    R.check("C1", "the colour factor of the colour-singlet baryon Σ_{i<j} λ_i·λ_j = −8 (−8/3 per pair) from the Casimirs "283            "C₂(3) = (N² − 1)/(2N) = 4/3 and C₂(1) = 0: Σ T_i·T_j = (C₂(1) − 3C₂(3))/2 = −2 and λ = 2T", ok,284            f"C₂ = {c2}, ΣT·T = {sTT}, Σλ·λ = {sll}, per pair {per}")285286    # C2 the spin pattern g_spin = ½S(S+1) − 9/8: octet −3/4, decuplet +3/4, separation 3/2; the eigenvalues of Σ(λ·λ)(S·S) on287    #    the singlet (−8/3)g = +2 (octet), −2 (decuplet); M_10 − M_8 = (3/2)A_light with A_light = −(8/3)κ_hf: the decuplet288    #    heavier by a derived sign289    e8, e10, sep, de = H.hyperfine_eigenvalues()290    ok = H.g_spin(1) == Q(-3, 4) and H.g_spin(3) == Q(3, 4) and sep == Q(3, 2) and e8 == 2 and e10 == -2 and de == -4291    # 35:C5 (p35019), 35:X6 (p35043)292    R.check("C2", "the hyperfine pattern is exact: g_spin = ½S(S+1) − 9/8 is −3/4 on the octet and +3/4 on the decuplet, the "293            "separation 3/2; the eigenvalues of Σ(λ_i·λ_j)(S_i·S_j) on the singlet are (−8/3)g = +2 and −2; so "294            "M_10 − M_8 = (3/2)A_light with A_light = −(8/3)κ_hf, the decuplet heavier than the octet by the colour-magnetic "295            "curvature invariant, a derived sign and pattern", ok, f"g = {H.g_spin(1)}, {H.g_spin(3)}; eigenvalues {e8}, {e10}; separation {sep}")296297    # C3 the Σ–Λ fine structure: the light pair S_u·S_d is −3/4 at spin 0 (Λ) and +1/4 at spin 1 (Σ); the strange coupling298    #    S_s·(S_u + S_d) at total spin ½ is 0 for the spin-0 pair and −1 for the spin-1 pair; so M_Σ − M_Λ = a_ll(1/4 + 3/4) +299    #    a_ls(−1 − 0) = a_ll − a_ls = a_ll(1 − m_l/m_s) > 0 for m_s > m_l: Σ heavier, derived300    pc = H.pair_correlators()301    diff_ll, diff_ls = pc["ud_spin1"] - pc["ud_spin0"], pc["s_pair_sigma"] - pc["s_pair_lambda"]302    ok = pc == dict(ud_spin0=Q(-3, 4), ud_spin1=Q(1, 4), s_pair_lambda=Q(0), s_pair_sigma=Q(-1)) and diff_ll == 1 and diff_ls == -1303    # 35:C9 (p35023), 35:X9 (p35046)304    R.check("C3", "Σ is heavier than Λ by hyperfine fine structure of two states of identical quark content: the light pair's "305            "S_u·S_d is −3/4 at spin 0 (Λ) and +1/4 at spin 1 (Σ), the strange coupling S_s·(S_u + S_d) at total spin ½ is 0 and −1, "306            "so M_Σ − M_Λ = a_ll·1 + a_ls·(−1) = a_ll − a_ls = a_ll(1 − m_l/m_s), positive for m_s > m_l", ok,307            f"correlators {dict((k, str(v)) for k, v in pc.items())}")308309    # C4 the charge structure: one-body Σ Q² is 1 for uud and 2/3 for udd, two-body Σ_{i<j} Q_iQ_j is 0 and −1/3; both differences310    #    p − n are +1/3: the electromagnetic term makes the proton heavier; Δ_EM = α √σ × this structure × O(1), so its magnitude311    #    reduces to the imported α and √σ (no new residue)312    qp = [H.QUARK_CHARGE[q] for q in "uud"]; qn = [H.QUARK_CHARGE[q] for q in "udd"]313    (op, tp), (on, tn) = H.charge_structure(qp), H.charge_structure(qn)314    ok = (op, tp) == (1, 0) and (on, tn) == (Q(2, 3), Q(-1, 3)) and op - on == Q(1, 3) and tp - tn == Q(1, 3) and op > on315    # 35:C13 (p35027)316    R.check("C4", "the electromagnetic splitting structure is exact: one-body Σ Q² = 1 for the proton (uud) and 2/3 for the neutron "317            "(udd), two-body Σ_{i<j} Q_iQ_j = 0 and −1/3, both differences p − n equal to +1/3 — the electromagnetic term makes "318            "the proton heavier; Δ_EM = α √σ × this structure, its magnitude the imported α (A9) times √σ (A3), no new residue", ok,319            f"p: ({op}, {tp}); n: ({on}, {tn})")320321322# ------------------------------------------------------------------------------------------------------------323# block D: the PDG confrontations (35:P1, P2, P8, C12, P6, C8, X8, C9, X9, C10, C22, X11, P7, P3, C6, P9, C18, X12, P10, P11, C16)324@R.block("D", BLOCK["D"])325def block_D():326    """Block D — the readings of the PDG masses: D1–D10 chart."""327    c = CH.confrontations()328    # D1 [chart] GMO on the isospin-averaged PDG masses: the residual 0.57 % (in (0.56, 0.58) %), the bounded second order329    r = c["gmo"]["residual"]330    # 35:P1 (p35051)331    R.check("D1", "[chart] Gell-Mann–Okubo holds on the PDG masses to 0.57 %: ½(N + Ξ) against ¼(3Λ + Σ), the residual in (0.56, 0.58) %, "332            "the bounded second-order (27-plet) insertion", _between(r, "0.0056", "0.0058"), f"residual {_pct(r, 3)} %", kind="CHART")333334    # D2 [chart] the decuplet spacings 152.6, 148.8, 139.1 MeV, the mean β = 146.8, the spread 9.2 % (in (9.2, 9.21) %), the335    #    spacings decreasing with strangeness (the second-order curvature)336    sp = c["spacing"]337    ok = _between(sp["beta"], "146.8", "146.85") and _between(sp["spread"], "0.092", "0.0921") and sp["spacings"][0] > sp["spacings"][1] > sp["spacings"][2]338    ok &= _between(sp["strange_step"], "189.6", "189.7")339    # 35:P2 (p35052)340    R.check("D2", "[chart] the decuplet equal spacing on the PDG masses: the spacings 152.6, 148.8, 139.1 MeV, the mean increment "341            "β = (M_Ω − M_Δ)/3 = 146.8 MeV, the spread (max − min)/β = 9.2 %, decreasing with strangeness — the second order "342            "the third-difference relation (P8) closes; the octet strange step (Ξ − N)/2 = 189.7 MeV", ok,343            f"spacings {', '.join(_f(x, 2) for x in sp['spacings'])}, β {_f(sp['beta'], 2)}, spread {_pct(sp['spread'], 2)} %", kind="CHART")344345    # D3 [chart] the third difference on PDG: M_Δ − 3M_Σ* + 3M_Ξ* − M_Ω = 6.05 MeV, 0.36 % of M_Ω (in (0.36, 0.363) %)346    t = c["third"]347    ok = _between(t["value"], "6.0", "6.1") and _between(t["relative"], "0.0036", "0.00363")348    # 35:P8 (p35058)349    R.check("D3", "[chart] the second-order decuplet relation holds on the PDG masses to 6.05 MeV, 0.36 % of the scale: "350            "M_Δ − 3M_Σ* + 3M_Ξ* − M_Ω in (6.0, 6.1) MeV, halving the first-order 9.2 % spread's 13.5 MeV", ok,351            f"{_f(t['value'], 2)} MeV, {_pct(t['relative'], 3)} %", kind="CHART")352353    # D4 [chart] the links on PDG: 77.5 against 67.8 MeV (12.5 %), 191.4 against 215.1 MeV (−12.4 %): the wavefunction wrap correction354    lk = c["links"]355    ok = _between(lk["rel1"], "0.125", "0.1252") and _between(lk["rel2"], "-0.124", "-0.1238")356    R.check("D4", "[chart] the octet–decuplet hyperfine links on the PDG masses hold to 12.5 % and −12.4 %: M_Σ − M_Λ = 77.5 against "357            "(2/3)[(M_Δ − M_N) − (M_Σ* − M_Σ)] = 67.8 MeV, M_Σ* − M_Σ = 191.4 against M_Ξ* − M_Ξ = 215.1 MeV, the residual the "358            "wavefunction wrap correction beyond the 1/(m_i m_j) hyperfine", ok,359            f"{_f(lk['l1'], 1)} vs {_f(lk['r1'], 1)} ({_pct(lk['rel1'], 1)} %); {_f(lk['l2'], 1)} vs {_f(lk['r2'], 1)} ({_pct(lk['rel2'], 1)} %)", kind="CHART")360361    # D5 [chart] Coleman–Glashow on the charged PDG masses: 8.143 against 8.079 MeV, 0.79 % (in (0.79, 0.80) %); n − p = 1.293 > 0362    #    (the d − u seed wins over the charge-squared term, which favours p: C4); Σ⁰ − Λ = 76.96 > 0 (the spin-1 pair: C3)363    cg = c["cg"]364    ok = _between(cg["residual"], "0.0079", "0.0080") and cg["n_minus_p"] == Q("1.293") and cg["n_minus_p"] > 0 and cg["sigma0_minus_lambda"] > 0365    ok &= _between(cg["sigma0_minus_lambda"], "76.9", "77.0") and _between(cg["lhs"], "8.14", "8.15") and _between(cg["rhs"], "8.07", "8.08")366    # 35:P6 (p35056), 35:C8 (p35022), 35:X8 (p35045)367    R.check("D5", "[chart] the isospin splittings obey Coleman–Glashow to 0.79 %: (n − p) + (Ξ⁻ − Ξ⁰) = 8.143 against "368            "Σ⁻ − Σ⁺ = 8.079 MeV, the residual the two-body electromagnetic term; the neutron is heavier, n − p = 1.293 MeV > 0, "369            "although the charge-squared term favours the proton (Σ Q² = 1 against 2/3), so the d − u seed exceeds it and "370            "m_d > m_u; Σ⁰ − Λ = 76.96 MeV > 0, the spin-1 light pair heavier (C3)", ok,371            f"CG {_f(cg['lhs'], 3)} vs {_f(cg['rhs'], 3)} ({_pct(cg['residual'], 2)} %); n − p {_f(cg['n_minus_p'], 3)}; Σ⁰ − Λ {_f(cg['sigma0_minus_lambda'], 2)}", kind="CHART")372373    # D6 [chart] heavy-quark symmetry on PDG: M_Λb − M_Λc = 3333.1 against M_B − M_D = 3414.8 MeV (−2.4 %); the 1/m_Q hyperfine ratio374    #    (Σ_c* − Σ_c)/(Σ* − Σ) = 0.339 ≈ m_s/m_c (constituent): the heavy-quark spin decouples, Λ_Q a spin-0 light diquark; the heavy375    #    absolute masses m_Q + O(√σ) reduce to the imported scales376    hv = c["heavy"]377    ok = _between(hv["residual"], "-0.024", "-0.0239") and _between(hv["ratio"], "0.339", "0.3391") and _between(hv["baryon"], "3333.1", "3333.2") and _between(hv["meson"], "3414.8", "3414.9")378    # 35:C10 (p35024), 35:C22 (p35036), 35:X11 (p35048), 35:P7 (p35057)379    R.check("D6", "[chart] the heavy baryons follow heavy-quark symmetry: M_Λb − M_Λc = 3333.1 against M_B − M_D = 3414.8 MeV "380            "(−2.4 %), the two differences one quantity m_b − m_c because the heavy-quark spin decouples (a_iQ ∼ 1/m_Q) and Λ_Q "381            "carries a spin-0 light diquark; the 1/m_Q hyperfine ratio (Σ_c* − Σ_c)/(Σ* − Σ) = 0.339 ≈ m_s/m_c; the heavy absolute "382            "masses m_Q + O(√σ) reduce to the imported scales, no new residue", ok,383            f"{_f(hv['baryon'], 1)} vs {_f(hv['meson'], 1)} ({_pct(hv['residual'], 2)} %); ratio {_f(hv['ratio'], 4)}", kind="CHART")384385    # D7 [chart] the hyperfine constant: A_light = (2/3)(M_Δ − M_N) = 195.4 MeV; the light-light pair M_Σ* − M_Σ = 191.4 MeV of the386    #    same order (equality needs the constituent-mass ratio)387    hf = c["hyperfine"]388    ok = _between(hf["A_light"], "195.3", "195.4") and _between(hf["ll_pair"], "191.4", "191.5")389    # 35:P3 (p35053)390    R.check("D7", "[chart] the hyperfine pattern on the PDG masses: A_light = (2/3)(M_Δ − M_N) = 195.4 MeV (the paper's ≃ 195), the "391            "separation (3/2)A_light = M_Δ − M_N; the light-light pair M_Σ* − M_Σ = 191.4 MeV of the same order, the strange "392            "spectator's 1/(m_l m_s) correction the difference", ok, f"A_light {_f(hf['A_light'], 2)}, Σ* − Σ {_f(hf['ll_pair'], 2)} MeV", kind="CHART")393394    # D8 [chart] the vector nonet on PDG: (2K* − ρ − φ)/(ρ + φ) = −0.42 %; K* predicted (ρ + φ)/2 = 897.4 against 893.6 (+0.42 %),395    #    ω predicted = ρ against 782.7 (−0.95 %), both under 1 %; the strange increment b = 122.1 MeV396    v = c["vector"]397    ok = _between(v["residual"], "-0.0042", "-0.0041") and v["Ks_pred"] == Q("897.36") and abs(v["Ks_rel"]) < Q("0.005") and abs(v["ome_rel"]) < Q("0.01")398    ok &= v["b"] == Q("122.1")399    # 35:P9 (p35059)400    R.check("D8", "[chart] the vector nonet on the PDG masses: 2M_K* against M_ρ + M_φ to −0.42 %; with ρ and φ anchored the predicted "401            "K* = (M_ρ + M_φ)/2 = 897.4 MeV lands within 0.5 % of 893.6 and the ideally mixed ω = ρ within 1 % of 782.7; the strange "402            "increment b = (M_φ − M_ρ)/2 = 122.1 MeV (the baryon Λ–N gap 176.8, D10: the two-body and three-body confinement "403            "eigenvalues differ on the same √σ)", ok,404            f"residual {_pct(v['residual'], 2)} %, K* {_f(v['Ks_pred'], 1)} ({_pct(v['Ks_rel'], 2, True)} %), ω {_pct(v['ome_rel'], 2, True)} %", kind="CHART")405406    # D9 [chart] the anchored spectrum: from N, Λ, Δ the constituents m_l = 361.8 MeV, m_s/m_l = 1.4885, v_ll/m_l = 0.540; the five407    #    predictions Σ −1.12 %, Ξ +0.87 %, Σ* −0.57 %, Ξ* −0.44 %, Ω +0.56 %, all within 1.12 % (the paper's 1.1 %)408    (ml, ms, vll, vls, vss), table, res, worst = CH.anchored_spectrum()409    ok = _between(ml, "361.8", "361.9") and _between(ms / ml, "1.488", "1.489") and _between(vll / ml, "0.540", "0.5401") and worst < Q("0.0112")410    ok &= all(res[t] == 0 for t in ("N", "Lam", "Del")) and _between(worst, "0.0111", "0.0112")411    # 35:P10 (p35060)412    R.check("D9", "[chart] the absolute octet and decuplet from one scale and two ratios: anchored to N, Λ, Δ the constituents are "413            "m_l = 361.8 MeV, m_s/m_l = 1.4885 and v_ll/m_l = 0.540; the five parameter-free predictions land within 1.12 % of PDG "414            "(Σ −1.12, Ξ +0.87, Σ* −0.57, Ξ* −0.44, Ω +0.56 %), the residuals traced to the strange-wrap and Σ–Λ hyperfine orders", ok,415            "; ".join(f"{t} {_pct(res[t], 2, True)} %" for t in res if t not in ("N", "Lam", "Del")) + f"; m_l {_f(ml, 1)}, m_s/m_l {_f(ms / ml, 4)}, v_ll/m_l {_f(vll / ml, 4)}", kind="CHART")416417    # D10 [chart] the Λ–N gap on PDG: M_Λ − M_N = 176.7645 MeV exactly on the declared masses, the strange constituent excess m_s − m_l418    #    (B7), hyperfine- and scale-free; (m_s − m_l)/√σ = 0.40 at √σ = 440419    ss = CH.single_scale()420    ok = ss["gap"] == Q("176.7645") and ss["m_s"] - ss["m_l"] == ss["gap"] and _between(ss["gap_over_s"], "0.401", "0.402")421    # 35:P11 (p35061)422    R.check("D10", "[chart] the Λ–N gap is the strange constituent excess: M_Λ − M_N = 176.8 MeV on the PDG masses equals m_s − m_l of "423            "the anchored constituents exactly (the hyperfine −(3/4)v_ll cancels, B7), hyperfine- and scale-free; "424            "(m_s − m_l)/√σ = 0.40 at √σ = 440 MeV", ok, f"gap {_f(ss['gap'], 4)} MeV, /√σ {_f(ss['gap_over_s'], 4)}", kind="CHART")425426427# ------------------------------------------------------------------------------------------------------------428# block E: the single scale (35:C23, Z1, C20, X13, C16)429@R.block("E", BLOCK["E"])430def block_E():431    """Block E — the discriminator and the ratios: E1 exact, E2 and E3 chart."""432    # E1 the colour rank is shell-independent: on every admissible shell Ω = 12k + 5, Ω + 1 = 3(4k + 2), so 3 | Ω + 1 (and 2 | Ω + 1,433    #    Ω + 1 ≡ 2 mod 4): the triality frame N = 3 on every shell; the four laboratory shells 53, 173, 389, 1373 are admissible; the434    #    character-sum coefficients 1/18, 1/36 depend on N alone — every dimensionless baryon quantity is Ω-stable; Ω enters only435    #    through the one scale √σ, declared once in the chart data436    ok = H.admissible_shells(range(2000)) and H.shells_ok(SHELLS) and H.character_coefficients(3) == (Q(1, 18), Q(1, 36))437    ok &= [k for k, v in CH.DATA["scales"].items() if k == "sqrt_sigma"] == ["sqrt_sigma"]438    # 35:C23 (p35037), 35:Z1 (p35065)439    R.check("E1", "the colour rank is shell-independent and the sector introduces no Ω-hard residue of its own: on every admissible "440            "shell Ω = 12k + 5 the successor 3(4k + 2) is divisible by 3 (k < 2000 checked, the identity for all k in the core), the "441            "laboratory shells 53, 173, 389, 1373 included, so the triality frame N = 3 and the coefficients β/18, β²/36 carry no Ω; "442            "the dimensionless A_light/√σ is Ω-stable, sub-horizon; the one Ω-hard input is the imported scale √σ (A3), declared "443            "once in the chart data, the electromagnetic α (A9) an imported constant", ok, f"shells {SHELLS}, coefficients {H.character_coefficients(3)}")444445    # E2 [chart] the second-order residuals are O(ε_s²) of the leading splittings: the GMO residual over the octet strange splitting446    #    Ξ − N is 0.017, the third difference over the decuplet spacing 0.041 — a convergent small-parameter expansion, ε_s ≈ 0.13–0.2447    ro = CH.residual_orders()448    ok = _between(ro["gmo"], "0.0169", "0.0171") and _between(ro["third"], "0.0412", "0.0413")449    # 35:C20 (p35034)450    R.check("E2", "[chart] the second-order SU(3)_F residuals are sub-horizon: the Gell-Mann–Okubo residual is 0.017 of the octet "451            "strange splitting Ξ − N and the decuplet third difference 0.041 of the spacing, both O(ε_s²) of a convergent "452            "strange-breaking expansion with ε_s ≈ 0.13–0.2, Ω-stable", ok, f"{_f(ro['gmo'], 4)}, {_f(ro['third'], 4)}", kind="CHART")453454    # E3 [chart] the single-scale readings at √σ = 440 MeV: λ_l = m_l/√σ = 0.822, m_s/m_l = 1.4885, λ_hf = v_ll/√σ = 0.444,455    #    M_N/√σ = 2.134, (m_s − m_l)/√σ = 0.402: the three anchored masses as one Ω-hard scale and three sub-horizon numbers456    ss = CH.single_scale()457    ok = _between(ss["lam_l"], "0.822", "0.8224") and _between(ss["ms_over_ml"], "1.488", "1.489") and _between(ss["lam_hf"], "0.444", "0.4441")458    ok &= _between(ss["mN_over_s"], "2.133", "2.134") and _between(ss["gap_over_s"], "0.401", "0.402")459    # 35:X13 (p35050)460    R.check("E3", "[chart] the spectrum rests on one scale: at √σ = 440 MeV the anchored constituents read λ_l = m_l/√σ = 0.822, "461            "m_s/m_l = 1.4885, λ_hf = v_ll/√σ = 0.444, M_N/√σ = 2.134 and (m_s − m_l)/√σ = 0.402 — every dimensionless mass ratio "462            "a sub-horizon number, the absolute scale the lone Ω-hard residue", ok,463            f"λ_l {_f(ss['lam_l'], 4)}, m_s/m_l {_f(ss['ms_over_ml'], 4)}, λ_hf {_f(ss['lam_hf'], 4)}, M_N/√σ {_f(ss['mN_over_s'], 4)}", kind="CHART")464465466# ------------------------------------------------------------------------------------------------------------467# block F: the finite confinement operators (35:C16, C17, C19)468@R.block("F", BLOCK["F"])469def block_F():470    """Block F — the finite operators: F1 exact (Sturm in Fractions), F2–F4 chart."""471    # F1 the finite-stage spectrum is exact: on the grid N = 4000, L = 30 the tridiagonal H^(N) = −u'' + x u has, by Sturm's count in472    #    exact rational arithmetic, exactly one eigenvalue in each of (2.338, 2.339), (4.087, 4.088), (5.520, 5.521), (6.786, 6.787):473    #    the counts (0, 1), (1, 2), (2, 3), (3, 4) at the brackets' ends474    N, L = CH.DATA["grid"]["airy"]475    br = [("2.338", "2.339"), ("4.087", "4.088"), ("5.520", "5.521"), ("6.786", "6.787")]476    counts = H.sturm_brackets(N, L, br)477    ok = counts == [(k, k + 1) for k in range(4)]478    # 35:C16 (p35030)479    R.check("F1", "the finite-stage confinement eigenvalues are exact: Sturm's count of the tridiagonal H^(N) = −u'' + x u on "480            "N = 4000 sites of [0, 30], in exact rational arithmetic, places exactly one eigenvalue in each of (2.338, 2.339), "481            "(4.087, 4.088), (5.520, 5.521) and (6.786, 6.787) — the finite spectrum at the decimals of the Airy zeros; the "482            "single-scale reduction M_H = √σ λ_H reads the three anchors as one Ω-hard scale and three sub-horizon numbers (E3), "483            "and M_Λ − M_N = m_s − m_l exactly (B7)", ok, f"counts at the bracket ends {counts}")484485    # F2 [chart] the decimals: the four eigenvalues by bisection 2.33810, 4.08793, 5.52053, 6.78666 against the Airy zeros 2.33811,486    #    4.08795, 5.52056, 6.78671 (within 5 × 10⁻⁵, the grid's accuracy); ε₁/ε₀ = 1.7484, pure and scale-free487    eps, zeros, diff, ratio = CH.airy_readout()488    ok = all(abs(Q(d)) < Q("5e-5") for d in diff) and _within(ratio, "1.7484", "0.00005") and all(Q(d) < 0 for d in diff)489    R.check("F2", "[chart] the finite-grid eigenvalues of H^(N) at N = 4000, L = 30 read 2.3381, 4.0879, 5.5205, 6.7867 against the "490            "Airy zeros 2.33811, 4.08795, 5.52056, 6.78671, each within 5 × 10⁻⁵ below its zero (the grid's accuracy); the level "491            "ratio ε₁/ε₀ = 1.7484 is pure and scale-free, a kind-(b) sub-horizon number", ok,492            f"{[round(e, 5) for e in eps]}, ratio {ratio:.4f}", kind="CHART")493494    # F3 [chart] the baryon scale is a computed eigenvalue: E₀ of H_G = |p| + r on the grid (600, 30) is 2.2320, within 0.001 of the495    #    converged 2.232 (the package's tower 2.2316, 2.2320, 2.2322, 2.2322 at N = 300..2200); E₁/E₀ = 1.49; M_N = E₀√σ = 982 MeV at496    #    √σ = 440, 4.6 % above 938.9, exact at √σ = 420.7 MeV inside the lattice band 420–447497    fl = CH.forward_landing()498    E0, E1 = fl["E0"], fl["E1"]; s = CH.DATA["scales"]["sqrt_sigma"]; mN = CH.pdg()["N"]499    MN_pred = Q(E0) * s; excess = (MN_pred - mN) / mN; sig_exact = mN / Q(E0)500    ok = _within(E0, "2.232", "0.001") and _between(E1 / E0, "1.491", "1.492") and _between(MN_pred, "981", "983")501    ok &= _between(excess, "0.045", "0.047") and _between(sig_exact, "420", "421")502    # 35:C17 (p35031)503    R.check("F3", "[chart] the baryon scale is the computed finite eigenvalue, no baryon mass entering: E₀ of H_G = |p| + r on the grid "504            "N = 600, L = 30 (|p| = T^{1/2} diagonal in the sine basis, the lowest pair by a Lanczos iteration) is 2.2320, within "505            "0.001 of the converged 2.232; E₁/E₀ = 1.49; M_N = E₀√σ = 982 MeV at √σ = 440 predicts the nucleon to 4.6 %, exact at "506            "√σ = 420.7 MeV inside the lattice band; λ_l = (M_N + M_Δ)/(6√σ) and λ_hf = 2(M_Δ − M_N)/(3√σ) then follow (B7, E3)", ok,507            f"E₀ {E0:.5f}, E₁/E₀ {E1 / E0:.4f}, M_N {_f(MN_pred, 0)} MeV ({_pct(excess, 1)} %), √σ exact {_f(sig_exact, 1)}", kind="CHART")508509    # F4 [chart] the forward landing on the grid (600, 30): |u'(0)|² of the nonrelativistic ground state 0.999 → 1 (the Airy510    #    normalisation identity), the relativistic contact 3.50, F_rel = 3.50 (3.52 on the package's N = 3000 grid); α_s(√σ) =511    #    2π/(9 ln 2) = 1.007 against the hyperfine-required 0.93 (within 12 %); v_ll/m_l = (2ρ/9)F_rel α_s/λ_l² = 0.536 (target512    #    0.540), λ_hf = 0.440 within 7 % of 0.444 at α_s = 0.93 and 0.474 at 1.00; λ_l = (E₀ + (3/4)λ_hf)/3 = 0.855 within 7 % of 0.822513    t = CH.DATA["targets"]514    ok = _within(fl["contact_nr"], 1, "0.002") and _between(fl["F_rel"], "3.49", "3.52") and _between(fl["alpha_s"], "1.00", "1.01")515    ok &= abs(Q(fl["hf"]["lam_hf"]) - t["lam_hf"]) / t["lam_hf"] < Q("0.07") and abs(Q(fl["hf"]["vm"]) - t["vm"]) / t["vm"] < Q("0.01")516    ok &= abs(Q(fl["transmutation"]["lam_hf"]) - t["lam_hf"]) / t["lam_hf"] < Q("0.08") and abs(Q(fl["lam_l_fwd"]) - t["lam_l"]) / t["lam_l"] < Q("0.07")517    ok &= abs(Q(fl["alpha_s"]) - t["alpha_s_hf"]) / Q(fl["alpha_s"]) < Q("0.12") and _within(fl["eps0"], "2.3379", "0.0002")518    # 35:C19 (p35033)519    R.check("F4", "[chart] the constituent eigenvalues evaluated forward from {N = 3, β} with no measured baryon mass: on the grid "520            "N = 600, L = 30 the nonrelativistic contact |u'(0)|² = 0.999 → 1 (the Airy normalisation identity), the relativistic "521            "enhancement F_rel = 3.50 (3.52 at N = 3000), the transmutation-pinned α_s(√σ) = 2π/(9 ln 2) = 1.007 within 12 % of the "522            "hyperfine-required 0.93; v_ll/m_l = (2ρ/9)F_rel α_s/λ_l² = 0.536 against 0.540, λ_hf = 0.440 within 7 % of 0.444 at "523            "α_s = 0.93 (0.474 at 1.00), λ_l = (E₀ + (3/4)λ_hf)/3 = 0.855 within 7 % of 0.822: constituent-model accuracy, the margin "524            "the linear-potential approximation", ok,525            f"|u'(0)|² {fl['contact_nr']:.4f}, F_rel {fl['F_rel']:.3f}, α_s {fl['alpha_s']:.3f}, v/m {fl['hf']['vm']:.3f}, λ_hf {fl['hf']['lam_hf']:.3f}/{fl['transmutation']['lam_hf']:.3f}, λ_l {fl['lam_l_fwd']:.3f}", kind="CHART")526527528# ------------------------------------------------------------------------------------------------------------529# block G: the electromagnetic magnitude (35:C21, C13)530@R.block("G", BLOCK["G"])531def block_G():532    """Block G — the magnitude reading: G1 chart."""533    # G1 [chart] Δ_EM = α √σ × structure: the one-body difference p − n of 1/3 (C4) at α = 1/137.036 and √σ = 440 MeV is 1.07 MeV, within534    #    10 % of the lattice QED part of M_n − M_p (1.00 MeV in magnitude, Borsányi et al. 2015); the magnitude reduces to the imported535    #    α and √σ, no new residue; Coleman–Glashow and the orderings are derived (B5, C3, C4, D5)536    em = CH.em_magnitude()537    ok = _between(em["value"], "1.07", "1.08") and abs(em["relative"]) < Q("0.1")538    # 35:C21 (p35035)539    R.check("G1", "[chart] the electromagnetic splitting magnitude reduces to the imported α and √σ: the one-body charge difference 1/3 "540            "(C4) times α √σ at α = 1/137.036 and √σ = 440 MeV is 1.07 MeV, within 10 % of the lattice QED part of M_n − M_p "541            "(1.00 MeV in magnitude); no new residue; Coleman–Glashow and the two orderings are derived (B5, C3, D5)", ok,542            f"α√σ/3 = {_f(em['value'], 3)} MeV ({_pct(em['relative'], 1, True)} % of 1.00)", kind="CHART")543544545if __name__ == "__main__":546    want = [a.upper() for a in sys.argv[1:]] or sorted(BLOCK)547    bad = [b for b in want if b not in BLOCK]548    if bad: sys.exit(f"no block {', '.join(bad)}: the blocks are {', '.join(sorted(BLOCK))}")549    for b in want: R.run_block(b)550    sys.exit(0 if R.summary(write=False, expect=list(LEDGER) if want == sorted(BLOCK) else None) else 1)551