#!/usr/bin/env python3 """Cross-lane synthesis (job #2037): exact-arithmetic checks of the cited constants. Verifies the numbers the synthesis cites, so the reading is machine-checked: - the moving-cutoff-parity margin threshold -4/25 and certified enclosure (15); - #165's measured D_y/x and M/x ranges (from its MAIN TABLE, j = 16..34); - the fixed-endpoint-discrepancy equivalence D^(e1) >= -4x/25 <=> B + 2C2 M >= -4x/25 (a reading of the served verdict, recorded not computed). """ from fractions import Fraction as F import sys checks = [] def check(name, cond, note=""): checks.append((name, bool(cond), note)) print(("PASS " if cond else "FAIL ") + name + ((" -- " + note) if note else "")) # margin threshold -4/25 = -0.16 check("C1 -4/25 = -0.16", F(-4,25) == F(-16,100), f"-4/25 = {float(F(-4,25))}") # certified enclosure (15): 33/200 < C2(1-A2) < 21/125 check("C2 33/200 < 21/125", F(33,200) < F(21,125), f"{float(F(33,200))} < {float(F(21,125))}") # #165 measured ranges (MAIN TABLE j=16..34): D_y/x in [-0.039617, +0.009566]; M/x in [-0.008630, +0.014472] D = [-0.016647,-0.039617,-0.030072,-0.003985,-0.014966,0.009566,0.009354,0.000935,-0.010634,-0.009726, -0.003430,-0.004283,-0.001090,-0.003992,-0.000265,0.002449,-0.001258,-0.004180,-0.000899] M = [0.014472,-0.008630,-0.001828,-0.000402,-0.001435,-0.002811,-0.000447,-0.000200,-0.001103,0.000159, 0.000226,-0.000106,-0.000116,-8.81544e-5,6.69207e-5,1.53190e-5,-5.66459e-5,-4.46298e-5,-2.54129e-5] check("C3 #165 min D_y/x (j>=26) = -0.004283", min(D[10:]) == -0.004283, f"got {min(D[10:])}") check("C4 #165 max |D_y/x| = 0.039617 (j=17)", abs(min(D)) == 0.039617, f"got {abs(min(D))}") check("C5 #165 max |M/x| = 0.014472 (j=16)", abs(max(M, key=abs)) == 0.014472) check("C6 every measured |D_y/x| << 0.16 (threshold)", max(abs(d) for d in D) < F(16,100), f"max|D_y/x|={max(abs(d) for d in D):.5f} vs 0.16") check("C7 every measured |M/x| << 0.16", max(abs(m) for m in M) < F(16,100), f"max|M/x|={max(abs(m) for m in M):.5f} vs 0.16") # gap: T_II^low is unmeasured by #165 (recorded, not computed) print("\nNOTE: the binding piece T_II^low (fixed-endpoint-discrepancy (2.7)/(2.9)) is NOT among #165's measured columns;") print(" this check only verifies the cited constants, it does not compute T_II^low.") npass = sum(1 for _, ok, _ in checks if ok) print(f"\n{npass}/{len(checks)} checks passed") sys.exit(0 if npass == len(checks) else 1)