TFPT scientific source excerpt Original repository path: experiments/theory-contracts/tfpt-unified-source-derivation-20261029/aps_source_review/check_common_curvature_response.py Original file SHA-256: d7886c7858a0a90a169cb40506b495e154421281995e01bc90fc2f57497aedd4 Inclusive original lines: 1-99 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 | """Whole Spin4 curvature trace and given Higgs radial source response. 000002 | Conditional original R031 consumer; no added physical operator or R² term. 000003 | """ 000004 | from pathlib import Path 000005 | import json,itertools 000006 | import sympy as s 000007 | checks={} 000008 | def need(k,v): 000009 | checks[k]=bool(v) 000010 | if not v:raise AssertionError(k) 000011 | def eq(k,x,y):need(k,s.simplify(x-y)==0) 000012 | I=s.I;one=s.eye(2);sx=s.Matrix([[0,1],[1,0]]);sy=s.Matrix([[0,-I],[I,0]]);sz=s.diag(1,-1) 000013 | ga=[s.kronecker_product(sx,one),s.kronecker_product(sy,sx),s.kronecker_product(sy,sy),s.kronecker_product(sy,sz)] 000014 | need('same_full_Euclidean_Spin4_Clifford_algebra',all(ga[i]*ga[j]+ga[j]*ga[i]==2*(i==j)*s.eye(4) for i in range(4) for j in range(4))) 000015 | # All algebraic 4D curvature tensors: symmetric6x6 pair matrix (21 entries), 000016 | # one Bianchi relation R0123-R0213+R0312=0 gives dimension20. 000017 | pairs=list(itertools.combinations(range(4),2));lookup={p:i for i,p in enumerate(pairs)} 000018 | coords=list(itertools.combinations_with_replacement(range(6),2));removed=(lookup[(0,3)],lookup[(1,2)]) 000019 | coords.remove(removed) 000020 | def tensor(mat): 000021 | out={} 000022 | for a,b,c,d in itertools.product(range(4),repeat=4): 000023 | if a==b or c==d:out[a,b,c,d]=s.S(0);continue 000024 | out[a,b,c,d]=(1 if a