Changeset c91ad1 in git
- Timestamp:
- Oct 30, 2007, 6:27:44 PM (16 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 0273dec39cc5a468a269edd6c08a5ba742e0fb14
- Parents:
- ae4b619fa9115e2df8467ef6e83ea5302280e402
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/nctools.lib
rae4b61 rc91ad1 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: nctools.lib,v 1.3 2 2007-10-30 17:17:43 SingularExp $";2 version="$Id: nctools.lib,v 1.33 2007-10-30 17:27:44 motsak Exp $"; 3 3 category="Noncommutative"; 4 4 info=" … … 116 116 matrix D[4][4]; 117 117 D[1,4]=(q-1/q)*b*c; 118 def S=ncalgebra(C,D); 119 setring S;S; 118 def S = ncalgebra(C,D); setring S; S; 120 119 Gweights(S); 121 120 def D=fetch(r,D); … … 157 156 execute (newringstring); 158 157 def lnewring=imap(r,lr); 159 def S=ncalgebra(lnewring[1],lnewring[2]); 160 return(S); 158 return( ncalgebra(lnewring[1],lnewring[2]) ); 161 159 } 162 160 else … … 174 172 matrix D[4][4]; 175 173 D[1,4]=(q-1/q)*b*c; 176 def S=ncalgebra(C,D);setring S; 177 S; 174 def S = ncalgebra(C,D); setring S; S; 178 175 def t=weightedRing(S); 179 176 setring t; t; … … 380 377 matrix D[3][3]=0,1,2y,0,0,-2x+y+1; 381 378 print(D); 382 def S=ncalgebra(C,D);setring S; 383 S; 379 def S=ncalgebra(C,D);setring S; S; 384 380 def l=ncRelations(S); 385 381 print (l[1]); … … 441 437 } 442 438 } 443 def S=ncalgebra(C,D); 444 ideal fdQuot = I; 439 def save = basering; 440 def S = ncalgebra(C,D); setring S; 441 ideal fdQuot = fetch(save,D); 445 442 export fdQuot; 446 443 } … … 493 490 D[1,3]=2*x; 494 491 D[2,3]=-2*y; 495 ncalgebra(1,D); // this is U(sl_2) 492 def S = ncalgebra(1,D); setring S; 493 S; // this is U(sl_2) 496 494 poly c = 4*x*y+z^2-2*z; 497 495 printlevel = 0; … … 530 528 C[1,3] = q; 531 529 print(C); 532 ncalgebra(C,0);533 r;530 def S = ncalgebra(C,0); serring S; 531 S; 534 532 } 535 533 … … 596 594 matrix D[3][3]; 597 595 D[1,2]=x; D[1,3]=z; 598 ncalgebra(C,D);599 r;596 def S = ncalgebra(C,D); setring S; 597 S; 600 598 ideal j=ndcond(); // the silent version 601 599 j; … … 675 673 proc makeHeisenberg(int N, list #) 676 674 "USAGE: makeHeisenberg(n, [p,d]); int n (setting 2n+1 variables), optional int p (field characteristic), optional int d (power of h in the commutator) 677 RETURN: nothing675 RETURN: ring 678 676 PURPOSE: create an n-th Heisenberg algebra in the variables x(1),y(1),...,x(n),y(n),h 679 677 SEE ALSO: makeWeyl … … 706 704 D[i,N+i]=h^@deg; 707 705 } 708 ncalgebra(1,D); 709 return(@@r); 706 return(ncalgebra(1,D)); 710 707 } 711 708 example … … 803 800 if( fprot == 1) 804 801 { 805 print("Warning: b==emeans that the resulting ring will be commutative!");802 print("Warning: (b==e) means that the resulting ring will be commutative!"); 806 803 } 807 804 Q = std(Q + (var(b)^2)); … … 818 815 */ 819 816 820 matrix @E = UpOneMatrix(N); 817 if (char(basering)==2) // commutative ring!!! 818 { 819 if( fprot == 1) 820 { 821 print("Warning: (char == 2) means that the resulting ring will be commutative!"); 822 } 823 824 int j = ncols(Q) + 1; 825 826 for ( int i=e; i>=b; i--, j++ ) 827 { 828 Q[j] = var(i)^2; 829 } 830 831 Q = std(Q); 832 qring @EA = Q; // and it will be internally commutative as well!!! 833 return(@EA); 834 } 835 821 836 822 837 int i, j; 823 824 for ( i = b; i < e; i++ ) 825 { 826 for ( j = i+1; j <= e; j++ ) 827 { 828 @E[i, j] = -1; 829 } 830 } 831 832 ncalgebra(@E, 0); // define ground G-algebra! 838 839 if( (b == 1) && (e == N) ) // just an exterior algebra? 840 { 841 def S = ncalgebra(-1, 0); // define ground G-algebra! 842 setring S; 843 } else 844 { 845 matrix @E = UpOneMatrix(N); 846 847 for ( i = b; i < e; i++ ) 848 { 849 for ( j = i+1; j <= e; j++ ) 850 { 851 @E[i, j] = -1; 852 } 853 } 854 def S = ncalgebra(@E, 0); // define ground G-algebra! 855 setring S; 856 } 833 857 834 858 ideal @Q = fetch(saveRing, Q); … … 1109 1133 ///////////////////////////////////////////////////////////////////// 1110 1134 ring R = 0,(x(1..4)),dp; 1111 ncalgebra(1, 0); // still commutative!1135 def S = ncalgebra(1, 0); setring S; S; // still commutative! 1112 1136 if(IsSCA()) 1113 1137 { "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; } … … 1133 1157 } 1134 1158 1135 ncalgebra(E,0); 1159 def S = ncalgebra(E,0); setring S; S; 1160 1136 1161 if(IsSCA()) 1137 1162 { "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; } … … 1177 1202 matrix @E = UpOneMatrix(N); 1178 1203 @E = -1*(@E); 1179 def @@RR=ncalgebra(@E,0); 1180 setring @@RR; 1204 def @@RR = ncalgebra(@E,0); setring @@RR; 1181 1205 int i; 1182 1206 ideal Q; … … 1329 1353 { "EXAMPLE:"; echo = 2; 1330 1354 ring r = 0,(x,d),dp; 1331 ncalgebra(1,1); // the first Weyl algebra1355 def S = ncalgebra(1,1); setring S; // the first Weyl algebra 1332 1356 ideal I = x,d; 1333 1357 module LS = syz(I); … … 1361 1385 LIB "ncalg.lib"; 1362 1386 ring r = 0,(x,d),dp; 1363 ncalgebra(1,1); // Weyl algebra1387 def S = ncalgebra(1,1); setring S; // Weyl algebra 1364 1388 ideal I = x; I = std(I); 1365 1389 poly p = x*d+1;
Note: See TracChangeset
for help on using the changeset viewer.