\\ This is the file unique.txt from the paper "Three-point bounds for \\ energy minimization" by Henry Cohn and Jeechul Woo. It consists of \\ PARI/GP code (see http://pari.math.u-bordeaux.fr/), but it does not do \\ anything sophisticated and can easily be translated to other computer \\ algebra systems. \\ Instead of using 1/sqrt(3), we will represent it by the variable \\ s and mod out by s^2-1/3. \\ Read in the definitions from definitions.txt: \r definitions.txt \\ Keep track of whether anything has failed so far: failure = 0; \\ Coefficients for simultaneous equations to determine N_1,...,N_5 \\ (from near the end of Section 4). { coeffs(j,k,d) = if(j==1,return(subst(subst(subst(T(3,k,d),u,0),v,0),t,0))); if(j==2,return(subst(subst(subst(T(3,k,d),u,-1/3),v,-1/3),t,-1/3))); if(j==3,return(subst(subst(subst(T(3,k,d),u,-1/3),v,s),t,s) % (s^2-1/3))); if(j==4,return(subst(subst(subst(T(3,k,d),u,s),v,s),t,0) % (s^2-1/3))); if(j==5,return(subst(subst(subst(T(3,k,d),u,1/3),v,s),t,s) % (s^2-1/3))); } \\ Equivalence of inner product triples under permutation and \\ pairs of sign changes: { equivalents(w) = [[w[1],w[2],w[3]], [w[1],w[3],w[2]], [w[2],w[1],w[3]], [w[2],w[3],w[1]], [w[3],w[1],w[2]], [w[3],w[2],w[1]], [-w[1],-w[2],w[3]], [-w[1],-w[3],w[2]], [-w[2],-w[1],w[3]], [-w[2],-w[3],w[1]], [-w[3],-w[1],w[2]], [-w[3],-w[2],w[1]], [w[1],-w[2],-w[3]], [w[1],-w[3],-w[2]], [w[2],-w[1],-w[3]], [w[2],-w[3],-w[1]], [w[3],-w[1],-w[2]], [w[3],-w[2],-w[1]], [-w[1],w[2],-w[3]], [-w[1],w[3],-w[2]], [-w[2],w[1],-w[3]], [-w[2],w[3],-w[1]], [-w[3],w[1],-w[2]], [-w[3],w[2],-w[1]]]; } isin(a,L) = for(i=1,length(L),if(L[i]==a,return(1))); return(0); equivalent(v,w) = isin(v,equivalents(w)); \\ Allowed triples of inner products: { allowed(v) = equivalent(v,[0,0,0]) || equivalent(v,[-1/3,-1/3,-1/3]) || equivalent(v,[-1/3,s,s]) || equivalent(v,[s,s,0]) || equivalent(v,[1/3,s,s]); } \\ Substitute values for u,v,t (mod s^2-1/3): subs(f,uu,vv,tt) = subst(subst(subst(f,u,uu),v,vv),t,tt) % (s^2-1/3); \\ Check uniqueness (by verifying that the triple distance \\ distribution is correct and that the potential and auxiliary \\ functions are equal only at the desired points): { Check_Unique(c, L, f) = local(Potential_Function, Auxiliary_Function, Difference, Eqs, RHS, d, W, failed); failed = 0; \\ Haven't failed so far. d = vector(6,i,matsize(L[i])[1]); \\ sizes of matrices Eqs = matrix(5,5,i,j,trace(L[i]*coeffs(j,i-1,d[i]))); \\ coefficient matrix for equations to determine N_1,...,N_5 RHS = vector(5,i,-35*trace(L[i]*(i==1)*matrix(d[i],d[i],j,k,1)))~; \\ right hand side of system of equations if(matsolve(Eqs,RHS) != [6,24,36,72,72]~, print(" Wrong distance distribution!");failed=1); \\ Check whether [N_1,...,N_5] = [6,24,36,72,72]. Auxiliary_Function = c \\ constant term + sum(i=1,#L-1, trace(L[i]*T(3,i-1,d[i]))); Potential_Function = (subst(f,x,u^2) + subst(f,x,v^2) + subst(f,x,t^2))/3; Difference = Potential_Function - Auxiliary_Function; \\ Check where the auxiliary function can equal the potential function: W = [0,1/3,-1/3,s,-s]; for(i=1,5, for(j=1,5, for(k=1,5, if((subs(Difference,W[i],W[j],W[k]) == 0) && !allowed([W[i],W[j],W[k]]), print(" Found an unallowed triple: ",[W[i],W[j],W[k]]); failed=1 ); ))); if(failed,failure=1,print(" Verified uniqueness.")); } \\ Read in data files and verify calculations: \r data1.txt; print("Checking first potential function:"); Check_Unique(c,L,x^2); \r data2.txt; print("Checking second potential function:"); Check_Unique(c,L,x^3); \r data3.txt; print("Checking third potential function:"); Check_Unique(c,L,x^3*(x-1/9)); \r data4.txt; print("Checking fourth potential function:"); Check_Unique(c,L,x^3*(x-1/9)^2); \r data5.txt; print("Checking fifth potential function:"); Check_Unique(c,L,x^3*(x-1/9)^2*(x-1/3)); if(!failure,print("Uniqueness has been verified in every case."));