An additive monoid is a unital additive semigroup, that is a set endowed with a binary operation $$+$$ which is associative and admits a zero (see Wikipedia article Monoid).

EXAMPLES:

sage: from sage.categories.additive_monoids import AdditiveMonoids
sage: C.super_categories()
sage: sorted(C.axioms())
True

>>> from sage.all import *
>>> C.super_categories()
>>> sorted(C.axioms())
True


alias of AdditiveGroups

class Homsets(category, *args)[source]#
extra_super_categories()[source]#

Implement the fact that a homset between two monoids is associative.

EXAMPLES:

sage: from sage.categories.additive_monoids import AdditiveMonoids

>>> from sage.all import *

class ParentMethods[source]#

Bases: object

sum(args)[source]#

Return the sum of the elements in args, as an element of self.

INPUT:

• args – a list (or iterable) of elements of self

EXAMPLES:

sage: S = CommutativeAdditiveMonoids().example()
sage: S.sum((a,b,a,c,a,b))
3*a + 2*b + c
sage: S.sum(())
0
sage: S.sum(()).parent() == S
True

>>> from sage.all import *