"""Check the diagram directly on the 600-cell; Python 3, no dependencies. A pair (a,b) stores a+b*phi, with phi²=phi+1. Coordinates are doubled. """ from collections import Counter, defaultdict from itertools import combinations, permutations, product def add(x, y): return x[0] + y[0], x[1] + y[1] def neg(x): return -x[0], -x[1] def mul(x, y): a, b = x c, d = y return a*c + b*d, a*d + b*c + b*d def sumq(xs): a = b = 0 for c, d in xs: a += c b += d return a, b def scale(x, s): return s*x[0], s*x[1] def half(x): assert x[0] % 2 == x[1] % 2 == 0 return x[0]//2, x[1]//2 Z, ONE, PHI, P = (0,0), (1,0), (0,1), (-1,1) v = set() for i, s in product(range(4), (-2,2)): v.add(tuple((s,0) if j == i else Z for j in range(4))) for ss in product((-1,1), repeat=4): v.add(tuple((s,0) for s in ss)) for p in permutations(range(4)): if sum(p[i] > p[j] for i,j in combinations(range(4),2)) % 2: continue for signs in product((-1,1), repeat=3): row = (Z, *(scale(x,s) for x,s in zip((ONE,PHI,P),signs))) v.add(tuple(row[i] for i in p)) assert len(v) == 120 assert all(sumq(mul(x,x) for x in w) == (4,0) for w in v) v = sorted(v) idx = {w:i for i,w in enumerate(v)} def step(w): """Right multiply by (phi + i + (phi−1)*j)/2.""" a,b,c,d = w return tuple(map(half, ( sumq((mul(a,PHI),neg(b),neg(mul(c,P)))), sumq((a,mul(b,PHI),neg(mul(d,P)))), sumq((mul(a,P),mul(c,PHI),d)), sumq((mul(b,P),neg(c),mul(d,PHI))), ))) remaining = set(range(120)) fibers = [] while remaining: start = min(remaining) f = [] u = start for _ in range(10): remaining.remove(u) f.append(u) u = idx[step(v[u])] assert u == start fibers.append(f) assert len(fibers) == 12 lab = {u:(a,i) for a,f in enumerate(fibers) for i,u in enumerate(f)} adj = [set() for _ in v] for a,b in combinations(range(120),2): ds = [add(x,neg(y)) for x,y in zip(v[a],v[b])] if sumq(mul(x,x) for x in ds) == (8,-4): adj[a].add(b) adj[b].add(a) assert sum(map(len,adj)) == 1440 and all(len(ns) == 12 for ns in adj) base = {} shift = {} for a,b in combinations(range(12),2): shifts = Counter((j-i)%10 for i,x in enumerate(fibers[a]) for j,y in enumerate(fibers[b]) if y in adj[x]) if shifts: assert list(shifts.values()) == [10,10] assert any((s+1)%10 in shifts for s in shifts) base[a,b] = shifts shift[a,b] = tuple(shifts) shift[b,a] = tuple((-s)%10 for s in shifts) assert len(base) == 30 def qmul(w, z): a,b,c,d = w e,f,g,h = z return ( sumq((mul(a,e),neg(mul(b,f)),neg(mul(c,g)),neg(mul(d,h)))), sumq((mul(a,f),mul(b,e),mul(c,h),neg(mul(d,g)))), sumq((mul(a,g),neg(mul(b,h)),mul(c,e),mul(d,f))), sumq((mul(a,h),mul(b,g),neg(mul(c,f)),mul(d,e))), ) def projection(u): # Imaginary quaternion 4*u*U*u⁻¹, U=i+(phi−1)j (not normalized). a,b,c,d = v[u] w = qmul(qmul(v[u], (Z,ONE,P,Z)), (a,neg(b),neg(c),neg(d))) assert w[0] == Z return w[1:] proj = [projection(f[0]) for f in fibers] assert all(projection(u) == h for h,f in zip(proj,fibers) for u in f) assert len(set(proj)) == 12 D = Counter() for a,b in combinations(range(12),2): dot = sumq(mul(x,y) for x,y in zip(proj[a],proj[b])) # |U|² = 3−phi; |U|²/sqrt(5) = phi−1. assert ((a,b) in base) == (dot == scale(P,16)) D[dot] += 1 assert D == {scale(P,16):30, scale(P,-16):30, (-48,16):6} def support(simplex): return tuple(sorted({lab[x][0] for x in simplex})) triangles = Counter() cells = defaultdict(list) for a,b in combinations(range(120),2): if b not in adj[a]: continue cs = sorted(c for c in adj[a]&adj[b] if c>b) triangles.update(len(support((a,b,c))) for c in cs) for c,d in combinations(cs,2): if d in adj[c]: t = a,b,c,d cells[support(t)].append(t) assert triangles == {2:600,3:600} assert len(cells) == 20 and all(len(face)==3 and len(T)==30 for face,T in cells.items()) for face,T in cells.items(): a,b,c = face land = Counter((x+y+z)%10 for x,y,z in product(shift[a,b],shift[b,c],shift[c,a])) direct = {9:1,0:3,1:3,2:1} assert land == direct or land == {(-s)%10:n for s,n in direct.items()} sides = defaultdict(list) for k,t in enumerate(T): for s in combinations(t,3): if support(s) == face: sides[s].append(k) assert len(sides) == 30 and all(len(ks)==2 for ks in sides.values()) graph = [[] for _ in T] for s,(a,b) in sides.items(): graph[a].append((b,s)) graph[b].append((a,s)) assert all(len(g)==2 for g in graph) # Traverse the dual cycle; record the triangle crossed at each step. path = [] seen = {0} old, cur = -1, 0 while True: nxt,s = next((j,s) for j,s in graph[cur] if j != old) path.append(tuple(seat for _,seat in sorted(map(lab.__getitem__,s)))) if nxt in seen: assert nxt == 0 and len(seen) == 30 break seen.add(nxt) old,cur = cur,nxt delta = [tuple((y-x)%10 for x,y in zip(a,b)) for a,b in zip(path,path[1:]+path[:1])] assert delta == delta[:3]*10 assert sorted(sum(t[i] != 0 for t in delta[:3]) for i in range(3)) == [1,1,1] changes = [d for t in delta for d in t if d] assert len(changes) == 30 and (all(d==1 for d in changes) or all(d==9 for d in changes)) print('120 vertices; 12 decagons; 720 edges; 1200 triangular faces.') print('30 neighboring fiber pairs, two consecutive matchings each.') print('20 base triangles, each carrying one cycle of 30 tetrahedra.') print('On every cycle the crossed triangles change one seat at a time: A, B, C; repeat ten times.') print("The eight edge choices around a base triangle have landing counts 1, 3, 3, 1.")