Bases: sage.categories.category_singleton.Category_singleton

The category of additive abelian semigroups, i.e. sets with an associative and abelian operation +.

EXAMPLES:

sage: CommutativeAdditiveSemigroups()
[Category of commutative additive semigroups, Category of additive magmas, Category of sets, Category of sets with partial maps, Category of objects]


TESTS:

sage: C = CommutativeAdditiveSemigroups()
sage: TestSuite(C).run()

class ElementMethods
summation(x, y)

The binary addition operator of the semigroup

INPUT:

• x, y – elements of this additive semigroup

Returns the sum of x and y

EXAMPLES:

sage: S = CommutativeAdditiveSemigroups().example()
sage: S.summation(a, b)
a + b


A parent in CommutativeAdditiveSemigroups() must either implement summation() in the parent class or _add_ in the element class. By default, the addition method on elements x._add_(y) calls S.summation(x,y), and reciprocally.

As a bonus effect, S.summation by itself models the binary function from S to S:

sage: bin = S.summation
sage: bin(a,b)
a + b


Here, S.summation is just a bound method. Whenever possible, it is recommended to enrich S.summation with extra mathematical structure. Lazy attributes can come handy for this.

The binary addition operator of the semigroup

INPUT:

• x, y – elements of this additive semigroup

Returns the sum of x and y

EXAMPLES:

sage: S = CommutativeAdditiveSemigroups().example()
sage: S.summation(a, b)
a + b


A parent in CommutativeAdditiveSemigroups() must either implement summation() in the parent class or _add_ in the element class. By default, the addition method on elements x._add_(y) calls S.summation(x,y), and reciprocally.

As a bonus effect, S.summation by itself models the binary function from S to S:

sage: bin = S.summation
sage: bin(a,b)
a + b


Here, S.summation is just a bound method. Whenever possible, it is recommended to enrich S.summation with extra mathematical structure. Lazy attributes can come handy for this.

EXAMPLES:

sage: CommutativeAdditiveSemigroups().super_categories()