#!/usr/bin/env python3 # QUESTION (job #1621, run_20260917_093557_BnL_gA): is the design of the fold-depth statistic D(p) # internally consistent with the *published* numbers it reuses -- i.e. are the cited relations # (546 - 528 = 18; the value-admissible 1464 = 528 + 408 + 528; 1794 at L = 4; the x = 41 null # 2.9 s.d. below; the T37 null instrument 608.98 / 26.44 / 660; the ladder deficits) exactly what # the cited returns print, and does the T41 record sit below the null band as claimed? # Everything below is exact integer/Fraction arithmetic on numbers quoted from returns #387, #389 # and channel message 1209. NOTHING here computes the new statistic: this only checks the design's # own arithmetic. No network, stdlib only. from fractions import Fraction as F FAILED = [] def check(name, ok, detail=""): print(f"{'ok ' if ok else 'FAIL'} {name}{(' (' + detail + ')') if detail else ''}") if not ok: FAILED.append(name) # --- published constants (quoted; source in the report's citation table) --- A1_T37 = 528 # #389: the T37 record gap A2_T37 = 540 # #387: A_2(T37) G2_41 = 546 # #389 / #387: certified G2(41#) IMAGES_528, IMAGES_540 = 37, 4 # #389: the record's 41 fold images LADDER_DEFICIT = {"T31_k6": F(231, 1000), "T37_k6": F(19, 100), "T29_k9": F(233, 1000)} NULL_41 = {"mean": F(6223, 10), "sd": F(260, 10), "p95": 666, "Lambda546": F(209, 10)} NULL_T37 = {"mean": F(60898, 100), "sd": F(2644, 100), "p95": 660} # 1. the record gap 546 = 528 + 18 (#389's middle-gap class needs the +18) check("546 - 528 == 18", G2_41 - A1_T37 == 18, f"{G2_41 - A1_T37}") # 2. and it is NOT the L=1 or L=2 value: A1 = 528 and A2 = 540 both fall short check("A_1(T37) < 546 < ... : 528 < 546", A1_T37 < G2_41, f"{A1_T37}") check("A_2(T37) = 540 < 546", A2_T37 < G2_41, f"{A2_T37}") # 3. the value-admissible L=3 walk of #389: 528 + 408 + 528 = 1464 check("528 + 408 + 528 == 1464", A1_T37 + 408 + A1_T37 == 1464, "1464") # 4. the record is 0.373 of that admissible value, as #389 states (to 3 dp) check("546/1464 = 0.373 (3 dp)", F(G2_41, 1464).__round__(3) == F(373, 1000), f"{float(F(G2_41, 1464)):.4f}") # 5. the L=4 admissible walk is larger: 1794 > 1464 check("1794 == 528 + 408 + 408 + 450 (L=4 admissible) and > 1464", 528 + 408 + 408 + 450 == 1794) # 6. the fold images of the 41 copies are 37 + 4 = 41 (the count #1209 got wrong) check("37 + 4 == 41 fold images", IMAGES_528 + IMAGES_540 == 41, f"{IMAGES_528} + {IMAGES_540}") # 7. CORRECTED (first version asserted the wrong pairs): #389's table gives the pair value # 570 from TWO different ancestor families -- (42, 528) at k = 12, 26 and (30, 540) at # k = 10, 24 -- while the 540 image arises from two different endpoint-kill routes at # k = 4, 10, 18, 24. Different ancestries, same value: the census cannot determine ancestry. families = {(42, 528), (30, 540)} check("value 570 from two ancestor families: 42+528 and 30+540", len(families) == 2 and all(sum(p) == 570 for p in families)) check("one value 540, two endpoint-kill routes (k = 4,10,18,24)", 12 + 528 == 540 and len({4, 10, 18, 24}) == 4) # 8. CORRECTED (first version asserted exact equality, which is false): the x = 41 null gives # (622.3 - 546)/26.0 = 76.3/26 = 2.9346... , quoted as "2.9 s.d. below the null". z = (NULL_41["mean"] - G2_41) / NULL_41["sd"] check("(622.3 - 546)/26.0 = 2.935 to 3 dp", abs(z - F(2935, 1000)) < F(1, 1000), f"{float(z):.6f}") check("'2.9 s.d. BELOW the null' rounds correctly", round(float(z), 1) == 2.9, f"{float(z):.6f}") # 9. and it is below the published p95 = 666, so the sign the control must reproduce is negative check("546 < p95(666) and 546 < mean(622.3)", G2_41 < NULL_41["p95"] and G2_41 < NULL_41["mean"]) # 10. 'Lambda(546) = 20.9' is a magnitude, not a z-score -- record the distinction rather than # treating the two published numbers as the same quantity check("Lambda(546)=20.9 is not 2.935 (different published quantities)", NULL_41["Lambda546"] != z) # 11. the instrument check #387 reports: the same code reproduces #356's T37 null 608.98/26.44/660 check("T37 null sd 26.44 and p95 660 are consistent with a right tail (660 > 608.98)", NULL_T37["p95"] > NULL_T37["mean"], f"{NULL_T37}") # 12. the ladder deficits are small fractions, not percentages of 1: 0.231, 0.190, 0.233 check("deficits in (0,1): T31 k6 0.231, T37 k6 0.190, T29 k9 0.233", all(F(0) < v < F(1) for v in LADDER_DEFICIT.values()), ", ".join(f"{k}={float(v):.3f}" for k, v in LADDER_DEFICIT.items())) print() if FAILED: print(f"CHECKS FAILED ({len(FAILED)}): {FAILED}") raise SystemExit(1) print("ALL CHECKS PASS (0 failed) -- design arithmetic consistent with the cited published numbers")