5.2.1 monoids.free_abelian_monoid - Free abelian monoids

AUTHOR: David Kohel, 09-2005.

SAGE supports free abelian monoids on any prescribed finite number $ n\geq 0$ of generators. Use the FreeAbelianMonoid function to create a free abelian monoid, and the gen and gens functions to obtain the corresponding generators. You can print the generators as arbitrary strings using the optional names argument to the FreeAbelianMonoid function.

The module monoids.free_abelian_monoid defines the following methods:

FreeAbelianMonoid( n, [names=None])

Create the free abelian monoid in $ n$ generators.

INPUT:
    n -- integer
    names -- (optional) names of generators

OUTPUT:
    free abelian monoid

sage: FreeAbelianMonoid(0)
Free abelian monoid on 0 generators ()
sage: F = FreeAbelianMonoid(5,names = list("abcde"))
sage: F
Free abelian monoid on 5 generators (a, b, c, d, e)
sage: F(1)
1
sage: (a, b, c, d, e) = F.gens()
sage: mul([ a, b, a, c, b, d, c, d ])
a^2*b^2*c^2*d^2
sage: a**2 * b**3 * a**2 * b**4
a^4*b^7

is_FreeAbelianMonoid( x)

Return True if $ x$ is a free abelian monoid.

sage: is_FreeAbelianMonoid(5)
False
sage: is_FreeAbelianMonoid(FreeAbelianMonoid(7))
True
sage: is_FreeAbelianMonoid(FreeMonoid(7))
False
sage: is_FreeAbelianMonoid(FreeMonoid(0))
False

The module monoids.free_abelian_monoid defines the following classes:

class FreeAbelianMonoid_class
Free abelian monoid on $ n$ generators.



Subsections
See About this document... for information on suggesting changes.