{"claim":{"assessments":[],"bundle":{"code":"\n// file: compose.py\nimport glob, json, sys\nS=[[0,1,2],[3,4]]\ndef best(n,m,p):\n    fs=glob.glob(f'out/d{n},{m},{p}_*.txt')\n    f=min(fs,key=lambda f:int(f.split('_')[-1][:-4]))\n    L=open(f).read().split('\\n'); R=int(L[0]); terms=[]\n    for r in range(R):\n        v=list(map(int,L[1+r].split())); terms.append((v[0:25],v[25:50],v[50:75]))\n    return terms\nterms=[]\nfor I in range(2):\n  for J in range(2):\n    for K in range(2):\n      n,m,p=len(S[I]),len(S[J]),len(S[K])\n      for a,b,c in best(n,m,p):\n        A=[0]*25;Bv=[0]*25;C=[0]*25\n        for i in range(n):\n          for j in range(m): A[S[I][i]*5+S[J][j]]=a[i*m+j]\n        for j in range(m):\n          for k in range(p): Bv[S[J][j]*5+S[K][k]]=b[j*p+k]\n        for i in range(n):\n          for k in range(p): C[S[I][i]*5+S[K][k]]=c[i*p+k]\n        terms.append((A,Bv,C))\ndef check(terms):\n    from collections import defaultdict\n    t=defaultdict(int)\n    for a,b,c in terms:\n        for x in range(25):\n            if a[x]:\n                for y in range(25):\n                    if b[y]:\n                        for z in range(25):\n                            if c[z]: t[x,y,z]+=a[x]*b[y]*c[z]\n    w={(i*5+j,j*5+k,i*5+k):1 for i in range(5) for j in range(5) for k in range(5)}\n    return all(t.get(k,0)==w.get(k,0) for k in set(t)|set(w))\nprint(len(terms),check(terms))\njson.dump({\"terms\":[{\"a\":a,\"b\":b,\"c\":c} for a,b,c in terms]},open('cand108.json','w'))\nwith open('out/seed.txt','w') as f:\n    f.write(f\"{len(terms)}\\n\")\n    for a,b,c in terms: f.write(' '.join(map(str,a+b+c))+'\\n')\n\n// file: flip.c\n// Z flip-graph walk for 5x5 matmul. usage: flip seed bound maxsec outprefix [init.txt]\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n#include <time.h>\n#define N 25\n#define MAXT 400\ntypedef struct { int8_t v[3][N]; } Term;\nstatic Term T[MAXT]; static int R;\nstatic uint64_t H[MAXT][3]; // normalized hash\nstatic int B; static int DN=5,DM=5,DP=5;\nstatic uint64_t rs;\nstatic inline uint64_t rnd(){ rs^=rs<<13; rs^=rs>>7; rs^=rs<<17; return rs; }\nstatic uint64_t hv(const int8_t*x){ int s=0; for(int i=0;i<N;i++) if(x[i]){ s=x[i]>0?1:-1; break;} uint64_t h=1469598103934665603ULL; for(int i=0;i<N;i++){ h^=(uint64_t)(uint8_t)(int8_t)(x[i]*s); h*=1099511628211ULL;} return h; }\nstatic int iszero(const int8_t*x){ for(int i=0;i<N;i++) if(x[i]) return 0; return 1; }\nstatic int eqs(const int8_t*x,const int8_t*y){ // 1 if x==y, -1 if x==-y, 0 else\n  int s=0; for(int i=0;i<N;i++){ if(x[i]||y[i]){ if(x[i]==y[i]) s=1; else if(x[i]==-y[i]) s=-1; else return 0; break; } }\n  if(!s) return 0; for(int i=0;i<N;i++) if(x[i]!=s*y[i]) return 0; return s; }\nstatic void rehash(int i){ for(int k=0;k<3;k++) H[i][k]=hv(T[i].v[k]); }\nstatic void removet(int i){ R--; if(i!=R){ T[i]=T[R]; memcpy(H[i],H[R],sizeof H[i]); } }\nstatic int verify(){\n  static int t[N][N][N]; memset(t,0,sizeof t);\n  for(int r=0;r<R;r++) for(int a=0;a<N;a++) if(T[r].v[0][a]) for(int b=0;b<N;b++) if(T[r].v[1][b]){ int ab=T[r].v[0][a]*T[r].v[1][b]; for(int c=0;c<N;c++) t[a][b][c]+=ab*T[r].v[2][c]; }\n  for(int a=0;a<N;a++)for(int b=0;b<N;b++)for(int c=0;c<N;c++){ int want=0;\n    if(a<DN*DM && b<DM*DP && c<DN*DP){ int i=a/DM,j=a%DM,jj=b/DP,k=b%DP,ii=c/DP,kk=c%DP; want=(j==jj&&i==ii&&k==kk);} if(t[a][b][c]!=want) return 0; }\n  return 1; }\n// try to merge term i with any other; returns 1 if changed\nstatic int trymerge(int i){\n  for(int j=0;j<R;j++){ if(j==i) continue;\n    for(int k=0;k<3;k++){ int k1=(k+1)%3,k2=(k+2)%3;\n      if(H[i][k1]==H[j][k1] && H[i][k2]==H[j][k2]){\n        int s1=eqs(T[i].v[k1],T[j].v[k1]); if(!s1) continue; int s2=eqs(T[i].v[k2],T[j].v[k2]); if(!s2) continue;\n        int s=s1*s2; int8_t nv[N]; int ok=1;\n        for(int q=0;q<N;q++){ int v=T[i].v[k][q]+s*T[j].v[k][q]; if(v>B||v<-B){ok=0;break;} nv[q]=v; }\n        if(!ok) continue;\n        memcpy(T[i].v[k],nv,N);\n        int a=i>j?i:j, b=i>j?j:i;\n        if(iszero(nv)){ removet(a); removet(b); } else { rehash(i); removet(j); }\n        return 1; } } }\n  return 0; }\nstatic void reduce_all(){ int ch=1; while(ch){ ch=0; for(int i=0;i<R;i++) if(trymerge(i)){ch=1;break;} } }\nstatic int flip(){\n  int i=rnd()%R; int k=rnd()%3; int cnt=0; int cand[MAXT];\n  for(int j=0;j<R;j++) if(j!=i && H[j][k]==H[i][k]) cand[cnt++]=j;\n  if(!cnt) return 0;\n  int j=cand[rnd()%cnt]; int s=eqs(T[i].v[k],T[j].v[k]); if(!s) return 0;\n  int y=(k+1)%3, z=(k+2)%3; if(rnd()&1){ int t=y; y=z; z=t; }\n  int lam=(rnd()&1)?1:-1;\n  // term j: x_j = s x_i. write term j as x_i ⊗ (s y_j) ⊗ z_j\n  int8_t ny[N], nz[N], syj[N];\n  for(int q=0;q<N;q++){ syj[q]=s*T[j].v[y][q]; int v=T[i].v[y][q]+lam*syj[q]; if(v>B||v<-B) return 0; ny[q]=v; int w=T[j].v[z][q]-lam*T[i].v[z][q]; if(w>B||w<-B) return 0; nz[q]=w; }\n  memcpy(T[i].v[y],ny,N); memcpy(T[j].v[k],T[i].v[k],N); memcpy(T[j].v[y],syj,N); memcpy(T[j].v[z],nz,N);\n  rehash(i); rehash(j);\n  int zi=iszero(ny), zj=iszero(nz);\n  if(zi||zj){ int a=i>j?i:j,b=i>j?j:i; if(zi&&zj){removet(a);removet(b);} else if(zi) removet(i); else removet(j); reduce_all(); return 2; }\n  int r0=R; if(trymerge(i)) { reduce_all(); return 2; }\n  if(R==r0){ for(int q=0;q<R;q++) if(eqs(T[q].v[0],T[j].v[0])||1){ /*j index valid*/ break;} if(j<R && trymerge(j)){ reduce_all(); return 2;} }\n  return 1; }\nstatic int plus(){ // split: a_i⊗b_i⊗c_i + a_j⊗b_j⊗c_j -> (a_i-a_j)⊗b_i⊗c_i + a_j⊗b_i⊗c_i + a_j⊗b_j⊗c_j\n  if(R>=MAXT-1) return 0; int i=rnd()%R, j=rnd()%R; if(i==j) return 0; int k=rnd()%3;\n  int8_t d[N]; for(int q=0;q<N;q++){ int v=T[i].v[k][q]-T[j].v[k][q]; if(v>B||v<-B) return 0; d[q]=v; }\n  if(iszero(d)) return 0;\n  T[R]=T[i]; memcpy(T[R].v[k],T[j].v[k],N); memcpy(T[i].v[k],d,N); rehash(i); R++; rehash(R-1); return 1; }\nstatic void dump(const char*fn){ FILE*f=fopen(fn,\"w\"); fprintf(f,\"%d\\n\",R); for(int r=0;r<R;r++){ for(int k=0;k<3;k++) for(int q=0;q<N;q++) fprintf(f,\"%d \",T[r].v[k][q]); fprintf(f,\"\\n\"); } fclose(f); }\nstatic int load(const char*fn){ FILE*f=fopen(fn,\"r\"); if(!f) return 0; if(fscanf(f,\"%d\",&R)!=1) return 0; for(int r=0;r<R;r++) for(int k=0;k<3;k++) for(int q=0;q<N;q++){ int v; if(fscanf(f,\"%d\",&v)!=1) return 0; T[r].v[k][q]=v; } fclose(f); return 1; }\nstatic Term BT[MAXT]; static int BR;\nint main(int argc,char**argv){\n  rs=atoll(argv[1])*2654435761ULL+7; B=atoi(argv[2]); double maxsec=atof(argv[3]); const char*out=argv[4]; if(getenv(\"DIMS\")) sscanf(getenv(\"DIMS\"),\"%d,%d,%d\",&DN,&DM,&DP);\n  if(argc>5 && load(argv[5])){} else { R=0; for(int i=0;i<DN;i++)for(int j=0;j<DM;j++)for(int k=0;k<DP;k++){ memset(&T[R],0,sizeof(Term)); T[R].v[0][i*DM+j]=1; T[R].v[1][j*DP+k]=1; T[R].v[2][i*DP+k]=1; R++; } }\n  for(int i=0;i<R;i++) rehash(i);\n  reduce_all();\n  if(!verify()){ printf(\"bad init\\n\"); return 1; }\n  memcpy(BT,T,sizeof(Term)*R); BR=R;\n  time_t t0=time(0); long it=0, since=0; long plateau=atol(argc>6?argv[6]:\"3000000\");\n  while(1){\n    it++; since++;\n    int r=flip();\n    if(R<BR){ if(verify()){ BR=R; memcpy(BT,T,sizeof(Term)*R); char fn[256]; sprintf(fn,\"%s_%d.txt\",out,R); dump(fn); printf(\"[%lds] rank %d it %ld\\n\",(long)(time(0)-t0),R,it); fflush(stdout);} else { printf(\"VERIFY FAIL\\n\"); return 1;} since=0; }\n    if(since>plateau){ // restart from best, with some plus moves\n      R=BR; memcpy(T,BT,sizeof(Term)*R); for(int i=0;i<R;i++) rehash(i);\n      int np=1+rnd()%3; for(int p=0;p<np;) p+=plus(); since=0; }\n    if((it&0xFFFFF)==0 && difftime(time(0),t0)>maxsec) break;\n    if(it<2000000){ static long c[3]; c[r]++; if(it==1999999) printf(\"flips %ld %ld %ld R=%d\\n\",c[0],c[1],c[2],R);}\n  }\n  printf(\"final best %d\\n\",BR); return 0; }\n\n// file: gw3.c\n// GF(2) equivariant flip walk on explicit term lists, group G acting on triples (XYZ form, tr(XYZ)).\n// G: 1 = trivial, 3 = Z3 cyclic shift, 6 = S3 = <shift, (X,Y,Z)->(Z^T,Y^T,X^T)>.\n// usage: gw3 n G seed maxsec plateau outprefix [init]   init: lines \"X Y Z\" hex masks, XYZ form.\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n#include <time.h>\n#define MAXT 600\ntypedef struct { uint32_t f[3]; } Tm;\nstatic Tm S[MAXT]; static int R;\nstatic Tm Best[MAXT]; static int BR;\nstatic int n, NN, GN;\nstatic uint64_t rs;\nstatic inline uint64_t rnd(){ rs^=rs<<13; rs^=rs>>7; rs^=rs<<17; return rs; }\nstatic uint32_t trT(uint32_t x){ uint32_t y=0; for(int i=0;i<n;i++)for(int j=0;j<n;j++) if(x>>(i*n+j)&1) y|=1u<<(j*n+i); return y; }\nstatic Tm gact(int g, Tm t){ // g = r + 3*f\n  int r=g%3, f=g/3; Tm u;\n  for(int m=0;m<3;m++){ if(!f) u.f[m]=t.f[(m+r)%3]; else u.f[m]=trT(t.f[((r-m)%3+3)%3]); }\n  return u;\n}\nstatic int eq(Tm a, Tm b){ return a.f[0]==b.f[0]&&a.f[1]==b.f[1]&&a.f[2]==b.f[2]; }\nstatic int find(Tm t){ for(int i=0;i<R;i++) if(eq(S[i],t)) return i; return -1; }\nstatic uint32_t TT[625][625/32+2]; // target\nstatic int verify(Tm*s,int r){\n  static uint32_t A[625][21]; memset(A,0,sizeof A);\n  for(int t=0;t<r;t++) for(int x=0;x<NN;x++) if(s[t].f[0]>>x&1) for(int y=0;y<NN;y++) if(s[t].f[1]>>y&1) A[x*NN+y][0]^=s[t].f[2];\n  for(int x=0;x<NN;x++)for(int y=0;y<NN;y++) if(A[x*NN+y][0]!=TT[x*NN+y][0]) return 0;\n  return 1;\n}\nstatic int invariant(Tm*s,int r){ for(int t=0;t<r;t++) for(int g=0;g<GN;g++){ Tm u=gact(g,s[t]); int ok=0; for(int q=0;q<r;q++) if(eq(s[q],u)){ok=1;break;} if(!ok) return 0;} return 1; }\nstatic void profile(Tm*s,int r,int*c){ c[1]=c[2]=c[3]=c[6]=0; for(int t=0;t<r;t++){ int st=0; for(int g=0;g<GN;g++) if(eq(gact(g,s[t]),s[t])) st++; c[GN/st]++; } }\nstatic void save(const char*pre){\n  char fn[256]; sprintf(fn,\"%s_%d.txt\",pre,BR); FILE*f=fopen(fn,\"w\");\n  for(int i=0;i<BR;i++) fprintf(f,\"%x %x %x\\n\",Best[i].f[0],Best[i].f[1],Best[i].f[2]); fclose(f);\n}\n// cleanup: remove zero terms and cancel duplicate pairs\nstatic void cleanup(void){\n  for(int i=0;i<R;){ if(!S[i].f[0]||!S[i].f[1]||!S[i].f[2]){ S[i]=S[--R]; continue;} i++; }\n  for(int i=0;i<R;i++) for(int j=i+1;j<R;j++) if(eq(S[i],S[j])){ S[j]=S[--R]; S[i]=S[--R]; i=-1; break; }\n}\nstatic int Ii[6],Ij[6]; static Tm Ni[6],Nj[6];\n// apply assignments idx->value (pairs), check consistency; returns 1 if applied\nstatic int apply_pairs(void){\n  // pair sets must be equal or disjoint, and values consistent\n  for(int g=0;g<GN;g++) for(int h=0;h<g;h++){\n    int a=Ii[g],b=Ij[g],c=Ii[h],d=Ij[h];\n    int same=(a==c&&b==d)||(a==d&&b==c);\n    int dis=(a!=c&&a!=d&&b!=c&&b!=d);\n    if(!same&&!dis) return 0;\n    if(same){ if(a==c){ if(!eq(Ni[g],Ni[h])||!eq(Nj[g],Nj[h])) return 0; } else { if(!eq(Ni[g],Nj[h])||!eq(Nj[g],Ni[h])) return 0; } }\n  }\n  for(int g=0;g<GN;g++){ S[Ii[g]]=Ni[g]; S[Ij[g]]=Nj[g]; }\n  return 1;\n}\nstatic int flip(void){\n  int i=rnd()%R, m=rnd()%3; int cand[MAXT],nc=0;\n  for(int j=0;j<R;j++) if(j!=i&&S[j].f[m]==S[i].f[m]) cand[nc++]=j;\n  if(!nc) return 0;\n  int j=cand[rnd()%nc];\n  int p=(m+1+(rnd()&1))%3, q=3-m-p; // i changes in mode q (+= j's), j changes in mode p (+= i's)\n  Tm ni=S[i], nj=S[j]; ni.f[q]^=S[j].f[q]; nj.f[p]^=S[i].f[p];\n  Tm ti=S[i],tj=S[j];\n  for(int g=0;g<GN;g++){ Ii[g]=find(gact(g,ti)); Ij[g]=find(gact(g,tj)); if(Ii[g]<0||Ij[g]<0){fprintf(stderr,\"noninv!\\n\");exit(1);} Ni[g]=gact(g,ni); Nj[g]=gact(g,nj); }\n  if(!apply_pairs()) return 0;\n  cleanup(); return 1;\n}\nstatic int plus(void){ // KM plus: t_i=a b c, t_j=a' b' c' -> (a+a') b c + a' b c (mode m)\n  int i=rnd()%R, j=rnd()%R; if(i==j) return 0; int m=rnd()%3;\n  if(S[i].f[m]==S[j].f[m]) return 0;\n  Tm t=S[i]; Tm n1=t, n2=t; n1.f[m]^=S[j].f[m]; n2.f[m]=S[j].f[m];\n  int idx[6]; Tm A[6],B[6];\n  for(int g=0;g<GN;g++){ idx[g]=find(gact(g,t)); A[g]=gact(g,n1); B[g]=gact(g,n2); }\n  for(int g=0;g<GN;g++) for(int h=0;h<g;h++) if(idx[g]==idx[h]){ if(!((eq(A[g],A[h])&&eq(B[g],B[h]))||(eq(A[g],B[h])&&eq(B[g],A[h])))) return 0; }\n  int done[MAXT]={0};\n  for(int g=0;g<GN;g++){ if(done[idx[g]]) continue; done[idx[g]]=1; S[idx[g]]=A[g]; S[R++]=B[g]; }\n  cleanup(); return 1;\n}\nint main(int argc,char**argv){\n  n=atoi(argv[1]); NN=n*n; GN=atoi(argv[2]); rs=atoll(argv[3])*2654435761ULL+12345; double maxsec=atof(argv[4]); long plat=atol(argv[5]); const char*pre=argv[6];\n  memset(TT,0,sizeof TT);\n  for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++) TT[(i*n+j)*NN+(j*n+k)][0]|=1u<<(k*n+i);\n  R=0;\n  if(argc>7){ FILE*f=fopen(argv[7],\"r\"); unsigned a,b,c; while(fscanf(f,\"%x %x %x\",&a,&b,&c)==3){ S[R].f[0]=a;S[R].f[1]=b;S[R].f[2]=c;R++; } fclose(f); }\n  else for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++){ S[R].f[0]=1u<<(i*n+j); S[R].f[1]=1u<<(j*n+k); S[R].f[2]=1u<<(k*n+i); R++; }\n  cleanup();\n  if(!verify(S,R)){ printf(\"init invalid\\n\"); return 1; } if(!invariant(S,R)){ printf(\"init not invariant\\n\"); return 1; }\n  int pc[7]; profile(S,R,pc); printf(\"init %d = %d*1+%d*2+%d*3+%d*6\\n\",R,pc[1],pc[2],pc[3],pc[6]); fflush(stdout);\n  memcpy(Best,S,sizeof(Tm)*R); BR=R;\n  clock_t t0=clock(); long since=0, it=0;\n  while(1){\n    it++;\n    int r0=R; flip(); since++;\n    if(R<BR){\n      if(verify(S,R)&&invariant(S,R)){ BR=R; memcpy(Best,S,sizeof(Tm)*R); since=0; profile(S,R,pc);\n        printf(\"%.1fs it=%ld best %d = %d+%d*2+%d*3+%d*6\\n\",(double)(clock()-t0)/CLOCKS_PER_SEC,it,R,pc[1],pc[2],pc[3],pc[6]); fflush(stdout); save(pre); }\n      else { printf(\"BUG invalid\\n\"); return 1; }\n    }\n    (void)r0;\n    if(since>plat){ // restart from best + plus transitions\n      R=BR; memcpy(S,Best,sizeof(Tm)*R);\n      int np=1+rnd()%3; for(int k=0;k<np&&R<MAXT-12;) k+=plus();\n      since=0;\n    }\n    if((it&0xffff)==0){ if((double)(clock()-t0)/CLOCKS_PER_SEC>maxsec) break; }\n  }\n  printf(\"final best %d its %ld\\n\",BR,it);\n  return 0;\n}\n\n// file: gw3b.c\n// GF(2) equivariant flip walk on explicit term lists, group G acting on triples (XYZ form, tr(XYZ)).\n// G: 1 = trivial, 3 = Z3 cyclic shift, 6 = S3 = <shift, (X,Y,Z)->(Z^T,Y^T,X^T)>.\n// usage: gw3 n G seed maxsec plateau outprefix [init]   init: lines \"X Y Z\" hex masks, XYZ form.\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n#include <time.h>\n#define MAXT 600\ntypedef struct { uint32_t f[3]; } Tm;\nstatic Tm S[MAXT]; static int R;\nstatic Tm Best[MAXT]; static int BR;\nstatic int n, NN, GN;\nstatic uint64_t rs;\nstatic inline uint64_t rnd(){ rs^=rs<<13; rs^=rs>>7; rs^=rs<<17; return rs; }\nstatic uint32_t trT(uint32_t x){ uint32_t y=0; for(int i=0;i<n;i++)for(int j=0;j<n;j++) if(x>>(i*n+j)&1) y|=1u<<(j*n+i); return y; }\nstatic int GM[6]={0,1,2,3,4,5};\nstatic Tm gact(int g, Tm t){ // g = r + 3*f\n  g=GM[g]; int r=g%3, f=g/3; Tm u;\n  for(int m=0;m<3;m++){ if(!f) u.f[m]=t.f[(m+r)%3]; else u.f[m]=trT(t.f[((r-m)%3+3)%3]); }\n  return u;\n}\nstatic int eq(Tm a, Tm b){ return a.f[0]==b.f[0]&&a.f[1]==b.f[1]&&a.f[2]==b.f[2]; }\nstatic int find(Tm t){ for(int i=0;i<R;i++) if(eq(S[i],t)) return i; return -1; }\nstatic uint32_t TT[625][625/32+2]; // target\nstatic int verify(Tm*s,int r){\n  static uint32_t A[625][21]; memset(A,0,sizeof A);\n  for(int t=0;t<r;t++) for(int x=0;x<NN;x++) if(s[t].f[0]>>x&1) for(int y=0;y<NN;y++) if(s[t].f[1]>>y&1) A[x*NN+y][0]^=s[t].f[2];\n  for(int x=0;x<NN;x++)for(int y=0;y<NN;y++) if(A[x*NN+y][0]!=TT[x*NN+y][0]) return 0;\n  return 1;\n}\nstatic int invariant(Tm*s,int r){ for(int t=0;t<r;t++) for(int g=0;g<GN;g++){ Tm u=gact(g,s[t]); int ok=0; for(int q=0;q<r;q++) if(eq(s[q],u)){ok=1;break;} if(!ok) return 0;} return 1; }\nstatic void profile(Tm*s,int r,int*c){ c[1]=c[2]=c[3]=c[6]=0; for(int t=0;t<r;t++){ int st=0; for(int g=0;g<GN;g++) if(eq(gact(g,s[t]),s[t])) st++; c[GN/st==2&&GN==6?2:GN/st]++; } }\nstatic void save(const char*pre){\n  char fn[256]; sprintf(fn,\"%s_%d.txt\",pre,BR); FILE*f=fopen(fn,\"w\");\n  for(int i=0;i<BR;i++) fprintf(f,\"%x %x %x\\n\",Best[i].f[0],Best[i].f[1],Best[i].f[2]); fclose(f);\n}\n// cleanup: remove zero terms and cancel duplicate pairs\nstatic void cleanup(void){\n  for(int i=0;i<R;){ if(!S[i].f[0]||!S[i].f[1]||!S[i].f[2]){ S[i]=S[--R]; continue;} i++; }\n  for(int i=0;i<R;i++) for(int j=i+1;j<R;j++) if(eq(S[i],S[j])){ S[j]=S[--R]; S[i]=S[--R]; i=-1; break; }\n}\nstatic int Ii[6],Ij[6]; static Tm Ni[6],Nj[6];\n// apply assignments idx->value (pairs), check consistency; returns 1 if applied\nstatic int apply_pairs(void){\n  // pair sets must be equal or disjoint, and values consistent\n  for(int g=0;g<GN;g++) for(int h=0;h<g;h++){\n    int a=Ii[g],b=Ij[g],c=Ii[h],d=Ij[h];\n    int same=(a==c&&b==d)||(a==d&&b==c);\n    int dis=(a!=c&&a!=d&&b!=c&&b!=d);\n    if(!same&&!dis) return 0;\n    if(same){ if(a==c){ if(!eq(Ni[g],Ni[h])||!eq(Nj[g],Nj[h])) return 0; } else { if(!eq(Ni[g],Nj[h])||!eq(Nj[g],Ni[h])) return 0; } }\n  }\n  for(int g=0;g<GN;g++){ S[Ii[g]]=Ni[g]; S[Ij[g]]=Nj[g]; }\n  return 1;\n}\nstatic int flip(void){\n  int i=rnd()%R, m=rnd()%3; int cand[MAXT],nc=0;\n  for(int j=0;j<R;j++) if(j!=i&&S[j].f[m]==S[i].f[m]) cand[nc++]=j;\n  if(!nc) return 0;\n  int j=cand[rnd()%nc];\n  int p=(m+1+(rnd()&1))%3, q=3-m-p; // i changes in mode q (+= j's), j changes in mode p (+= i's)\n  Tm ni=S[i], nj=S[j]; ni.f[q]^=S[j].f[q]; nj.f[p]^=S[i].f[p];\n  Tm ti=S[i],tj=S[j];\n  for(int g=0;g<GN;g++){ Ii[g]=find(gact(g,ti)); Ij[g]=find(gact(g,tj)); if(Ii[g]<0||Ij[g]<0){fprintf(stderr,\"noninv!\\n\");exit(1);} Ni[g]=gact(g,ni); Nj[g]=gact(g,nj); }\n  if(!apply_pairs()) return 0;\n  cleanup(); return 1;\n}\nstatic int plus(void){ // KM plus: t_i=a b c, t_j=a' b' c' -> (a+a') b c + a' b c (mode m)\n  int i=rnd()%R, j=rnd()%R; if(i==j) return 0; int m=rnd()%3;\n  if(S[i].f[m]==S[j].f[m]) return 0;\n  Tm t=S[i]; Tm n1=t, n2=t; n1.f[m]^=S[j].f[m]; n2.f[m]=S[j].f[m];\n  int idx[6]; Tm A[6],B[6];\n  for(int g=0;g<GN;g++){ idx[g]=find(gact(g,t)); A[g]=gact(g,n1); B[g]=gact(g,n2); }\n  for(int g=0;g<GN;g++) for(int h=0;h<g;h++) if(idx[g]==idx[h]){ if(!((eq(A[g],A[h])&&eq(B[g],B[h]))||(eq(A[g],B[h])&&eq(B[g],A[h])))) return 0; }\n  int done[MAXT]={0};\n  for(int g=0;g<GN;g++){ if(done[idx[g]]) continue; done[idx[g]]=1; S[idx[g]]=A[g]; S[R++]=B[g]; }\n  cleanup(); return 1;\n}\nint main(int argc,char**argv){\n  n=atoi(argv[1]); NN=n*n; GN=atoi(argv[2]); if(GN==2){GM[1]=5;} rs=atoll(argv[3])*2654435761ULL+12345; double maxsec=atof(argv[4]); long plat=atol(argv[5]); const char*pre=argv[6];\n  memset(TT,0,sizeof TT);\n  for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++) TT[(i*n+j)*NN+(j*n+k)][0]|=1u<<(k*n+i);\n  R=0;\n  if(argc>7){ FILE*f=fopen(argv[7],\"r\"); unsigned a,b,c; while(fscanf(f,\"%x %x %x\",&a,&b,&c)==3){ S[R].f[0]=a;S[R].f[1]=b;S[R].f[2]=c;R++; } fclose(f); }\n  else for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++){ S[R].f[0]=1u<<(i*n+j); S[R].f[1]=1u<<(j*n+k); S[R].f[2]=1u<<(k*n+i); R++; }\n  cleanup();\n  if(!verify(S,R)){ printf(\"init invalid\\n\"); return 1; } if(!invariant(S,R)){ printf(\"init not invariant\\n\"); return 1; }\n  int pc[7]; profile(S,R,pc); printf(\"init %d = %d*1+%d*2+%d*3+%d*6\\n\",R,pc[1],pc[2],pc[3],pc[6]); fflush(stdout);\n  memcpy(Best,S,sizeof(Tm)*R); BR=R;\n  clock_t t0=clock(); long since=0, it=0;\n  while(1){\n    it++;\n    int r0=R; flip(); since++;\n    if(R<BR){\n      if(verify(S,R)&&invariant(S,R)){ BR=R; memcpy(Best,S,sizeof(Tm)*R); since=0; profile(S,R,pc);\n        printf(\"%.1fs it=%ld best %d = %d+%d*2+%d*3+%d*6\\n\",(double)(clock()-t0)/CLOCKS_PER_SEC,it,R,pc[1],pc[2],pc[3],pc[6]); fflush(stdout); save(pre); }\n      else { printf(\"BUG invalid\\n\"); return 1; }\n    }\n    (void)r0;\n    if(since>plat){ // restart from best + plus transitions\n      R=BR; memcpy(S,Best,sizeof(Tm)*R);\n      int np=1+rnd()%3; for(int k=0;k<np&&R<MAXT-12;) k+=plus();\n      since=0;\n    }\n    if((it&0xffff)==0){ if((double)(clock()-t0)/CLOCKS_PER_SEC>maxsec) break; }\n  }\n  printf(\"final best %d its %ld\\n\",BR,it);\n  return 0;\n}\n\n// file: gw3c.c\n// GF(2) equivariant flip walk on explicit term lists, group G acting on triples (XYZ form, tr(XYZ)).\n// G: 1 = trivial, 3 = Z3 cyclic shift, 6 = S3 = <shift, (X,Y,Z)->(Z^T,Y^T,X^T)>.\n// usage: gw3 n G seed maxsec plateau outprefix [init]   init: lines \"X Y Z\" hex masks, XYZ form.\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n#include <time.h>\n#define MAXT 600\ntypedef struct { uint32_t f[3]; } Tm;\nstatic Tm S[MAXT]; static int R;\nstatic Tm Best[MAXT]; static int BR;\nstatic int n, NN, GN;\nstatic uint64_t rs;\nstatic inline uint64_t rnd(){ rs^=rs<<13; rs^=rs>>7; rs^=rs<<17; return rs; }\nstatic uint32_t trT(uint32_t x){ uint32_t y=0; for(int i=0;i<n;i++)for(int j=0;j<n;j++) if(x>>(i*n+j)&1) y|=1u<<(j*n+i); return y; }\nstatic int GM[6]={0,1,2,3,4,5};\nstatic Tm gact(int g, Tm t){ // g = r + 3*f\n  g=GM[g]; int r=g%3, f=g/3; Tm u;\n  for(int m=0;m<3;m++){ if(!f) u.f[m]=t.f[(m+r)%3]; else u.f[m]=trT(t.f[((r-m)%3+3)%3]); }\n  return u;\n}\nstatic int eq(Tm a, Tm b){ return a.f[0]==b.f[0]&&a.f[1]==b.f[1]&&a.f[2]==b.f[2]; }\nstatic int find(Tm t){ for(int i=0;i<R;i++) if(eq(S[i],t)) return i; return -1; }\nstatic uint32_t TT[625][625/32+2]; // target\nstatic int verify(Tm*s,int r){\n  static uint32_t A[625][21]; memset(A,0,sizeof A);\n  for(int t=0;t<r;t++) for(int x=0;x<NN;x++) if(s[t].f[0]>>x&1) for(int y=0;y<NN;y++) if(s[t].f[1]>>y&1) A[x*NN+y][0]^=s[t].f[2];\n  for(int x=0;x<NN;x++)for(int y=0;y<NN;y++) if(A[x*NN+y][0]!=TT[x*NN+y][0]) return 0;\n  return 1;\n}\nstatic int invariant(Tm*s,int r){ for(int t=0;t<r;t++) for(int g=0;g<GN;g++){ Tm u=gact(g,s[t]); int ok=0; for(int q=0;q<r;q++) if(eq(s[q],u)){ok=1;break;} if(!ok) return 0;} return 1; }\nstatic void profile(Tm*s,int r,int*c){ c[1]=c[2]=c[3]=c[6]=0; for(int t=0;t<r;t++){ int st=0; for(int g=0;g<GN;g++) if(eq(gact(g,s[t]),s[t])) st++; c[GN/st==2&&GN==6?2:GN/st]++; } }\nstatic void save(const char*pre){\n  char fn[256]; sprintf(fn,\"%s_%d.txt\",pre,BR); FILE*f=fopen(fn,\"w\");\n  for(int i=0;i<BR;i++) fprintf(f,\"%x %x %x\\n\",Best[i].f[0],Best[i].f[1],Best[i].f[2]); fclose(f);\n}\n// cleanup: remove zero terms and cancel duplicate pairs\nstatic void cleanup(void){\n  for(int i=0;i<R;){ if(!S[i].f[0]||!S[i].f[1]||!S[i].f[2]){ S[i]=S[--R]; continue;} i++; }\n  for(int i=0;i<R;i++) for(int j=i+1;j<R;j++) if(eq(S[i],S[j])){ S[j]=S[--R]; S[i]=S[--R]; i=-1; break; }\n}\nstatic int SEQ=1; static long nseq=0;\nstatic int Ii[6],Ij[6]; static Tm Ni[6],Nj[6];\n// apply assignments idx->value (pairs), check consistency; returns 1 if applied\nstatic int apply_pairs(void){\n  // pair sets must be equal or disjoint, and values consistent\n  for(int g=0;g<GN;g++) for(int h=0;h<g;h++){\n    int a=Ii[g],b=Ij[g],c=Ii[h],d=Ij[h];\n    int same=(a==c&&b==d)||(a==d&&b==c);\n    int dis=(a!=c&&a!=d&&b!=c&&b!=d);\n    if(!same&&!dis) return 0;\n    if(same){ if(a==c){ if(!eq(Ni[g],Ni[h])||!eq(Nj[g],Nj[h])) return 0; } else { if(!eq(Ni[g],Nj[h])||!eq(Nj[g],Ni[h])) return 0; } }\n  }\n  for(int g=0;g<GN;g++){ S[Ii[g]]=Ni[g]; S[Ij[g]]=Nj[g]; }\n  return 1;\n}\nstatic int flip(void){\n  int i=rnd()%R, m=rnd()%3; int cand[MAXT],nc=0;\n  for(int j=0;j<R;j++) if(j!=i&&S[j].f[m]==S[i].f[m]) cand[nc++]=j;\n  if(!nc) return 0;\n  int j=cand[rnd()%nc];\n  int p=(m+1+(rnd()&1))%3, q=3-m-p; // i changes in mode q (+= j's), j changes in mode p (+= i's)\n  Tm ni=S[i], nj=S[j]; ni.f[q]^=S[j].f[q]; nj.f[p]^=S[i].f[p];\n  Tm ti=S[i],tj=S[j];\n  for(int g=0;g<GN;g++){ Ii[g]=find(gact(g,ti)); Ij[g]=find(gact(g,tj)); if(Ii[g]<0||Ij[g]<0){fprintf(stderr,\"noninv!\\n\");exit(1);} Ni[g]=gact(g,ni); Nj[g]=gact(g,nj); }\n  if(!apply_pairs()){\n    if(!SEQ) return 0;\n    static Tm bak[MAXT]; int bR=R; memcpy(bak,S,sizeof(Tm)*R);\n    int seen[6][2],ns=0;\n    for(int g=0;g<GN;g++){\n      int A=Ii[g],Bq=Ij[g],dup=0; for(int k=0;k<ns;k++) if(seen[k][0]==A&&seen[k][1]==Bq) dup=1; if(dup) continue; seen[ns][0]=A; seen[ns][1]=Bq; ns++;\n      int gg=GM[g], r=gg%3, f=gg/3;\n      int gm = f? ((r-m)%3+3)%3 : ((m-r)%3+3)%3, gq = f? ((r-q)%3+3)%3 : ((q-r)%3+3)%3, gp=3-gm-gq;\n      if(S[A].f[gm]!=S[Bq].f[gm]){ R=bR; memcpy(S,bak,sizeof(Tm)*R); return 0; }\n      uint32_t ap=S[A].f[gp]; S[A].f[gq]^=S[Bq].f[gq]; S[Bq].f[gp]^=ap;\n    }\n    cleanup();\n    if(!invariant(S,R)){ R=bR; memcpy(S,bak,sizeof(Tm)*R); return 0; }\n    nseq++; return 1;\n  }\n  cleanup(); return 1;\n}\nstatic int plus(void){ // KM plus: t_i=a b c, t_j=a' b' c' -> (a+a') b c + a' b c (mode m)\n  int i=rnd()%R, j=rnd()%R; if(i==j) return 0; int m=rnd()%3;\n  if(S[i].f[m]==S[j].f[m]) return 0;\n  Tm t=S[i]; Tm n1=t, n2=t; n1.f[m]^=S[j].f[m]; n2.f[m]=S[j].f[m];\n  int idx[6]; Tm A[6],B[6];\n  for(int g=0;g<GN;g++){ idx[g]=find(gact(g,t)); A[g]=gact(g,n1); B[g]=gact(g,n2); }\n  for(int g=0;g<GN;g++) for(int h=0;h<g;h++) if(idx[g]==idx[h]){ if(!((eq(A[g],A[h])&&eq(B[g],B[h]))||(eq(A[g],B[h])&&eq(B[g],A[h])))) return 0; }\n  int done[MAXT]={0};\n  for(int g=0;g<GN;g++){ if(done[idx[g]]) continue; done[idx[g]]=1; S[idx[g]]=A[g]; S[R++]=B[g]; }\n  cleanup(); return 1;\n}\nint main(int argc,char**argv){\n  n=atoi(argv[1]); NN=n*n; GN=atoi(argv[2]); if(GN==2){GM[1]=5;} rs=atoll(argv[3])*2654435761ULL+12345; double maxsec=atof(argv[4]); long plat=atol(argv[5]); const char*pre=argv[6];\n  memset(TT,0,sizeof TT);\n  for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++) TT[(i*n+j)*NN+(j*n+k)][0]|=1u<<(k*n+i);\n  R=0;\n  if(argc>7){ FILE*f=fopen(argv[7],\"r\"); unsigned a,b,c; while(fscanf(f,\"%x %x %x\",&a,&b,&c)==3){ S[R].f[0]=a;S[R].f[1]=b;S[R].f[2]=c;R++; } fclose(f); }\n  else for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++){ S[R].f[0]=1u<<(i*n+j); S[R].f[1]=1u<<(j*n+k); S[R].f[2]=1u<<(k*n+i); R++; }\n  cleanup();\n  if(!verify(S,R)){ printf(\"init invalid\\n\"); return 1; } if(!invariant(S,R)){ printf(\"init not invariant\\n\"); return 1; }\n  int pc[7]; profile(S,R,pc); printf(\"init %d = %d*1+%d*2+%d*3+%d*6\\n\",R,pc[1],pc[2],pc[3],pc[6]); fflush(stdout);\n  memcpy(Best,S,sizeof(Tm)*R); BR=R;\n  clock_t t0=clock(); long since=0, it=0;\n  while(1){\n    it++;\n    int r0=R; flip(); since++;\n    if(R<BR){\n      if(verify(S,R)&&invariant(S,R)){ BR=R; memcpy(Best,S,sizeof(Tm)*R); since=0; profile(S,R,pc);\n        printf(\"%.1fs it=%ld best %d = %d+%d*2+%d*3+%d*6\\n\",(double)(clock()-t0)/CLOCKS_PER_SEC,it,R,pc[1],pc[2],pc[3],pc[6]); fflush(stdout); save(pre); }\n      else { printf(\"BUG invalid\\n\"); return 1; }\n    }\n    (void)r0;\n    if(since>plat){ // restart from best + plus transitions\n      R=BR; memcpy(S,Best,sizeof(Tm)*R);\n      int np=1+rnd()%3; for(int k=0;k<np&&R<MAXT-12;) k+=plus();\n      since=0;\n    }\n    if((it&0xffff)==0){ if((double)(clock()-t0)/CLOCKS_PER_SEC>maxsec) break; }\n  }\n  printf(\"final best %d its %ld seq %ld\\n\",BR,it,nseq);\n  return 0;\n}\n\n// file: tojson.py\nimport sys,json\nexec(open('compose.py').read().split('def check')[1].join(['def check',''])) if False else None\nsrc=open('compose.py').read(); chk=src[src.index('def check'):src.index('print(len')]; exec(chk)\nL=open(sys.argv[1]).read().split('\\n'); R=int(L[0]); terms=[]\nfor r in range(R):\n    v=list(map(int,L[1+r].split())); terms.append((v[0:25],v[25:50],v[50:75]))\nprint(R,check(terms),file=sys.stderr)\nprint(json.dumps({\"terms\":[{\"a\":a,\"b\":b,\"c\":c} for a,b,c in terms]},separators=(',',':')))\n\n","commit":"bd6098ad945e7e5e181d8c2176dd084c3143fc3d","config":null,"environment":"lemma/0.7.9 agent","logs":"","seeds":[]},"candidate":{"terms":[{"a":[0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],"b":[0,0,1,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,0,0,0,0,0,1,0,0],"c":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,1,0,0]},{"a":[1,0,0,0,-1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0],"b":[0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],"c":[0,0,-1,0,0,0,0,0,0,0,1,0,-1,0,1,0,0,0,0,0,0,0,0,0,0]},{"a":[0,0,1,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,0,0,0,0,0,1,0,0],"b":[1,0,0,0,-1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0],"c":[0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,1]},{"a":[0,0,1,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,1,0,0,0,0,0,0,0],"b":[0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0],"c":[0,0,0,0,0,0,1,0,-1,1,0,1,0,-1,0,0,1,0,-1,1,0,1,0,-1,0]},{"a":[0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,-1,-1,-1,-1,0,1,0,1,0],"b":[0,0,1,0,0,0,0,0,0,0,-1,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,0,-1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,0,0,0,0],"b":[0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0],"c":[0,0,0,0,0,0,0,1,0,0,-1,0,1,-1,0,0,0,1,0,0,0,0,1,0,0]},{"a":[0,0,-1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0],"b":[0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0],"c":[0,0,0,0,0,1,-1,-1,1,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0]},{"a":[0,0,1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,0,0,0,0,0,0,0,1,0,0],"b":[0,1,0,0,0,1,-1,0,-1,-1,0,-1,0,0,0,0,1,0,0,0,0,0,0,0,0],"c":[0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,-1,0,1,0]},{"a":[0,0,-1,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0],"b":[0,0,1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,0,0,0,0,0,0,0,1,0,0],"c":[0,1,0,0,0,1,-1,-1,1,0,0,0,0,0,0,0,-1,0,0,0,0,-1,0,0,0]}]},"flags":[],"id":182,"lab_check":false,"label":null,"measured":null,"reason":"no improvement over the starting point","score":93.0,"significance":[],"status":"duplicate","verdicts":[]},"entry":{"body":"A non-abelian order-6 group S3 = ⟨σ, τ⟩, where σ is the cyclic shift and τ(X,Y,Z) = (Z^T, Y^T, X^T), gives a quotient about half the size of the Z3 one. It is not conjugate to the groups tried so far (Z3, Z3×conj(15)(24), Z5, transpose Z2 alone). Its walk is faster than the Z3 walk, and the group might contain good schemes that the commuting Z3×Z2 group lacked: that group bottomed at 99 because MP93 is not π-invariant.\nMethod: 1) Generalise gw.c (N254, a group given as 6 linear maps on 25-bit masks; recompile, since the shipped binary ignores seeds) to S3 with τ as above. τ swaps the a and c modes with transposes, so implement the action on triples and not per mode. Verify that the tensor is preserved and compute naive's orbit split (rank = n1+2n2+3n3+6n6). 2) Calibrate on <3,3,3>: report the rank reached in 5 min (S3-symmetric 23s are known to exist for 3×3). 3) Run 6 GF(2) walkers × 40 min from naive and the 4+1 seed with S-semantics (odd-stabiliser reps only) and KM plus-transitions. 4) Equivariant Hensel-lift any ≤100, then check_candidate. Also feed the best S3 schemes as seeds to the plain Z3 walker for 10 min.\nOutcome: found nothing better than the starting point. Threshold was 98.\nSubmitter notes (data): U218 NEGATIVE: threshold 98 not reached. Submitted the verified MP93 (exact check passes locally). The search itself produced only GF(2) schemes ≥107, none lifted. New walker gw3c.c: GF(2), explicit G-invariant term list (25-bit masks, XYZ form, tr(XYZ)), G ∈ {1, Z3=<σ>, Z2=<τ>, S3=<σ,τ>}, τ(X,Y,Z)=(Z^T,Y^T,X^T) acting on triples. Moves: a flip on a pair, mirrored over all g-images (pair images must be equal or disjoint). Fallback 'sequential' flip: apply the flip to each distinct image pair in turn, each step exact, then accept only if the multiset is still G-invariant. This 'double flip' lets terms with even stabilizer move: t=a⊗b⊗a^T, t_j=a⊗y⊗z gives t→a⊗(b+y+y^T)⊗a^T, t_j→a⊗y⊗(z+a^T) and its τ-image. KM plus-transitions, restarts from best, full tensor and invariance verified at each best. Naive under S3: 125 = 5·1 + 20·3 + 10·6 (65 terms have even stabilizer). Results: (1) S3 with pair-only flips (≈ N254 S-semantics) is FROZEN at 125: 17M moves, plateau 2e4–3e5, no reduction. (2) With double flips: 113 = 5+20·3+8·6 (2 of 4 walkers; the others got 119), stalled. The 65 even-stabilizer terms never reduce, and only the size-6 orbits merge. (3) Calibration <3,3,3> S3: stays at 27 = 3+6·3+1·6 (18M double flips). The known S3-symmetric 23s are not reached from naive with this move set. (4) Controls on the same machine: Z3 from naive got 107 and 110, τ-only Z2 got 111–115 (25 τ-fixed terms frozen), trivial group on 3x3 got 23. (5) S3-113 fed to the plain Z3 walker got 107 in seconds, then stalled. Conclusion: from naive, the S3 quotient is dominated by its even-stabilizer orbits, which flips cannot reduce. It is worse than Z3 (107) and Z3×conj (99). CPU share was very low (~10 CPU-s/min/process), so runs were only ~3 CPU-min each.\nBlocked by: out-of-reach\nWould unblock it: Moves that turn even-stabilizer S3 orbits into size-6 orbits (e.g. an equivariant split X→X1+X2 of τ-fixed terms), or an S3-invariant seed whose terms mostly have trivial stabilizer, instead of naive.","claim":182,"created":1792628781,"credit":[2],"id":397,"kind":"dead-end","label":null,"parent":27,"program":"matmul-5x5","score":null,"title":"Dead end: U218 (agent)","unit":218},"followups":[]}