TFPT scientific source excerpt Original repository path: experiments/theory-contracts/elliptic-moebius-source-bridge-20261026/admissible_pair_20261028/check_covariant_rigidity.py Original file SHA-256: 5bd291b2ebe05e605bde9493e8c27d5bb8434fddc0abcf3688c4bfc30b7ddd81 Inclusive original lines: 1-166 Line numbers below refer to the original source. This bounded excerpt is source evidence; it is not a new proof/checker run. Conversation metadata and personal execution details are omitted where indicated. 000001 | #!/usr/bin/env python3 000002 | """Exact channel rigidity with fixed input/output representations, not P1 selection.""" 000003 | from pathlib import Path 000004 | import importlib.util 000005 | import itertools as it 000006 | import hashlib 000007 | import json 000008 | import numpy as np 000009 | import sympy as sp 000010 | 000011 | HERE=Path(__file__).resolve().parent 000012 | PREV=HERE.parent/'research-20261028-hodge-complement-channel/hodge_complement_channel.py' 000013 | [OMITTED: non-scientific conversation or execution metadata] 000014 | spec=importlib.util.spec_from_file_location('hodge_previous',PREV) 000015 | h=importlib.util.module_from_spec(spec); spec.loader.exec_module(h) 000016 | C=h.hodge_amplitudes(); pairs=h.PAIRS 000017 | checks=[] 000018 | def require(v,name): 000019 | if not bool(v): raise RuntimeError(name) 000020 | checks.append(name) 000021 | def ptout(M): return np.einsum('aiaj->ij',M.reshape(10,10,10,10)) 000022 | def choi_to_super(J): return J.reshape(10,10,10,10).transpose(0,2,1,3).reshape(100,100) 000023 | I=np.eye(100,dtype=np.int64); F=np.zeros((100,100),dtype=np.int64) 000024 | for a in range(10): 000025 | for b in range(10): F[10*b+a,10*a+b]=1 000026 | vs=[x.reshape(-1) for x in C] 000027 | M=sum(np.outer(v,v) for v in vs) 000028 | Q=[M,3*(I-F),3*(I+F)-M] # six times orthogonal projectors 000029 | D=[5,45,50] 000030 | for i,q in enumerate(Q): 000031 | require(np.array_equal(q@q,6*q),f'projector {D[i]} exact idempotence') 000032 | require(np.trace(q)==6*D[i],f'projector {D[i]} exact rank') 000033 | require(np.array_equal(ptout(q)*10,6*D[i]*np.eye(10,dtype=np.int64)),f'projector {D[i]} TP partial trace') 000034 | for j,r in enumerate(Q): 000035 | if i!=j: require(not np.any(q@r),f'orthogonality {D[i]}/{D[j]}') 000036 | require(np.array_equal(sum(Q),6*I),'complete three-projector decomposition') 000037 | # Actual complexified dual representation on bar10 tensor bar10. 000038 | G={} 000039 | for a in range(5): 000040 | for b in range(5): 000041 | X=np.zeros((5,5),dtype=np.int64); X[b,a]=1 000042 | r=-h.exterior_two_differential(X) 000043 | G[a,b]=np.kron(r,np.eye(10,dtype=np.int64))+np.kron(np.eye(10,dtype=np.int64),r) 000044 | for a in range(5): 000045 | for b in range(5): 000046 | for d,q in zip(D,Q): require(np.array_equal(G[a,b]@q,q@G[a,b]),f'dual gl5 E{a}{b} commutes P{d}') 000047 | cas=5*sum(G[a,b]@G[b,a] for a in range(5) for b in range(5))-16*I 000048 | for ev,q in zip([24,64,84],Q): require(np.array_equal(cas@q,ev*q),f'quadratic Casimir eigenvalue {ev}/5') 000049 | raising=sp.Matrix(np.vstack([G[i,i+1] for i in range(4)])) 000050 | N=raising.nullspace() 000051 | require(len(N)==3,'three highest-weight lines in full tensor product') 000052 | Nmat=sp.Matrix.hstack(*N) 000053 | for d,q in zip(D,Q): require((sp.Matrix(q)*Nmat).rank()==1,f'one highest weight in P{d}; irreducible') 000054 | # Choi vertex transition law. Every population entry checked as rational. 000055 | transitions=[] 000056 | for q,d in zip(Q,D): 000057 | vals={k:set() for k in ['stay','intersect','disjoint']} 000058 | for a,e in enumerate(pairs): 000059 | for b,f in enumerate(pairs): 000060 | kind='stay' if a==b else 'disjoint' if set(e).isdisjoint(f) else 'intersect' 000061 | vals[kind].add(sp.Rational(10*int(q[10*b+a,10*b+a]),6*d)) 000062 | expected={5:{'stay':0,'intersect':0,'disjoint':sp.Rational(1,3)},45:{'stay':0,'intersect':sp.Rational(1,9),'disjoint':sp.Rational(1,9)},50:{'stay':sp.Rational(1,5),'intersect':sp.Rational(1,10),'disjoint':sp.Rational(1,15)}}[d] 000063 | for k in vals: require(vals[k]=={expected[k]},f'P{d} all {k} population entries') 000064 | transitions.append({k:str(v) for k,v in expected.items()}) 000065 | p5,p45,p50,s,o=sp.symbols('p5 p45 p50 s o') 000066 | sol=sp.solve([p5+p45+p50-1,s-p50/5,o-sp.Rational(2,3)*p45-sp.Rational(3,5)*p50],[p5,p45,p50]) 000067 | require(sol[p50]==5*s and sol[p45]==(3*o-9*s)/2,'leakage reconstructs three covariant weights') 000068 | require(sp.simplify(2*(sol[p45]+sol[p50])-(3*o+s))==0,'diamond distance from orthogonal Choi sectors equals 3o+s') 000069 | # Analytic norm proof: T-Phi=sum_{45,50}p_i(T_i-Phi) has diamond norm 000070 | # at most 2*sum(p_i), since all three vertices are CPTP. The maximally 000071 | # entangled probe gives exactly that trace norm on the orthogonal Choi 000072 | # supports. The lower and upper bounds match, without a numerical SDP. 000073 | # SU3 plus actual five-cycle Lie algebra generation, with exact matrices. 000074 | cycle=np.zeros((5,5),dtype=np.int64) 000075 | for j in range(5): cycle[(j+1)%5,j]=1 000076 | roots=set() 000077 | for k in range(5): 000078 | for a,b in [(0,1),(1,0),(1,2),(2,1),(0,2),(2,0)]: roots.add(((a+k)%5,(b+k)%5)) 000079 | change=True 000080 | while change: 000081 | change=False 000082 | for a,b in list(roots): 000083 | for c,d in list(roots): 000084 | if b==c and a!=d and (a,d) not in roots: roots.add((a,d)); change=True 000085 | require(len(roots)==20,'SU3 and fivecycle conjugates generate all twenty sl5 root directions') 000086 | # Fixed-dictionary SM phase counterexample: rank five and same populations. 000087 | U=np.diag([-1 if all(j<3 for j in e) else 1 for e in pairs]).astype(np.int64) 000088 | Mu=sum(np.outer((c@U).reshape(-1),(c@U).reshape(-1)) for c in C) 000089 | require(np.array_equal(np.diag(Mu),np.diag(M)),'SM phase variant has identical Petersen populations') 000090 | require(np.array_equal(ptout(Mu),3*np.eye(10,dtype=np.int64)),'SM phase variant trace preserving') 000091 | require(np.array_equal(Mu@Mu,6*Mu) and np.trace(Mu)==30,'SM phase variant has Choi rank five') 000092 | require(not np.array_equal(Mu,M),'SM phase variant is a different quantum channel') 000093 | sm=[] 000094 | for a,b in it.product(range(5),repeat=2): 000095 | if (a<3)==(b<3): 000096 | X=np.zeros((5,5),dtype=np.int64); X[a,b]=1 000097 | r=h.exterior_two_differential(X); sm.append(r) 000098 | require(np.array_equal(r@U,U@r),f'phase counterexample commutes block E{a}{b}') 000099 | Sj=choi_to_super(M); Su=choi_to_super(Mu) 000100 | for j,r in enumerate(sm): 000101 | # Complexified covariance input r, target dual -r.T. 000102 | Lin=np.kron(r,np.eye(10,dtype=np.int64))-np.kron(np.eye(10,dtype=np.int64),r.T) 000103 | rout=-r.T 000104 | Lout=np.kron(rout,np.eye(10,dtype=np.int64))-np.kron(np.eye(10,dtype=np.int64),rout.T) 000105 | require(np.array_equal(Su@Lin,Lout@Su),f'SM covariance phase variant generator {j}') 000106 | R=np.zeros((10,10),dtype=np.int64) 000107 | for j,(a,b) in enumerate(pairs): 000108 | aa,bb=(a+1)%5,(b+1)%5; f=tuple(sorted((aa,bb))) 000109 | R[pairs.index(f),j]=1 if aa