triset.spad line 580 [edit on github]
This package provides modest routines for polynomial system solving. The aim of many of the operations of this package is to remove certain factors in some polynomials in order to avoid unnecessary computations in algorithms involving splitting techniques by partial factorization.
bivariate?(p)
returns true
iff p
involves two and only two variables.
bivariatePolynomials(lp)
returns bps, nbps
where bps
is a list of the bivariate polynomials, and nbps
are the other ones.
certainlySubVariety?(newlp, lp)
returns true
iff for every p
in lp
the remainder of p
by newlp
using the division algorithm of Groebner techniques is zero.
crushedSet(lp)
returns lq
such that lp
and and lq
generate the same ideal and no rough basic sets reduce (in the sense of Groebner bases) the other polynomials in lq
.
interReduce(lp)
returns lq
such that lp
and lq
generate the same ideal and no polynomial in lq
is reducible by the others in the sense of Groebner bases. Since no assumptions are required the result may depend on the ordering the reductions are performed.
irreducibleFactors(lp)
returns lf
such that if lp = [p1, ..., pn]
and lf = [f1, ..., fm]
then p1*p2*...*pn=0
means f1*f2*...*fm=0
, and the
are irreducible over fi
R
and are pairwise distinct.
lazyIrreducibleFactors(lp)
returns lf
such that if lp = [p1, ..., pn]
and lf = [f1, ..., fm]
then p1*p2*...*pn=0
means f1*f2*...*fm=0
, and the
are irreducible over fi
R
and are pairwise distinct. The algorithm tries to avoid factorization into irreducible factors as far as possible and makes previously use of gcd
techniques over R
.
linear?(p)
returns true
iff p
does not lie in the base ring R
and has main degree 1
.
linearPolynomials(lp)
returns lps, nlps
where lps
is a list of the linear polynomials in lp
, and nlps
are the other ones.
possiblyNewVariety?(newlp, llp)
returns true
iff for every lp
in llp
certainlySubVariety?(newlp
, lp
) does not hold.
probablyZeroDim?(lp)
returns true
iff the number of polynomials in lp
is not smaller than the number of variables occurring in these polynomials.
quasiMonicPolynomials(lp)
returns qmps, nqmps
where qmps
is a list of the quasi-monic polynomials in lp
and nqmps
are the other ones.
removeIrreducibleRedundantFactors(lp, lq)
returns the same as irreducibleFactors(concat(lp, lq))
assuming that irreducibleFactors(lp)
returns lp
up to replacing some polynomial pj
in lp
by some polynomial qj
associated to pj
.
removeRedundantFactors(p, q)
returns the same as removeRedundantFactors([p, q])
removeRedundantFactors(lp)
returns lq
such that if lp = [p1, ..., pn]
and lq = [q1, ..., qm]
then the product p1*p2*...*pn
vanishes iff the product q1*q2*...*qm
vanishes, and the product of degrees of the
is not greater than the one of the qi
pj
, and no polynomial in lq
divides another polynomial in lq
. In particular, polynomials lying in the base ring R
are removed. Moreover, lq
is sorted w
.r
.t
infRittWu?
. Furthermore, if R
is gcd
-domain, the polynomials in lq
are pairwise without common non trivial factor.
removeRedundantFactors(lp, q)
returns the same as removeRedundantFactors(cons(q, lp))
assuming that removeRedundantFactors(lp)
returns lp
up to replacing some polynomial pj
in lp
by some some polynomial qj
associated to pj
.
removeRedundantFactors(lp, lq)
returns the same as removeRedundantFactors(concat(lp, lq))
assuming that removeRedundantFactors(lp)
returns lp
up to replacing some polynomial pj
in lp
by some polynomial qj
associated to pj
.
removeRedundantFactors(lp, lq, remOp)
returns the same as concat(remOp(removeRoughlyRedundantFactorsInPols(lp, lq)), lq)
assuming that remOp(lq)
returns lq
up to similarity.
removeRedundantFactorsInContents(lp, lf)
returns newlp
where newlp
is obtained from lp
by removing in the content of every polynomial of lp
any non trivial factor of any polynomial f
in lf
. Moreover, squares over R
are first removed in the content of every polynomial of lp
.
removeRedundantFactorsInPols(lp, lf)
returns newlp
where newlp
is obtained from lp
by removing in every polynomial p
of lp
any non trivial factor of any polynomial f
in lf
. Moreover, squares over R
are first removed in every polynomial lp
.
removeRoughlyRedundantFactorsInContents(lp, lf)
returns newlp
where newlp
is obtained from lp
by removing in the content of every polynomial of lp
any occurrence of a polynomial f
in lf
. Moreover, squares over R
are first removed in the content of every polynomial of lp
.
removeRoughlyRedundantFactorsInPol(p, lf)
returns the same as removeRoughlyRedundantFactorsInPols([p
], lf
, true
)
removeRoughlyRedundantFactorsInPols(lp, lf)
returns newlp
where newlp
is obtained from lp
by removing in every polynomial p
of lp
any occurrence of a polynomial f
in lf
. This may involve a lot of exact-quotients computations.
removeRoughlyRedundantFactorsInPols(lp, lf, opt)
returns the same as removeRoughlyRedundantFactorsInPols(lp, lf)
if opt
is false
and if the previous operation does not return any non null and constant polynomial, else return [1]
.
removeSquaresIfCan(lp)
returns removeDuplicates [squareFreePart(p)$P for p in lp]
if R
is gcd
-domain else returns lp
.
rewriteIdealWithQuasiMonicGenerators(lp, redOp?, redOp)
returns lq
where lq
and lp
generate the same ideal in R^(-1) P
and lq
has rank not higher than the one of lp
. Moreover, lq
is computed by reducing lp
w
.r
.t
. some basic set of the ideal generated by the quasi-monic polynomials in lp
.
rewriteSetByReducingWithParticularGenerators(lp, pred?, redOp?, redOp)
returns lq
where lq
is computed by the following algorithm. Chose a basic set w
.r
.t
. the reduction-test redOp?
among the polynomials satisfying property pred?
, if it is empty then leave, else reduce the other polynomials by this basic set w
.r
.t
. the reduction-operation redOp
. Repeat while another basic set with smaller rank can be computed. See code. If pred?
is quasiMonic?
the ideal is unchanged.
roughBasicSet(lp)
returns the smallest (with Ritt-Wu ordering) triangular set contained in lp
.
selectAndPolynomials(lpred?, ps)
returns gps, bps
where gps
is a list of the polynomial p
in ps
such that pred?(p)
holds for every pred?
in lpred?
and bps
are the other ones.
selectOrPolynomials(lpred?, ps)
returns gps, bps
where gps
is a list of the polynomial p
in ps
such that pred?(p)
holds for some pred?
in lpred?
and bps
are the other ones.
selectPolynomials(pred?, ps)
returns gps, bps
where gps
is a list of the polynomial p
in ps
such that pred?(p)
holds and bps
are the other ones.
squareFreeFactors(p)
returns the square-free factors of p
over R
univariate?(p)
returns true
iff p
involves one and only one variable.
univariatePolynomials(lp)
returns ups, nups
where ups
is a list of the univariate polynomials, and nups
are the other ones.
univariatePolynomialsGcds(lp)
returns lg
where lg
is a list of the gcds of every pair in lp
of univariate polynomials in the same main variable.
univariatePolynomialsGcds(lp, opt)
returns the same as univariatePolynomialsGcds(lp)
if opt
is false
and if the previous operation does not return any non null and constant polynomial, else return [1]
.
unprotectedRemoveRedundantFactors(p, q)
returns the same as removeRedundantFactors(p, q)
but does assume that neither p
nor q
lie in the base ring R
and assumes that infRittWu?(p, q)
holds. Moreover, if R
is gcd
-domain, then p
and q
are assumed to be square free.