TFPT scientific source excerpt Original repository path: experiments/theory-contracts/tfpt-unified-source-derivation-20261029/aps_source_review/check_higgs_mixture_wick.py Original file SHA-256: d4a4921905bfe2d3984c3017909c8d59864ed4b9facff8ce1d1b594fbcb01b5a Inclusive original lines: 1-120 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 | """Original full96 Higgs source versus covariance-only modular reconstruction. 000002 | 000003 | Analytic proof supplies all positive Higgs weights. Numerical constructor 000004 | controls reuse v252's original seed252; rational Fock control is diagnostic. 000005 | No physical Yukawa, boson measure, geometry or vacuum is selected here. 000006 | """ 000007 | from pathlib import Path 000008 | import sys, json 000009 | import numpy as np 000010 | import sympy as s 000011 | ROOT=Path(__file__).resolve().parents[4] 000012 | sys.path.insert(0,str(ROOT/'verification')) 000013 | import v252_full_finite_triple as v 000014 | 000015 | checks={}; details={} 000016 | def need(name,ok): 000017 | checks[name]=bool(ok) 000018 | if not ok:raise AssertionError(name) 000019 | 000020 | # The ACTUAL original constructor inputs and real/selfadjoint one-form. 000021 | rng=np.random.default_rng(252) 000022 | Ys=[rng.normal(size=(3,3))+1j*rng.normal(size=(3,3)) for _ in range(4)] 000023 | mr=rng.normal(size=(3,3));MR=mr+mr.T 000024 | z3=np.zeros((3,3),complex);z2=np.zeros((2,2),complex) 000025 | DY=v.full_D(*Ys,z3);DM=v.full_D(z3,z3,z3,z3,MR) 000026 | K=v.Kswap();P=v.rep(1,z2,z3);gamma=v.grading() 000027 | p=.25;ell=1.0 # retained quarter mode; ell=1 is a diagnostic, not a scale fit 000028 | def phi(H): 000029 | h1,h2=H;q=np.array([[np.conj(h2),h1],[-np.conj(h1),h2]]) 000030 | a=v.rep(0,q,z3);B=a@(DY@P-P@DY);B=B+B.conj().T 000031 | return B+K@B.conj()@K+DM 000032 | def cov(H): 000033 | ph=phi(H);h=p*gamma-1j*gamma@ph 000034 | need('full96_hermitian_'+str(H),np.max(abs(h-h.conj().T))<1e-12) 000035 | ev,U=np.linalg.eigh(h) 000036 | return (U*(1/(1+np.exp(2*ell*ev))))@U.conj().T 000037 | left=[[v.IDX[(name,'L',col,g)] for name in ['u','d'] for g in range(3)] for col in range(3)] 000038 | sing=np.r_[np.linalg.svd(Ys[0],compute_uv=False),np.linalg.svd(Ys[1],compute_uv=False)] 000039 | def mean_formula(u): 000040 | E=np.sqrt(p*p+u*sing*sing) 000041 | return 3-p/2*np.sum(np.tanh(ell*E)/E) 000042 | Hs=[(0j,1+0j),(.6+0j,.8+0j),(.6j,.8+0j),(0j,2+0j)] 000043 | Cs=[cov(H) for H in Hs] 000044 | means=[] 000045 | for k,C in enumerate(Cs): 000046 | blocks=[C[np.ix_(ii,ii)] for ii in left] 000047 | need('three_actual_color_blocks_identical_'+str(k),all(np.max(abs(A-blocks[0]))<2e-13 for A in blocks)) 000048 | need('actual_cross_color_covariance_zero_'+str(k),all(np.max(abs(C[np.ix_(left[a],left[b])]))<2e-13 for a in range(3) for b in range(3) if a!=b)) 000049 | m=float(np.trace(blocks[0]).real);means.append(m) 000050 | u=sum(abs(z)**2 for z in Hs[k]) 000051 | need('original96_mean_matches_six_singular_values_'+str(k),abs(m-mean_formula(u))<3e-13) 000052 | need('whole_H_direction_does_not_change_color_mean',max(abs(means[k]-means[0]) for k in [1,2])<3e-13) 000053 | need('actual_radial_H_change_is_detected',means[3]>means[0]) 000054 | details['constructor_means']=means 000055 | 000056 | # Direct finite CAR matrices, independent of Wick formula / covariance log. 000057 | # Two internal modes per color, all 64 Fock states, exact integer operators. 000058 | n=6;dim=1<0 and (s.eye(2)-A).det()>0 and A[0,0]>0 and 1-A[0,0]>0) 000096 | rho=fullrho(A);m=s.trace(A);tau=s.trace(A-A*A) 000097 | need('exact_normalized_density_'+str(i),s.trace(rho)==1) 000098 | need('direct_Fock_N2_'+str(i),s.simplify(expect(rho,N@N)-9*m*m-3*tau)==0) 000099 | need('direct_Fock_color_Casimir_'+str(i),s.simplify(expect(rho,Q)-3*m*m-9*tau)==0) 000100 | need('direct_Fock_quartic_factor24_'+str(i),s.simplify(expect(rho,O)-24*m*m)==0) 000101 | mixed=wt*fullrho(A0)+(1-wt)*fullrho(A1);gauss=fullrho(Abar) 000102 | var=s.factor(wt*(1-wt)*(s.trace(A0)-s.trace(A1))**2) 000103 | defect=s.factor(expect(mixed-gauss,O)) 000104 | need('same_full_two_point_but_nonzero_invariant_four_point',all(expect(mixed-gauss,ann[j].T@ann[i])==0 for i in range(n) for j in range(n)) and defect==24*var and defect>0) 000105 | details.update(exact_Fock_defect=str(defect),exact_Fock_variance=str(var),Fock_dimension=dim) 000106 | 000107 | # Original96 constructor control with two positive diagnostic H weights. 000108 | # This does not choose the original physical H distribution. 000109 | cl=[C[np.ix_(left[0],left[0])] for C in [Cs[0],Cs[3]]] 000110 | m0,m1=means[0],means[3] 000111 | w0=.5;bar=w0*cl[0]+(1-w0)*cl[1] 000112 | full4=24*(w0*m0*m0+(1-w0)*m1*m1) 000113 | gauss4=24*np.trace(bar).real**2 000114 | need('original96_color_invariant_Wick_defect',abs((full4-gauss4)-24*w0*(1-w0)*(m0-m1)**2)<2e-12 and full4>gauss4) 000115 | details['original96_diagnostic_defect']=float(full4-gauss4) 000116 | need('constant_H_norm_control',abs(means[0]-means[1])<3e-13) 000117 | 000118 | out=dict(all_passed=all(checks.values()),checks=checks,details=details,physical_H_weight_selected=False,new_lean=False) 000119 | Path(__file__).with_name('HIGGS-MIXTURE-WICK.json').write_text(json.dumps(out,indent=2)+'\n') 000120 | print(json.dumps(dict(all_passed=out['all_passed'],checks=len(checks),details=details)))