Changeset e53306f in git


Ignore:
Timestamp:
Sep 3, 1999, 9:58:02 AM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
Children:
6fc3def6b0c7905f30860129fd3cd160bd19e4e3
Parents:
013a76e1c23680e70350e2b1490fb5f16196a9d9
Message:
* hannes: moved algebra_containment and module_containment to algebra.lib


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/finvar.lib

    r013a76 re53306f  
    1 // $Id: finvar.lib,v 1.22 1999-08-31 12:38:56 Singular Exp $
     1// $Id: finvar.lib,v 1.23 1999-09-03 07:58:02 Singular Exp $
    22// author: Agnes Eileen Heydtmann, email:agnes@math.uni-sb.de
    33// last change: 98/11/05
    44///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: finvar.lib,v 1.22 1999-08-31 12:38:56 Singular Exp $"
     5version="$Id: finvar.lib,v 1.23 1999-09-03 07:58:02 Singular Exp $"
    66info="
    77LIBRARY:  finvar.lib       LIBRARY TO CALCULATE INVARIANT RINGS & MORE
     
    4343 secondary_and_irreducibles_no_molien() s.i. & irreducible s.i., without M.s.
    4444 secondary_not_cohen_macaulay()    s.i. when invariant ring not Cohen-Macaulay
    45  algebra_containment()             query of algebra containment
    46  module_containment()              query of module containment
    4745 orbit_variety()                   ideal of the orbit variety
    4846 relative_orbit_variety()          ideal of a relative orbit variety
     
    6664LIB "elim.lib";
    6765LIB "general.lib";
     66LIB "algebra.lib";
    6867
    6968///////////////////////////////////////////////////////////////////////////////
     
    56215620///////////////////////////////////////////////////////////////////////////////
    56225621
    5623 proc algebra_containment (poly p, ideal A)
    5624 "USAGE:   algebra_containment(p,A); p <poly>, A <ideal> giving generators, say
    5625          f1,...,fm, subalgebra of the basering
    5626 RETURN:  1 (TRUE) (type <int>) if p is contained in the subalgebra K[f1,...,fm]
    5627          0 (FALSE) (type <int>) if p is not contained
    5628 DISPLAY: a representation of p in terms of algebra generators fi=y(i) if p
    5629          is contained in the subalgebra, provided printlevel>=1
    5630          (default: printlevel=0)
    5631 THEORY:  The ideal of algebraic relations of the algebra generators f1,...,fm
    5632          given by A is computed introducing new variables y(i) and the product
    5633          order with x(i) >> y(i) where x(i) are the variable of the basering.
    5634          p reduces to a polynomial only in the y(i) <=> p is contained in the
    5635          subring generated by the polynomials f1,...,fm in A.
    5636 EXAMPLE: example algebra_containment; shows an example
    5637 "
    5638 { int DEGB = degBound;
    5639   degBound=0;
    5640   def br=basering;
    5641   int n=nvars(br);
    5642   int m=ncols(A);
    5643   string mp=string(minpoly);
    5644   execute "ring R=("+charstr(br)+"),(x(1..n),y(1..m)),(dp(n),dp(m));";
    5645   execute "minpoly=number("+mp+");";
    5646   ideal vars=x(1..n);
    5647   map emb=br,vars;
    5648   ideal A=ideal(emb(A));
    5649   poly check=emb(p);
    5650   for (int i=1;i<=m;i++)
    5651   { A[i]=A[i]-y(i);
    5652   }
    5653   A=std(A);
    5654   check=reduce(check,A);
    5655   degBound = DEGB;
    5656   if( sum(leadexp(check),1..n) == 0 )
    5657   { dbprint(printlevel-voice+2,"// "+string(check));
    5658     return(1);
    5659   }
    5660   else
    5661   { return(0);
    5662   }
    5663 }
    5664 example
    5665 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2;
    5666          ring R=0,(x,y,z),dp;
    5667          matrix A[1][7]=x2+y2,z2,x4+y4,1,x2z-1y2z,xyz,x3y-1xy3;
    5668          poly p1=x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4;
    5669          printlevel=2;
    5670          algebra_containment(p1,A);
    5671          poly p2=z;
    5672          algebra_containment(p2,A);
    5673 }
    5674 ///////////////////////////////////////////////////////////////////////////////
    5675 
    5676 proc module_containment(poly p, matrix P, matrix S)
    5677 "USAGE:  module_containment(p,P,S); p <poly>, P <ideal>, generators of an
    5678          algebra, S <ideal>, generators of a module over the algebra generated
    5679          by P
    5680 ASSUME:  ncols(P)=number of variables in the basering and the generators in P
    5681 RETURNS: 1 (TRUE) (type <int>) if p is contained in the module
    5682          0 (FALSE) type <int>) if p is not contained
    5683 DISPLAY: the representation of p in terms of algebra generators P[i]=z(i) and
    5684          module generators S[j]=y(j) if p is contained in the module
    5685 THEORY:  The ideal of algebraic relations of all the generators p1,...,pn,
    5686          s1,...,st given by P and S is computed introducing new variables y(j),
    5687          z(i) and the product order: x^a*y^b*z^c > x^d*y^e*z^f if x^a > x^d
    5688          with respect to the lp ordering or else if z^c > z^f with respect to
    5689          the dp ordering or else if y^b > y^e with respect to the lp ordering
    5690          again. p reduces to a polynomial only in the y(j) and z(i), linear in
    5691          the z(i) <=> p is contained in the module.
    5692 EXAMPLE: example module_containment; shows an example
    5693 "
    5694 { def br=basering;
    5695   int DEGB=degBound;
    5696   degBound=0;
    5697   int n=nvars(br);
    5698   if (ncols(P)==n)
    5699   { int m=ncols(S);
    5700     string mp=string(minpoly);
    5701     execute "ring R=("+charstr(br)+"),(x(1..n),y(1..m),z(1..n)),(lp(n),dp(m),lp(n));";
    5702     execute "minpoly=number("+mp+");";
    5703     ideal vars=x(1..n);
    5704     map emb=br,vars;
    5705     matrix P=emb(P);
    5706     matrix S=emb(S);
    5707     ideal check=emb(p);
    5708     ideal I;
    5709     for (int i=1;i<=m;i++)
    5710     { I[i]=S[1,i]-y(i);
    5711     }
    5712     for (i=1;i<=n;i++)
    5713     { I[m+i]=P[1,i]-z(i);
    5714     }
    5715     I=std(I);
    5716     check[1]=reduce(check[1],I);
    5717     I=elim(check,1,n);                 // checking whether all variables from
    5718     if (I[1]<>0)                       // the former ring have disappeared
    5719     { dbprint(printlevel-voice+2,"// "+string(check));
    5720       return(1);
    5721     }
    5722     else
    5723     { return(0);
    5724     }
    5725   }
    5726   else
    5727    { "ERROR: the first ideal must have nvars(basering) entries";
    5728     return();
    5729   }
    5730 }
    5731 example
    5732 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2;
    5733          ring R=0,(x,y,z),dp;
    5734          matrix P[1][3]=x2+y2,z2,x4+y4;
    5735          matrix S[1][4]=1,x2z-1y2z,xyz,x3y-1xy3;
    5736          poly p1=x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4;
    5737          printlevel=2;
    5738          module_containment(p1,P,S);
    5739          poly p2=z;
    5740          module_containment(p2,P,S);
    5741 }
    5742 ///////////////////////////////////////////////////////////////////////////////
    5743 
    57445622proc orbit_variety (matrix F,string newring)
    57455623"USAGE:   orbit_variety(F,s);
Note: See TracChangeset for help on using the changeset viewer.