proc Substitute(int m, ideal I) { int i; int n = nvars(basering); int k; ideal P = I; if (m==0) { k = n/2; } else { k = n/(m+1); } for (i=0; i