# Weyl models of G_3: pi_x(p_rs) = Proj(W_r x W_s^*) on M_3. Checks: (1) the projective Clifford group C_3, # the normalizer of the Weyl group K in PU_3, has order 216, and pi_x is commutative for every x in C_3; # (2) pi_x is noncommutative for random x, and for x = (Clifford element) * (small perturbation); # (3) degree one kernel test: for f = sum c_rs p_rs, pi_x(f) = 0 iff the corresponding function # sum c_rs q_rs on PU_3 vanishes on the double coset K x K, where q_rs are the coefficients of the # conjugation action of PU_3 on M_3, written in the basis Q_r = (1/9) sum_g conj(d(g,r)) W_g. import itertools, numpy as np out = open("benzema-output.txt", "w") def say(s): print(s, flush=True); out.write(s + "\n"); out.flush() n = 3; w = np.exp(2j * np.pi / 3) pts = [(i, j) for i in range(3) for j in range(3)] det = lambda g, h: (g[0] * h[1] - g[1] * h[0]) % 3 Zc = np.diag([w ** k for k in range(3)]); S = np.roll(np.eye(3), -1, axis=0) W = [np.linalg.matrix_power(Zc, g[0]) @ np.linalg.matrix_power(S, g[1]) for g in pts] def model(x): P = np.zeros((81, 9, 9), complex) for r in range(9): for s in range(9): v = (W[r] @ x @ W[s].conj().T).flatten() / np.sqrt(n) P[9 * r + s] = np.outer(v, v.conj()) return P def noncomm(P): AB = np.einsum('aij,bjk->abik', P, P) return np.abs(AB - AB.transpose(1, 0, 2, 3)).max() def canon(U): k = np.flatnonzero(np.abs(U.flatten()) > 1e-9)[0] ph = U.flatten()[k] / abs(U.flatten()[k]) return U / ph def key(U): return tuple(np.round(canon(U).flatten(), 6)) F = np.array([[w ** (i * j) for j in range(3)] for i in range(3)]) / np.sqrt(3) D = np.diag([1, 1, w]) gens = [F, D, Zc, S] group = {key(np.eye(3)): np.eye(3, dtype=complex)}; frontier = [np.eye(3, dtype=complex)] while frontier: nf = [] for g in frontier: for h in gens: k = h @ g if key(k) not in group: group[key(k)] = canon(k); nf.append(canon(k)) frontier = nf say("projective Clifford group generated by F_3/sqrt(3), diag(1,1,w), clock, shift: order %d (expect 216)" % len(group)) worst = max(noncomm(model(U)) for U in group.values()) say("max commutator norm of the models pi_x, x in the Clifford group: %.1e (commutative)" % worst) rng = np.random.default_rng(3) def haar(): A = rng.normal(size=(3, 3)) + 1j * rng.normal(size=(3, 3)); q, r = np.linalg.qr(A) return q * (np.diag(r) / abs(np.diag(r))) for t in range(3): say("random x number %d: commutator norm %.3f (noncommutative)" % (t + 1, noncomm(model(haar())))) H = rng.normal(size=(3, 3)) + 1j * rng.normal(size=(3, 3)); H = (H + H.conj().T) / 2 for eps in (1e-1, 1e-3): ev, V = np.linalg.eigh(H); E = V @ np.diag(np.exp(1j * eps * ev)) @ V.conj().T say("x = F_3 exp(i eps H), eps = %g: commutator norm %.2e (noncommutative)" % (eps, noncomm(model(F @ E)))) # degree one kernel test d = lambda g, h: w ** det(g, h) Q = [sum(np.conj(d(g, pts[r])) * W[gi] for gi, g in enumerate(pts)) / 9 for r in range(9)] def q(y): # matrix q_rs(y), from y Q_s y^* = sum_r q_rs(y) Q_r, using = tr(Q_r Q_t^*) = delta_rt / 9 return np.array([[9 * np.trace(y @ Q[s] @ y.conj().T @ Q[r].conj().T) / 3 for s in range(9)] for r in range(9)]) def test(x, label): P = model(x) M1 = P.reshape(81, 81) M2 = np.array([q(W[k] @ x @ W[l]).flatten() for k in range(9) for l in range(9)]).T r1 = np.linalg.matrix_rank(M1, tol=1e-8); r2 = np.linalg.matrix_rank(M2, tol=1e-8) r12 = np.linalg.matrix_rank(np.hstack([M1, M2]), tol=1e-8) say("%s: rank of {pi_x(p_rs)} %d, rank of {q_rs on KxK} %d, joint rank %d, same kernels: %s" % (label, r1, r2, r12, r1 == r2 == r12)) test(haar(), "random x") test(haar(), "random x") test(F, "x = F_3/sqrt(3)") test(D, "x = diag(1,1,w)") test(np.eye(3), "x = 1") say("done") out.close()