"""Finite logical checks for return 85 and its cited return 84; no census replay. Run: python3 adversarial-check.py All count scenarios explicitly marked synthetic; source counts are not disputed. """ from fractions import Fraction as F from itertools import combinations from math import sqrt, prod # Source: prereg section 3, production @31 CRT and N1 prediction. crt=F('1695051393.52'); pred=F('0.024784'); obs=1653400000 r=(1-pred)*crt-obs z=float(r)/sqrt(obs); d=r/(pred*crt); j=F(obs)/crt assert r*r>36*obs and abs(d)36; |d|<1.25%; 0.94cut];b=[t for t in triples if t<=cut] return sum((F(1,t) for t in a),F(0)),sum((F(1,t) for t in b),F(0)),len(a),len(b) right=partition(w);wrong=partition(27000) e3=sum((F(1,t) for t in triples),F(0)) assert right[0]!=wrong[0] assert right[0]+right[1]==wrong[0]+wrong[1]==e3 assert right[2]+right[3]==wrong[2]+wrong[3]==4 print('\nSynthetic wrong-cut partition on a four-prime subset of the x=13 scour primes') print('triple_products='+','.join(map(str,triples))) print('true_cut=30030; wrong_cut=27000') print('right_tail='+str(right[0])+'; wrong_tail='+str(wrong[0])) print('wrong_tail_minus_right='+str(wrong[0]-right[0])) print('Both tail+sub=e3 and n_tail+n_sub=C(4,3): EXACT PASS') print('A total-identity check alone cannot bound the tail error.') # Printed @31 mass illustration, not a reconstruction of true unrounded sums. e=F('0.33095269');m=F('0.068057');a=F('0.000010');s=e-m assert (m+a)+(s-a)==e and m+a>0 and s-a>0 print('\nIllustration with published rounded @31 masses') print('tail_shift=0.000010 preserves total exactly; relative_tail_shift='+f'{float(a/m):.9f}') print('claimed_relative_bound='+f'{float(F("0.000000005")/e):.12f}') assert a/m>F('0.000000005')/e # The actual published rows and the sigma-conditional verdict in return 85. for level,o,c,p,slot in [(29,53660192,'55252747.16','0.028943',-.43),(31,1653241687,'1695051393.52','0.024784',-2.32)]: c=F(c);p=F(p);r=(1-p)*c-o;z=float(r)/sqrt(o);d=r/(p*c) t1='HIT' if abs(z)<=3 else 'MARGINAL' if abs(z)<=6 else 'MISS' t2='TIGHT' if abs(d)<=F('.0125') else 'OTHER' print(f'PUBLISHED @{level}: z={z:.2f}, d_percent={float(d)*100:.2f}, {t1}/{t2}; slot_z={slot:.2f} gives HIT') assert t1==('HIT' if level==29 else 'MARGINAL') and t2=='TIGHT' and abs(slot)<3 print('Return 85 actual-row classifications: PASS; no changed census or prediction.')