# decryption_complete: false # source: /Voynich/Voynich_ANONYMOUS_RECORD_DECOMPRESSION_032_reproducibility.zip!/run_anonymous_record_de # stated_sha256: ce0e0cd6127f4048e8a12fa309e19833885a7e2be1e44268798e3a88ccf5b1bb # matches_stated_sha256: false # pdf_pages: 291-292 # 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_anonymous_record_decompression_032.py VOYNICH RESEARCH ARCHIVE | 16 SEPTEMBER 2026 1 run_anonymous_record_decompression_032.py Source: /Voynich/Voynich_ANONYMOUS_RECORD_DECOMPRESSION_032_reproducibility.zip!/run_anonymous_record_de compression_032.py SHA-256: ce0e0cd6127f4048e8a12fa309e19833885a7e2be1e44268798e3a88ccf5b1bb !/usr/bin/env python3 """ANONYMOUS-RECORD-DECOMPRESSION-032: extract cross-witness vertical-band records.""" from pathlib import Path from collections import Counter 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/'anonymous_record_decompression_032';OUT.mkdir(exist_ok=Tr ue);SEED=20260830;REPS=10000 def select(q): scores=[] for c in q['cand']: _,y0,_,y1=c['box'];scores.append(-abs((y0+y1)/2/837-q['qy']/837)) j=int(np.argmax(scores));c=q['cand'][j];return {'folio':q['folio'],'key':q['key'],'line':c['line'],'hit ':j in q['pos'],'full':list(c['payloads']),'residual':[x for x in c['payloads'] if x!=q['key']],'distance':-scores[j]} def multiset_jaccard(a,b): x,y=Counter(a),Counter(b);u=set(x)|set(y);return sum(min(x[k],y[k]) for k in u)/max(1,sum(max(x[k],y[k]) for k in u)) def lcs_ratio(a,b): d=[0]*(len(b)+1) for x in a: prev=0 for j,y in enumerate(b,1):old=d[j];d[j]=prev+1 if x==y else max(d[j],d[j-1]);prev=old return d[-1]/max(1,min(len(a),len(b))) def main(): lb=g30.aligned_label_boxes();coords=g30.aligned_prose_lines();sel={} allrows=[] for w in ('ZL','GC'): for q in g30.build(w,lb,coords): r=select(q);r['witness']=w;allrows.append(r);sel[(w,r['folio'],r['key'])]=r pairs=[] common=sorted({(f,k) for w,f,k in sel if w=='ZL'}&{(f,k) for w,f,k in sel if w=='GC'}) for f,k in common: z=sel[('ZL',f,k)];g=sel[('GC',f,k)];pairs.append({'folio':f,'key':k,'zl_line':z['line'],'gc_line':g['l ine'],'both_hit':int(z['hit'] and g['hit']),'zl_residual':' | '.join(z['residual']),'gc_residual':' | '.join(g['residual']),'multiset_jaccard':multiset_jaccard(z['residual'],g['residual']),'ordered_lcs_rati o':lcs_ratio(z['residual'],g['residual'])}) p=pd.DataFrame(pairs);valid=p[p.both_hit==1].copy();records=[] for (f,zl,gc),grp in valid.groupby(['folio','zl_line','gc_line']): keys=sorted(set(grp.key));first=keys[0];zs=[x for x in sel[('ZL',f,first)]['full'] if x not in keys];gs=[x for x in sel[('GC',f,first)]['full'] if x not in keys] records.append({'record_id':f+':'+str(zl)+'/'+str(gc),'folio':f,'zl_line':zl,'gc_line':gc,'keys':' | '.join(keys),'zl_residual':' | '.join(zs),'gc_residual':' | '.join(gs),'multiset_jaccard':multiset_jacca rd(zs,gs),'ordered_lcs_ratio':lcs_ratio(zs,gs),'zl_seq':zs,'gc_seq':gs}) rec=pd.DataFrame(records);obs=float(rec.multiset_jaccard.mean()) if len(rec) else 0 rng=np.random.default_rng(SEED);null=[];gseq=list(rec.gc_seq) if len(rec) else [];zseq=list(rec.zl_seq) if len(rec) else [] for _ in range(REPS): order=rng.permutation(len(gseq));null.append(float(np.mean([multiset_jaccard(zseq[i],gseq[j]) for i,j in enumerate(order)])) if len(gseq) else 0) pv=(1+sum(x>=obs for x in null))/(REPS+1) promoted=bool(len(rec)>=5 and obs>=.65 and pv<.05) pd.DataFrame(allrows).assign(residual=lambda d:d.residual.map(lambda x:' | '.join(x)),full=lambda d:d.full.map(lambda x:' | '.join(x))).to_csv(OUT/'all_top1_retrievals.csv',index=False);p.to_csv(OUT/'cr oss_witness_queries.csv',index=False);rec.drop(columns=['zl_seq','gc_seq']).to_csv(OUT/'deduplicated_ano nymous_record_ledger.csv',index=False);pd.DataFrame({'replicate':range(REPS),'jaccard':null}).to_csv(OUT /'pairing_null.csv',index=False) run_anonymous_record_decompression_032.py VOYNICH RESEARCH ARCHIVE | 16 SEPTEMBER 2026 2 summary={'test':'ANONYMOUS-RECORD-DECOMPRESSION-032','paired_queries':len(p),'both_witness_top1_hits':l en(valid),'deduplicated_physical_records':len(rec),'mean_multiset_jaccard':obs,'mean_ordered_lcs_ratio': float(rec.ordered_lcs_ratio.mean()) if len(rec) else 0,'pairing_permutation_p':pv,'promoted_anonymous_re cords':promoted,'promotion_minimum_records':5,'boundary':'Page-specific anonymous record contents; payload symbols are not plaintext words or semantic glosses.'};(OUT/'summary.json').write_text(json.dump s(summary,indent=2)) report=['# ANONYMOUS-RECORD-DECOMPRESSION-032','',('**PASS — ANONYMOUS RECORD LEDGER PROMOTED**' if promoted else '**PROVISIONAL — BELOW FIVE-RECORD PROMOTION FLOOR**'),'','The confirmed vertical-band decoder selected one prose line per label without using key identity. Only queries whose selected line independently contained the key in both ZL and GC were retained. Repeated keys pointing to the same physical line were collapsed before inference.','',f"- Paired queries: {len(p)}",f"- Both-witness top-1 query hits: {len(valid)}",f"- Deduplicated physical records: {len(rec)}",f"- Mean residual multiset Jaccard: {obs:.4f}",f"- Mean ordered LCS ratio: {summary['mean_ordered_lcs_ratio']:.4f}",f"- Cross-record pairing permutation p: {pv:.6f}",'','## Boundary','','These are anonymous, page-specific decompressed records—not translated sentences. Repeated atoms are structural concepts/operators whose linguistic values remain unknown.','', '## Rule audit','',('CORE PRESERVATION, EDGE HANDOFF, and REGISTER SHIFT are jointly strengthened. Six rules remain.' if promoted else 'The geometry result remains promoted through Test 031; the content ledger stays provisional. Six rules remain.')] (OUT/'report.md').write_text('\n'.join(report));files=sorted(q for q in OUT.iterdir() if q.is_file() and q.name!='SHA256SUMS.txt');(OUT/'SHA256SUMS.txt').write_text('\n'.join(f'{hashlib.sha256(q.read_bytes ()).hexdigest()} {q.name}' for q in files)+'\n');print(json.dumps(summary,indent=2)) if __name__=='__main__':main()