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:
- 0: %
from AbelianMonoid
- *: (NonNegativeInteger, %) -> %
from AbelianMonoid
- *: (PositiveInteger, %) -> %
from AbelianSemiGroup
- +: (%, %) -> %
from AbelianSemiGroup
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- latex: % -> String
from SetCategory
- opposite?: (%, %) -> Boolean
from AbelianMonoid
- sample: %
from AbelianMonoid
- subtractIfCan: (%, %) -> Union(%, failed)
subtractIfCan(x, y)
returns an elementz
such thatz+y=x
or “failed” if no such element exists.
- zero?: % -> Boolean
from AbelianMonoid