Basic functions

Functions for terms

Traits and functions for rings

LinearCombinations.has_char2Function
has_char2(::Type{R}) where R -> Bool

Return true if the ring R is known to have characteristic 2 and false otherwise.

By default, has_char2 returns false for all arguments. Changing it to true for a ring R avoids (possibly expensive) sign computations.

See also is_domain.

source
LinearCombinations.is_domainFunction
is_domain(::Type{R}) where R -> Bool

Return true if the ring R is known to be integral domain and false otherwise. An integral domain is a commutative ring without zero divisors.

By default, is_domain returns true only for subtypes of Real and Complex. If is_domain(R) == true, then sometimes more efficient algorithms can be chosen.

See also has_char2.

source
LinearCombinations.signedFunction
LinearCombinations.signed(k, x)

Return a value representing (-1)^k*x. The default definition is

signed(k, x::R) where R = has_char2(R) || iseven(k) ? x : -x

Additional methods may be needed to support more exotic coefficient types.

source