Magmas and Additive Magmas

sage.categories.magmas_and_additive_magmas.MagmasAndAdditiveMagmas

The category of sets \((S,+,*)\) with an additive operation ‘+’ and a multiplicative operation \(*\)

EXAMPLES:

sage: from sage.categories.magmas_and_additive_magmas import MagmasAndAdditiveMagmas
sage: C = MagmasAndAdditiveMagmas(); C
Category of magmas and additive magmas

This is the base category for the categories of rings and their variants:

sage: C.Distributive()
Category of distributive magmas and additive magmas
sage: C.Distributive().Associative().AdditiveAssociative().AdditiveCommutative().AdditiveUnital().AdditiveInverse()
Category of rngs
sage: C.Distributive().Associative().AdditiveAssociative().AdditiveCommutative().AdditiveUnital().Unital()
Category of semirings
sage: C.Distributive().Associative().AdditiveAssociative().AdditiveCommutative().AdditiveUnital().AdditiveInverse().Unital()
Category of rings

This category is really meant to represent the intersection of the categories of Magmas and AdditiveMagmas; however Sage’s infrastructure does not allow yet to model this:

sage: Magmas() & AdditiveMagmas()
Join of Category of magmas and Category of additive magmas

sage: Magmas() & AdditiveMagmas()        # todo: not implemented
Category of magmas and additive magmas