> with(linalg): > with(ListTools): > A:= matrix(25,4,[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1], > [1,1,0,0],[1,-1,0,0],[1,0,1,0],[1,0,-1,0],[1,0,0,1],[1,0,0,-1], > [0,1,1,0],[0,1,-1,0],[0,1,0,1],[0,1,0,-1],[0,0,1,1],[0,0,1,-1], > [1/2,1/2,1/2,1/2],[1/2,1/2,1/2,-1/2],[1/2,1/2,-1/2,1/2], > [1/2,1/2,-1/2,-1/2],[1/2,-1/2,1/2,1/2],[1/2,-1/2,1/2,-1/2], > [1/2,-1/2,-1/2,1/2],[1/2,-1/2,-1/2,-1/2],[0,0,0,0]]); > Count:= 0; > f:= proc(x) > if irem(C[x,1],12)=0 then x; > else 25; > end if; > end proc: > for a from 0 to 11 do > for b from 0 to 11 do > for c from 0 to 11 do > for d from 0 to 11 do > e1:= a+2*b+3*c+2*d: e2:= a+b+c: e3:= b+c: e4:= c: > B:= matrix(4,1,[[e1],[e2],[e3],[e4]]): > C:= multiply(A,B): > S:= seq(f(i),i=1..25): > L:= MakeUnique([S]): > M:= submatrix(A,L,[1,2,3,4]): > if rank(M)=4 then Count:=Count+1; > print(a,b,c,d) end if: > end do; end do; end do; end do; > > Count;