Changeset 7f3ad4 in git for Singular/LIB/matrix.lib
- Timestamp:
- Jan 14, 2009, 5:07:05 PM (15 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 0721816437af5ddabc83aa203a12d9b58b42a33c
- Parents:
- 95edd5641377e851d4a1d4e986853687991d0895
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/matrix.lib
r95edd5 r7f3ad4 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: matrix.lib,v 1.4 5 2008-12-08 14:31:46 motsakExp $";2 version="$Id: matrix.lib,v 1.46 2009-01-14 16:07:05 Singular Exp $"; 3 3 category="Linear Algebra"; 4 4 info=" … … 30 30 rowred(A[,any]); reduction of matrix A with elementary row-operations 31 31 colred(A[,any]); reduction of matrix A with elementary col-operations 32 linear_relations(E); find linear relations between homogeneous vectors 32 linear_relations(E); find linear relations between homogeneous vectors 33 33 rm_unitrow(A); remove unit rows and associated columns of A 34 34 rm_unitcol(A); remove unit columns and associated rows of A … … 37 37 exteriorBasis(n,k[,s]); basis of k-th exterior power of n-dim v.space 38 38 symmetricPower(A,k); k-th symmetric power of a module/matrix A 39 exteriorPower(A,k); k-th exterior power of a module/matrix A 39 exteriorPower(A,k); k-th exterior power of a module/matrix A 40 40 (parameters in square brackets [] are optional) 41 41 "; … … 910 910 "USAGE: linear_relations(M); 911 911 M: a module 912 ASSUME: All non-zero entries of M are homogeneous polynomials of the same 913 positife degree. The base field must be an exact field (not real 912 ASSUME: All non-zero entries of M are homogeneous polynomials of the same 913 positife degree. The base field must be an exact field (not real 914 914 or complex). 915 915 It is not checked whether these assumptions hold. … … 957 957 pmat(REL); 958 958 pmat(M*REL); 959 } 959 } 960 960 961 961 ////////////////////////////////////////////////////////////////////////////// … … 1078 1078 proc symmetricBasis(int n, int k, list #) 1079 1079 "USAGE: symmetricBasis(n, k[,s]); n int, k int, s string 1080 RETURN: ring, poynomial ring containing the ideal \"symBasis\", 1080 RETURN: ring, poynomial ring containing the ideal \"symBasis\", 1081 1081 being a basis of the k-th symmetric power of an n-dim vector space. 1082 NOTE: The output polynomial ring has characteristics 0 and n variables 1082 NOTE: The output polynomial ring has characteristics 0 and n variables 1083 1083 named \"S(i)\", where the base variable name S is either given by the 1084 1084 optional string argument(which must not contain brackets) or equal to … … 1099 1099 if( (find(S, "(") + find(S, ")")) > 0 ) 1100 1100 { 1101 ERROR("Wrong optional argument: must be a string without brackets"); 1101 ERROR("Wrong optional argument: must be a string without brackets"); 1102 1102 } 1103 1103 } … … 1117 1117 1118 1118 // basis of the 3-rd symmetricPower of a 4-dim vector space: 1119 def R = symmetricBasis(4, 3, "@e"); setring R; 1119 def R = symmetricBasis(4, 3, "@e"); setring R; 1120 1120 R; // container ring: 1121 1121 symBasis; // symmetric basis: … … 1126 1126 proc exteriorBasis(int n, int k, list #) 1127 1127 "USAGE: exteriorBasis(n, k[,s]); n int, k int, s string 1128 RETURN: qring, an exterior algebra containing the ideal \"extBasis\", 1128 RETURN: qring, an exterior algebra containing the ideal \"extBasis\", 1129 1129 being a basis of the k-th exterior power of an n-dim vector space. 1130 NOTE: The output polynomial ring has characteristics 0 and n variables 1130 NOTE: The output polynomial ring has characteristics 0 and n variables 1131 1131 named \"S(i)\", where the base variable name S is either given by the 1132 1132 optional string argument(which must not contain brackets) or equal to … … 1147 1147 if( (find(S, "(") + find(S, ")")) > 0 ) 1148 1148 { 1149 ERROR("Wrong optional argument: must be a string without brackets"); 1149 ERROR("Wrong optional argument: must be a string without brackets"); 1150 1150 } 1151 1151 } … … 1165 1165 { "EXAMPLE:"; echo = 2; 1166 1166 // basis of the 3-rd symmetricPower of a 4-dim vector space: 1167 def r = exteriorBasis(4, 3, "@e"); setring r; 1167 def r = exteriorBasis(4, 3, "@e"); setring r; 1168 1168 r; // container ring: 1169 1169 extBasis; // exterior basis: … … 1194 1194 rings Tn is source- and Tm is image-ring with bases 1195 1195 resp. Ink and Imk. 1196 M = max dim of Image, N - dim. of source 1196 M = max dim of Image, N - dim. of source 1197 1197 SEE ALSO: symmetricPower, exteriorPower" 1198 1198 { … … 1206 1206 1207 1207 //------------------------- compute matrix of single images ------------------ 1208 def Rm = save + Tm; setring Rm; 1208 def Rm = save + Tm; setring Rm; 1209 1209 dbprint(p-2, "Temporary Working Ring", Rm); 1210 1210 … … 1228 1228 //------------------------- compute image --------------------- 1229 1229 // apply S^k(A): Tn -> Rm to Source basis vectors Ink: 1230 map TMap = Tn, B; 1231 1232 ideal C = NF(TMap(Ink), std(0)); 1230 map TMap = Tn, B; 1231 1232 ideal C = NF(TMap(Ink), std(0)); 1233 1233 dbprint(p-1, "Image Matrix: ", C); 1234 1234 … … 1273 1273 "USAGE: symmetricPower(A, k); A module, k int 1274 1274 RETURN: module: the k-th symmetric power of A 1275 NOTE: the chosen bases and most of intermediate data will be shown if 1275 NOTE: the chosen bases and most of intermediate data will be shown if 1276 1276 printlevel is big enough 1277 1277 SEE ALSO: exteriorPower … … 1303 1303 1304 1304 //------------------------- compute and return S^k(A) in chosen bases -- 1305 setring save; 1305 setring save; 1306 1306 1307 1307 return(mapPower(p, A, k, Tn, Tm)); … … 1332 1332 "USAGE: exteriorPower(A, k); A module, k int 1333 1333 RETURN: module: the k-th exterior power of A 1334 NOTE: the chosen bases and most of intermediate data will be shown if 1334 NOTE: the chosen bases and most of intermediate data will be shown if 1335 1335 printlevel is big enough. Last rows will be invisible if zero. 1336 1336 SEE ALSO: symmetricPower … … 1366 1366 example 1367 1367 { "EXAMPLE:"; echo = 2; 1368 ring r = (0),(a, b, c, d, e, f), dp; 1368 ring r = (0),(a, b, c, d, e, f), dp; 1369 1369 r; "base ring:"; 1370 1370 1371 module B = a*gen(1) + c*gen(2) + e*gen(3), 1372 b*gen(1) + d*gen(2) + f*gen(3), 1371 module B = a*gen(1) + c*gen(2) + e*gen(3), 1372 b*gen(1) + d*gen(2) + f*gen(3), 1373 1373 e*gen(1) + f*gen(3); 1374 1374 1375 1375 print(B); 1376 print(exteriorPower(B, 2)); 1377 print(exteriorPower(B, 3)); 1376 print(exteriorPower(B, 2)); 1377 print(exteriorPower(B, 3)); 1378 1378 1379 1379 def g = SuperCommutative(); setring g; g; … … 1384 1384 print(exteriorPower(A, 2)); 1385 1385 1386 module B = a*gen(1) + c*gen(2) + e*gen(3), 1387 b*gen(1) + d*gen(2) + f*gen(3), 1386 module B = a*gen(1) + c*gen(2) + e*gen(3), 1387 b*gen(1) + d*gen(2) + f*gen(3), 1388 1388 e*gen(1) + f*gen(3); 1389 1389 print(B);
Note: See TracChangeset
for help on using the changeset viewer.