Changeset 7475b3f in git
 Timestamp:
 Dec 31, 2000, 3:02:05 AM (22 years ago)
 Branches:
 (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
 Children:
 2e49a51582e5688782ab3d662b5dad70f3938d81
 Parents:
 bb7da752a854cf4b094e8dde30a8a98f0c5bb32f
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/primdec.lib
rbb7da7 r7475b3f 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: primdec.lib,v 1.8 1 20001222 14:24:36greuel Exp $";2 version="$Id: primdec.lib,v 1.82 20001231 02:02:05 greuel Exp $"; 3 3 category="Commutative Algebra"; 4 4 info=" … … 1253 1253 if(size(@pa)==0) 1254 1254 { 1255 return(lcm P(h));1255 return(lcm(h)); 1256 1256 } 1257 1257 def bsr= basering; … … 1259 1259 execute("ring @r=0,("+@pa+","+varstr(bsr)+"),(C,dp);"); 1260 1260 execute ("ideal @i="+@id+";"); 1261 poly @p=lcm P(@i);1261 poly @p=lcm(@i); 1262 1262 string @ps=string(@p); 1263 1263 setring bsr; … … 1275 1275 pr; 1276 1276 } 1277 1278 1277 /////////////////////////////////////////////////////////////////////////////// 1279 1278 1280 proc lcmP(ideal i)1281 "USAGE: lcm(i); i list of polynomials1282 RETURN: poly = lcm(i[1],...,i[size(i)])1283 NOTE:1284 EXAMPLE: example lcm; shows an example1285 "1286 {1287 int k,j;1288 poly p,q;1289 i=simplify(i,10);1290 for(j=1;j<=size(i);j++)1291 {1292 if(deg(i[j])>0)1293 {1294 p=i[j];1295 break;1296 }1297 }1298 if(deg(p)==1)1299 {1300 return(1);1301 }1302 for (k=j+1;k<=size(i);k++)1303 {1304 if(deg(i[k])!=0)1305 {1306 q=GCD(p,i[k]);1307 if(deg(q)==0)1308 {1309 p=p*i[k];1310 }1311 else1312 {1313 p=p/q;1314 p=p*i[k];1315 }1316 }1317 }1318 return(p);1319 }1320 example1321 { "EXAMPLE:"; echo = 2;1322 ring r = 0,(x,y,z),lp;1323 poly p = (x+y)*(y+z);1324 poly q = (z4+2)*(y+z);1325 ideal l=p,q;1326 poly pr= lcmP(l);1327 pr;1328 l=1,1,p,1,1,q,1;1329 pr=lcmP(l);1330 pr;1331 }1332 1333 ///////////////////////////////////////////////////////////////////////////////1334 1279 proc clearSB (ideal i,list #) 1335 1280 "USAGE: clearSB(i); i ideal which is SB ordered by monomial ordering
Note: See TracChangeset
for help on using the changeset viewer.