AUTHORS:
EXAMPLES:
Recall the example from abelian monoids.
sage: F = FreeAbelianMonoid(5,names = list("abcde"))
sage: (a,b,c,d,e) = F.gens()
sage: a*b^2*e*d
a*b^2*d*e
sage: x = b^2*e*d*a^7
sage: x
a^7*b^2*d*e
sage: x.list()
[7, 2, 0, 1, 1]
It is important to note that lists are mutable and the returned list is not a copy. As a result, reassignment of an element of the list changes the object.
sage: x.list()[0] = 0
sage: x
b^2*d*e
Bases: sage.structure.element.MonoidElement
Return (a reference to) the underlying list used to represent this element. If this is a monoid in an abelian monoid on generators, then this is a list of nonnegative integers of length .
EXAMPLES:
sage: F = FreeAbelianMonoid(5, 'abcde')
sage: (a, b, c, d, e) = F.gens()
sage: a.list()
[1, 0, 0, 0, 0]
Queries whether x is an object of type FreeAbelianMonoidElement.
INPUT:
OUTPUT: