Changeset 558eb2 in git


Ignore:
Timestamp:
Dec 22, 2000, 2:46:04 PM (22 years ago)
Author:
Gert-Martin Greuel <greuel@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
803c5a17d620ffa41d14efaab791dcf17ad1f7a4
Parents:
4ac99747f8f23db40f8b7dcb05fd07c448b76b0f
Message:
* GMG: Kosmetik


git-svn-id: file:///usr/local/Singular/svn/trunk@4980 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular/LIB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/equising.lib

    r4ac997 r558eb2  
    1 version="$Id: equising.lib,v 1.4 2000-12-22 13:43:10 greuel Exp $";
     1version="$Id: equising.lib,v 1.5 2000-12-22 13:44:24 greuel Exp $";
    22category="Singularities";
    33info="
    4 LIBRARY:  equising.lib  EQUISINGULARITY STRATUM OF A FAMILY OF PLANE CURVES
     4LIBRARY:  equising.lib  Equisingularity Stratum of a Family of Plane Curves
    55AUTHOR:   Andrea Mindnich, e-mail:mindnich@mathematik.uni-kl.de
    66
  • Singular/LIB/finvar.lib

    r4ac997 r558eb2  
    1 // $Id: finvar.lib,v 1.28 2000-12-19 15:05:21 anne Exp $
    2 // author: Agnes Eileen Heydtmann, email:agnes@math.uni-sb.de
    31// last change: 98/11/05
    42///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: finvar.lib,v 1.28 2000-12-19 15:05:21 anne Exp $"
     3version="$Id: finvar.lib,v 1.29 2000-12-22 13:46:04 greuel Exp $"
    64category="Invariant theory";
    75info="
    8 LIBRARY:  finvar.lib       LIBRARY TO CALCULATE INVARIANT RINGS OF FINITE GROUPS
     6LIBRARY:  finvar.lib    Invariant Rings of Finite Groups
    97AUTHOR: Agnes E. Heydtmann, email: agnes@math.uni-sb.de
    108
     9OVERVIEW:
    1110 A library for computing polynomial invariants of finite matrix groups and
    1211 generators of related varieties. The algorithms are based on B. Sturmfels,
     
    1918 primary_invariants_random()       primary invariants, randomized alg.
    2019
    21 SUB PROCEDURES:
     20AUXILIARY PROCEDURES:
    2221 cyclotomic()                      cyclotomic polynomial
    2322 group_reynolds()                  finite group and Reynolds operator (R.o.)
     
    154153EXAMPLE: example group_reynolds; shows an example
    155154"
    156 { int ch=char(basering);               // the existance of the Reynolds operator
    157                                        // is dependent on the characteristic of
    158                                        // the base field
    159   int gen_num;                         // number of generators
     155{ int ch=char(basering);              // the existance of the Reynolds operator
     156                                      // is dependent on the characteristic of
     157                                      // the base field
     158  int gen_num;                        // number of generators
    160159 //------------------------ making sure the input is okay ---------------------
    161160  if (typeof(#[size(#)])=="int")
     
    191190                                       // operator -
    192191  matrix G(1)=#[1];                    // G(k) are elements of the group -
    193   if (ch<>0 && minpoly==0 && gen_num<>1) // finding out of which order the group
    194   { matrix I=diag(1,n);                // element is
     192  if (ch<>0 && minpoly==0 && gen_num<>1) // finding out of which order the
     193  { matrix I=diag(1,n);                  // group element is
    195194    matrix TEST=G(1);
    196195    int o1=1;
     
    258257        g++;
    259258        matrix G(g)=P(k);              // a new group element -
    260         if (ch<>0 && minpoly==0 && i<>1) // finding out of which order the group
    261         { TEST=G(g);                   // element is
     259        if (ch<>0 && minpoly==0 && i<>1) // finding out of which order the
     260        { TEST=G(g);                     //group element is
    262261          o2=1;
    263262          while (TEST<>I)
     
    284283    "";
    285284  }
    286   REY=transpose(REY);                  // when we evaluate the Reynolds operator
    287                                        // later on, we actually want 1xn
    288                                        // matrices
     285  REY=transpose(REY);                 // when we evaluate the Reynolds operator
     286                                      // later on, we actually want 1xn
     287                                      // matrices
    289288  if (ch<>0)
    290289  { if ((g%ch)==0)
     
    575574    map slead=br,ideal(0);
    576575    s=slead(M);
    577     M[1,1]=1/s[1,1]*M[1,1];            // numerator and denominator have to have
    578     M[1,2]=1/s[1,2]*M[1,2];            // a constant term of 1
     576    M[1,1]=1/s[1,1]*M[1,1];           // numerator and denominator have to have
     577    M[1,2]=1/s[1,2]*M[1,2];           // a constant term of 1
    579578    if (v)
    580579    { "";
     
    592591      }
    593592 //------ preparing everything for Brauer lifts into characteristic 0 ---------
    594       ring Q=0,x,dp;                   // we want to extend our ring as well as
    595                                        // the ring of rational numbers Q to
    596                                        // contain r-th primitive roots of unity
    597                                        // in order to factor characteristic
    598                                        // polynomials of group elements into
    599                                        // linear factors and lift eigenvalues to
    600                                        // characteristic 0 -
    601       poly minq=cyclotomic(r);         // minq now contains the size-of-group-th
    602                                        // cyclotomic polynomial of Q, it is
    603                                        // irreducible there
     593      ring Q=0,x,dp;                  // we want to extend our ring as well as
     594                                      // the ring of rational numbers Q to
     595                                      // contain r-th primitive roots of unity
     596                                      // in order to factor characteristic
     597                                      // polynomials of group elements into
     598                                      // linear factors and lift eigenvalues to
     599                                      // characteristic 0 -
     600      poly minq=cyclotomic(r);        // minq now contains the size-of-group-th
     601                                      // cyclotomic polynomial of Q, it is
     602                                      // irreducible there
    604603      ring `newring`=(0,e),x,dp;
    605604      map f=Q,ideal(e);
     
    627626                                       // to this new extension field bre
    628627      matrix xI=diag(x,n);
    629       poly p;                          // used for the characteristic polynomial
    630                                        // to factor -
    631       list L;                          // will contain the linear factors of the
    632       ideal F;                         // characteristic polynomial of the group
    633       intvec C;                        // elements and their powers
     628      poly p;                         // used for the characteristic polynomial
     629                                      // to factor -
     630      list L;                         // will contain the linear factors of the
     631      ideal F;                        // characteristic polynomial of the group
     632      intvec C;                       // elements and their powers
    634633      int i, j, k;
    635634 // -------------- finding all the terms of the Molien series -----------------
     
    645644        }
    646645        setring bre;
    647         p=det(xI-f2(G(i)));            // characteristic polynomial of G(i)
     646        p=det(xI-f2(G(i)));           // characteristic polynomial of G(i)
    648647        L=factorize(p);
    649648        F=L[1];
    650649        C=L[2];
    651650        for (j=2;j<=ncols(F);j++)
    652         { F[j]=-1*(F[j]-x);            // F[j] is now an eigenvalue of G(i),
    653                                        // it is a power of a primitive r-th root
    654                                        // of unity -
    655           k=exponent(number(F[j]),e);  // F[j]==e^k
     651        { F[j]=-1*(F[j]-x);           // F[j] is now an eigenvalue of G(i),
     652                                      // it is a power of a primitive r-th root
     653                                      // of unity -
     654          k=exponent(number(F[j]),e); // F[j]==e^k
    656655          setring `newring`;
    657           p=p*(1-x*(e^k))^C[j];        // building the denominator of the new
    658           setring bre;                 // term
     656          p=p*(1-x*(e^k))^C[j];       // building the denominator of the new
     657          setring bre;                // term
    659658        }
    660659//         -----------
     
    731730      }
    732731      map slead=`newring`,ideal(0);
    733       s=slead(M);                      // forcing the constant term of numerator
    734       M[1,1]=1/s[1,1]*M[1,1];          // and denominator to be 1
     732      s=slead(M);                     // forcing the constant term of numerator
     733      M[1,1]=1/s[1,1]*M[1,1];         // and denominator to be 1
    735734      M[1,2]=1/s[1,2]*M[1,2];
    736735      kill slead;
     
    738737      kill p;
    739738    }
    740     else                               // if the group only contains an identity
    741     { ring `newring`=0,x,dp;           // element, it is very easy to calculate
    742       matrix M[1][2]=1,(1-x)^n;        // the Molien series
    743     }
    744     export `newring`;                  // we keep the ring where we computed the
    745     export M;                          // Molien series in such that we can
    746     setring br;                        // keep it
     739    else                              // if the group only contains an identity
     740    { ring `newring`=0,x,dp;          // element, it is very easy to calculate
     741      matrix M[1][2]=1,(1-x)^n;       // the Molien series
     742    }
     743    export `newring`;                 // we keep the ring where we computed the
     744    export M;                         // Molien series in such that we can
     745    setring br;                       // keep it
    747746    if (v)
    748747    { "  We are done calculating the Molien series.";
     
    750749    }
    751750  }
    752   else                                 // i.e. char<>0 and mol_flag<>0, the user
    753   {                                    // has specified that we are dealing with
    754                                        // a ring of large characteristic which
    755                                        // can be treated like a ring of
    756                                        // characteristic 0; we'll avoid the
    757                                        // Brauer lifts
     751  else                                // i.e. char<>0 and mol_flag<>0, the user
     752  {                                   // has specified that we are dealing with
     753                                      // a ring of large characteristic which
     754                                      // can be treated like a ring of
     755                                      // characteristic 0; we'll avoid the
     756                                      // Brauer lifts
    758757 //----------------------- simulating characteristic 0 ------------------------
    759758    string chst=charstr(br);
     
    845844    map slead=`newring`,ideal(0);
    846845    s=slead(M);
    847     M[1,1]=1/s[1,1]*M[1,1];            // numerator and denominator have to have
    848     M[1,2]=1/s[1,2]*M[1,2];            // a constant term of 1
     846    M[1,1]=1/s[1,1]*M[1,1];           // numerator and denominator have to have
     847    M[1,2]=1/s[1,2]*M[1,2];           // a constant term of 1
    849848    if (v)
    850849    { "";
     
    853852    }
    854853    kill G(1..g), s, slead, p, v1, I;
    855     export `newring`;                  // we keep the ring where we computed the
    856     export M;                          // the Molien series such that we can
    857     setring br;                        // keep it
     854    export `newring`;                 // we keep the ring where we computed the
     855    export M;                         // the Molien series such that we can
     856    setring br;                       // keep it
    858857  }
    859858}
     
    11421141      "";
    11431142    }
    1144     A(1)=transpose(A(1));              // when we evaluate the Reynolds operator
    1145                                        // later on, we actually want 1xn
    1146                                        // matrices
    1147     if (interval==0)                   // canceling common terms of denominator
    1148     {                                  // and enumerator -
    1149       s=matrix(syz(ideal(A(2))));      // once gcd() is faster than syz()
    1150       A(2)[1,1]=-s[2,1];               // these three lines should be replaced
    1151       A(2)[1,2]=s[1,1];                // by the following three
     1143    A(1)=transpose(A(1));             // when we evaluate the Reynolds operator
     1144                                      // later on, we actually want 1xn
     1145                                      // matrices
     1146    if (interval==0)                  // canceling common terms of denominator
     1147    {                                 // and enumerator -
     1148      s=matrix(syz(ideal(A(2))));     // once gcd() is faster than syz()
     1149      A(2)[1,1]=-s[2,1];              // these three lines should be replaced
     1150      A(2)[1,2]=s[1,1];               // by the following three
    11521151      // p=gcd(A(2)[1,1],A(2)[1,2]);
    11531152      // A(2)[1,1]=A(2)[1,1]/p;
     
    11671166    map slead=br,ideal(0);
    11681167    s=slead(A(2));
    1169     A(2)[1,1]=1/s[1,1]*A(2)[1,1];      // numerator and denominator have to have
    1170     A(2)[1,2]=1/s[1,2]*A(2)[1,2];      // a constant term of 1
     1168    A(2)[1,1]=1/s[1,1]*A(2)[1,1];     // numerator and denominator have to have
     1169    A(2)[1,2]=1/s[1,2]*A(2)[1,2];     // a constant term of 1
    11711170    if (v)
    11721171    { "  Now we are done calculating Molien series and Reynolds operator.";
     
    13911390    map slead=`newring`,ideal(0);
    13921391    s=slead(A(2));
    1393     A(2)[1,1]=1/s[1,1]*A(2)[1,1];      // numerator and denominator have to have
    1394     A(2)[1,2]=1/s[1,2]*A(2)[1,2];      // a constant term of 1
     1392    A(2)[1,1]=1/s[1,1]*A(2)[1,1];     // numerator and denominator have to have
     1393    A(2)[1,2]=1/s[1,2]*A(2)[1,2];     // a constant term of 1
    13951394    if (v)
    13961395    { "  Now we are done calculating Molien series and Reynolds operator.";
     
    13991398    matrix M=A(2);
    14001399    kill G(1..g), s, slead, p, v1, I, A(2);
    1401     export `newring`;                  // we keep the ring where we computed the
    1402     export M;                          // the Molien series such that we can
    1403     setring br;                        // keep it
     1400    export `newring`;                 // we keep the ring where we computed the
     1401    export M;                         // the Molien series such that we can
     1402    setring br;                       // keep it
    14041403    return(A(1));
    14051404  }
     
    14611460
    14621461    if (size(#)==0)
    1463     { A(2)=M[1,1];                     // if a third parameter is not given, the
    1464                                        // intermediate result from the last run
    1465                                        // corresponds to the numerator - we need
    1466     }                                  // its smallest term
     1462    { A(2)=M[1,1];                    // if a third parameter is not given, the
     1463                                      // intermediate result from the last run
     1464                                      // corresponds to the numerator - we need
     1465    }                                 // its smallest term
    14671466    else
    14681467    { if (typeof(#[1])=="poly")
    1469       { A(2)=#[1];                     // if a third term is given we 'start'
    1470       }                                // with its smallest term
     1468      { A(2)=#[1];                    // if a third term is given we 'start'
     1469      }                               // with its smallest term
    14711470      else
    14721471      { "ERROR:   <poly> as third parameter expected";
     
    14741473      }
    14751474    }
    1476     poly A(1)=M[1,2];                  // denominator of Molien series (for now)
     1475    poly A(1)=M[1,2];                 // denominator of Molien series (for now)
    14771476    string mp=string(minpoly);
    14781477    execute("ring R=("+charstr(br)+"),("+varstr(br)+"),ds;");
    14791478    execute("minpoly=number("+mp+");");
    1480     poly A(1)=0;                       // A(1) will contain the sum of n terms -
    1481     poly min;                          // min will be our smallest term -
    1482     poly A(2)=fetch(br,A(2));          // fetching A(2) and M[1,2] into R
     1479    poly A(1)=0;                      // A(1) will contain the sum of n terms -
     1480    poly min;                         // min will be our smallest term -
     1481    poly A(2)=fetch(br,A(2));         // fetching A(2) and M[1,2] into R
    14831482    poly den=fetch(br,A(1));
    1484     for (int i=1; i<=n; i++)           // getting n terms and adding them up
     1483    for (int i=1; i<=n; i++)           / getting n terms and adding them up
    14851484    { min=lead(A(2));
    14861485      A(1)=A(1)+min;
    14871486      A(2)=A(2)-min*den;
    14881487    }
    1489     setring br;                        // moving A(1) and A(2) back in the
    1490     A(1)=fetch(R,A(1));                // actual ring for output
     1488    setring br;                       // moving A(1) and A(2) back in the
     1489    A(1)=fetch(R,A(1));               // actual ring for output
    14911490    A(2)=fetch(R,A(2));
    14921491    return(A(1..2));
     
    15101509         p(1);
    15111510}
     1511///////////////////////////////////////////////////////////////////////////////
    15121512
    15131513proc evaluate_reynolds (matrix REY, ideal I)
     
    15581558         print(evaluate_reynolds(L[1],I));
    15591559}
     1560///////////////////////////////////////////////////////////////////////////////
    15601561
    15611562proc invariant_basis (int g,list #)
     
    17861787      }
    17871788    }
    1788     B=minbase(B);                      // here are the linearly independent ones
     1789    B=minbase(B);                     // here are the linearly independent ones
    17891790    degBound=DEGB;
    17901791    return(B);
     
    18061807      }
    18071808    }
    1808     B=minbase(B+part_mon);             // here are the linearly independent ones
     1809    B=minbase(B+part_mon);            // here are the linearly independent ones
    18091810    if (upper_bound==j)
    18101811    { degBound=DEGB;
     
    18591860    }
    18601861    else
    1861     { vec[1,i]=-vec[1,i];              // make all negatives before positives
    1862     }                                  // positive
    1863   }
    1864   for (i=2;i<=n-1;i++)                 // case: 1,p,...,p after 1,n,...,n
     1862    { vec[1,i]=-vec[1,i];             // make all negatives before positives
     1863    }                                 // positive
     1864  }
     1865  for (i=2;i<=n-1;i++)                // case: 1,p,...,p after 1,n,...,n
    18651866  { if (vec[1,i]>0)
    1866     { vec[1,2]=vec[1,i]-1;             // shuffleing things around...
    1867       if (i>2)                         // same sum of absolute values of entries
     1867    { vec[1,2]=vec[1,i]-1;            // shuffleing things around...
     1868      if (i>2)                        // same sum of absolute values of entries
    18681869      { vec[1,i]=0;
    18691870      }
     
    18921893    i=(-1)*i;
    18931894  }
    1894   i=i%p^d;                             // base field has p^d elements -
    1895   number a=par(1);                     // a is the root of the minpoly - we have
    1896   number out=0;                        // to construct a linear combination of
    1897   int j=1;                             // a^k
     1895  i=i%p^d;                            // base field has p^d elements -
     1896  number a=par(1);                    // a is the root of the minpoly - we have
     1897  number out=0;                       // to construct a linear combination of
     1898  int j=1;                            // a^k
    18981899  int k;
    18991900  while (1)
     
    19861987  ring R=0,x,dp;                       // just to calculate next variable
    19871988                                       // bound -
    1988   number bound=(number(p)^(ext_deg*cd)-1)/(number(p)^ext_deg-1)+1; // this is
    1989                                        // how many linearly independent vectors
    1990                                        // of size cd exist having entries in the
    1991                                        // base field of br
     1989  number bound=(number(p)^(ext_deg*cd)-1)/(number(p)^ext_deg-1)+1;
     1990                                       // this is how many linearly independent
     1991                                       // vectors of size cd exist having
     1992                                       // entries in the base field of br
    19921993  setring br;
    19931994  intvec h;                            // Hilbert series
     
    19971998  while (k<=i+dif)
    19981999  { CI=CI+ideal(var(k)^d);             // homogeneous polynomial of the same
    1999                                        // degree as the one we're looking for is
     2000                                       //degree as the one we're looking for is
    20002001                                       // added
    20012002    // h=hilb(std(CI),1);
     
    20082009      { pnew[1,j]=int_number_map(new[1,j]); // mapping an integer into br
    20092010      }
    2010       if (unique(vec(1..counter),pnew)) // checking whether we tried pnew before
     2011      if (unique(vec(1..counter),pnew)) //checking whether we tried pnew before
    20112012      { counter++;
    20122013        matrix vec(counter)=pnew;      // keeping track of the ones we tried -
     
    24862487         print(l[1]);
    24872488}
     2489///////////////////////////////////////////////////////////////////////////////
    24882490
    24892491proc primary_charp_no_molien (matrix REY, list #)
     
    57975799         print(image_of_variety(I,F));
    57985800}
     5801///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.