# Changeset 7036d0 in git

Ignore:
Timestamp:
Jul 3, 2015, 10:56:16 AM (8 years ago)
Branches:
Children:
105eb273abbf2ab214f10f04627af4902c750d87988b95c72fc990b11e9eec2eac106b9b5e6e422c
Parents:
Message:
```Merge pull request #716 from steenpass/nfmodstd

add: include benchmark problems in nfmodstd.lib```
Files:
20 edited

Unmodified
Removed
• ## Singular/LIB/nfmodstd.lib

 rf34cd44 I; } ////////////////////////////////////////////////////////////////////////////// /* Benchmark Problems from Boku, Decker, Fieker, Steenpass: Groebner Bases over Algebraic Number Fields. // 1 ring R = (0,a), (x,y,z), dp; minpoly = (a^2+1); poly f1 = (a+8)*x^2*y^2+5*x*y^3+(-a+3)*x^3*z +x^2*y*z; poly f2 = x^5+2*y^3*z^2+13*y^2*z^3+5*y*z^4; poly f3 = 8*x^3+(a+12)*y^3+x*z^2+3; poly f4 = (-a+7)*x^2*y^4+y^3*z^3+18*y^3*z^2; ideal I1 = f1,f2,f3,f4; // 2 ring R = (0,a), (x,y,z), dp; minpoly = (a^5+a^2+2); poly f1 = 2*x*y^4*z^2+(a-1)*x^2*y^3*z +(2*a)*x*y*z^2+7*y^3+(7*a+1); poly f2 = 2*x^2*y^4*z+(a)*x^2*y*z^2-x*y^2*z^2 +(2*a+3)*x^2*y*z-12*x+(12*a)*y; poly f3 = (2*a)*y^5*z+x^2*y^2*z-x*y^3*z +(-a)*x*y^3+y^4+2*y^2*z; poly f4 = (3*a)*x*y^4*z^3+(a+1)*x^2*y^2*z -x*y^3*z+4*y^3*z^2+(3*a)*x*y*z^3 +4*z^2-x+(a)*y; ideal I2 = f1,f2,f3,f4; // 3a ring R = (0,a), (v,w,x,y,z), dp; minpoly = (a^7-7*a+3); poly f1 = (a)*v+(a-1)*w+x+(a+2)*y+z; poly f2 = v*w+(a-1)*w*x+(a+2)*v*y+x*y+(a)*y*z; poly f3 = (a)*v*w*x+(a+5)*w*x*y+(a)*v*w*z +(a+2)*v*y*z+(a)*x*y*z; poly f4 = (a-11)*v*w*x*y+(a+5)*v*w*x*z +(a)*v*w*y*z+(a)*v*x*y*z +(a)*w*x*y*z; poly f5 = (a+3)*v*w*x*y*z+(a+23); ideal I3a = f1,f2,f3,f4,f5; // 3b ring R = (0,a), (u,v,w,x,y,z), dp; minpoly = (a^7-7*a+3); poly f1 = (a)*u+(a+2)*v+w+x+y+z; poly f2 = u*v+v*w+w*x+x*y+(a+3)*u*z+y*z; poly f3 = u*v*w+v*w*x+(a+1)*w*x*y+u*v*z+u*y*z +x*y*z; poly f4 = (a-1)*u*v*w*x+v*w*x*y+u*v*w*z +u*v*y*z+u*x*y*z+w*x*y*z; poly f5 = u*v*w*x*y+(a+1)*u*v*w*x*z+u*v*w*y*z +u*v*x*y*z+u*w*x*y*z+v*w*x*y*z; poly f6 = u*v*w*x*y*z+(-a+2); ideal I3b = f1,f2,f3,f4,f5,f6; // 4 ring R = (0,a), (w,x,y,z), dp; minpoly = (a^6+a^5+a^4+a^3+a^2+a+1); poly f1 = (a+5)*w^3*x^2*y+(a-3)*w^2*x^3*y +(a+7)*w*x^2*y^2; poly f2 = (a)*w^5+(a+3)*w*x^2*y^2 +(a^2+11)*x^2*y^2*z; poly f3 = (a+7)*w^3+12*x^3+4*w*x*y+(a)*z^3; poly f4 = 3*w^3+(a-4)*x^3+x*y^2; ideal I4 = f1,f2,f3,f4; // 5 ring R = (0,a), (w,x,y,z), dp; minpoly = (a^12-5*a^11+24*a^10-115*a^9+551*a^8 -2640*a^7+12649*a^6-2640*a^5+551*a^4 -115*a^3+24*a^2-5*a+1); poly f1 = (2*a+3)*w*x^4*y^2+(a+1)*w^2*x^3*y*z +2*w*x*y^2*z^3+(7*a-1)*x^3*z^4; poly f2 = 2*w^2*x^4*y+w^2*x*y^2*z^2 +(-a)*w*x^2*y^2*z^2 +(a+11)*w^2*x*y*z^3-12*w*z^6 +12*x*z^6; poly f3 = 2*x^5*y+w^2*x^2*y*z-w*x^3*y*z -w*x^3*z^2+(a)*x^4*z^2+2*x^2*y*z^3; poly f4 = 3*w*x^4*y^3+w^2*x^2*y*z^3 -w*x^3*y*z^3+(a+4)*x^3*y^2*z^3 +3*w*x*y^3*z^3+(4*a)*y^2*z^6-w*z^7 +x*z^7; ideal I5 = f1,f2,f3,f4; // 6 ring R = (0,a), (u,v,w,x,y,z), dp; minpoly = (a^2+5*a+1); poly f1 = u+v+w+x+y+z+(a); poly f2 = u*v+v*w+w*x+x*y+y*z+(a)*u+(a)*z; poly f3 = u*v*w+v*w*x+w*x*y+x*y*z+(a)*u*v +(a)*u*z+(a)*y*z; poly f4 = u*v*w*x+v*w*x*y+w*x*y*z+(a)*u*v*w +(a)*u*v*z+(a)*u*y*z+(a)*x*y*z; poly f5 = u*v*w*x*y+v*w*x*y*z+(a)*u*v*w*x +(a)*u*v*w*z+(a)*u*v*y*z+(a)*u*x*y*z +(a)*w*x*y*z; poly f6 = u*v*w*x*y*z+(a)*u*v*w*x*y +(a)*u*v*w*x*z+(a)*u*v*w*y*z +(a)*u*v*x*y*z+(a)*u*w*x*y*z +(a)*v*w*x*y*z; poly f7 = (a)*u*v*w*x*y*z-1; ideal I6 = f1,f2,f3,f4,f5,f6,f7; // 7 ring R = (0,a), (w,x,y,z), dp; minpoly = (a^8-16*a^7+19*a^6-a^5-5*a^4+13*a^3 -9*a^2+13*a+17); poly f1 = (-a^2-1)*x^2*y+2*w*x*z-2*w +(a^2+1)*y; poly f2 = (a^3-a-3)*w^3*y+4*w*x^2*y+4*w^2*x*z +2*x^3*z+(a)*w^2-10*x^2+4*w*y-10*x*z +(2*a^2+a); poly f3 = (a^2+a+11)*x*y*z+w*z^2-w-2*y; poly f4 = -w*y^3+4*x*y^2*z+4*w*y*z^2+2*x*z^3 +(2*a^3+a^2)*w*y+4*y^2-10*x*z-10*z^2 +(3*a^2+5); ideal I7 = f1,f2,f3,f4; // 8 ring R = (0,a), (t,u,v,w,x,y,z), dp; minpoly = (a^7+10*a^5+5*a^3+10*a+1); poly f1 = v*x+w*y-x*z-w-y; poly f2 = v*w-u*x+x*y-w*z+v+x+z; poly f3 = t*w-w^2+x^2-t; poly f4 = (-a)*v^2-u*y+y^2-v*z-z^2+u; poly f5 = t*v+v*w+(-a^2-a-5)*x*y-t*z+w*z+v+x+z +(a+1); poly f6 = t*u+u*w+(-a-11)*v*x-t*y+w*y-x*z-t-u +w+y; poly f7 = w^2*y^3-w*x*y^3+x^2*y^3+w^2*y^2*z -w*x*y^2*z+x^2*y^2*z+w^2*y*z^2 -w*x*y*z^2+x^2*y*z^2+w^2*z^3-w*x*z^3 +x^2*z^3; poly f8 = t^2*u^3+t^2*u^2*v+t^2*u*v^2+t^2*v^3 -t*u^3*x-t*u^2*v*x-t*u*v^2*x-t*v^3*x +u^3*x^2+u^2*v*x^2+u*v^2*x^2 +v^3*x^2; ideal I8 = f1,f2,f3,f4,f5,f6,f7,f8; */

• ## Singular/LIB/primdec.lib

 r257093d if((size(sact)==1)&&(m==2)) { l[2*i]=l[2*i-1]; attrib(l[2*i],"isSB",1); l[2*i]=std(l[2*i-1],sact[1]); } if((size(sact)==1)&&(m>2))
• ## Singular/LIB/standard.lib

 r257093d //------------------ classify the possible settings --------------------- string algorithm;       //possibilities: std, slimgb, stdorslimgb string algorithm;       //possibilities: std, slimgb, stdorslimgb, mathicgb string conversion;      //possibilities: hilb, fglm, hilborfglm, no string partovar;        //possibilities: yes, no //define algorithm: if( (was_minpoly == 0) && (npars_P == 0) && (was_qring == 0) && (attrib (P,"global") == 1) && (char(P) > 0) && (size(BRlist)<=4) ) { if( defined(Singmathic) ) { algorithm = "mathicgb"; // make it default for any appropriate setting... if mathicgb is available... } else { if( p_opt && find(method,"mathicgb")  ) { "Sorry Singmathic::mathicgb is not available!"; } } } if( find(method,"std") && !find(method,"slimgb") ) { (order=="simple" && (method==",par2var" && npars_P==0 )) || (conversion=="no" && partovar=="no" && (algorithm=="std" || algorithm=="slimgb" || (find(method,"std") && find(method,"slimgb")) ) ) ) (algorithm=="std" || algorithm=="slimgb" || algorithm=="mathicgb" || (find(method,"std") && find(method,"slimgb")) ) ) ) { direct = "yes"; //BRlist (=ringlist of basering) > 4 if the basering is non-commutative //---------------------------- direct methods ----------------------------- if ( algorithm=="mathicgb" ) { if (p_opt) { algorithm + " in " + string(P); } return( mathicgb(i) ); } if ( direct == "yes" ) {
• ## Singular/maps_ip.cc

 r257093d if (P!=0) { //        WerrorS("Sorry 'napPermNumber' was lost in the refactoring process (due to Frank): needs to be fixed"); //        return TRUE; #if 1 // poly n_PermNumber(const number z, const int *par_perm, const int OldPar, const ring src, const ring dst); res->data= (void *) n_PermNumber((number)data, par_perm, P, preimage_r, currRing); #endif res->rtyp=POLY_CMD; if (nCoeff_is_Extension(currRing->cf)) if (nCoeff_is_algExt(currRing->cf)) res->data=(void *)p_MinPolyNormalize((poly)res->data, currRing); pTest((poly) res->data); { assume( nMap != NULL ); number a = nMap((number)data, preimage_r->cf, currRing->cf); if (nCoeff_is_Extension(currRing->cf)) { n_Normalize(a, currRing->cf); // ??? n_Normalize(a, currRing->cf); /* number a = (number)res->data; } } else if ( (what==IMAP_CMD) || /*(*/ (what==FETCH_CMD) /*)*/) /* && (nMap!=nCopy)*/ else if ((what==IMAP_CMD) || (what==FETCH_CMD)) { for (i=R*C-1;i>=0;i--) } } else /* if(what==MAP_CMD) */ { else /* (what==MAP_CMD) */ { assume(what==MAP_CMD); matrix s=mpNew(N,maMaxDeg_Ma((ideal)data,preimage_r)); for (i=R*C-1;i>=0;i--) idDelete((ideal *)&s); } if (nCoeff_is_Extension(currRing->cf)) if (nCoeff_is_algExt(currRing->cf)) { for (i=R*C-1;i>=0;i--) n_Delete(&d, currRing); d = NULL; } else if (!p_IsConstant((poly)NUM((fraction)d), R)) else if (!p_IsConstant((poly)NUM((fraction)d), R)) { WarnS("ignoring denominators of coefficients...");
• ## Tst/Manual/Groebner_basis_conversion.res.gz.uu

 r257093d begin 640 Groebner_basis_conversion.res.gz M'XL("!]^N4X``T=R;V5B;F5R7V)AU4``T=R;V5B;F5R7V)AEF6W M*'KH+#Q+SHM#4O.1TL???O[PJQ`"'L4O']Z)-[6OXWVY>7,OL/6Y/)1U\$-XO
• ## Tst/Manual/Groebner_basis_conversion.stat

 r257093d 1 >> tst_memory_0 :: 1320779239:3133- exportiert :3-1-3:x86_64-Linux:wawa:496552 1 >> tst_memory_1 :: 1320779239:3133- exportiert :3-1-3:x86_64-Linux:wawa:3031040 1 >> tst_memory_2 :: 1320779239:3133- exportiert :3-1-3:x86_64-Linux:wawa:3573104 1 >> tst_timer_1 :: 1320779239:3133- exportiert :3-1-3:x86_64-Linux:wawa:8 1 >> tst_memory_0 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:538712 1 >> tst_memory_1 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:4329472 1 >> tst_memory_2 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:4347232 1 >> tst_timer_1 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:1657
• ## Tst/Manual/groebner_and_std.res.gz.uu

 r257093d begin 640 groebner_and_std.res.gz M'XL("/E]N4X``V=R;V5B;F5R7V%N9%]S=&0NU4``V=R;V5B;F5R7V%N9%]S=&0N*9Y^;7=,FZ
• ## Tst/Manual/groebner_and_std.stat

 r257093d 1 >> tst_memory_0 :: 1320779200:3133- exportiert :3-1-3:x86_64-Linux:wawa:524264 1 >> tst_memory_1 :: 1320779200:3133- exportiert :3-1-3:x86_64-Linux:wawa:1429504 1 >> tst_memory_2 :: 1320779200:3133- exportiert :3-1-3:x86_64-Linux:wawa:1462272 1 >> tst_timer_1 :: 1320779200:3133- exportiert :3-1-3:x86_64-Linux:wawa:14 1 >> tst_memory_0 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:821112 1 >> tst_memory_1 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:2236416 1 >> tst_memory_2 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:2249896 1 >> t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?B2E7XM>R>MR=G'AQ M./=#?1PYO!&PZOX6GR&1Z@:F9>L,#9JRC5Q*7_>_4;9Y7[9?!Z!\$Z(0RH7)&4!Q\$F`^2!)HRHG%_ M<:O<#M.B:2,,B0PGB[;4T/X;VG]#V^9VOMG`J\$[%>BFN%FB/4@+-E\$PLI4-%+36;\$72UYLOZ,38VQY\$ZTZ"]2[TUVBVO'8`X+\8!%L*1O- M(+4^?+*W/:ZW\2%1Q: M#E-CNY#[F?H-3'R`PTEI`D9VB>!3% M0Y]BH&DWM+G@!DQ7>%S2:\$@V:MX&T@8EN&`I1CF-\$6P#,&>:9QK97VKD`>BP M@0["I*%0)H1GKM?H)?"J1`XEZ5"B`J!4\$C+V3,W0"=W,THP9Z9AAQXQLS,A' M#)6T`-V,(>@B4PSNU%%,-5/#-&5JF69,Y(W!VY[A7:66XVR\WGN'IN;0X!%]OH`:)E1)6-';RS(@`C^B+T M(NXBZ"+B(MPBUB+0(LHBQ!KC3.KF'I@J-Q.,S1/=P0[TR)<@W'2(!H/_67P1 M=^*Q@;3KR^7ZGC>_'FY\$[Q :OMJ\N<7.KPX?(2^8AO#VN\6??X;5&\<8```` ` end
• ## Tst/Short/cyc5_lp.stat

 r257093d 1 >> tst_memory_0 :: 1231858763:3100-2009010717:3-1-0:ix86-Linux:nepomuck:347188 1292524760:3120- 13145 :3-1-2:ix86-Linux:mamawutz:358008 1 >> tst_memory_1 :: 1231858763:3100-2009010717:3-1-0:ix86-Linux:nepomuck:1426212 1292524760:3120- 13145 :3-1-2:ix86-Linux:mamawutz:1342768 1 >> tst_memory_2 :: 1231858763:3100-2009010717:3-1-0:ix86-Linux:nepomuck:1909540 1292524760:3120- 13145 :3-1-2:ix86-Linux:mamawutz:1938572 1 >> tst_timer_1 :: 1231858763:3100-2009010717:3-1-0:ix86-Linux:nepomuck:91 1292524760:3120- 13145 :3-1-2:ix86-Linux:mamawutz:36 1 >> tst_memory_0 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:457928 1 >> tst_memory_1 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:4329472 1 >> tst_memory_2 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:4347232 1 >> tst_timer_1 :: 1434126079:4020, 64 bit:4.0.2:x86_64-Linux:dilbert:1830
• ## Tst/Short/ok_s.lst

 r257093d bug_tr707 bug_tr709 bug_tr723 bug_tr724 bug_genus_etc conv_bi
• ## libpolys/coeffs/numbers.cc

 r257093d number ndCopyMap(number a, const coeffs aRing, const coeffs r) { assume( getCoeffType(r) == getCoeffType(aRing) ); // aRing and r need not be the same, but must be the same representation assume(aRing->rep==r->rep); if ( nCoeff_has_simple_Alloc(r) && nCoeff_has_simple_Alloc(aRing) ) return a;
• ## libpolys/coeffs/rintegers.cc

 r257093d { /* dst = currRing */ if (nCoeff_is_Ring_Z(src) || nCoeff_is_Ring_ModN(src) || nCoeff_is_Ring_PtoM(src)) /* dst = nrn */ if ((src->rep==n_rep_gmp) && (nCoeff_is_Ring_Z(src) || nCoeff_is_Ring_ModN(src) || nCoeff_is_Ring_PtoM(src))) { return ndCopyMap; //nrzCopyMap; } if ((src->rep==n_rep_gap_gmp) /*&& nCoeff_is_Ring_Z(src)*/) { return ndCopyMap; //nrzCopyMap;
• ## libpolys/polys/ext_fields/transext.cc

 r257093d { p_Test(den, ntRing); if(p_IsConstant(den, ntRing) && (n_IsOne(pGetCoeff(den), ntCoeffs))) { return FALSE; } if( !n_GreaterZero(pGetCoeff(den), ntCoeffs) ) { return FALSE; } // test that den is over integers!? } else } else {  // num != NULL // den == NULL //    if( COM(t) != 0 ) //    { if (IS0(a)) return NULL; fraction f = (fraction)a; poly g = p_Copy(NUM(f), ntRing); poly h = NULL; if (!DENIS1(f)) h = p_Copy(DEN(f), ntRing); fraction result = (fraction)omAllocBin(fractionObjectBin); NUM(result) = g; DEN(result) = h; poly g = NUM(f); poly h = NULL; h =DEN(f); fraction result = (fraction)omAlloc0Bin(fractionObjectBin); NUM(result) = p_Copy(g,cf->extRing); DEN(result) = p_Copy(h,cf->extRing); COM(result) = COM(f); ntTest((number)result); if( !n_GreaterZero(g, ntCoeffs) ) { NUM (f) = p_Neg(NUM (f), ntRing); // Ugly :((( NUM (f) = p_Neg(NUM (f), ntRing); g = n_InpNeg(g, ntCoeffs); } if( !n_IsOne(g, ntCoeffs) ) { DEN (f) = p_NSet(g, ntRing); // update COM(f)??? DEN (f) = p_NSet(g, ntRing); COM (f) ++; assume( DEN (f) != NULL ); if (IS0(a)) return; if (DENIS1(f) || NUMIS1(f)) { COM(f) = 0; return; } if (!simpleTestsHaveAlreadyBeenPerformed) { if (DENIS1(f) || NUMIS1(f)) { COM(f) = 0; return; } /* check whether NUM(f) = DEN(f), and - if so - replace 'a' by 1 */ p_Delete(&DEN(f), ntRing); DEN(f) = NULL; COM(f) = 0; ntTest(a); // !!!! ntTest(a); return; } //PrintS(" den=");p_wrp(DEN(a),ntRing);PrintLn(); definiteGcdCancellation(a, cf, FALSE); fraction f=(fraction)a; if ((DEN(f)!=NULL) &&(!n_GreaterZero(pGetCoeff(DEN(f)),ntCoeffs))) { NUM(f)=p_Neg(NUM(f),ntRing); DEN(f)=p_Neg(DEN(f),ntRing); a=(number)f; if ((DEN((fraction)a)!=NULL) &&(!n_GreaterZero(pGetCoeff(DEN((fraction)a)),ntCoeffs))) { NUM((fraction)a)=p_Neg(NUM((fraction)a),ntRing); DEN((fraction)a)=p_Neg(DEN((fraction)a),ntRing); } } fraction f = (fraction)a; poly g = prMapR(NUM(f), nMap, rSrc, rDst); /* g may contain summands with coeff 0 */ poly hh=g; poly prev=NULL; while(hh!=NULL) { if (n_IsZero(pGetCoeff(hh),rDst->cf)) { if (prev==NULL) { g=p_LmFreeAndNext(g,rDst); hh=g; } else { prev->next=p_LmFreeAndNext(prev->next,rDst); hh=prev->next; } } else { prev=hh; pIter(hh); } } if (g==NULL) return NULL; poly h = NULL; if (!DENIS1(f)) { h = prMapR(DEN(f), nMap, rSrc, rDst); /* h may contain summands with coeff 0 */ hh=h; prev=NULL; while(hh!=NULL) { if (n_IsZero(pGetCoeff(hh),rDst->cf)) { if (prev==NULL) { h=p_LmFreeAndNext(h,rDst); hh=h; } else { prev->next=p_LmFreeAndNext(prev->next,rDst); hh=prev->next; } } else { prev=hh; pIter(hh); } } if (h==NULL) WerrorS("mapping to */0"); } fraction result = (fraction)omAllocBin(fractionObjectBin);
• ## libpolys/polys/monomials/p_polys.cc

 r257093d #ifndef SING_NDEBUG #if MYTEST Print("p_Setm_General: ro_isTemp ord: pos: %d, p: ", pos);  p_DebugPrint(p, r, r, 1); Print("p_Setm_General: ro_isTemp ord: pos: %d, p: ", pos);  p_wrp(p, r); #endif #endif #if MYTEST //          if( p->exp[o->data.isTemp.start] > 0 ) PrintS("after Values: "); p_DebugPrint(p, r, r, 1); PrintS("after Values: "); p_wrp(p, r); #endif #endif #ifndef SING_NDEBUG #if MYTEST Print("p_Setm_General: ro_is ord: pos: %d, p: ", pos);  p_DebugPrint(p, r, r, 1); Print("p_Setm_General: ro_is ord: pos: %d, p: ", pos);  p_wrp(p, r); #endif #endif #ifndef SING_NDEBUG #if MYTEST Print("p_Setm_General: ro_is : in rSetm: pos: %d, c: %d >  limit: %d\n", c, pos, limit); // p_DebugPrint(p, r, r, 1); Print("p_Setm_General: ro_is : in rSetm: pos: %d, c: %d >  limit: %d\n", c, pos, limit); PrintS("preComputed Values: "); p_DebugPrint(p, r, r, 1); p_wrp(p, r); #endif #endif #if MYTEST Print("Respective F[c - %d: %d] pp: ", limit, c); p_DebugPrint(pp, r, r, 1); p_wrp(pp, r); #endif #endif // TODO: how to check this for computed values??? #if MYTEST PrintS("Computed Values: "); p_DebugPrint(p, r, r, 1); PrintS("Computed Values: "); p_wrp(p, r); #endif #endif #if MYTEST Print("ELSE p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit, vo, p->exp[vo]); p_DebugPrint(p, r, r, 1); p_wrp(p, r); #endif #endif if( !DENIS1((fraction)z) ) { if (p_IsConstant(DEN((fraction)z),srcExtRing)) { number n=pGetCoeff(DEN((fraction)z)); zz=p_Div_nn(zz,n,srcExtRing); p_Normalize(zz,srcExtRing); } else if (!p_IsConstant(DEN((fraction)z),srcExtRing)) WarnS("Not defined: Cannot map a rational fraction and make a polynomial out of it! Ignoring the denumerator."); } qq = p_PermPoly(zz, par_perm-1, srcExtRing, dst, nMap, NULL, rVar (srcExtRing)-1); if(nCoeff_is_transExt(srcCf) && (!DENIS1((fraction)z)) && p_IsConstant(DEN((fraction)z),srcExtRing)) { number n=nMap(pGetCoeff(DEN((fraction)z)),srcExtRing->cf, dstCf); qq=p_Div_nn(qq,n,dst); n_Delete(&n,dstCf); p_Normalize(qq,dst); } p_Test (qq, dst); //       poly p_PermPoly (poly p, int * perm, const ring oldRing, const ring dst, nMapFunc nMap, int *par_perm, int OldPar) //  assume( FALSE );  WarnS("longalg missing 2"); return qq; PrintS("\np_PermPoly::p: "); p_Write(p, oldRing, oldRing); PrintLn(); #endif const int OldpVariables = rVar(oldRing); poly result = NULL; poly aq = NULL; /* the map coefficient */ poly qq; /* the mapped monomial */ assume(dst != NULL); assume(dst->cf != NULL); while (p != NULL) { qq = p_Init(dst); assume( nMap != NULL ); number n = nMap(p_GetCoeff(p, oldRing), oldRing->cf, dst->cf); n_Test (n,dst->cf); if ( nCoeff_is_algExt(dst->cf) ) n_Normalize(n, dst->cf); p_GetCoeff(qq, dst) = n;// Note: n can be a ZERO!!! // coef may be zero: //      p_Test(qq, dst); } else { qq = p_One(dst); //      aq = naPermNumber(p_GetCoeff(p, oldRing), par_perm, OldPar, oldRing); // no dst??? //      poly    n_PermNumber(const number z, const int *par_perm, const int P, const ring src, const ring dst) aq = n_PermNumber(p_GetCoeff(p, oldRing), par_perm, OldPar, oldRing, dst); p_Test(aq, dst); if ( nCoeff_is_algExt(dst->cf) ) p_Normalize(aq,dst); if (aq == NULL) p_SetCoeff(qq, n_Init(0, dst->cf),dst); // Very dirty trick!!! p_Test(aq, dst); } if (rRing_has_Comp(dst)) p_SetComp(qq, p_GetComp(p, oldRing), dst); if ( n_IsZero(pGetCoeff(qq), dst->cf) ) { assume( dst->cf->extRing == NULL ); number ee = n_Param(1, dst); number eee; n_Power(ee, e, &eee, dst->cf); //nfDelete(ee,dst); ee = n_Mult(c, eee, dst->cf); //nfDelete(c,dst);nfDelete(eee,dst); const int par = -perm[i]; assume( par > 0 ); //              WarnS("longalg missing 3"); #if 1 const coeffs C = dst->cf; assume( C != NULL ); const ring R = C->extRing; assume( R != NULL ); assume( par <= rVar(R) ); poly pcn; // = (number)c assume( !n_IsZero(c, C) ); if( nCoeff_is_algExt(C) ) pcn = (poly) c; else //            nCoeff_is_transExt(C) pcn = NUM((fraction)c); if (pNext(pcn) == NULL) // c->z p_AddExp(pcn, -perm[i], e, R); p_SetExp(mmc, -perm[i], e, R); p_Setm(mmc, R); number nnc; // convert back to a number: number nnc = mmc; else //            nCoeff_is_transExt(C) nnc = ntInit(mmc, C); p_GetCoeff(qq, dst) = n_Mult((number)c, nnc, C); n_Delete((number *)&c, C); n_Delete((number *)&nnc, C); } mapped_to_par=1; #endif if (aq!=NULL) qq=p_Mult_q(aq,qq,dst); aq = qq; while (pNext(aq) != NULL) pIter(aq); if (result_last==NULL) { } } result=p_SortAdd(result,dst); #else #endif p_Test(result,dst); #if 0 p_Test(result,dst);
• ## libpolys/polys/monomials/ring.cc

 r257093d #ifndef SING_NDEBUG /// debug-print at most nTerms (2 by default) terms from poly/vector p, /// assuming that lt(p) lives in lmRing and tail(p) lives in tailRing. void p_DebugPrint(const poly p, const ring lmRing, const ring tailRing, const int nTerms) { assume( nTerms >= 0 ); if( p != NULL ) { assume( p != NULL ); p_Write(p, lmRing, tailRing); if( (p != NULL) && (nTerms > 0) ) { assume( p != NULL ); assume( nTerms > 0 ); // debug pring leading term m_DebugPrint(p, lmRing); poly q = pNext(p); // q = tail(p) // debug pring tail (at most nTerms-1 terms from it) for(int j = nTerms - 1; (q !=NULL) && (j > 0); pIter(q), --j) m_DebugPrint(q, tailRing); if (q != NULL) PrintS("...\n"); } } else PrintS("0\n"); } #endif //    F = system("ISUpdateComponents", F, V, MIN ); //    // replace gen(i) -> gen(MIN + V[i-MIN]) for all i > MIN in all terms from F! #ifdef PDEBUG Print("F[%d]:", j); p_DebugPrint(F->m[j], r, r, 0); p_wrp(F->m[j], r); #endif Print("new F[%d]:", j); p_Test(F->m[j], r); p_DebugPrint(F->m[j], r, r, 0); #endif } } p_wrp(F->m[j], r); #endif } } /*2
• ## libpolys/polys/monomials/ring.h

 r257093d #endif #ifndef SING_NDEBUG /// debug-print at most nTerms (2 by default) terms from poly/vector p, /// assuming that lt(p) lives in lmRing and tail(p) lives in tailRing. void p_DebugPrint(const poly p, const ring lmRing, const ring tailRing, const int nTerms = 2); #endif int64 * rGetWeightVec(ring r); void rSetWeightVec(ring r, int64 *wv);
• ## libpolys/polys/polys0.cc

 r257093d const BOOLEAN bNotShortOut = (rShortOut(r) == FALSE); if (pGetCoeff(p)!=NULL) n_Normalize(pGetCoeff(p),C); if (((p_GetComp(p,r) == (short)ko) if (((p_GetComp(p,r) == ko) &&(p_LmIsConstantComp(p, r))) || ((!n_IsOne(pGetCoeff(p),C)) // Just think of other ring using the VERY SAME naRing and possible // side-effects... // but this is not a problem: i/o is not thread-safe anyway. const BOOLEAN bLMShortOut = rShortOut(lmRing); const BOOLEAN bTAILShortOut = rShortOut(tailRing); } p_Normalize(p,lmRing); if ((n_GetChar(lmRing->cf) == 0) && (nCoeff_is_transExt(lmRing->cf))) p_Normalize(p,lmRing); /* Manual/absfact.tst */ if ((p_GetComp(p, lmRing) == 0) || (!lmRing->VectorOut)) { r = pNext(pNext(p)); pNext(pNext(p)) = NULL; p_Write0(p, lmRing, tailRing); p_Write0(p, tailRing); if (r!=NULL) {
• ## libpolys/polys/simpleideals.cc

 r257093d for (int i = 0; i <= j; i++) { Print("generator %d: ",i); p_DebugPrint(id->m[i], lmRing, tailRing, debugPrint); Print("generator %d: ",i); p_wrp(id->m[i], lmRing, tailRing); } }
Note: See TracChangeset for help on using the changeset viewer.