Home Online Manual
Back: algebra_lib
Forward: module_containment
FastBack: absfact_lib
FastForward: assprimeszerodim_lib
Up: algebra_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.4.2.1 algebra_containment

Procedure from library algebra.lib (see algebra_lib).

algebra_containment(p,A[,k]); p poly, A ideal, k integer.
A = A[1],...,A[m] generators of subalgebra of the basering

         - k=0 (or if k is not given) an integer:
           1  : if p is contained in the subalgebra K[A[1],...,A[m]]
           0  : if p is not contained in K[A[1],...,A[m]]
         - k=1 : a list, say l, of size 2, l[1] integer, l[2] ring, satisfying
           l[1]=1 if p is in the subalgebra K[A[1],...,A[m]] and then the ring
           l[2]: ring, contains poly check = h(y(1),...,y(m)) if p=h(A[1],...,A[m])
           l[1]=0 if p is not in the subalgebra K[A[1],...,A[m]] and then
           l[2] contains the poly check = h(x,y(1),...,y(m)) if p satisfies
           the nonlinear relation p = h(x,A[1],...,A[m]) where
           x = x(1),...,x(n) denote the variables of the basering

if k=0 and printlevel >= voice+1 (default) display the polynomial check

The proc inSubring uses a different algorithm which is sometimes faster.

The ideal of algebraic relations of the algebra generators A[1],..., A[m] is computed introducing new variables y(i) and the product order with x(i) >> y(i).
p reduces to a polynomial only in the y(i) <=> p is contained in the subring generated by the polynomials A[1],...,A[m].

LIB "algebra.lib";
int p = printlevel; printlevel = 1;
ring R = 0,(x,y,z),dp;
ideal A=x2+y2,z2,x4+y4,1,x2z-1y2z,xyz,x3y-1xy3;
poly p1=z;
poly p2=
==> // x(3)
==> 0
==> // y(1)*y(2)*y(5)^2+y(3)*y(5)^3+4*y(1)*y(2)*y(6)^2+4*y(6)^3*y(7)+2*y(2)*y\
==> 1
list L = algebra_containment(p2,A,1);
==> // 'algebra_containment' created a ring as 2nd element of the list.
==> // The ring contains the polynomial check which defines the algebraic rel\
==> // To access to the ring and see check you must give the ring a name,
==> // e.g.:
==>                def S = l[2]; setring S; check;
==> 1
def S = L[2]; setring S;
==> y(1)*y(2)*y(5)^2+y(3)*y(5)^3+4*y(1)*y(2)*y(6)^2+4*y(6)^3*y(7)+2*y(2)*y(5)\
printlevel = p;