"""Independent exact exponent check of the source mismatch and omitted factorization.""" import json,pathlib from fractions import Fraction as F p=pathlib.Path(__file__).parent c=F(19,20);R=F(51,100);k=F(39,100) baseline=min(c,(R+k+c)/2) def H(m,n,wrong=False): return [m/8+(max(c,m+n)+max(c,2*n))/16-c/4+min(c-m,c/2)/16, max(2*n-2*c,n/2+m+max(c,2*n)-5*c/2)/16, max(m,n)/(5 if wrong else 3)-c/5, max(m/2+n/6,m/6+n/2)-7*c/18, (max(m,n)-c)/15] rows=[] for label,m,n in [('R_first',R,k),('k_first',k,R)]: h=H(m,n);old=H(m,n,True) assert max(h)==F(-1,50) and h[2]>max(h[:2]+h[3:]) assert baseline-(c+max(h))==F(-1,200) rows.append({'orientation':label,'correct_H_terms_x':[str(a) for a in h],'correct_bound_x':str(c+max(h)),'saving_over_baseline_x':str(baseline-c-max(h)),'misquoted_checker_H_terms_x':[str(a) for a in old]}) # Theorem5.4, admissible c=d*d*e with d,e distinct primes at x^.44 and x^.07. # Then d'=d and f=d exactly (largest integer whose square divides c*d=d^3*e). d=F(11,25);e=F(7,100);f=d assert 2*d+e==c g=[d+R+k+max(2*R,2*k)-3*c,f+max(2*R,2*k)-2*c,f-2*d] bound=c+max(g)/6;saving=baseline-bound assert g==[F(-49,100),F(-11,25),F(-11,25)] assert bound==F(263,300) and saving==F(29,600) and saving-F(7,200)==F(1,75) # Direct finite factorization control for the f definition. cc=5*5*7;dd=5;ff=max(i for i in range(1,cc*dd+1) if (cc*dd)%(i*i)==0) assert ff==5 result={'passed':True,'baseline_x':str(baseline),'H_rows':rows,'Theorem54_counterexample_family':{'d_x':str(d),'dprime_x':str(d),'e_x':str(e),'f_x':str(f),'G_terms_x':[str(a) for a in g],'bound_x':str(bound),'saving_x':str(saving),'margin_over_7_200':str(saving-F(7,200)),'saving_c':str(saving/c),'scope':'Admissible family for the paper, disproves all-factorizations ceiling; not asserted to occur in the project actual Mobius squarefree modulus family.'},'factorization_control':{'c':cc,'d':dd,'max_f':ff},'method':'Independent exact Fraction formulas transcribed from the primary theorem statements; no imported author checker; expected mismatch recorded before execution.'} (p/'spot-results.json').write_text(json.dumps(result,indent=2),encoding='utf-8');print(json.dumps(result))