Commutative additive groups#

class sage.categories.commutative_additive_groups.CommutativeAdditiveGroups(base_category)[source]#

Bases: CategoryWithAxiom_singleton, AbelianCategory

The category of abelian groups, i.e. additive abelian monoids where each element has an inverse.

EXAMPLES:

sage: C = CommutativeAdditiveGroups(); C
Category of commutative additive groups
sage: C.super_categories()
[Category of additive groups, Category of commutative additive monoids]
sage: sorted(C.axioms())
['AdditiveAssociative', 'AdditiveCommutative', 'AdditiveInverse', 'AdditiveUnital']
sage: C is CommutativeAdditiveMonoids().AdditiveInverse()
True
sage: from sage.categories.additive_groups import AdditiveGroups
sage: C is AdditiveGroups().AdditiveCommutative()
True
>>> from sage.all import *
>>> C = CommutativeAdditiveGroups(); C
Category of commutative additive groups
>>> C.super_categories()
[Category of additive groups, Category of commutative additive monoids]
>>> sorted(C.axioms())
['AdditiveAssociative', 'AdditiveCommutative', 'AdditiveInverse', 'AdditiveUnital']
>>> C is CommutativeAdditiveMonoids().AdditiveInverse()
True
>>> from sage.categories.additive_groups import AdditiveGroups
>>> C is AdditiveGroups().AdditiveCommutative()
True

Note

This category is currently empty. It’s left there for backward compatibility and because it is likely to grow in the future.

class Algebras(category, *args)[source]#

Bases: AlgebrasCategory

class CartesianProducts(category, *args)[source]#

Bases: CartesianProductsCategory

class ElementMethods[source]#

Bases: object

additive_order()[source]#

Return the additive order of this element.

EXAMPLES:

sage: G = cartesian_product([Zmod(3), Zmod(6), Zmod(5)])
sage: G((1,1,1)).additive_order()
30
sage: any((i * G((1,1,1))).is_zero() for i in range(1,30))
False
sage: 30 * G((1,1,1))
(0, 0, 0)

sage: G = cartesian_product([ZZ, ZZ])
sage: G((0,0)).additive_order()
1
sage: G((0,1)).additive_order()
+Infinity

sage: # needs sage.rings.finite_rings
sage: K = GF(9)
sage: H = cartesian_product([
....:     cartesian_product([Zmod(2), Zmod(9)]), K])
sage: z = H(((1,2), K.gen()))
sage: z.additive_order()
18
>>> from sage.all import *
>>> G = cartesian_product([Zmod(Integer(3)), Zmod(Integer(6)), Zmod(Integer(5))])
>>> G((Integer(1),Integer(1),Integer(1))).additive_order()
30
>>> any((i * G((Integer(1),Integer(1),Integer(1)))).is_zero() for i in range(Integer(1),Integer(30)))
False
>>> Integer(30) * G((Integer(1),Integer(1),Integer(1)))
(0, 0, 0)

>>> G = cartesian_product([ZZ, ZZ])
>>> G((Integer(0),Integer(0))).additive_order()
1
>>> G((Integer(0),Integer(1))).additive_order()
+Infinity

>>> # needs sage.rings.finite_rings
>>> K = GF(Integer(9))
>>> H = cartesian_product([
...     cartesian_product([Zmod(Integer(2)), Zmod(Integer(9))]), K])
>>> z = H(((Integer(1),Integer(2)), K.gen()))
>>> z.additive_order()
18