Module: sage.groups.abelian_gps.abelian_group_element
Author Log:
Recall an example from abelian groups.
sage: F = AbelianGroup(5,[4,5,5,7,8],names = list("abcde")) sage: (a,b,c,d,e) = F.gens() sage: x = a*b^2*e*d^20*e^12 sage: x a*b^2*d^6*e^5 sage: x = a^10*b^12*c^13*d^20*e^12 sage: x a^2*b^2*c^3*d^6*e^4 sage: y = a^13*b^19*c^23*d^27*e^72 sage: y a*b^4*c^3*d^6 sage: x*y a^3*b*c*d^5*e^4 sage: x.list() [2, 2, 3, 6, 4]
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] = 3 sage: x.list() [3, 2, 3, 6, 4] sage: x a^3*b^2*c^3*d^6*e^4
Module-level Functions
x) |
Class: AbelianGroupElement
self, F, x) |
Create the element x of the AbelianGroup F.
sage: F = AbelianGroup(5, [3,4,5,8,7], 'abcde') sage: a, b, c, d, e = F.gens() sage: a^2 * b^3 * a^2 * b^-4 a*b^3 sage: b^-11 b^3 sage: a^-11 a^2 sage: a*b in F True
Functions: as_permutation,
list,
order,
word_problem
self) |
Return the element of the permutation group G (isomorphic to the abelian group A) associated to a in A.
sage: G = AbelianGroup(3,[2,3,4],names="abc"); G Multiplicative Abelian Group isomorphic to C2 x C3 x C4 sage: a,b,c=G.gens() sage: Gp = G.permutation_group(); Gp Permutation Group with generators [(1,13)(2,14)(3,15)(4,16)(5,17)(6,18)(7,19)(8,20)(9,21)(10,22)(11,23)(12,24 ), (1,5,9)(2,6,10)(3,7,11)(4,8,12)(13,17,21)(14,18,22)(15,19,23)(16,20,24), (1,3,2,4)(5,7,6,8)(9,11,10,12)(13,15,14,16)(17,19,18,20)(21,23,22,24)] sage: a.as_permutation() (1,13)(2,14)(3,15)(4,16)(5,17)(6,18)(7,19)(8,20)(9,21)(10,22)(11,23)(12,24) sage: ap = a.as_permutation(); ap (1,13)(2,14)(3,15)(4,16)(5,17)(6,18)(7,19)(8,20)(9,21)(10,22)(11,23)(12,24) sage: ap in Gp True
self) |
Return (a reference to) the underlying list used to represent
this element. If this is a word in an abelian group on
generators, then this is a list of nonnegative integers of
length
.
sage: F = AbelianGroup(5, [3,4,5,8,7], 'abcde') sage: (a, b, c, d, e) = F.gens() sage: a.list() [1, 0, 0, 0, 0]
self) |
Returns the (finite) order of this element or Infinity if this element does not have finite order.
sage: F = AbelianGroup(3,[7,8,9]); F Multiplicative Abelian Group isomorphic to C7 x C8 x C9 sage: F.gens()[2].order() 9 sage: a,b,c = F.gens() sage: (b*c).order() 72
self, words, [display=True]) |
G and H are abelian groups, g in G, H is a subgroup of G generated by a list (words) of elements of G. If self is in H, return the expression for self as a word in the elements of (words).
This function does not solve the word problem in SAGE. Rather it pushes it over to GAP, which has optimized algorithms for the word problem. Essentially, this function is a wrapper for the GAP functions "EpimorphismFromFreeGroup" and "PreImagesRepresentative".
sage: A=AbelianGroup(5,[3, 5, 5, 7, 8], names="abcde") sage: a,b,c,d,e=A.gens() sage: b1 = a^3*b*c*d^2*e^5 sage: b2 = a^2*b*c^2*d^3*e^3 sage: b3 = a^7*b^3*c^5*d^4*e^4 sage: b4 = a^3*b^2*c^2*d^3*e^5 sage: b5 = a^2*b^4*c^2*d^4*e^5 sage: e.word_problem([b1,b2,b3,b4,b5],display=False) [[b^2*c^2*d^3*e^5, 245]] sage: (b^2*c^2*d^3*e^5)^245 e sage: G = AbelianGroup(2,[2,3], names="xy") sage: x,y = G.gens() sage: x.word_problem([x,y],display=False) [[x, 1]] sage: y.word_problem([x,y],display=False) [[y, 1]] sage: (y*x).word_problem([x,y],display=False) [[x, 1], [y, 1]]
Special Functions: __cmp__,
__pow__,
_mul_,
_repr_
self, n) |
requires that len(invs) = n
See About this document... for information on suggesting changes.