Changeset 4b56a8 in git for Singular/LIB/invar.lib


Ignore:
Timestamp:
Feb 6, 2020, 2:27:22 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
Children:
092919835ebabc072adc7c0c118f96741838874a
Parents:
48d798e6fa161513a1be9c743406d7c43a479b9d
Message:
fix: avoid warning in invar.lib
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/invar.lib

    r48d798e r4b56a8  
    1212  torusrep(list m)       representation of a torus given by the weights m[1],m[2],...
    1313  finiterep(<list>)      representation of a by a list of matrices
    14   prod(l)                gives the product of all entries of list l
    15   monsum(n,d)            sum of all monomials in x(1),x(2),...,x(n) of degree d
    1614  sympower(m,d)          computes the d-th symmetric power of a representation m
    1715  invar(m)               computes the invariant ring of the representation m.
     
    5452}
    5553example
    56 {       "> SL(3);";
    57         SL(3);
    58         "> group;";
    59         Invar::group;
    60         "> groupideal;";
    61         groupideal;
    62         "> print(SLrep);";
    63         print(SLrep);
     54{"EXAMPLE:"; echo=2;
     55  SL(3);
     56  Invar::group;
     57  groupideal;
     58  print(SLrep);
    6459}
    6560
     
    6762// prod(<list>) just gives the product of all entries of <list>.
    6863////////////////////////////////////////////////////////////////////////////////
    69 proc prod(list #)
     64static proc prod(list #)
    7065"USAGE: prod(<list>)
    7166RETURN: the product of all entries of <list>"
     
    7772// monsum(n,d) is the sum of all monomials in x(1),x(2),...,x(n) of degree d
    7873////////////////////////////////////////////////////////////////////////////////
    79 proc monsum(int n,int d)
     74static proc monsum(int n,int d)
    8075"USAGE: monsum(n,d)
    8176RETURNS: the sum of all monomials in x(1),x(2),...,x(n) of degree d"
     
    123118}
    124119example
    125 {       "> SL(2);";
    126         SL(2);
    127         "> print(SLrep);";
    128         print(SLrep);
    129         "> print(sympower(SLrep,3));";
    130         print(sympower(SLrep,3));               // doesn't work in the example
    131                                                 // environment. Bug in Singular??
    132                                                 // We'll have to cheat:
    133 //"g(1)^3,     3*g(1)^2*g(2),          3*g(1)*g(2)^2,          g(2)^3,";
    134 //"g(1)^2*g(3),3*g(1)^2*g(4)-2*g(1),   3*g(1)*g(2)*g(4)-1*g(2),g(2)^2*g(4),";
    135 //"g(1)*g(3)^2,3*g(1)*g(3)*g(4)-1*g(3),3*g(1)*g(4)^2-2*g(4),   g(2)*g(4)^2,";
    136 //"g(3)^3,     3*g(3)^2*g(4),          3*g(3)*g(4)^2,          g(4)^3";
     120{ "EXAMPLE:"; echo=2;
     121  SL(2);
     122  print(SLrep);
     123  print(sympower(SLrep,3));
    137124}
    138125
     
    151138         The base ring will be set to 'polyring' which is a global
    152139         variable representing the polynomial ring on which the group acts.
    153          The variable 'representation' will be set to the input m."
     140         The variable 'representation' will be set to the input m.
     141EXAMPLE: example invar; shows an example
     142"
    154143{
    155144      int n=nrows(m);
     
    188177     print(invring);
    189178}
     179example
     180{ "EXAMPLE:"; echo=2;
     181  SL(2);                          // Take the group SL_2
     182  matrix m=dsum(SLrep,SLrep,SLrep,SLrep);
     183                                  // 4 copies of the standard representation
     184  invar(m);                       // empirical evidence for FFT
     185  reynolds(x(1)*x(4));            // The reynolds operator is computed using
     186                                  // the Omega process.
     187}
     188
    190189
    191190////////////////////////////////////////////////////////////////////////////////
     
    294293}
    295294example
    296 {       "> torus(3);";
    297         torus(3);
    298         "> group;";
    299         Invar::group;
    300         "> groupideal;";
    301         groupideal;
     295{"EXAMPLE:"; echo=2;
     296  torus(3);
     297  Invar::group;
     298  groupideal;
    302299}
    303300
     
    312309RETURNS: torusrep(m) gives a matrix with entries in 'group'. This matrix
    313310         represents the action of the torus with weights
    314          m[1],m[2],...,m[size(m)]"
     311         m[1],m[2],...,m[size(m)]
     312EXAMPLE: example torusreynolds; shows an example
     313"
    315314{       int r=size(m[1]);
    316315        int n=size(m);
     
    329328        return(mm);
    330329}
     330example
     331{ "EXAMPLE:"; echo=2;
     332  torus(1);                  // Take the 1-dimensional torus, the multiplicative group.
     333  list weights=-2,-3,7;      // 3-dimensial action with weights -2,-3,7
     334  matrix m=torusrep(weights);// compute the matrix of the representation
     335  invar(m);                  // compute the invariant ring
     336}
    331337
    332338////////////////////////////////////////////////////////////////////////////////
     
    366372        int i=prime(n-1);
    367373        while(i<>2)
    368                 {if (n%i==0) {f=f*(z**(n/i)-1);};
     374                {if (n%i==0) {f=f*(z**(n div i)-1);};
    369375                i=prime(i-1);};
    370         if (n%2==0) {f=f*(z**(n/2)-1);};
    371         h=h/GCD(f,h);
     376        if (n%2==0) {f=f*(z**(n div 2)-1);};
     377        h=h/gcd(f,h);
    372378        return(h/leadcoef(h));
    373379}
     
    383389           groupideal   of type <ideal>
    384390           reynolds     of type <proc>
    385          The basering will be set to 'group'."
     391         The basering will be set to 'group'.
     392EXAMPLE: example finite; shows an example
     393"
    386394{       ring group=0,(g(1),g(2)),dp(2);
    387395        export group;
     
    395403                                                // 'finitereynolds'
    396404}
     405example
     406{"EXAMPLE:"; echo=2;
     407  finite(6);                              // The symmetric group S_3
     408  matrix id=unitmat(3);                   // identity matrix
     409  matrix m3[3][3]=0,1,0,0,0,1,1,0,0;      // corresponds with (1 2 3)
     410  matrix m2[3][3]=0,1,0,1,0,0,0,0,1;      // corresponds with (1 2)
     411  list a=id,m3,m3*m3,m2,m2*m3,m2*m3*m3;   // all elements of S_3
     412  matrix rep=finiterep(a);                // compute matrix of standard repr.
     413  invar(rep);                             // compute the invariant ring
     414}
     415
    397416
    398417////////////////////////////////////////////////////////////////////////////////
     
    406425RETURNS: finiterep(m) gives a matrix with coefficients in the ring 'group'
    407426         which represents the action of the finite group where the elements
    408          of the finite group act as m[1],m[2],...m[size(m)]."
     427         of the finite group act as m[1],m[2],...m[size(m)].
     428EXAMPLE: example finiterep; shows an example
     429"
    409430{       int l=size(m);
    410431        int n=nrows(m[1]);
     
    420441        return(finiterep);
    421442}
    422 
     443example
     444{"EXAMPLE:"; echo=2;
     445  finite(6);                              // The symmetric group S_3
     446  matrix id=unitmat(3);                   // identity matrix
     447  matrix m3[3][3]=0,1,0,0,0,1,1,0,0;      // corresponds with (1 2 3)
     448  matrix m2[3][3]=0,1,0,1,0,0,0,0,1;      // corresponds with (1 2)
     449  list a=id,m3,m3*m3,m2,m2*m3,m2*m3*m3;   // all elements of S_3
     450  matrix rep=finiterep(a);                // compute matrix of standard repr.
     451  invar(rep);                             // compute the invariant ring
     452}
     453
Note: See TracChangeset for help on using the changeset viewer.