|
7.7.13.0. testNCfac
Procedure from library ncfactor.lib (see ncfactor_lib).
- Usage:
- testNCfac(l[,p,b]); l is a list, p is an optional poly, b is 1 or 0
- Return:
- 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.
- Assume:
- basering is the first Weyl algebra, the entries of l are polynomials
- Purpose:
- Checks whether a list of factorizations contains factorizations of
the same element in the first Weyl algebra
- Theory:
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.
Example:
| 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
testNCfac(t1);
==> 1
//now a correct list with the factorized polynomial
testNCfac(t1,h);
==> 1
//now we put in an incorrect list without a polynomial
t1[3][3] = y;
testNCfac(t1);
==> 0
// take h as additional input
testNCfac(t1,h);
==> 0
// take h as additional input and output list of differences
testNCfac(t1,h,1);
==> [1]:
==> 0
==> [2]:
==> 0
==> [3]:
==> -x4y2+x3y3-4x3y+6x2y2-3x2+7xy
| See also:
facFirstShift;
facFirstWeyl;
facSubWeyl.
|