Changeset e53306f in git
- Timestamp:
- Sep 3, 1999, 9:58:02 AM (24 years ago)
- Branches:
- (u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
- Children:
- 6fc3def6b0c7905f30860129fd3cd160bd19e4e3
- Parents:
- 013a76e1c23680e70350e2b1490fb5f16196a9d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/finvar.lib
r013a76 re53306f 1 // $Id: finvar.lib,v 1.2 2 1999-08-31 12:38:56Singular Exp $1 // $Id: finvar.lib,v 1.23 1999-09-03 07:58:02 Singular Exp $ 2 2 // author: Agnes Eileen Heydtmann, email:agnes@math.uni-sb.de 3 3 // last change: 98/11/05 4 4 /////////////////////////////////////////////////////////////////////////////// 5 version="$Id: finvar.lib,v 1.2 2 1999-08-31 12:38:56Singular Exp $"5 version="$Id: finvar.lib,v 1.23 1999-09-03 07:58:02 Singular Exp $" 6 6 info=" 7 7 LIBRARY: finvar.lib LIBRARY TO CALCULATE INVARIANT RINGS & MORE … … 43 43 secondary_and_irreducibles_no_molien() s.i. & irreducible s.i., without M.s. 44 44 secondary_not_cohen_macaulay() s.i. when invariant ring not Cohen-Macaulay 45 algebra_containment() query of algebra containment46 module_containment() query of module containment47 45 orbit_variety() ideal of the orbit variety 48 46 relative_orbit_variety() ideal of a relative orbit variety … … 66 64 LIB "elim.lib"; 67 65 LIB "general.lib"; 66 LIB "algebra.lib"; 68 67 69 68 /////////////////////////////////////////////////////////////////////////////// … … 5621 5620 /////////////////////////////////////////////////////////////////////////////// 5622 5621 5623 proc algebra_containment (poly p, ideal A)5624 "USAGE: algebra_containment(p,A); p <poly>, A <ideal> giving generators, say5625 f1,...,fm, subalgebra of the basering5626 RETURN: 1 (TRUE) (type <int>) if p is contained in the subalgebra K[f1,...,fm]5627 0 (FALSE) (type <int>) if p is not contained5628 DISPLAY: a representation of p in terms of algebra generators fi=y(i) if p5629 is contained in the subalgebra, provided printlevel>=15630 (default: printlevel=0)5631 THEORY: The ideal of algebraic relations of the algebra generators f1,...,fm5632 given by A is computed introducing new variables y(i) and the product5633 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 the5635 subring generated by the polynomials f1,...,fm in A.5636 EXAMPLE: example algebra_containment; shows an example5637 "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 else5661 { return(0);5662 }5663 }5664 example5665 { "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 an5678 algebra, S <ideal>, generators of a module over the algebra generated5679 by P5680 ASSUME: ncols(P)=number of variables in the basering and the generators in P5681 RETURNS: 1 (TRUE) (type <int>) if p is contained in the module5682 0 (FALSE) type <int>) if p is not contained5683 DISPLAY: the representation of p in terms of algebra generators P[i]=z(i) and5684 module generators S[j]=y(j) if p is contained in the module5685 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^d5688 with respect to the lp ordering or else if z^c > z^f with respect to5689 the dp ordering or else if y^b > y^e with respect to the lp ordering5690 again. p reduces to a polynomial only in the y(j) and z(i), linear in5691 the z(i) <=> p is contained in the module.5692 EXAMPLE: example module_containment; shows an example5693 "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 from5718 if (I[1]<>0) // the former ring have disappeared5719 { dbprint(printlevel-voice+2,"// "+string(check));5720 return(1);5721 }5722 else5723 { return(0);5724 }5725 }5726 else5727 { "ERROR: the first ideal must have nvars(basering) entries";5728 return();5729 }5730 }5731 example5732 { "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 5744 5622 proc orbit_variety (matrix F,string newring) 5745 5623 "USAGE: orbit_variety(F,s);
Note: See TracChangeset
for help on using the changeset viewer.