Changeset 2a5ce36 in git
- Timestamp:
- Mar 6, 2009, 6:51:27 PM (14 years ago)
- Branches:
- (u'spielwiese', '5d369c3cbad1a1bf2d5c856a48fb8a30b51cec3b')
- Children:
- dfb2c646c61802722d29569f2e01d9a2fe1af023
- Parents:
- 15ac1ca9c4ddde1e5e7ae4229db9244d9e470c6b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/nctools.lib
r15ac1c r2a5ce36 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: nctools.lib,v 1.4 0 2009-01-14 16:07:05 SingularExp $";2 version="$Id: nctools.lib,v 1.41 2009-03-06 17:51:27 levandov Exp $"; 3 3 category="Noncommutative"; 4 4 info=" … … 26 26 27 27 AUXILIARY PROCEDURES: 28 ncRelations(r); 29 isCentral(p); 28 ncRelations(r); recover the non-commutative relations of a G-algebra, 29 isCentral(p); check for the commutativity of a polynomial in the G-algebra, 30 30 isNC(); check whether basering is noncommutative, 31 UpOneMatrix(N); return NxN matrix with 1's in the whole upper triagle, 32 AltVarStart(); return first alternating variable of a super-commutative algebra, 33 AltVarEnd(); return last alternating variable of a super-commutative algebra, 34 IsSCA(); checks whether current ring is a super-commutative algebra 31 isCommutative(); check whether basering is commutative 32 isWeyl(); check whether basering is a Weyl algebra 33 UpOneMatrix(N); return NxN matrix with 1's in the whole upper triagle, 34 AltVarStart(); return first alternating variable of a super-commutative algebra, 35 AltVarEnd(); return last alternating variable of a super-commutative algebra, 36 IsSCA(); check whether current ring is a super-commutative algebra 35 37 "; 36 38 … … 1461 1463 1462 1464 ////////////////////////////////////////////////////////////////////// 1465 1466 proc isCommutative () 1467 "USAGE: isCommutative(); 1468 RETURN: int, 1 if basering is commutative, or 0 otherwise 1469 PURPOSE: check whether basering is commutative 1470 EXAMPLE: example isCommutative; shows an example 1471 " 1472 { 1473 int iscom = 1; 1474 list L = ringlist(basering); 1475 if (size(L) > 4) // basering is nc_algebra 1476 { 1477 matrix C = L[5]; 1478 matrix D = L[6]; 1479 if (size(module(D)) <> 0) { iscom = 0; } 1480 else 1481 { 1482 matrix U = UpOneMatrix(nvars(basering)); 1483 if (size(module(C-U)) <> 0) { iscom = 0; } 1484 } 1485 } 1486 return(iscom); 1487 } 1488 example 1489 { 1490 "EXAMPLE:"; echo = 2; 1491 ring r = 0,(x,y),dp; 1492 isCommutative(); 1493 def D = Weyl(); setring D; 1494 isCommutative(); 1495 setring r; 1496 def R = nc_algebra(1,0); setring R; 1497 isCommutative(); 1498 } 1499 1500 ////////////////////////////////////////////////////////////////////// 1501 1502 proc isWeyl () 1503 "USAGE: isWeyl(); 1504 RETURN: int, 1 if basering is a Weyl algebra, or 0 otherwise 1505 PURPOSE: check whether basering is a Weyl algebra 1506 EXAMPLE: example isWeyl; shows an example 1507 " 1508 { 1509 int i,j; 1510 int notW = 0; 1511 int N = nvars(basering); 1512 if (N mod 2 <> 0) { return(notW); } // odd number of generators 1513 int n = N/2; 1514 list L = ringlist(basering); 1515 if (size(L) < 6) { return(notW); } // basering is commutative 1516 matrix C = L[5]; 1517 matrix D = L[6]; 1518 matrix U = UpOneMatrix(N); 1519 if (size(ideal(C-U)) <> 0) { return(notW); } // lt(xy)<>lt(yx) 1520 ideal I = D; 1521 if (size(I) <> n) { return(notW); } // not n entries<>0 1522 I = simplify(I,4+2); 1523 int sI = size(I); 1524 if (sI > 2) { return(notW); } // more than 2 distinct entries 1525 for (i=1; i<=sI; i++) 1526 { 1527 if (I[i]<>1 && I[i]<>-1) { return (notW); } // other values apart from 1,-1 1528 } 1529 ideal Ro,Co; 1530 for (i=1; i<=N; i++) 1531 { 1532 Ro = D[1..N,i]; 1533 Co = D[i,1..N]; 1534 if (size(Ro)>1 || size(Co)>1) 1535 { 1536 return(int(0)); // var(i) doesn't commute with more than 1 other vars 1537 } 1538 } 1539 return(int(1)); // all tests passed: basering is Weyl algebra 1540 } 1541 example 1542 { 1543 "EXAMPLE:"; echo = 2; 1544 ring r = 0,(a,b,c,d),dp; 1545 isWeyl(); 1546 def D = Weyl(1); setring D; //make from r a Weyl algebra 1547 b*a; 1548 isWeyl(); 1549 ring t = 0,(Dx,x,y,Dy),dp; 1550 matrix M[4][4]; M[1,2]=-1; M[3,4]=1; 1551 def T = nc_algebra(1,M); setring T; 1552 isWeyl(); 1553 }
Note: See TracChangeset
for help on using the changeset viewer.