CancellationAbelianMonoid

catdef.spad line 166 [edit on github]

This is an AbelianMonoid with the cancellation property, i.e. a+b = a+c => b=c . This is formalised by the partial subtraction operator, which satisfies the axioms listed below:

* : (NonNegativeInteger, %) -> %
from AbelianMonoid
* : (PositiveInteger, %) -> %
from AbelianSemiGroup
+ : (%, %) -> %
from AbelianSemiGroup
0 : () -> %
from AbelianMonoid
= : (%, %) -> Boolean
from BasicType
coerce : % -> OutputForm
from CoercibleTo(OutputForm)
latex : % -> String
from SetCategory
opposite? : (%, %) -> Boolean
from AbelianMonoid
sample : () -> %
from AbelianMonoid
subtractIfCan : (%, %) -> Union(%, "failed")

subtractIfCan(x, y) returns an element z such that z+y=x or "failed" if no such element exists.

zero? : % -> Boolean
from AbelianMonoid
~= : (%, %) -> Boolean
from BasicType

SetCategory

AbelianSemiGroup

BasicType

CoercibleTo(OutputForm)

AbelianMonoid