TFPT scientific source excerpt Original repository path: experiments/theory-contracts/tfpt-unified-source-derivation-20261029/aps_source_review/check_normal_source_placement.py Original file SHA-256: 73a1d70fb871f1d8d4bf241833537097ef625c8e6c016c5cb072bac092c4d44c Inclusive original lines: 1-43 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 | """Direct differential and original H0(O1) checks; no physical profile selected.""" 000002 | from pathlib import Path 000003 | import json 000004 | import sympy as s 000005 | x,y=s.symbols('x y',real=True) 000006 | sig=s.Function('sigma')(x,y);f=s.exp(-sig/2);W=1/f;h=s.diff(sig,x) 000007 | I=s.I;zero=s.zeros(2,1);c=s.Matrix([[0,1],[1,0]]) 000008 | def matrix(prefix):return s.Matrix(2,2,lambda i,j:s.Function(prefix+str(i)+str(j))(x,y)) 000009 | V=matrix('v');u=s.Matrix([s.Function('u0')(x,y),s.Function('u1')(x,y)]) 000010 | def B(q):return -I*c*q.diff(y)+V*q 000011 | def Bs(q):return f*B(f*q) 000012 | def simp(q):return q.applyfunc(s.simplify) 000013 | checks=[] 000014 | def check(name,value):checks.append(dict(name=name,passed=bool(value))) 000015 | check('first order scalar commutator including full potential',simp(B(h*u)-h*B(u)+I*c*s.diff(h,y)*u)==zero) 000016 | lhs=s.diff(Bs(u),x)-Bs(u.diff(x)) 000017 | rhs=f*V.diff(x)*(f*u)-h*Bs(u)/2-f*B(h*f*u)/2 000018 | check('full congruence derivative retains both ordered factors',simp(lhs-rhs)==zero) 000019 | check('unscaled normal operator has exact multiplier residual',simp(B(W*u)-W*B(u)+I*c*s.diff(W,y)*u)==zero) 000020 | check('whole outer insertion congruence identity',simp((Bs(u)+B(u))-f*(B(f*u)+W*B(W*f*u)))==zero) 000021 | check('outer insertion defect retains first order commutator',simp(B(u)-f*B(f*u)-(1-f*f)*B(u)+f*(B(f*u)-f*B(u)))==zero) 000022 | # Exact polynomial identity for the WHOLE original span(1,z). 000023 | a,b,d,e,zeta=s.symbols('a b d e zeta') 000024 | poly=s.Poly((a+b*zeta)*zeta-(d+e*zeta),zeta) 000025 | check('all smooth scalar multipliers preserving original O1 span are constant',s.solve(poly.all_coeffs(),[b,d,e],dict=True)==[{b:0,d:0,e:a}]) 000026 | # General product-chart differential identity,including varying symbol and 000027 | # noncommuting horizontal/vertical connections; no compatibility imposed. 000028 | C=matrix('c');Amu=matrix('m');An=matrix('n');Phi=matrix('p') 000029 | def N(q):return q.diff(y)+An*q 000030 | def H(q):return q.diff(x)+Amu*q 000031 | def Bgen(q):return C*N(q)+Phi*q 000032 | dc=C.diff(x)+Amu*C-C*Amu 000033 | Fmix=An.diff(x)-Amu.diff(y)+Amu*An-An*Amu 000034 | dPhi=Phi.diff(x)+Amu*Phi-Phi*Amu 000035 | check('full horizontal normal derivative includes symbol and mixed curvature',simp(H(Bgen(u))-Bgen(H(u))-dc*N(u)-C*Fmix*u-dPhi*u)==zero) 000036 | # Clifford algebra check in one local two-dimensional orthonormal frame. 000037 | p,q=s.symbols('p q',real=True);pauli2=s.Matrix([[0,-I],[I,0]]) 000038 | cl=p*c+q*pauli2 000039 | check('real nonzero normal covector has invertible Clifford action',s.simplify(cl.det()+p*p+q*q)==0 and simp(cl*cl-(p*p+q*q)*s.eye(2))==s.zeros(2)) 000040 | result=dict(date='2026-10-31',result='R052',scope='Original fixed H0(O1) multiplier class and common-core first-order producer/placement identities. No chosen normal geometry,horizontal connection,physical profile or exact dynamical reduction.',all_passed=all(t['passed'] for t in checks),checks=checks) 000041 | path=Path(__file__).with_name('NORMAL-SOURCE-PLACEMENT.json');path.write_text(json.dumps(result,indent=2)+'\n') 000042 | print(json.dumps(dict(all_passed=result['all_passed'],checks=len(checks)))) 000043 | assert result['all_passed']