#!/usr/bin/env python3 """Job #1673 (route 58): every number of the copy-law paragraph of paper/moire-primes.md (lines 584-598 of the served file, sha256 b8ebd0697c2caa2b...) checked against the served producer that owns it, by string search in the fetched files. PASS = the exact token is printed in the producer's embedded OUTPUT table; READING = printed only in a hand-written reading, not in the table; FAIL = not found.""" import re, json, sys def rd(f): return open(f, encoding='utf-8', errors='replace').read() paper, cryst, census, a2410, fp12, fp13 = map(rd, ['paper.md', 'cryst.js', 'census.js', 'a2410.js', 'fp12.js', 'fp13.js']) rows = [] def row(item, claim, producer, text, table_tokens, reading_tokens=()): tab = {t: (t in text) for t in table_tokens} red = {t: (t in text) for t in reading_tokens} status = 'PASS' if all(tab.values()) else ('READING' if reading_tokens and all(red.values()) else 'FAIL') rows.append(dict(item=item, claim=claim, producer=producer, table=tab, reading=red, status=status)) print(f"{status:8s} {item}: {claim} <- {producer} table={tab} reading={red}") # paragraph text present? assert 'copy-law is' in paper and 'exact to four decimals at every depth' in paper # 1. the contested sentence row('1 copy-law sentence', "'exact to four decimals at every depth'", 'research/attack2-04-10-hierarchy-oeis.js (READING 1; table column meas/pred)', a2410, ['| 1.0000', '| 0.9999', '| 0.9998', '| 0.9935'], ['matches measurement to 4 decimal', 'worst 0.65% at m=7']) # 2. the dangling citation row('2 citation attack2-04-10', 'served path research/attack2-04-10-hierarchy-oeis.js exists (14617 B); bare attack2-04-10{,.js,.json,.md} -> 404', 'docs listing', a2410, ['ATTACK2 #4 + #10']) # 3. survival ratios row('3 seam survival 1.016, 0.980, 1.007, 0.986', 'half-widths 300, 3000, 30000, 300000 at T23; controls 0.903, 0.962, 0.993, 0.980', 'research/fold-profile-12-anatomy-survival.js', fp12, ['1.016', '0.980', '1.007', '0.986', '0.903', '0.962', '0.993']) # 4. the z range row('4 z range -1.41 to +0.13', 'paper: seams within -1.41 to +0.13 sd of the control mean at T19/T23 (400 controls)', 'research/fold-profile-13-hotspot-sweep.js', fp13, ['-1.41 |', '0.13 |'], ['z = -1.41, -0.19, -0.09 at T19 and -0.65, +0.13, -0.50 at T23']) tbl19 = re.findall(r'^//\s+(3000|30000|300000) \|\s+0\.1[45]\d+ \|\s+0\.1[45]\d+ \|\s+0\.00\d+ \|\s+(-?\d+\.\d+) \|', fp13, re.M) print(' fp13 embedded table z values (T19 rows have survival ~0.14-0.15):', tbl19) tblall = re.findall(r'^//\s+(3000|30000|300000) \|\s+(0\.\d+) \|\s+(0\.\d+) \|\s+(0\.00\d+) \|\s+(-?\d+\.\d+) \|', fp13, re.M) print(' fp13 all seam rows (half-width, seam, control, sd, z):', tblall) # 5. window ratio row('5 seam-anchored windows 1.002 +/- 0.005', 'census: measured ratio 1.0022 +/- 0.0054 (prediction 1.0002); second window 1.0029 +/- 0.0052 (prediction 0.9997)', 'research/attack2-01-06-seam-census.js', census, ['1.0022 ± 0.0054', '1.0029 ± 0.0052']) # 6. A060256 row('6 min-k seam ladder is OEIS A060256', 'Sequence A EXISTS - it is A060256 exactly', 'research/attack2-04-10-hierarchy-oeis.js', a2410, ['A060256 exactly']) # 7. the route's proposed replacement numbers (crystallization) - present, but a DIFFERENT quantity row('7 route-58 replacement act/HL in [0.9771, 1.0045], |dev| <= 1.10', 'zone twin supply vs HL at p = 101..9973 (NOT the seam-hierarchy copy-law)', 'research/04-crystallization-and-hl.js', cryst, ['act/HL=0.9771', 'act/HL=1.0045', '(act-HL)/sqrt(HL)=1.10', 'act/HL=0.9998', 'act/HL=1.0009']) json.dump(dict(rows=rows, fp13_seam_rows=tblall), open('ledger1673.json', 'w'), indent=1) print('statuses:', [r['status'] for r in rows])