# SCRIPT: BH-KNOT-08 # Quantum invariants at roots of unity and the mirror. q = e^{2 pi i/N}. # Figure-eight 4_1: Kashaev invariant <4_1>_N = sum_{k=0}^{N-1} |(q;q)_k|^2 (real and positive). # Trefoil 3_1: the Kontsevich-Zagier series F(q) = sum_{n>=0} (q;q)_n, which terminates at a root of # unity and equals the Kashaev invariant of the trefoil up to conjugation. # Kill conditions, written before the run: # K1 volume conjecture for 4_1: (2 pi/N) log <4_1>_N -> Vol(4_1) = 2.0298832128; with the known # subleading terms, (2 pi/N)(log<4_1>_N - 1.5 log N + 0.25 log 3) must be within 1e-2 of Vol at N = 800 # and approach it monotonically. Kill otherwise. # K2 trefoil: |F(q)|/N^{3/2} converges (changes by less than 1e-3 from N = 400 to N = 800), with no # exponential growth (the trefoil has hyperbolic volume zero). Kill otherwise. # K3 mirror rule: the mirror replaces q by 1/q, which conjugates both invariants. 4_1 is amphichiral, # so its invariant must be real (imaginary part below 1e-9 relative); the trefoil is chiral and its # invariant is not real. Signatures: sigma(4_1) = 0, sigma(3_1) = -2, sigma(mirror 3_1) = +2 # (Seifert-matrix computation). Kill if any fails. import numpy as np ok=True def report(name,cond,val=''): global ok print(('PASS ' if cond else 'FAIL ')+name, val); ok=ok and cond VOL=2.029883212819307 def kashaev41(N, conj=False): q=np.exp(2j*np.pi/N*(-1 if conj else 1)); lp=0.0; terms=[0.0] for k in range(1,N): lp+=2*np.log(abs(1-q**k)); terms.append(lp) t=np.array(terms); m=t.max(); return m+np.log(np.sum(np.exp(t-m))) prev=None; rows=[] for N in [50,100,200,400,800]: lk=kashaev41(N); raw=2*np.pi/N*lk; cor=2*np.pi/N*(lk-1.5*np.log(N)+0.25*np.log(3)); rows.append(cor) print(f' N={N:4d}: (2pi/N) log<4_1> = {raw:.6f} corrected = {cor:.6f} (Vol = {VOL:.6f})') report('K1 volume conjecture, figure-eight', abs(rows[-1]-VOL)<1e-2 and all(abs(rows[i+1]-VOL) {r[800]:.6f}') # K3 mirror N=200; q=np.exp(2j*np.pi/N) k41=sum(np.prod([abs(1-q**j)**2 for j in range(1,k+1)]) for k in range(N)) k41c=sum(np.prod([(1-q**j)*(1-q**(-j)) for j in range(1,k+1)]) for k in range(N)) report('K3 4_1 invariant is real (amphichiral)', abs(k41c.imag)<1e-9*abs(k41c), f'Im/Re = {k41c.imag/k41c.real:.1e}') F=kz(N); Fm=kz(N,True) report('K3 trefoil: mirror conjugates, invariant not real', abs(Fm-np.conj(F))<1e-9*abs(F) and abs(F.imag)>1e-3*abs(F), f'F = {F:.4f}, mirror = {Fm:.4f}') def signature(V): S=V+V.T; ev=np.linalg.eigvalsh(S); return int(np.sum(ev>0)-np.sum(ev<0)) V31=np.array([[-1,1],[0,-1]]); V41=np.array([[1,1],[0,-1]]) s31=signature(V31); s31m=signature(-V31.T); s41=signature(V41); s41m=signature(-V41.T) report('K3 signatures', s41==0 and s41m==0 and s31==-2 and s31m==2, f'sigma(4_1)={s41}, mirror {s41m}; sigma(3_1)={s31}, mirror {s31m}') print('ALL PASS' if ok else 'SOME FAILED')