Changeset 7f3ad4 in git for Singular/LIB/matrix.lib


Ignore:
Timestamp:
Jan 14, 2009, 5:07:05 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
0721816437af5ddabc83aa203a12d9b58b42a33c
Parents:
95edd5641377e851d4a1d4e986853687991d0895
Message:
*hannes: format


git-svn-id: file:///usr/local/Singular/svn/trunk@11306 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/matrix.lib

    r95edd5 r7f3ad4  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: matrix.lib,v 1.45 2008-12-08 14:31:46 motsak Exp $";
     2version="$Id: matrix.lib,v 1.46 2009-01-14 16:07:05 Singular Exp $";
    33category="Linear Algebra";
    44info="
     
    3030 rowred(A[,any]);       reduction of matrix A with elementary row-operations
    3131 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
    3333 rm_unitrow(A);         remove unit rows and associated columns of A
    3434 rm_unitcol(A);         remove unit columns and associated rows of A
     
    3737 exteriorBasis(n,k[,s]); basis of k-th exterior power of n-dim v.space
    3838 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
    4040          (parameters in square brackets [] are optional)
    4141";
     
    910910"USAGE:   linear_relations(M);
    911911         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 
     912ASSUME:  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
    914914         or complex).
    915915         It is not checked whether these assumptions hold.
     
    957957  pmat(REL);
    958958  pmat(M*REL);
    959 } 
     959}
    960960
    961961//////////////////////////////////////////////////////////////////////////////
     
    10781078proc symmetricBasis(int n, int k, list #)
    10791079"USAGE:    symmetricBasis(n, k[,s]); n int, k int, s string
    1080 RETURN:   ring, poynomial ring containing the ideal \"symBasis\", 
     1080RETURN:   ring, poynomial ring containing the ideal \"symBasis\",
    10811081          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 
     1082NOTE:     The output polynomial ring has characteristics 0 and n variables
    10831083          named \"S(i)\", where the base variable name S is either given by the
    10841084          optional string argument(which must not contain brackets) or equal to
     
    10991099    if( (find(S, "(") + find(S, ")")) > 0 )
    11001100    {
    1101       ERROR("Wrong optional argument: must be a string without brackets"); 
     1101      ERROR("Wrong optional argument: must be a string without brackets");
    11021102    }
    11031103  }
     
    11171117
    11181118// basis of the 3-rd symmetricPower of a 4-dim vector space:
    1119 def R = symmetricBasis(4, 3, "@e"); setring R; 
     1119def R = symmetricBasis(4, 3, "@e"); setring R;
    11201120R;  // container ring:
    11211121symBasis; // symmetric basis:
     
    11261126proc exteriorBasis(int n, int k, list #)
    11271127"USAGE:    exteriorBasis(n, k[,s]); n int, k int, s string
    1128 RETURN:   qring, an exterior algebra containing the ideal \"extBasis\", 
     1128RETURN:   qring, an exterior algebra containing the ideal \"extBasis\",
    11291129          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 
     1130NOTE:     The output polynomial ring has characteristics 0 and n variables
    11311131          named \"S(i)\", where the base variable name S is either given by the
    11321132          optional string argument(which must not contain brackets) or equal to
     
    11471147    if( (find(S, "(") + find(S, ")")) > 0 )
    11481148    {
    1149       ERROR("Wrong optional argument: must be a string without brackets"); 
     1149      ERROR("Wrong optional argument: must be a string without brackets");
    11501150    }
    11511151  }
     
    11651165{ "EXAMPLE:"; echo = 2;
    11661166// basis of the 3-rd symmetricPower of a 4-dim vector space:
    1167 def r = exteriorBasis(4, 3, "@e"); setring r; 
     1167def r = exteriorBasis(4, 3, "@e"); setring r;
    11681168r; // container ring:
    11691169extBasis; // exterior basis:
     
    11941194      rings Tn is source- and Tm is image-ring with bases
    11951195          resp. Ink and Imk.
    1196       M = max dim of Image, N - dim. of source     
     1196      M = max dim of Image, N - dim. of source
    11971197SEE ALSO: symmetricPower, exteriorPower"
    11981198{
     
    12061206
    12071207//------------------------- compute matrix of single images ------------------
    1208   def Rm = save + Tm;  setring Rm; 
     1208  def Rm = save + Tm;  setring Rm;
    12091209  dbprint(p-2, "Temporary Working Ring", Rm);
    12101210
     
    12281228//------------------------- compute image ---------------------
    12291229  // 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));
    12331233  dbprint(p-1, "Image Matrix: ", C);
    12341234
     
    12731273"USAGE:    symmetricPower(A, k); A module, k int
    12741274RETURN:   module: the k-th symmetric power of A
    1275 NOTE:     the chosen bases and most of intermediate data will be shown if 
     1275NOTE:     the chosen bases and most of intermediate data will be shown if
    12761276          printlevel is big enough
    12771277SEE ALSO: exteriorPower
     
    13031303
    13041304//------------------------- compute and return S^k(A) in chosen bases --
    1305   setring save; 
     1305  setring save;
    13061306
    13071307  return(mapPower(p, A, k, Tn, Tm));
     
    13321332"USAGE:    exteriorPower(A, k); A module, k int
    13331333RETURN:   module: the k-th exterior power of A
    1334 NOTE:     the chosen bases and most of intermediate data will be shown if 
     1334NOTE:     the chosen bases and most of intermediate data will be shown if
    13351335          printlevel is big enough. Last rows will be invisible if zero.
    13361336SEE ALSO: symmetricPower
     
    13661366example
    13671367{ "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;
    13691369  r; "base ring:";
    13701370
    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),
    13731373                        e*gen(1) + f*gen(3);
    13741374
    13751375  print(B);
    1376   print(exteriorPower(B, 2)); 
    1377   print(exteriorPower(B, 3)); 
     1376  print(exteriorPower(B, 2));
     1377  print(exteriorPower(B, 3));
    13781378
    13791379  def g = SuperCommutative(); setring g; g;
     
    13841384  print(exteriorPower(A, 2));
    13851385
    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),
    13881388                        e*gen(1) + f*gen(3);
    13891389  print(B);
Note: See TracChangeset for help on using the changeset viewer.