diff --git a/.singularhistory b/.singularhistory index 0973726..c33144d 100644 --- a/.singularhistory +++ b/.singularhistory @@ -38,3 +38,91 @@ setring r; ring r = 0,(x(1..6)),ds; ideal i = maxideal(40); qring q = std(i); +LIB"AeCodPruebas.lib"; +ring r = 0,(x,y),ds; +ideal f = x,y2,y3+xy; +AeNormal(f,maxideal(4)); +LIB"AeCodPruebas.lib"; +def Q = MalgrRing(ideal(0),2, +ideal f = x,y2,y3+xy; +def Q = MalgrRing(ideal(0),2,ideal(x,y2)); +setring Q; +def f = imap(r,f); +setring r; +matrix jf = jacob(f); +setring Q; +def jf = imap(r,jf); +print(jf); +jf[1]; +MalgrFormVect(jf[1]); +; +print(jf); +jf[1]; +MalgrFormVect(jf[1], maxOX^5); +quit; +quit; +quit; +quit; +quit; +quit; +quit; +quit; +quit; +setring r; +f; +AeNormal(f); +AeNormal(f); +quit; +ring r; +quit; +; +AeNormal(f,maxideal(5)); +AeNormal(f); +quit; +; +quit; +; +quit; +quit; +; +quit; +quit; +LIB"AeCodPruebas.lib"; +ring r = 0,(x,y),ds; +ideal f = x,y2,x3y+xy3,y5; +AeNormal(f); +ring s = 0,(x,y,a,b),ds; +ideal i = x-a,y-b; +reduce(xy3+x3y-ab3-a3b,std(i)); +lift(i,xy3+x3y-ab3-a3b); +ring r = 0,(x,y,a,b),ds; +ideal f = x-a,y2-b2,x3y+xy3-a3b-ab3,y5-b5; +qring q = std(f); +basering; +ideal i = x-a,y-b; +std(i); +kbase(i); +kbase(std(i)); +dim(y-b); +dim(std(i)); +vdim(std(i)); +i; +i = std(i); +i; +ideal z = std(0); +reduce(i,z); +reduce(i*maxideal(1),z); +reduce(i*maxideal(4),z); +reduce(i*maxideal(10),z); +reduce(i*maxideal(5),z); +reduce(i*maxideal(6),z); +reduce(i*maxideal(5),z); +reduce(i*maxideal(1),z); +reduce(i*maxideal(2),z); +setring r; +f; +ring R = 0,(x,y,b),ds; +ideal f = y+b,x*(y2+yb+b2)+x3,y4+y3b+y2b2+yb3+b4; +kbase(std(f)); +quit +; diff --git a/AeCodPruebas.lib b/AeCodPruebas.lib index 02cd842..14a9ff1 100644 --- a/AeCodPruebas.lib +++ b/AeCodPruebas.lib @@ -617,7 +617,7 @@ proc MalgrFormVect(matrix v, list #) # is an optional ideal so that computations are made modulo this ideal. */ - + int i; int j; int k; @@ -632,9 +632,11 @@ proc MalgrFormVect(matrix v, list #) if (s > 0) { - K = std(#[1] + GF); // Work modulo an ideal, if requested. + // Work modulo an ideal, if requested. ideal determinacyIdeal = std(#[1]); + K = std(determinacyIdeal + GF); + maxibound = 1; while(size(reduce(maxOX^(maxibound),determinacyIdeal)) != 0){ // Compute power of maximal ideal contained in #. @@ -642,6 +644,10 @@ proc MalgrFormVect(matrix v, list #) maxibound++; } } + else + { + ideal determinacyIdeal = std(0); + } for (i=dimX+1; i <= size(mappingf); i++) { @@ -651,8 +657,43 @@ proc MalgrFormVect(matrix v, list #) /* Caution: We do not compute again a standard basis of K since this would be equivalent to computing the polynomial of the image when p > n and this is too computationally expensive. */ - module rv; + module rv = v; + module wv; + module W; + int D = 0; + + option(redSB); + option(redTail); + option(redThrough); + + + //"v=";v; // + + //"determinacyIdeal=";determinacyIdeal; // + + while (reduce(rv, determinacyIdeal)[1] != 0 && D <20) + { + //"rv=";rv;// + D++; + wv = system("reduce_bound", module(rv), K*freemodule(a), D); + W = wv[1]+W[1]; + /* + "D=";D;// + "wv=";wv;// + "W=";W;// + */ + for (i=1; i<= dimX; i++) + { + wv = module(subst(matrix(wv), X(i), mappingf[i])); + } + //"wv en OX=";wv;// + + rv = rv[1] - wv[1]; + //"reduccion = ";reduce(rv, determinacyIdeal)[1]; // + } + + /* if (s > 0) { option(redSB); @@ -667,6 +708,7 @@ proc MalgrFormVect(matrix v, list #) rv = reduce(v,K); // Obtain Malgrange form as a sum. This should be a polynomial only in X's and // the elements of Gens in "linear" form } + */ poly prod = 1; for(i=1; i<=size(maxOX); i++){ @@ -680,7 +722,7 @@ proc MalgrFormVect(matrix v, list #) for(i=1; i<= a; i++) { - cofv = coef(rv[1][i],prod); + cofv = coef(W[1][i],prod); //cofv;// for(j=1; j<=nGens; j++) diff --git a/example.c b/example.c index cc2c638..887620d 100644 --- a/example.c +++ b/example.c @@ -1,7 +1,22 @@ LIB"AeCodPruebas.lib"; -ring r = 0,(x,y),ds; +ring r = 0,(x,y,z),ds; -ideal f = x,xy+y6+y9; +ideal f = x,y,yz+z6+z8,z3+xz; +matrix jf = jacob(f); + +AeNormal(f,maxideal(2)); + + +/* +def Q = MalgrRing(ideal(0),2,ideal(x,y2)); +setring Q; + +def f = imap(r,f); +def jf = imap(r,jf); + +jf[1]; + +MalgrFormVect(matrix(jf[1]), maxOX^5); +*/ -AeNormal(f); quit; \ No newline at end of file