{"claim":{"assessments":[],"bundle":{"code":"z3w.c in the working directory (~11 KB C). Core: Term{int8 v[3][25]; fixed}; sigma(a,b,c)=(b,c^T,a^T); flip(): pick orbit rep i, mode m, partner = any image sigma^t(rep_j) whose mode-m factor equals rep_i's up to sign eps; P'=(f,u1+lam*eps*u2,v1), Q'=(eps f,u2,v2-lam*v1); rep_j := sigma^{-t}(Q'); reduce_all(): zero factor -> drop orbit, collapse sigma(rep)=±rep -> (3a,a,a^T) fixed, merges on two shared factors up to sign (orbit–orbit and fixed–fixed only); KM restart from best after L flips; plus moves: KM 2->3 transition, split, explode k x^3 = orb(x,x,x) + (k-3) x^3. verify(): full tensor identity.\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: dbg.patch.py\ns=open('z3w.c').read()\ns=s.replace(\"    if(flip()){ flips++; reduce_all(); }\",\"    if(flip()){ flips++; reduce_all(); if(getenv(\\\"DBG\\\") && (flips%1000)==0){ if(!verify()){ printf(\\\"INVALID after flip %ld rank %d\\\\n\\\",flips,rank()); return 3;} expand(); int miss=0; for(int x=0;x<ne;x++)for(int y=x+1;y<ne;y++){ int c=0; for(int m=0;m<3;m++) if(eqsign(E[x].v[m],E[y].v[m])) c++; if(c>=2) miss++; } int mx=0; for(int x=0;x<ne;x++)for(int m=0;m<3;m++)for(int p=0;p<N;p++){int v=abs(E[x].v[m][p]); if(v>mx)mx=v;} printf(\\\"dbg flips=%ld rank=%d pairs2=%d maxcoef=%d\\\\n\\\",flips,rank(),miss,mx); } }\")\nopen('z3w_dbg.c','w').write(s)\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: 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// file: z3w.c\n// Z3-cyclic-symmetric flip walker for <n,n,n> over Z (|coef|<=B) or GF(2).\n// Scheme = fixed terms (k x, x, x^T) + orbit reps (a,b,c), images sigma(a,b,c) = (b, c^T, a^T).\n// usage: z3w n MOD B seed seconds L outfile\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n#include <time.h>\n\nstatic int n, N, MOD = 0, B = 3, NOSYM=0;\n#define MAXT 300\ntypedef struct { int8_t v[3][25]; int fixed; } Term;\nstatic Term R[MAXT]; static int nr;\nstatic Term E[3*MAXT]; static int ne; static int eo[3*MAXT], et[3*MAXT];\n\nstatic uint64_t rs = 88172645463325252ULL;\nstatic inline uint64_t rnd(void){ rs ^= rs<<13; rs ^= rs>>7; rs ^= rs<<17; return rs; }\n\nstatic void transp(const int8_t*s, int8_t*d){ for(int i=0;i<n;i++)for(int j=0;j<n;j++) d[i*n+j]=s[j*n+i]; }\nstatic void sigma(const Term*s, Term*d){ Term t; memcpy(t.v[0],s->v[1],N); transp(s->v[2],t.v[1]); transp(s->v[0],t.v[2]); t.fixed=s->fixed; *d=t; }\nstatic void sigmak(const Term*s, Term*d, int k){ Term t=*s; for(int i=0;i<k;i++){ Term u; sigma(&t,&u); t=u; } *d=t; }\nstatic int iszero(const int8_t*a){ for(int i=0;i<N;i++) if(a[i]) return 0; return 1; }\nstatic int eqsign(const int8_t*a,const int8_t*b){\n  int s=0; for(int i=0;i<N;i++){ if(a[i]==0&&b[i]==0) continue; if(a[i]==0||b[i]==0) return 0;\n    int t = (a[i]==b[i])?1:((a[i]==-b[i])?-1:0); if(!t) return 0; if(s==0) s=t; else if(s!=t) return 0; }\n  return s; }\nstatic int rank(void){ int r=0; for(int i=0;i<nr;i++) r+= (R[i].fixed||NOSYM)?1:3; return r; }\nstatic void expand(void){ ne=0; for(int i=0;i<nr;i++){ if(R[i].fixed||NOSYM){ E[ne]=R[i]; eo[ne]=i; et[ne]=0; ne++; } else { Term t=R[i]; for(int k=0;k<3;k++){ E[ne]=t; eo[ne]=i; et[ne]=k; ne++; Term u; sigma(&t,&u); t=u; } } } }\nstatic int bounded(const Term*t){ for(int m=0;m<3;m++){ int bb=(t->fixed&&m==0)?3*B:B; for(int i=0;i<N;i++){ int x=t->v[m][i]; if(x>bb||x<-bb) return 0; } } return 1; }\nstatic int nonzero(const Term*t){ return !iszero(t->v[0])&&!iszero(t->v[1])&&!iszero(t->v[2]); }\nstatic void normt(Term*t){ if(MOD==2) for(int m=0;m<3;m++) for(int i=0;i<N;i++) t->v[m][i]&=1; }\n\nstatic long long Tn[25*25*25];\nstatic int verify(void){ expand(); memset(Tn,0,sizeof(long long)*N*N*N);\n  for(int e=0;e<ne;e++) for(int p=0;p<N;p++) if(E[e].v[0][p]) for(int q=0;q<N;q++) if(E[e].v[1][q]) for(int r=0;r<N;r++) if(E[e].v[2][r]) Tn[(p*N+q)*N+r]+= (long long)E[e].v[0][p]*E[e].v[1][q]*E[e].v[2][r];\n  for(int p=0;p<N;p++)for(int q=0;q<N;q++)for(int r=0;r<N;r++){ int i=p/n,j=p%n,j2=q/n,k=q%n,i2=r/n,k2=r%n;\n    long long want=(j==j2&&i==i2&&k==k2); long long got=Tn[(p*N+q)*N+r]; if(MOD==2){ got&=1; }\n    if(got!=want) return 0; }\n  return 1; }\n\nstatic void seed_naive(void){ nr=0; for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++){\n  if(i==j&&j==k && !NOSYM && !getenv(\"EXPLODESEED\")){ Term t; memset(&t,0,sizeof t); t.v[0][i*n+i]=1; t.v[1][i*n+i]=1; t.v[2][i*n+i]=1; t.fixed=1; R[nr++]=t; continue; }\n  // orbit of (i,j,k) -> (j,k,i) -> (k,i,j); keep lexicographically smallest rep\n  int a[3]={i,j,k}; int best=1; for(int s=1;s<3;s++){ int b0=a[s],b1=a[(s+1)%3],b2=a[(s+2)%3]; if(b0*n*n+b1*n+b2 < i*n*n+j*n+k) best=0; } if(!best && !NOSYM) continue;\n  Term t; memset(&t,0,sizeof t); t.v[0][i*n+j]=1; t.v[1][j*n+k]=1; t.v[2][i*n+k]=1; t.fixed=0; R[nr++]=t; } }\n\nstatic void remove_rep(int i){ R[i]=R[nr-1]; nr--; }\n\n// try reductions involving rep i; returns 1 if the rank dropped (and reps changed)\nstatic int reduce_one(int i){\n  if(!nonzero(&R[i])){ remove_rep(i); return 1; }\n  if(!R[i].fixed && !NOSYM){ // collapse: sigma(rep) = +- rep  => (a, e a, d a^T)\n    Term s; sigma(&R[i],&s); int e=eqsign(R[i].v[0],s.v[0]), f=eqsign(R[i].v[1],s.v[1]), g=eqsign(R[i].v[2],s.v[2]);\n    if(e&&f&&g){ Term t=R[i]; for(int p=0;p<N;p++) t.v[0][p]=(int8_t)(3*t.v[0][p]); normt(&t); t.fixed=1;\n      // rep is (a, e a, d a^T); as fixed form want (k x, x, x^T): x = b = e a; fine: (3sg a, ea, da^T) tensors: keep general triple, fixed flag\n      if(bounded(&t)&&nonzero(&t)){ R[i]=t; return 1; } else if(!nonzero(&t)){ remove_rep(i); return 1; } } }\n  // merges with other terms (expanded), sharing two factors up to sign\n  expand();\n  for(int e=0;e<ne;e++){ if(eo[e]==i) continue; if(R[i].fixed!=E[e].fixed) continue;\n    for(int m=0;m<3;m++){ int m1=(m+1)%3,m2=(m+2)%3; int s1=eqsign(R[i].v[m1],E[e].v[m1]); if(!s1) continue; int s2=eqsign(R[i].v[m2],E[e].v[m2]); if(!s2) continue;\n      Term t=R[i]; for(int p=0;p<N;p++) t.v[m][p]=(int8_t)(t.v[m][p]+s1*s2*E[e].v[m][p]); normt(&t);\n      if(!bounded(&t)) continue;\n      int j=eo[e]; if(R[i].fixed){ // fixed+fixed: result must stay fixed form; since b,c shared it is\n        R[i]=t; remove_rep(j); return 1; }\n      R[i]=t; remove_rep(j); return 1; } }\n  return 0; }\nstatic void reduce_all(void){ int ch=1; while(ch){ ch=0; for(int i=0;i<nr;i++){ if(reduce_one(i)){ ch=1; break; } } } }\n\nstatic double TEMP=0.0; static int PLUSP=0; static int wt(const Term*t){ int w=0; for(int m=0;m<3;m++) for(int p=0;p<N;p++) w+= t->v[m][p]!=0; return w; }\n#include <math.h>\nstatic int flip(void){\n  // pick orbit rep i, mode m, partner expanded term from another orbit sharing factor m up to sign\n  int oc=0; for(int i=0;i<nr;i++) if(!R[i].fixed) oc++; if(oc<2) return 0;\n  int i; do { i=rnd()%nr; } while(R[i].fixed);\n  int m=rnd()%3; expand();\n  int cand[3*MAXT], nc=0, sg[3*MAXT];\n  for(int e=0;e<ne;e++){ if(eo[e]==i||E[e].fixed) continue; int s=eqsign(R[i].v[m],E[e].v[m]); if(s){ cand[nc]=e; sg[nc]=s; nc++; } }\n  if(!nc) return 0;\n  int c=rnd()%nc, e=cand[c], eps=sg[c]; int j=eo[e], t=et[e];\n  int m1=(m+1)%3, m2=(m+2)%3; if(rnd()&1){ int x=m1; m1=m2; m2=x; }\n  int lam=(rnd()&1)?1:-1; if(MOD==2) lam=1;\n  Term P=R[i], Q=E[e];\n  // P=(f,u1,v1), Q=(eps f,u2,v2): P'=(f,u1+lam*eps*u2,v1), Q'=(eps f,u2,v2-lam*v1)\n  for(int p=0;p<N;p++){ P.v[m1][p]=(int8_t)(P.v[m1][p]+lam*eps*Q.v[m1][p]); Q.v[m2][p]=(int8_t)(Q.v[m2][p]-lam*P.v[m2][p]); }\n  normt(&P); normt(&Q);\n  if(!bounded(&P)||!bounded(&Q)) return 0;\n  if(TEMP>0){ int dw=wt(&P)+wt(&Q)-wt(&R[i])-wt(&E[e]); if(dw>0){ double u=(rnd()%1000000)/1e6; if(u>exp(-dw/TEMP)) return 0; } }\n  Term Qr; sigmak(&Q,&Qr,(3-t)%3); Qr.fixed=0;\n  R[i]=P; R[j]=Qr;\n  return 1; }\n\nstatic void plus_km(void){ // KM plus transition: T_i + s^t T_j -> (a+a',b,c') + (a,b,c-c') + (a',b'-b,c'), mirrored\n  int oc=0; for(int i=0;i<nr;i++) if(!R[i].fixed) oc++; if(oc<2||nr+2>=MAXT) return;\n  int i; do { i=rnd()%nr; } while(R[i].fixed); expand();\n  int e; int tries=0; do { e=rnd()%ne; tries++; } while((eo[e]==i||E[e].fixed) && tries<50); if(eo[e]==i||E[e].fixed) return;\n  int j=eo[e], t=et[e]; int pm[3]={0,1,2}; for(int k=2;k>0;k--){ int r=rnd()%(k+1); int x=pm[k]; pm[k]=pm[r]; pm[r]=x; }\n  int ma=pm[0], mb=pm[1], mc=pm[2]; Term P=R[i], Q=E[e]; int s1=(rnd()&1)?1:-1, s2=(rnd()&1)?1:-1; if(MOD==2){s1=s2=1;}\n  // a b c + a' b' c' = (a + s1 a') b (s1 c') + a b (c - s1 c') ... use: (a+a')bc' + ab(c-c') + a'(b'-b)c' with signs: a' -> s1 a', c' -> s1 c' consistent (s1*s1=1)\n  Term T1,T2,T3; memset(&T1,0,sizeof T1); memset(&T2,0,sizeof T2); memset(&T3,0,sizeof T3);\n  for(int p=0;p<N;p++){ int a=P.v[ma][p], b=P.v[mb][p], c=P.v[mc][p], a2=s1*Q.v[ma][p], b2=Q.v[mb][p], c2=s1*Q.v[mc][p];\n    T1.v[ma][p]=(int8_t)(a+a2); T1.v[mb][p]=(int8_t)b; T1.v[mc][p]=(int8_t)c2;\n    T2.v[ma][p]=(int8_t)a; T2.v[mb][p]=(int8_t)b; T2.v[mc][p]=(int8_t)(c-c2);\n    T3.v[ma][p]=(int8_t)a2; T3.v[mb][p]=(int8_t)(b2-b); T3.v[mc][p]=(int8_t)c2; }\n  (void)s2; normt(&T1); normt(&T2); normt(&T3);\n  if(!bounded(&T1)||!bounded(&T2)||!bounded(&T3)) return;\n  Term T3r; sigmak(&T3,&T3r,(3-t)%3); T1.fixed=T2.fixed=T3r.fixed=0;\n  R[i]=T1; R[j]=T2; R[nr++]=T3r; }\nstatic void plus_fixed(void){ // F=(a,b,c), a||b, c=+-b^T:  F = orbit(b,b,c) + (a-3b) b c   (rank +3, or +2 if a=3b)\n  int fc=0; for(int i=0;i<nr;i++) if(R[i].fixed) fc++; if(!fc||nr+1>=MAXT) return;\n  int i; do { i=rnd()%nr; } while(!R[i].fixed);\n  Term O=R[i]; memcpy(O.v[0],O.v[1],N); O.fixed=0; Term F=R[i]; for(int p=0;p<N;p++) F.v[0][p]=(int8_t)(F.v[0][p]-3*F.v[1][p]); normt(&F);\n  if(!bounded(&F)) return;\n  if(iszero(F.v[0])){ R[i]=O; } else { R[i]=F; R[nr++]=O; } }\nstatic void plus_split(void){ // split one factor of a random orbit rep into two: rank +3\n  int i; int tries=0; do { i=rnd()%nr; tries++; } while(R[i].fixed && tries<100); if(R[i].fixed) return;\n  int m=rnd()%3; int nz=0; for(int p=0;p<N;p++) if(R[i].v[m][p]) nz++;\n  Term t2=R[i]; int moved=0;\n  if(nz>=2){ for(int p=0;p<N;p++) if(R[i].v[m][p]){ if(rnd()&1){ t2.v[m][p]=0; } else { R[i].v[m][p]=0; moved++; } }\n    if(moved==0) return; if(moved==nz){ memcpy(R[i].v[m],t2.v[m],N); return; } }\n  else { // single entry: split value x = (x - y) + y with y random +-1 ... only if bound allows\n    int p=0; for(p=0;p<N;p++) if(R[i].v[m][p]) break; int x=R[i].v[m][p]; int y = (rnd()&1)?1:-1; if(MOD==2) return; if(abs(x-y)>B||x-y==0) return;\n    R[i].v[m][p]=(int8_t)(x-y); t2.v[m][p]=(int8_t)y; }\n  if(nr+1>=MAXT) return; R[nr++]=t2; }\n\nstatic void dump(const char*fn){ FILE*f=fopen(fn,\"w\"); expand(); fprintf(f,\"{\\\"terms\\\":[\");\n  for(int e=0;e<ne;e++){ fprintf(f,\"%s{\",e?\",\":\"\"); const char*nm[3]={\"a\",\"b\",\"c\"}; for(int m=0;m<3;m++){ fprintf(f,\"\\\"%s\\\":[\",nm[m]); for(int p=0;p<N;p++) fprintf(f,\"%s%d\",p?\",\":\"\",E[e].v[m][p]); fprintf(f,\"]%s\",m<2?\",\":\"\"); } fprintf(f,\"}\"); }\n  fprintf(f,\"]}\\n\"); fclose(f); }\n\nint main(int argc,char**argv){\n  NOSYM=getenv(\"NOSYM\")!=NULL; n=atoi(argv[1]); N=n*n; MOD=atoi(argv[2]); B=atoi(argv[3]); rs ^= (uint64_t)atoll(argv[4])*2654435761ULL; for(int i=0;i<10;i++) rnd();\n  double secs=atof(argv[5]); long L=atol(argv[6]); const char*out=argv[7]; if(argc>8) TEMP=atof(argv[8]); if(argc>9) PLUSP=atoi(argv[9]);\n  seed_naive(); if(!verify()){ printf(\"seed invalid\\n\"); return 1; }\n  int best=rank(); Term BR[MAXT]; int bnr=nr; memcpy(BR,R,sizeof(Term)*nr);\n  printf(\"seed rank %d (reps %d)\\n\",best,nr); fflush(stdout);\n  time_t t0=time(NULL); long it=0, since=0; int cur=best;\n  long flips=0, plus=0;\n  while(difftime(time(NULL),t0)<secs){\n    it++;\n    if(flip()){ flips++; since++; reduce_all(); }\n    cur=rank();\n    if(cur<best){ if(!verify()){ printf(\"VERIFY FAIL at %d\\n\",cur); return 2; } best=cur; bnr=nr; memcpy(BR,R,sizeof(Term)*nr);\n      int s=0; for(int i=0;i<nr;i++) if(R[i].fixed) s++;\n      printf(\"t=%.0f rank %d (s=%d m=%d) it=%ld\\n\",difftime(time(NULL),t0),best,s,(best-s)/3,it); fflush(stdout); dump(out); since=0; }\n    if(since>L){ // KM path-length limit: restart from best; occasionally plus-split first\n      nr=bnr; memcpy(R,BR,sizeof(Term)*nr); if(PLUSP>0 && (rnd()%100)<PLUSP){ { int r=rnd()%3; if(r==0) plus_km(); else if(r==1) plus_split(); else plus_fixed(); } plus++; } since=0; }\n  }\n  nr=bnr; memcpy(R,BR,sizeof(Term)*nr); int ok=verify();\n  int s=0; for(int i=0;i<nr;i++) if(R[i].fixed) s++;\n  { expand(); int W=0; for(int x=0;x<ne;x++) W+=wt(&E[x]); printf(\"avg weight/term %.2f\\n\",(double)W/ne); }\n  printf(\"final best %d (s=%d) verify=%d flips=%ld plus=%ld it=%ld\\n\",best,s,ok,flips,plus,it); dump(out); return 0; }\n\n// file: z3w_dbg.c\n// Z3-cyclic-symmetric flip walker for <n,n,n> over Z (|coef|<=B) or GF(2).\n// Scheme = fixed terms (k x, x, x^T) + orbit reps (a,b,c), images sigma(a,b,c) = (b, c^T, a^T).\n// usage: z3w n MOD B seed seconds L outfile\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n#include <time.h>\n\nstatic int n, N, MOD = 0, B = 3;\n#define MAXT 300\ntypedef struct { int8_t v[3][25]; int fixed; } Term;\nstatic Term R[MAXT]; static int nr;\nstatic Term E[3*MAXT]; static int ne; static int eo[3*MAXT], et[3*MAXT];\n\nstatic uint64_t rs = 88172645463325252ULL;\nstatic inline uint64_t rnd(void){ rs ^= rs<<13; rs ^= rs>>7; rs ^= rs<<17; return rs; }\n\nstatic void transp(const int8_t*s, int8_t*d){ for(int i=0;i<n;i++)for(int j=0;j<n;j++) d[i*n+j]=s[j*n+i]; }\nstatic void sigma(const Term*s, Term*d){ Term t; memcpy(t.v[0],s->v[1],N); transp(s->v[2],t.v[1]); transp(s->v[0],t.v[2]); t.fixed=s->fixed; *d=t; }\nstatic void sigmak(const Term*s, Term*d, int k){ Term t=*s; for(int i=0;i<k;i++){ Term u; sigma(&t,&u); t=u; } *d=t; }\nstatic int iszero(const int8_t*a){ for(int i=0;i<N;i++) if(a[i]) return 0; return 1; }\nstatic int eqsign(const int8_t*a,const int8_t*b){\n  int s=0; for(int i=0;i<N;i++){ if(a[i]==0&&b[i]==0) continue; if(a[i]==0||b[i]==0) return 0;\n    int t = (a[i]==b[i])?1:((a[i]==-b[i])?-1:0); if(!t) return 0; if(s==0) s=t; else if(s!=t) return 0; }\n  return s; }\nstatic int rank(void){ int r=0; for(int i=0;i<nr;i++) r+= R[i].fixed?1:3; return r; }\nstatic void expand(void){ ne=0; for(int i=0;i<nr;i++){ if(R[i].fixed){ E[ne]=R[i]; eo[ne]=i; et[ne]=0; ne++; } else { Term t=R[i]; for(int k=0;k<3;k++){ E[ne]=t; eo[ne]=i; et[ne]=k; ne++; Term u; sigma(&t,&u); t=u; } } } }\nstatic int bounded(const Term*t){ for(int m=0;m<3;m++) for(int i=0;i<N;i++){ int x=t->v[m][i]; if(x>B||x<-B) return 0; } return 1; }\nstatic int nonzero(const Term*t){ return !iszero(t->v[0])&&!iszero(t->v[1])&&!iszero(t->v[2]); }\nstatic void normt(Term*t){ if(MOD==2) for(int m=0;m<3;m++) for(int i=0;i<N;i++) t->v[m][i]&=1; }\n\nstatic long long Tn[25*25*25];\nstatic int verify(void){ expand(); memset(Tn,0,sizeof(long long)*N*N*N);\n  for(int e=0;e<ne;e++) for(int p=0;p<N;p++) if(E[e].v[0][p]) for(int q=0;q<N;q++) if(E[e].v[1][q]) for(int r=0;r<N;r++) if(E[e].v[2][r]) Tn[(p*N+q)*N+r]+= (long long)E[e].v[0][p]*E[e].v[1][q]*E[e].v[2][r];\n  for(int p=0;p<N;p++)for(int q=0;q<N;q++)for(int r=0;r<N;r++){ int i=p/n,j=p%n,j2=q/n,k=q%n,i2=r/n,k2=r%n;\n    long long want=(j==j2&&i==i2&&k==k2); long long got=Tn[(p*N+q)*N+r]; if(MOD==2){ got&=1; }\n    if(got!=want) return 0; }\n  return 1; }\n\nstatic void seed_naive(void){ nr=0; for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++){\n  if(i==j&&j==k){ Term t; memset(&t,0,sizeof t); t.v[0][i*n+i]=1; t.v[1][i*n+i]=1; t.v[2][i*n+i]=1; t.fixed=1; R[nr++]=t; continue; }\n  // orbit of (i,j,k) -> (j,k,i) -> (k,i,j); keep lexicographically smallest rep\n  int a[3]={i,j,k}; int best=1; for(int s=1;s<3;s++){ int b0=a[s],b1=a[(s+1)%3],b2=a[(s+2)%3]; if(b0*n*n+b1*n+b2 < i*n*n+j*n+k) best=0; } if(!best) continue;\n  Term t; memset(&t,0,sizeof t); t.v[0][i*n+j]=1; t.v[1][j*n+k]=1; t.v[2][i*n+k]=1; t.fixed=0; R[nr++]=t; } }\n\nstatic void remove_rep(int i){ R[i]=R[nr-1]; nr--; }\n\n// try reductions involving rep i; returns 1 if the rank dropped (and reps changed)\nstatic int reduce_one(int i){\n  if(!nonzero(&R[i])){ remove_rep(i); return 1; }\n  if(!R[i].fixed){ // collapse: sigma(rep) = +- rep  => (a, e a, d a^T)\n    Term s; sigma(&R[i],&s); int e=eqsign(R[i].v[0],s.v[0]), f=eqsign(R[i].v[1],s.v[1]), g=eqsign(R[i].v[2],s.v[2]);\n    if(e&&f&&g){ Term t=R[i]; for(int p=0;p<N;p++) t.v[0][p]=(int8_t)(3*t.v[0][p]); normt(&t); t.fixed=1;\n      // rep is (a, e a, d a^T); as fixed form want (k x, x, x^T): x = b = e a; fine: (3sg a, ea, da^T) tensors: keep general triple, fixed flag\n      if(bounded(&t)&&nonzero(&t)){ R[i]=t; return 1; } else if(!nonzero(&t)){ remove_rep(i); return 1; } } }\n  // merges with other terms (expanded), sharing two factors up to sign\n  expand();\n  for(int e=0;e<ne;e++){ if(eo[e]==i) continue; if(R[i].fixed!=E[e].fixed) continue;\n    for(int m=0;m<3;m++){ int m1=(m+1)%3,m2=(m+2)%3; int s1=eqsign(R[i].v[m1],E[e].v[m1]); if(!s1) continue; int s2=eqsign(R[i].v[m2],E[e].v[m2]); if(!s2) continue;\n      Term t=R[i]; for(int p=0;p<N;p++) t.v[m][p]=(int8_t)(t.v[m][p]+s1*s2*E[e].v[m][p]); normt(&t);\n      if(!bounded(&t)) continue;\n      int j=eo[e]; if(R[i].fixed){ // fixed+fixed: result must stay fixed form; since b,c shared it is\n        R[i]=t; remove_rep(j); return 1; }\n      R[i]=t; remove_rep(j); return 1; } }\n  return 0; }\nstatic void reduce_all(void){ int ch=1; while(ch){ ch=0; for(int i=0;i<nr;i++){ if(reduce_one(i)){ ch=1; break; } } } }\n\nstatic double TEMP=0.0; static int wt(const Term*t){ int w=0; for(int m=0;m<3;m++) for(int p=0;p<N;p++) w+= t->v[m][p]!=0; return w; }\n#include <math.h>\nstatic int flip(void){\n  // pick orbit rep i, mode m, partner expanded term from another orbit sharing factor m up to sign\n  int oc=0; for(int i=0;i<nr;i++) if(!R[i].fixed) oc++; if(oc<2) return 0;\n  int i; do { i=rnd()%nr; } while(R[i].fixed);\n  int m=rnd()%3; expand();\n  int cand[3*MAXT], nc=0, sg[3*MAXT];\n  for(int e=0;e<ne;e++){ if(eo[e]==i||E[e].fixed) continue; int s=eqsign(R[i].v[m],E[e].v[m]); if(s){ cand[nc]=e; sg[nc]=s; nc++; } }\n  if(!nc) return 0;\n  int c=rnd()%nc, e=cand[c], eps=sg[c]; int j=eo[e], t=et[e];\n  int m1=(m+1)%3, m2=(m+2)%3; if(rnd()&1){ int x=m1; m1=m2; m2=x; }\n  int lam=(rnd()&1)?1:-1; if(MOD==2) lam=1;\n  Term P=R[i], Q=E[e];\n  // P=(f,u1,v1), Q=(eps f,u2,v2): P'=(f,u1+lam*eps*u2,v1), Q'=(eps f,u2,v2-lam*v1)\n  for(int p=0;p<N;p++){ P.v[m1][p]=(int8_t)(P.v[m1][p]+lam*eps*Q.v[m1][p]); Q.v[m2][p]=(int8_t)(Q.v[m2][p]-lam*P.v[m2][p]); }\n  normt(&P); normt(&Q);\n  if(!bounded(&P)||!bounded(&Q)) return 0;\n  if(TEMP>0){ int dw=wt(&P)+wt(&Q)-wt(&R[i])-wt(&E[e]); if(dw>0){ double u=(rnd()%1000000)/1e6; if(u>exp(-dw/TEMP)) return 0; } }\n  Term Qr; sigmak(&Q,&Qr,(3-t)%3); Qr.fixed=0;\n  R[i]=P; R[j]=Qr;\n  return 1; }\n\nstatic void plus_split(void){ // split one factor of a random orbit rep into two: rank +3\n  int i; int tries=0; do { i=rnd()%nr; tries++; } while(R[i].fixed && tries<100); if(R[i].fixed) return;\n  int m=rnd()%3; int nz=0; for(int p=0;p<N;p++) if(R[i].v[m][p]) nz++;\n  Term t2=R[i]; int moved=0;\n  if(nz>=2){ for(int p=0;p<N;p++) if(R[i].v[m][p]){ if(rnd()&1){ t2.v[m][p]=0; } else { R[i].v[m][p]=0; moved++; } }\n    if(moved==0) return; if(moved==nz){ memcpy(R[i].v[m],t2.v[m],N); return; } }\n  else { // single entry: split value x = (x - y) + y with y random +-1 ... only if bound allows\n    int p=0; for(p=0;p<N;p++) if(R[i].v[m][p]) break; int x=R[i].v[m][p]; int y = (rnd()&1)?1:-1; if(MOD==2) return; if(abs(x-y)>B||x-y==0) return;\n    R[i].v[m][p]=(int8_t)(x-y); t2.v[m][p]=(int8_t)y; }\n  if(nr+1>=MAXT) return; R[nr++]=t2; }\n\nstatic void dump(const char*fn){ FILE*f=fopen(fn,\"w\"); expand(); fprintf(f,\"{\\\"terms\\\":[\");\n  for(int e=0;e<ne;e++){ fprintf(f,\"%s{\",e?\",\":\"\"); const char*nm[3]={\"a\",\"b\",\"c\"}; for(int m=0;m<3;m++){ fprintf(f,\"\\\"%s\\\":[\",nm[m]); for(int p=0;p<N;p++) fprintf(f,\"%s%d\",p?\",\":\"\",E[e].v[m][p]); fprintf(f,\"]%s\",m<2?\",\":\"\"); } fprintf(f,\"}\"); }\n  fprintf(f,\"]}\\n\"); fclose(f); }\n\nint main(int argc,char**argv){\n  n=atoi(argv[1]); N=n*n; MOD=atoi(argv[2]); B=atoi(argv[3]); rs ^= (uint64_t)atoll(argv[4])*2654435761ULL; for(int i=0;i<10;i++) rnd();\n  double secs=atof(argv[5]); long L=atol(argv[6]); const char*out=argv[7]; if(argc>8) TEMP=atof(argv[8]);\n  seed_naive(); if(!verify()){ printf(\"seed invalid\\n\"); return 1; }\n  int best=rank(); Term BR[MAXT]; int bnr=nr; memcpy(BR,R,sizeof(Term)*nr);\n  printf(\"seed rank %d (reps %d)\\n\",best,nr); fflush(stdout);\n  time_t t0=time(NULL); long it=0, since=0; int cur=best;\n  long flips=0, plus=0;\n  while(difftime(time(NULL),t0)<secs){\n    it++;\n    if(flip()){ flips++; reduce_all(); if(getenv(\"DBG\") && (flips%20000)==0){ expand(); int W=0,sh=0; for(int x=0;x<ne;x++) W+=wt(&E[x]); for(int x=0;x<ne;x++)for(int y=x+1;y<ne;y++) for(int m=0;m<3;m++) if(eqsign(E[x].v[m],E[y].v[m])) sh++; printf(\"dbg flips=%ld rank=%d avgw=%.2f sharingpairs=%d\\n\",flips,rank(),(double)W/ne,sh); } }\n    cur=rank(); since++;\n    if(cur<best){ if(!verify()){ printf(\"VERIFY FAIL at %d\\n\",cur); return 2; } best=cur; bnr=nr; memcpy(BR,R,sizeof(Term)*nr);\n      int s=0; for(int i=0;i<nr;i++) if(R[i].fixed) s++;\n      printf(\"t=%.0f rank %d (s=%d m=%d) it=%ld\\n\",difftime(time(NULL),t0),best,s,(best-s)/3,it); fflush(stdout); dump(out); since=0; }\n    if(since>L){ // plateau: plus transition, or restart if drifted too far\n      if(cur>best+9){ nr=bnr; memcpy(R,BR,sizeof(Term)*nr); } else plus_split(); plus++; since=0; }\n  }\n  nr=bnr; memcpy(R,BR,sizeof(Term)*nr); int ok=verify();\n  int s=0; for(int i=0;i<nr;i++) if(R[i].fixed) s++;\n  { expand(); int W=0; for(int x=0;x<ne;x++) W+=wt(&E[x]); printf(\"avg weight/term %.2f\\n\",(double)W/ne); }\n  printf(\"final best %d (s=%d) verify=%d flips=%ld plus=%ld it=%ld\\n\",best,s,ok,flips,plus,it); dump(out); return 0; }\n\n","commit":"d52a15249ca4b6bc4c7793f2deae1b6d162eecc2","config":null,"environment":"lemma/0.7.8 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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b":[0,0,-1,0,0,0,0,0,0,0,0,1,1,1,1,0,0,-1,0,0,0,0,0,0,0],"c":[0,0,0,0,0,1,-1,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"a":[0,1,0,0,0,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":75,"lab_check":false,"label":null,"measured":null,"reason":"no improvement over the starting point","score":93.0,"significance":[],"status":"duplicate","verdicts":[]},"entry":{"body":"A Z3-cyclic-symmetric flip walk started from the naive scheme (125 = 5 fixed + 3·40 orbits, already in the rank class ≡ 2 mod 3 that a 92 needs) descends much faster than the lab's non-symmetric walks (101 unlifted, 106 over Z) and gives verified Z schemes at or below 100 within an hour. The record 93 came from exactly this kind of search, and parity means a pure orbit walk from naive can reach 92 without any s-changing move, which a walk from the 93 cannot.\nMethod: 1) Represent a Z3-invariant scheme as f fixed terms x⊗x⊗x and m orbit representatives (a,b,c) with images (b,c,a),(c,a,b); seed = naive: x = e_ii (5 fixed) and reps (e_ij, e_jk, e_ki) for the 40 non-diagonal index triples up to cyclic shift. Check closure numerically against the full tensor after every move. 2) Extend symflip.c (N52) from the transpose Z2 action to Z3, over Z with |coef| <= 3: orbit–orbit flips where rep i shares a factor with rep j or with one of its two cyclic images (apply the flip to the reps and let the images follow); merges rep–rep (−3); zero term (−3); orbit collapse when a rep reaches a=b=c up to sign: 3·x⊗x⊗x -> (3x)⊗x⊗x, one fixed term (rank −2, s+1); fixed–orbit interactions only if they can be mirrored consistently, otherwise skip. Plus-transitions on plateaus (split an orbit rep into two reps), Kauers–Moosbauer style restarts from a best pool. 3) Run 4 walkers for 40 min, half over Z and half over GF(2) with a Z3-equivariant Hensel lift (lift only reps and fixed terms, so the linear systems are 3x smaller) at every new rank <= 104. 4) Log rank vs time and the (s,m) split at each rank; check_candidate every verified scheme <= 100; submit the best. 5) Sanity calibration first (5 min): the same walker on <3,3,3> from naive (27 = 3 + 3·8) should reach 23 with s=2.\nOutcome: found nothing better than the starting point. Threshold was 100.\nSubmitter notes (data): NEGATIVE RESULT for U97; threshold 100 not reached. The submitted candidate is the pre-existing Moosbauer–Poole 93 (best.json, re-verified exactly locally), NOT a scheme produced by this walk. The walk's own best over Z is 125 (naive).\n\nWhat was run: a Z3-cyclic-symmetric orbit walker (z3w.c, C) in the candidate convention, action sigma(a,b,c)=(b,c^T,a^T); scheme = fixed terms (k x, x, x^T) + orbit reps; moves = rep–image flips mirrored to all images (partner = any of the 3 images of another orbit, both roles, lambda=±1), merges (−3), zero-term removal, collapse rep=(a,±a,±a^T) -> (3a,a,a^T) (−2, s+1), Kauers–Moosbauer path-length restarts from the best, plus-moves (KM 2->3 transition mirrored, random split, and the Z-valid explode k x^3 = orb(x,x,x) + (k−3) x^3). Full 25^3 tensor identity verified at every rank drop and at the end. Modes: Z with |coef|<=2,3; GF(2).\n\nNumbers, 5x5 from naive 125 = 5 + 3·40: over Z, 6 walkers x 15 min (path limits 1e5 and 1e6, with/without plus moves) plus earlier 14 walkers x 11–18 min with short paths: rank 125 throughout, zero reductions. GF(2), fixed terms kept fixed: 125. GF(2) with the five fixed e_ii^3 re-seeded as size-3 orbits (valid only mod 2 since 3≡1): 122 after 1–2 min and 119 after 2–5 min (two walkers), s=5, m=38. Those GF(2) schemes are not valid over Z and were not submitted.\n\nCalibration <3,3,3> from naive 27 = 3+3·8 (10 s runs): symmetric Z: 27 (never any reduction); symmetric GF(2): 24 = 3+3·7 (brief predicted 23, not reached); non-symmetric mode of the same engine: GF(2) 23 (and 7 for <2,2,2>), Z 24. So the engine is sound, Z is merely slower non-symmetrically, but the symmetric Z quotient from naive is frozen.\n\nStructural explanation (main finding): in the Z3 quotient a fixed term k·x⊗x⊗x^T cannot flip with an orbit term (the result is not invariant) and fixed–fixed flips are merges. The only Z-valid moves touching a fixed term are collapse (k -> k+3), explode (k -> k−3 plus an orbit) and fixed–fixed merges with\nBlocked by: out-of-reach\nWould unblock it: Over Z the symmetric walk from naive needs fixed-term mobility, which only the rank+7 explode (p+q)^3 move provides; otherwise use the GF(2) symmetric walk with fixed terms as orbits plus a working Hensel lift.","claim":75,"created":1791965022,"credit":[2],"id":115,"kind":"dead-end","label":null,"parent":27,"program":"matmul-5x5","score":null,"title":"Dead end: U97 (agent)","unit":97},"followups":[]}