# PolynomialSetCategory(R, E, VarSet, P)ΒΆ

- R: Ring
- E: OrderedAbelianMonoidSup
- VarSet: OrderedSet
- P: RecursivePolynomialCategory(R, E, VarSet)

A category for finite subsets of a polynomial ring. Such a set is only regarded as a set of polynomials and not identified to the ideal it generates. So two distinct sets may generate the same the ideal. Furthermore, for `R`

being an integral domain, a set of polynomials may be viewed as a representation of the ideal it generates in the polynomial ring `(R)^(-1) P`

, or the set of its zeros (described for instance by the radical of the previous ideal, or a split of the associated affine variety) and so on. So this category provides operations about those different notions.

- =: (%, %) -> Boolean
- from BasicType
- ~=: (%, %) -> Boolean
- from BasicType
- coerce: % -> List P
- from CoercibleTo List P
- coerce: % -> OutputForm
- from CoercibleTo OutputForm

- collect: (%, VarSet) -> %
`collect(ps, v)`

returns the set consisting of the polynomials of`ps`

with`v`

as main variable.

- collectUnder: (%, VarSet) -> %
`collectUnder(ps, v)`

returns the set consisting of the polynomials of`ps`

with main variable less than`v`

.

- collectUpper: (%, VarSet) -> %
`collectUpper(ps, v)`

returns the set consisting of the polynomials of`ps`

with main variable greater than`v`

.- construct: List P -> %
- from Collection P
- convert: % -> InputForm
- from ConvertibleTo InputForm
- copy: % -> %
- from Aggregate
- count: (P, %) -> NonNegativeInteger
- from HomogeneousAggregate P
- empty: () -> %
- from Aggregate
- empty?: % -> Boolean
- from Aggregate
- eq?: (%, %) -> Boolean
- from Aggregate
- eval: (%, Equation P) -> % if P has Evalable P
- from Evalable P
- eval: (%, List Equation P) -> % if P has Evalable P
- from Evalable P
- eval: (%, List P, List P) -> % if P has Evalable P
- from InnerEvalable(P, P)
- eval: (%, P, P) -> % if P has Evalable P
- from InnerEvalable(P, P)
- find: (P -> Boolean, %) -> Union(P, failed)
- from Collection P
- hash: % -> SingleInteger
- from SetCategory
- hashUpdate!: (HashState, %) -> HashState
- from SetCategory

- headRemainder: (P, %) -> Record(num: P, den: R) if R has IntegralDomain
`headRemainder(a, ps)`

returns`[b, r]`

such that the leading monomial of`b`

is reduced in the sense of Groebner bases`w`

.`r`

.`t`

.`ps`

and`r*a - b`

lies in the ideal generated by`ps`

.

- iexactQuo: (R, R) -> R if R has IntegralDomain
`iexactQuo(x, y)`

should be local but conditional- latex: % -> String
- from SetCategory
- less?: (%, NonNegativeInteger) -> Boolean
- from Aggregate

- mainVariable?: (VarSet, %) -> Boolean
`mainVariable?(v, ps)`

returns`true`

iff`v`

is the main variable of some polynomial in`ps`

.

- mainVariables: % -> List VarSet
`mainVariables(ps)`

returns the decreasingly sorted list of the variables which are main variables of some polynomial in`ps`

.- map: (P -> P, %) -> %
- from HomogeneousAggregate P
- member?: (P, %) -> Boolean
- from HomogeneousAggregate P
- more?: (%, NonNegativeInteger) -> Boolean
- from Aggregate

- mvar: % -> VarSet
`mvar(ps)`

returns the main variable of the non constant polynomial with the greatest main variable, if any, else an error is returned.- reduce: ((P, P) -> P, %, P, P) -> P
- from Collection P

- remainder: (P, %) -> Record(rnum: R, polnum: P, den: R) if R has IntegralDomain
`remainder(a, ps)`

returns`[c, b, r]`

such that`b`

is fully reduced in the sense of Groebner bases`w`

.`r`

.`t`

.`ps`

,`r*a - c*b`

lies in the ideal generated by`ps`

. Furthermore, if`R`

is a`gcd`

-domain,`b`

is primitive.- remove: (P, %) -> %
- from Collection P
- removeDuplicates: % -> %
- from Collection P
- retract: List P -> %
- from RetractableFrom List P
- retractIfCan: List P -> Union(%, failed)
- from RetractableFrom List P

- rewriteIdealWithHeadRemainder: (List P, %) -> List P if R has IntegralDomain
`rewriteIdealWithHeadRemainder(lp, cs)`

returns`lr`

such that the leading monomial of every polynomial in`lr`

is reduced in the sense of Groebner bases`w`

.`r`

.`t`

.`cs`

and`(lp, cs)`

and`(lr, cs)`

generate the same ideal in`(R)^(-1) P`

.

- rewriteIdealWithRemainder: (List P, %) -> List P if R has IntegralDomain
`rewriteIdealWithRemainder(lp, cs)`

returns`lr`

such that every polynomial in`lr`

is fully reduced in the sense of Groebner bases`w`

.`r`

.`t`

.`cs`

and`(lp, cs)`

and`(lr, cs)`

generate the same ideal in`(R)^(-1) P`

.

- roughBase?: % -> Boolean if R has IntegralDomain
`roughBase?(ps)`

returns`true`

iff for every pair`{p, q}`

of polynomials in`ps`

their leading monomials are relatively prime.

- roughEqualIdeals?: (%, %) -> Boolean if R has IntegralDomain
`roughEqualIdeals?(ps1, ps2)`

returns`true`

iff it can proved that`ps1`

and`ps2`

generate the same ideal in`(R)^(-1) P`

without computing Groebner bases.

- roughSubIdeal?: (%, %) -> Boolean if R has IntegralDomain
`roughSubIdeal?(ps1, ps2)`

returns`true`

iff it can proved that all polynomials in`ps1`

lie in the ideal generated by`ps2`

in`(R)^(-1) P`

without computing Groebner bases.

- roughUnitIdeal?: % -> Boolean if R has IntegralDomain
`roughUnitIdeal?(ps)`

returns`true`

iff`ps`

contains some non null element lying in the base ring`R`

.- sample: %
- from Aggregate
- size?: (%, NonNegativeInteger) -> Boolean
- from Aggregate

- sort: (%, VarSet) -> Record(under: %, floor: %, upper: %)
`sort(v, ps)`

returns`us, vs, ws`

such that`us`

is`collectUnder(ps, v)`

,`vs`

is`collect(ps, v)`

and`ws`

is`collectUpper(ps, v)`

.

- triangular?: % -> Boolean if R has IntegralDomain
`triangular?(ps)`

returns`true`

iff`ps`

is a triangular set, i.e. two distinct polynomials have distinct main variables and no constant lies in`ps`

.

- trivialIdeal?: % -> Boolean
`trivialIdeal?(ps)`

returns`true`

iff`ps`

does not contain non-zero elements.

- variables: % -> List VarSet
`variables(ps)`

returns the decreasingly sorted list of the variables which are variables of some polynomial in`ps`

.

Evalable P if P has Evalable P

InnerEvalable(P, P) if P has Evalable P