"""Independent 256-bit Arb S4 cell bounds, with both weight choices at H=400.""" import os for k in ['OPENBLAS_NUM_THREADS','OMP_NUM_THREADS','MKL_NUM_THREADS','NUMEXPR_NUM_THREADS']:os.environ[k]='1' from pathlib import Path import math,json import numpy as np from flint import arb,arb_poly,ctx ctx.prec=256;ctx.threads=1 W,H=39,400 L0=arb('2736.86');L3=arb('32.7').exp();l=L0/40;z=l.exp();d=arb('.01') eps=arb(1)/(5*l*l)+arb(8)/(15*l**3)+1/z rep=39*(2*eps).exp()/(z-1) U=2*(-arb.const_euler()).exp()*arb('.6601617536') # independently certified JS lower constant cp=arb(9)/32*(1+arb(480)/(840*l)) assert eps>1/(z-1) and l>arb(8000000000).log() out={} for kind in ['rational','logarithmic']: weights=[arb(1)/(H+i) for i in range(38*H+1)] if kind=='logarithmic':weights=[(1+x).log() for x in weights] base=arb_poly(weights);poly=arb_poly([1]);J=[arb(1)] fw=(1.0/(H+np.arange(38*H+1,dtype=np.float64))) fw=fw*(1+1e-15) if kind=='rational' else np.log1p(fw)*(1+1e-14) assert all(arb(float(x))>=y for x,y in zip(fw,weights)) fp=None for m in range(1,W): poly=(poly*base).truncate((W-m)*H+1) J.append(sum(poly.coeffs(),arb(0))) fp=fw.copy() if m==1 else np.convolve(fp,fw)[:38*H+1]*(1+1e-10) fj=arb(float(np.sum(fp[:(W-m)*H+1]))*(1+1e-10)) assert fj>=J[-1] mu=[arb(1)] for j in range(1,W): Nj=sum((math.comb(j,i)*eps**i*J[j-i] for i in range(j+1)),arb(0)) mu.append(Nj/math.factorial(j)+(rep if j>=2 else 0)) def Aa(a):return a*(l/z**a+l/((a-1)*z**(a-1))+1/((a-1)**2*z**(a-1))) phi=sum((cp*mu[k-1]+sum((Aa(a)*mu[k-a] for a in range(2,k+1)),arb(0)) for k in range(19,40)),arb(0)) results={'Phi':phi.str(28),'J18':J[18].str(28),'J19':J[19].str(28)} for top,cc,label in [(arb(3000),arb('9.8036'),'low'),(L3,arb('26.218'),'high')]: lhs=top*phi/((1-d)*cc*U)+(L0**2*(-d*L0).exp()+5*L3**2*(-L0).exp())/(cc*U) assert lhs<1 results[label]=lhs.str(28) out[kind]=results;print(kind,json.dumps(results),flush=True) (Path(__file__).resolve().parent/'resume1/audit_s4.json').write_text(json.dumps(out,indent=2)+'\n')