TFPT scientific source excerpt Original repository path: experiments/theory-contracts/tfpt-unified-source-derivation-20261029/aps_source_review/check_winding_multiplicity.py Original file SHA-256: 1792f2cf31da65c26d6fea0dac635c950122a52225345f4b0cad98e7f7213a17 Inclusive original lines: 1-45 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 R081 retained quark space: winding multiplicity under scalar shift. 000002 | 000003 | The shared scalar shift and the Fock determinant are conditional diagnostics; 000004 | this is not the physical Majorana Pfaffian or the full TFPT source. 000005 | """ 000006 | from pathlib import Path 000007 | import sys, json 000008 | import numpy as np 000009 | ROOT=Path(__file__).resolve().parents[4] 000010 | sys.path.insert(0,str(ROOT/'verification')) 000011 | import v252_full_finite_triple as original 000012 | rng=np.random.default_rng(252) 000013 | ys=[rng.normal(size=(3,3))+1j*rng.normal(size=(3,3)) for _ in range(4)] 000014 | mr=rng.normal(size=(3,3));D=original.full_D(*ys,mr+mr.T) 000015 | gamma=original.grading();swap=original.Kswap() 000016 | bp=original.rep(1,np.zeros((2,2)),np.zeros((3,3))) 000017 | a=original.rep(0,np.eye(2),np.zeros((3,3))) 000018 | om=a@(D@bp-bp@D);sa=om+om.conj().T;V=sa+swap@sa.conj()@swap 000019 | ix=[i for i,f in enumerate(original.P) if f[0] in ('u','d')] 000020 | g=gamma[np.ix_(ix,ix)];t=-1j*g@V[np.ix_(ix,ix)] 000021 | keep=np.where(np.diag(g).real>0)[0];drop=np.where(np.diag(g).real<0)[0] 000022 | cross=t[np.ix_(keep,drop)];sing=np.linalg.svd(cross,compute_uv=False) 000023 | checks={} 000024 | def require(name,c): 000025 | checks[name]=bool(c) 000026 | if not c: raise RuntimeError(name) 000027 | require('actual_R081_retained_rank18',len(keep)==18 and len(drop)==18) 000028 | require('actual_radial_odd_force',np.linalg.norm(t@g+g@t)<1e-10) 000029 | require('actual_18_channel_singular_values',len(sing)==18) 000030 | mass=.3*sing; ell=.2;alpha=.25;z=.03 000031 | def occ(p): 000032 | e=np.sqrt(p*p+mass*mass) 000033 | return (1+p/e*np.tanh(ell*e))/2 000034 | values=[] 000035 | for n in [100,1000,10000]: 000036 | logdet=float(np.sum(np.log1p(-z*occ(-n+alpha-1))-np.log1p(-z*occ(n+alpha)))) 000037 | values.append({'cutoff':n,'logdet':logdet,'det':float(np.exp(logdet))}) 000038 | target=(1-z)**(-18) 000039 | require('retained_18_channel_winding_limit',abs(values[-1]['det']-target)<1e-7) 000040 | require('cannot_count_as_single_index_factor',abs(target-1/(1-z))>.1) 000041 | out={'scope':'full 18-mode diagnostic gamma+ quark component with hypothetical same scalar shift, fixed background; not physical Pfaffian', 000042 | 'channels':len(keep),'winding_index':-len(keep),'z':z,'target':target,'single_channel_target':1/(1-z), 000043 | 'samples':values,'checks':checks,'passed':len(checks)} 000044 | Path(__file__).with_name('WINDING-MULTIPLICITY.json').write_text(json.dumps(out,indent=2)+'\n') 000045 | print(json.dumps(out,indent=2))