Macaulay2 » Documentation
Packages » PALPInterface :: isWellDefined(WeightSystem)
next | previous | forward | backward | up | index | toc

isWellDefined(WeightSystem) -- whether a WeightSystem is a valid combined weight system

Description

The last condition says that no variable has weight zero in every row.

A result of weightSystem always satisfies these conditions. This function is for checking one made some other way.

i1 : isWellDefined weightSystem {10, 1, 2, 3, 4}

o1 = true
i2 : isWellDefined new WeightSystem from {{10, 1, 2, 3, 4}}

o2 = true
i3 : isWellDefined new WeightSystem from {{3, 1, 1, 1, 0}}

o3 = false
i4 : isWellDefined new WeightSystem from {{4, 1, 1, 1}}

o4 = false

When debugLevel is positive, the reason for returning false is printed.

i5 : debugLevel = 1

o5 = 1
i6 : isWellDefined new WeightSystem from {{2, 1, 1}, {3, 1, 1, 1}}
-- isWellDefined WeightSystem: expected every row to have the same number of weights, got {{2, 1, 1}, {3, 1, 1, 1}}

o6 = false
i7 : debugLevel = 0

o7 = 0

See also

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.26.11+ds/M2/Macaulay2/packages/PALPInterface.m2:2277:0.