# decryption_complete: false # source: /Voynich/Voynich_ANONYMOUS_RECORD_DECOMPRESSION_032_reproducibility.zip!/run_vertical_band_confi # stated_sha256: 5a0555976cc0d51d8d039e16c214ad83bb75efcd2573743b11820903d8cda917 # matches_stated_sha256: false # pdf_pages: 297-298 # note: The stated SHA-256 is the digest printed in the PDF. # The PDF page extract follows the form feed. decryption_complete stays false. run_vertical_band_confirmation_031.py VOYNICH RESEARCH ARCHIVE | 16 SEPTEMBER 2026 1 run_vertical_band_confirmation_031.py Source: /Voynich/Voynich_ANONYMOUS_RECORD_DECOMPRESSION_032_reproducibility.zip!/run_vertical_band_confi rmation_031.py SHA-256: 5a0555976cc0d51d8d039e16c214ad83bb75efcd2573743b11820903d8cda917 !/usr/bin/env python3 """VERTICAL-BAND-CONFIRMATION-031: cluster-safe confirmation of Test 030 discovery.""" from pathlib import Path from collections import defaultdict import hashlib,json import numpy as np,pandas as pd import run_geometric_expansion_link_030 as g30 ROOT=Path(__file__).resolve().parent;OUT=ROOT/'vertical_band_confirmation_031';OUT.mkdir(exist_ok=True) SEED=20260830;REPS=10000 def rr(score,pos): order=np.argsort(-np.asarray(score),kind='stable');return 1/min(i+1 for i,j in enumerate(order) if j in pos) def expected(n,p):return g30.random_mrr(n,p) def evaluate(w,queries): rows=[];prepared=[] for q in queries: score=[] for c in q['cand']: _,y0,_,y1=c['box'];score.append(-abs((y0+y1)/2/837-q['qy']/837)) gain=rr(score,q['pos'])-expected(len(score),len(q['pos'])) rows.append({'witness':w,'folio':q['folio'],'key':q['key'],'n':len(score),'p':len(q['pos']),'mrr':rr(s core,q['pos']),'expected_mrr':expected(len(score),len(q['pos'])),'gain':gain}) prepared.append((q['folio'],score,q['pos'])) d=pd.DataFrame(rows);fg=d.groupby('folio').gain.mean();obs=float(fg.mean()) jack=[] for f in sorted(fg.index):jack.append({'witness':w,'heldout_folio':f,'remaining_folios':len(fg)-1,'gain ':float(fg.drop(f).mean()) if len(fg)>1 else float('nan')}) rng=np.random.default_rng(SEED+(w=='GC')*100);null=[];folios=sorted(fg.index) for _ in range(REPS): u={f:rng.random() for f in folios};vals=defaultdict(list) for f,score,pos in prepared: n=len(score);shift=int(np.floor(u[f]*n));shifted={(j+shift)%n for j in pos} vals[f].append(rr(score,shifted)-expected(n,len(pos))) null.append(float(np.mean([np.mean(vals[f]) for f in folios]))) p=(1+sum(x>=obs for x in null))/(REPS+1) return d,pd.DataFrame(jack),pd.DataFrame({'witness':w,'replicate':range(REPS),'gain':null}),{'witness': w,'queries':len(d),'folios':len(fg),'keys':d.key.nunique(),'folio_equal_weight_gain':obs,'positive_folio s':int((fg>0).sum()),'positive_leave_one_folio_out':int(sum(r['gain']>0 for r in jack)),'cluster_circular_shift_p':p,'null_mean':float(np.mean(null)),'mrr':float(d.mrr.mean()),'expected _mrr':float(d.expected_mrr.mean())} def main(): lb=g30.aligned_label_boxes();coords=g30.aligned_prose_lines();ds=[];js=[];ns=[];ss=[] for w in ('ZL','GC'): q=g30.build(w,lb,coords);d,j,n,s=evaluate(w,q);ds.append(d);js.append(j);ns.append(n);ss.append(s) passed=all(s['folio_equal_weight_gain']>0 and s['positive_folios']>=max(3,s['folios']-1) and s['positive_leave_one_folio_out']==s['folios'] and s['cluster_circular_shift_p']<.05 for s in ss) pd.concat(ds).to_csv(OUT/'query_results.csv',index=False);pd.concat(js).to_csv(OUT/'leave_one_folio_out .csv',index=False);pd.concat(ns).to_csv(OUT/'cluster_circular_shift_null.csv',index=False) summary={'test':'VERTICAL-BAND-CONFIRMATION-031','post_discovery_confirmation_of':'GEOMETRIC-EXPANSION- LINK-030 Y_DISTANCE','null':'One shared normalized circular shift per folio; folios equally weighted; 10,000 replicates.','results':ss,'replicated_pass':passed,'boundary':'Physical row/band linkage only; no plaintext, semantic referents, or proof of Dreibilderserie descent.'};(OUT/'summary.json').write_text (json.dumps(summary,indent=2,default=lambda x:x.item())) report=['# VERTICAL-BAND-CONFIRMATION-031','',('**PASS**' if passed else '**FAIL / NOT PROMOTED**'),'','Post-discovery confirmation of the vertical-band signal from Test 030. Folios, not repeated label queries, are the independent units. The null applies one shared normalized circular shift to all target blocks on each folio.',''] for s in ss:report += [f"## {s['witness']}",'',f"- Queries / folios / keys: {s['queries']} / run_vertical_band_confirmation_031.py VOYNICH RESEARCH ARCHIVE | 16 SEPTEMBER 2026 2 {s['folios']} / {s['keys']}",f"- MRR: {s['mrr']:.4f} vs random expectation {s['expected_mrr']:.4f}",f"- Equal-folio gain: {s['folio_equal_weight_gain']:+.4f}",f"- Positive folios: {s['positive_folios']}/{s['folios']}",f"- Positive leave-one-folio-out runs: {s['positive_leave_one_folio_out']}/{s['folios']}",f"- Cluster circular-shift p: {s['cluster_circular_shift_p']:.6f}",''] report += ['## Interpretation','',('The projected labels and their same-key residual prose records share a reproducible physical row/band relation. The expansion pointer is therefore spatially indexed at page level.' if passed else 'The stricter folio-cluster confirmation fails; the Test 030 signal remains exploratory.'),'','## Rule audit','',('EDGE HANDOFF and REGISTER SHIFT are strengthened by a physical page-band bridge. The live rule count remains six.' if passed else 'No rule change; the live count remains six.')] (OUT/'report.md').write_text('\n'.join(report));files=sorted(p for p in OUT.iterdir() if p.is_file() and p.name!='SHA256SUMS.txt');(OUT/'SHA256SUMS.txt').write_text('\n'.join(f'{hashlib.sha256(p.read_bytes ()).hexdigest()} {p.name}' for p in files)+'\n');print(json.dumps(summary,indent=2,default=lambda x:x.item())) if __name__=='__main__':main()