|
40 | 40 | # ── Layer 1: derive f_{abc} from the matrices ───────────────────────────────── |
41 | 41 | # f_{abc} = Tr([λ_a, λ_b] λ_c) / (4i) |
42 | 42 |
|
43 | | -def derive_f(): |
| 43 | +def derive_f(L=None): |
| 44 | + if L is None: |
| 45 | + L = LAMBDA |
44 | 46 | f = {} |
45 | 47 | for a in range(8): |
46 | 48 | for b in range(8): |
47 | | - comm = LAMBDA[a] @ LAMBDA[b] - LAMBDA[b] @ LAMBDA[a] |
| 49 | + comm = L[a] @ L[b] - L[b] @ L[a] |
48 | 50 | for c in range(8): |
49 | | - val = np.trace(comm @ LAMBDA[c]) / (4j) |
| 51 | + val = np.trace(comm @ L[c]) / (4j) |
50 | 52 | if abs(val) > 1e-12: |
51 | 53 | f[(a,b,c)] = float(val.real) |
52 | 54 | return f |
@@ -77,8 +79,10 @@ def build_f_hand(): |
77 | 79 |
|
78 | 80 | # ── Check commutation relations ─────────────────────────────────────────────── |
79 | 81 |
|
80 | | -def check_mapping(assignment, f): |
81 | | - ops = [LAMBDA[i] for i in assignment] |
| 82 | +def check_mapping(assignment, f, L=None): |
| 83 | + if L is None: |
| 84 | + L = LAMBDA |
| 85 | + ops = [L[i] for i in assignment] |
82 | 86 | passes = 0 |
83 | 87 | max_err = 0.0 |
84 | 88 | for a in range(8): |
@@ -154,8 +158,35 @@ def main(): |
154 | 158 | status = "HOLDS" if err < 1e-10 else "FAILS" |
155 | 159 | print(f" {status} (error: {err:.2e})") |
156 | 160 |
|
| 161 | + # Convention robustness — four sign/ordering variants |
| 162 | + print("\n[6] Convention robustness (4 variants, exhaustive search each)...") |
| 163 | + variants = [ |
| 164 | + ("Standard Gell-Mann", LAMBDA), |
| 165 | + ("Negated imag gens (λ2,λ5,λ7 → -)", [m if i not in (1,4,6) else -m |
| 166 | + for i,m in enumerate(LAMBDA)]), |
| 167 | + ("Swapped diagonal (λ3↔λ8)", [LAMBDA[7] if i==2 else |
| 168 | + LAMBDA[2] if i==7 else m |
| 169 | + for i,m in enumerate(LAMBDA)]), |
| 170 | + ("All generators negated", [-m for m in LAMBDA]), |
| 171 | + ] |
| 172 | + convention_ok = True |
| 173 | + for label, L in variants: |
| 174 | + fv = derive_f(L) |
| 175 | + nat, _ = check_mapping(list(range(8)), fv, L) |
| 176 | + b = 0; bc = 0; sb = 0 |
| 177 | + for perm in permutations(range(8)): |
| 178 | + p, _ = check_mapping(list(perm), fv, L) |
| 179 | + if p > b: sb = b; b = p; bc = 1 |
| 180 | + elif p == b: bc += 1 |
| 181 | + elif p > sb: sb = p |
| 182 | + unique = "UNIQUE" if bc == 1 else f"NOT unique ({bc})" |
| 183 | + ok = (nat == 28 and bc == 1) |
| 184 | + convention_ok = convention_ok and ok |
| 185 | + print(f" {label}: {nat}/28, {unique}, next={sb}/28 {'✓' if ok else '✗'}") |
| 186 | + |
157 | 187 | print("\n" + "=" * 70) |
158 | | - all_ok = (table_ok and passes_d == 28 and passes_h == 28 and best_count == 1) |
| 188 | + all_ok = (table_ok and passes_d == 28 and passes_h == 28 |
| 189 | + and best_count == 1 and convention_ok) |
159 | 190 | print(f"RESULT: {'VERIFIED' if all_ok else 'FAILED'}") |
160 | 191 | print("=" * 70) |
161 | 192 |
|
|
0 commit comments