Home Online Manual
Back: facFirstWeyl
Forward: facSubWeyl
Up: ncfactor_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document testNCfac
Procedure from library ncfactor.lib (see ncfactor_lib).

testNCfac(l[,p,b]); l is a list, p is an optional poly, b is 1 or 0

Case 1: No optional argument. In this case the output is 1, if the entries in the given list represent the same polynomial or 0 otherwise.
Case 2: One optional argument p is given. In this case it returns 1, if all the entries in l are factorizations of p, otherwise 0. Case 3: Second optional b is given. In this case a list is returned containing the difference between the product of each entry in l and p.

basering is the first Weyl algebra, the entries of l are polynomials

Checks whether a list of factorizations contains factorizations of the same element in the first Weyl algebra

testNCfac multiplies out each factorization and checks whether each factorization was a factorization of the same element.
- if there is only a list given, the output will be 0, if it does not contain factorizations of the same element. Otherwise the output will be 1.
- if there is a polynomial in the second argument, then the procedure checks whether the given list contains factorizations of this polynomial. If it does, then the output depends on the third argument. If it is not given, the procedure will check whether the factorizations in the list l are associated to this polynomial and return either 1 or 0, respectively. If the third argument is given, the output will be a list with the length of the given one and in each entry is the product of one entry in l subtracted by the polynomial.

LIB "ncfactor.lib";
ring r = 0,(x,y),dp;
def R = nc_algebra(1,1);
setring R;
poly h = (x^2*y^2+1)*(x^2);
def t1 = facFirstWeyl(h);
//fist a correct list
==> 1
//now a correct list with the factorized polynomial
==> 1
//now we put in an incorrect list without a polynomial
t1[3][3] = y;
==> 0
// take h as additional input
==> 0
// take h as additional input and output list of differences
==> [1]:
==>    0
==> [2]:
==>    0
==> [3]:
==>    -x4y2+x3y3-4x3y+3x2y2-3x2+xy+1
See also: facFirstShift; facFirstWeyl; facSubWeyl.