PolynomialSetUtilitiesPackage(R, E, V, P)ΒΆ
triset.spad line 580 [edit on github]
V: OrderedSet
P: RecursivePolynomialCategory(R, E, V)
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 -> Boolean
bivariate?(p)
returnstrue
iffp
involves two and only two variables.
- bivariatePolynomials: List P -> Record(goodPols: List P, badPols: List P)
bivariatePolynomials(lp)
returnsbps, nbps
wherebps
is a list of the bivariate polynomials, andnbps
are the other ones.
- certainlySubVariety?: (List P, List P) -> Boolean
certainlySubVariety?(newlp, lp)
returnstrue
iff for everyp
inlp
the remainder ofp
bynewlp
using the division algorithm of Groebner techniques is zero.
- crushedSet: List P -> List P
crushedSet(lp)
returnslq
such thatlp
and andlq
generate the same ideal and no rough basic sets reduce (in the sense of Groebner bases) the other polynomials inlq
.
- interReduce: List P -> List P
interReduce(lp)
returnslq
such thatlp
andlq
generate the same ideal and no polynomial inlq
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: List P -> List P if R has PolynomialFactorizationExplicit and R has CharacteristicZero
irreducibleFactors(lp)
returnslf
such that iflp = [p1, ..., pn]
andlf = [f1, ..., fm]
thenp1*p2*...*pn=0
meansf1*f2*...*fm=0
, and thefi
are irreducible overR
and are pairwise distinct.
- lazyIrreducibleFactors: List P -> List P if R has PolynomialFactorizationExplicit and R has CharacteristicZero
lazyIrreducibleFactors(lp)
returnslf
such that iflp = [p1, ..., pn]
andlf = [f1, ..., fm]
thenp1*p2*...*pn=0
meansf1*f2*...*fm=0
, and thefi
are irreducible overR
and are pairwise distinct. The algorithm tries to avoid factorization into irreducible factors as far as possible and makes previously use ofgcd
techniques overR
.
- linear?: P -> Boolean
linear?(p)
returnstrue
iffp
does not lie in the base ringR
and has main degree1
.
- linearPolynomials: List P -> Record(goodPols: List P, badPols: List P)
linearPolynomials(lp)
returnslps, nlps
wherelps
is a list of the linear polynomials inlp
, andnlps
are the other ones.
- possiblyNewVariety?: (List P, List List P) -> Boolean
possiblyNewVariety?(newlp, llp)
returnstrue
iff for everylp
inllp
certainlySubVariety?(newlp
,lp
) does not hold.
- probablyZeroDim?: List P -> Boolean
probablyZeroDim?(lp)
returnstrue
iff the number of polynomials inlp
is not smaller than the number of variables occurring in these polynomials.
- quasiMonicPolynomials: List P -> Record(goodPols: List P, badPols: List P)
quasiMonicPolynomials(lp)
returnsqmps, nqmps
whereqmps
is a list of the quasi-monic polynomials inlp
andnqmps
are the other ones.
- removeIrreducibleRedundantFactors: (List P, List P) -> List P if R has PolynomialFactorizationExplicit and R has CharacteristicZero
removeIrreducibleRedundantFactors(lp, lq)
returns the same asirreducibleFactors(concat(lp, lq))
assuming thatirreducibleFactors(lp)
returnslp
up to replacing some polynomialpj
inlp
by some polynomialqj
associated topj
.
- removeRedundantFactors: (List P, List P) -> List P
removeRedundantFactors(lp, lq)
returns the same asremoveRedundantFactors(concat(lp, lq))
assuming thatremoveRedundantFactors(lp)
returnslp
up to replacing some polynomialpj
inlp
by some polynomialqj
associated topj
.
- removeRedundantFactors: (List P, List P, List P -> List P) -> List P
removeRedundantFactors(lp, lq, remOp)
returns the same asconcat(remOp(removeRoughlyRedundantFactorsInPols(lp, lq)), lq)
assuming thatremOp(lq)
returnslq
up to similarity.
- removeRedundantFactors: (List P, P) -> List P
removeRedundantFactors(lp, q)
returns the same asremoveRedundantFactors(cons(q, lp))
assuming thatremoveRedundantFactors(lp)
returnslp
up to replacing some polynomialpj
inlp
by some some polynomialqj
associated topj
.
- removeRedundantFactors: (P, P) -> List P
removeRedundantFactors(p, q)
returns the same asremoveRedundantFactors([p, q])
- removeRedundantFactors: List P -> List P
removeRedundantFactors(lp)
returnslq
such that iflp = [p1, ..., pn]
andlq = [q1, ..., qm]
then the productp1*p2*...*pn
vanishes iff the productq1*q2*...*qm
vanishes, and the product of degrees of theqi
is not greater than the one of thepj
, and no polynomial inlq
divides another polynomial inlq
. In particular, polynomials lying in the base ringR
are removed. Moreover,lq
is sortedw
.r
.t
infRittWu?
. Furthermore, ifR
isgcd
-domain, the polynomials inlq
are pairwise without common non trivial factor.
- removeRedundantFactorsInContents: (List P, List P) -> List P if R has GcdDomain
removeRedundantFactorsInContents(lp, lf)
returnsnewlp
wherenewlp
is obtained fromlp
by removing in the content of every polynomial oflp
any non trivial factor of any polynomialf
inlf
. Moreover, squares overR
are first removed in the content of every polynomial oflp
.
- removeRedundantFactorsInPols: (List P, List P) -> List P if R has GcdDomain
removeRedundantFactorsInPols(lp, lf)
returnsnewlp
wherenewlp
is obtained fromlp
by removing in every polynomialp
oflp
any non trivial factor of any polynomialf
inlf
. Moreover, squares overR
are first removed in every polynomiallp
.
- removeRoughlyRedundantFactorsInContents: (List P, List P) -> List P if R has GcdDomain
removeRoughlyRedundantFactorsInContents(lp, lf)
returnsnewlp
wherenewlp
is obtained fromlp
by removing in the content of every polynomial oflp
any occurence of a polynomialf
inlf
. Moreover, squares overR
are first removed in the content of every polynomial oflp
.
- removeRoughlyRedundantFactorsInPol: (P, List P) -> P
removeRoughlyRedundantFactorsInPol(p, lf)
returns the same as removeRoughlyRedundantFactorsInPols([p
],lf
,true
)
- removeRoughlyRedundantFactorsInPols: (List P, List P) -> List P
removeRoughlyRedundantFactorsInPols(lp, lf)
returnsnewlp
wherenewlp
is obtained fromlp
by removing in every polynomialp
oflp
any occurrence of a polynomialf
inlf
. This may involve a lot of exact-quotients computations.
- removeRoughlyRedundantFactorsInPols: (List P, List P, Boolean) -> List P
removeRoughlyRedundantFactorsInPols(lp, lf, opt)
returns the same asremoveRoughlyRedundantFactorsInPols(lp, lf)
ifopt
isfalse
and if the previous operation does not return any non null and constant polynomial, else return[1]
.
- removeSquaresIfCan: List P -> List P
removeSquaresIfCan(lp)
returnsremoveDuplicates [squareFreePart(p)\$P for p in lp]
ifR
isgcd
-domain else returnslp
.
- rewriteIdealWithQuasiMonicGenerators: (List P, (P, P) -> Boolean, (P, P) -> P) -> List P
rewriteIdealWithQuasiMonicGenerators(lp, redOp?, redOp)
returnslq
wherelq
andlp
generate the same ideal inR^(-1) P
andlq
has rank not higher than the one oflp
. Moreover,lq
is computed by reducinglp
w
.r
.t
. some basic set of the ideal generated by the quasi-monic polynomials inlp
.
- rewriteSetByReducingWithParticularGenerators: (List P, P -> Boolean, (P, P) -> Boolean, (P, P) -> P) -> List P
rewriteSetByReducingWithParticularGenerators(lp, pred?, redOp?, redOp)
returnslq
wherelq
is computed by the following algorithm. Chose a basic setw
.r
.t
. the reduction-testredOp?
among the polynomials satisfying propertypred?
, if it is empty then leave, else reduce the other polynomials by this basic setw
.r
.t
. the reduction-operationredOp
. Repeat while another basic set with smaller rank can be computed. See code. Ifpred?
isquasiMonic?
the ideal is unchanged.
- roughBasicSet: List P -> Union(Record(bas: GeneralTriangularSet(R, E, V, P), top: List P), failed)
roughBasicSet(lp)
returns the smallest (with Ritt-Wu ordering) triangular set contained inlp
.
- selectAndPolynomials: (List(P -> Boolean), List P) -> Record(goodPols: List P, badPols: List P)
selectAndPolynomials(lpred?, ps)
returnsgps, bps
wheregps
is a list of the polynomialp
inps
such thatpred?(p)
holds for everypred?
inlpred?
andbps
are the other ones.
- selectOrPolynomials: (List(P -> Boolean), List P) -> Record(goodPols: List P, badPols: List P)
selectOrPolynomials(lpred?, ps)
returnsgps, bps
wheregps
is a list of the polynomialp
inps
such thatpred?(p)
holds for somepred?
inlpred?
andbps
are the other ones.
- selectPolynomials: (P -> Boolean, List P) -> Record(goodPols: List P, badPols: List P)
selectPolynomials(pred?, ps)
returnsgps, bps
wheregps
is a list of the polynomialp
inps
such thatpred?(p)
holds andbps
are the other ones.
- squareFreeFactors: P -> List P if R has GcdDomain
squareFreeFactors(p)
returns the square-free factors ofp
overR
- univariate?: P -> Boolean
univariate?(p)
returnstrue
iffp
involves one and only one variable.
- univariatePolynomials: List P -> Record(goodPols: List P, badPols: List P)
univariatePolynomials(lp)
returnsups, nups
whereups
is a list of the univariate polynomials, andnups
are the other ones.
- univariatePolynomialsGcds: (List P, Boolean) -> List P if R has GcdDomain
univariatePolynomialsGcds(lp, opt)
returns the same asunivariatePolynomialsGcds(lp)
ifopt
isfalse
and if the previous operation does not return any non null and constant polynomial, else return[1]
.
- univariatePolynomialsGcds: List P -> List P if R has GcdDomain
univariatePolynomialsGcds(lp)
returnslg
wherelg
is a list of the gcds of every pair inlp
of univariate polynomials in the same main variable.
- unprotectedRemoveRedundantFactors: (P, P) -> List P
unprotectedRemoveRedundantFactors(p, q)
returns the same asremoveRedundantFactors(p, q)
but does assume that neitherp
norq
lie in the base ringR
and assumes thatinfRittWu?(p, q)
holds. Moreover, ifR
isgcd
-domain, thenp
andq
are assumed to be square free.