Size: 12484
Comment:
|
Size: 3091
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Sage notebook wiki-output examples (paste below): | Trying out html2moin.py processor; this is one step in processing doc pages for a notebook help browser, as well as a step to making a wiki-version of the documentation. |
Line 5: | Line 5: |
|| ''SAGE'' Reference Manual || || '''Previous:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html] || || '''Up:''' [http://modular.math.washington.edu/sage/doc/html/ref/node144.html] || || '''Next:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html] || |
||[http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html prev]||[http://modular.math.washington.edu/sage/doc/html/ref/node144.html parent]||[http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html next]||<style="width:90%; text-align: center;">[http://modular.math.washington.edu/sage/doc/html/ref/contents.html ''SAGE'' Reference Manual]||[http://modular.math.washington.edu/sage/doc/html/ref/modindex.html module index]||[http://modular.math.washington.edu/sage/doc/html/ref/genindex.html general index]|| '''Previous:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html 14.2 Multiplicative Abelian Groups] '''Up:''' [http://modular.math.washington.edu/sage/doc/html/ref/node144.html 14. Groups] '''Next:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html 14.4 Homomorphisms of abelian] ---- |
Line 10: | Line 15: |
Line 11: | Line 18: |
[[Anchor(SECTION0016300000000000000000)]] '''Module:''' {{{sage.groups.abelian_gps.abelian_group_element}}} |
|
Line 12: | Line 21: |
'''Module:''' {{{sage.groups.abelian_gps.abelian_group_element}}} [[BR]] '''Author Log:''' [[BR]] * David Joyner (2006-02); based on free_abelian_monoid_element.py, written by David Kohel. * David Joyner (2006-05); bug fix in order * (2006-08); bug fix+new method in pow for negatives+fixed corresponding examples. |
[[Anchor(module-sage.groups.abelian-gps.abelian-group-element)]] |
Line 18: | Line 23: |
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''' || ''' `is_AbelianGroupElement` ''' (||x )|| '''Class:{{{AbelianGroupElement}}}''' '''class `AbelianGroupElement` ''' || ''' `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 sage: a^-11 a sage: a*b in F True }}} '''Functions:''' `as_permutation` , `list` , `order` , `random` , ` word_problem` || ''' `as_permutation` ''' (||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 }}} || ''' `list` ''' (||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] }}} || ''' `order` ''' (||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 }}} || ''' `random` ''' (||self )|| Return a random element of this dual group. || ''' `word_problem` ''' (||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". WANRING: Don't use E (or other GAP-reserved letters) as a generator name. {{{ 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_` || ''' `__pow__` ''' (||self, n )|| requires that len(invs) = n ---- ||[http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/node144.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html] || ''SAGE'' Reference Manual||[http://modular.math.washington.edu/sage/doc/html/ref/contents.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/modindex.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/genindex.html] || '''Previous:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html 14.2 Multiplicative Abelian Groups] '''Up:''' [http://modular.math.washington.edu/sage/doc/html/ref/node144.html 14. Groups] '''Next:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html 14.4 Homomorphisms of abelian] ---- Release 1.4, documentation updated on October 5, 2006. ## End of Navigation Panel See ''[http://modular.math.washington.edu/sage/doc/html/ref/about.html About this document...] '' for information on suggesting changes.14.3 Abelian group elements ||[http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/node144.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html] || ''SAGE'' Reference Manual||[http://modular.math.washington.edu/sage/doc/html/ref/contents.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/modindex.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/genindex.html] || '''Previous:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html 14.2 Multiplicative Abelian Groups] '''Up:''' [http://modular.math.washington.edu/sage/doc/html/ref/node144.html 14. Groups] '''Next:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html 14.4 Homomorphisms of abelian] ---- ## End of Navigation Panel = 14.3 Abelian group elements = [[Anchor(SECTION0016300000000000000000)]] '''Module:''' {{{sage.groups.abelian_gps.abelian_group_element}}} [[Anchor(module-sage.groups.abelian-gps.abelian-group-element)]] '''Author Log:''' [[BR]] * David Joyner (2006-02); based on free_abelian_monoid_element.py, written by David Kohel.[[BR]] * David Joyner (2006-05); bug fix in order[[BR]] * " (2006-08); bug fix+new method in pow for negatives+fixed corresponding examples.[[BR]] 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''' || ''' `is_AbelianGroupElement` ''' (||x )|| '''Class:{{{AbelianGroupElement}}}''' '''class `AbelianGroupElement` ''' || ''' `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 sage: a^-11 a sage: a*b in F True }}} '''Functions:''' `as_permutation` , `list` , `order` , `random` , ` word_problem` || ''' `as_permutation` ''' (||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 }}} || ''' `list` ''' (||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] }}} || ''' `order` ''' (||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 }}} || ''' `random` ''' (||self )|| Return a random element of this dual group. || ''' `word_problem` ''' (||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". WANRING: Don't use E (or other GAP-reserved letters) as a generator name. {{{ 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_` || ''' `__pow__` ''' (||self, n )|| requires that len(invs) = n ---- ||[http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/node144.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html] || ''SAGE'' Reference Manual||[http://modular.math.washington.edu/sage/doc/html/ref/contents.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/modindex.html] ||[http://modular.math.washington.edu/sage/doc/html/ref/genindex.html] || '''Previous:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html 14.2 Multiplicative Abelian Groups] '''Up:''' [http://modular.math.washington.edu/sage/doc/html/ref/node144.html 14. Groups] '''Next:''' [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html 14.4 Homomorphisms of abelian] ---- Release 1.4, documentation updated on October 5, 2006. ## End of Navigation Panel See ''[http://modular.math.washington.edu/sage/doc/html/ref/about.html About this document...] '' for information on suggesting changes. |
'''Author Log:''' [[BR]] * David Joyner (2006-02); based on free_abelian_monoid_element.py, written by David Kohel.[[BR]] * David Joyner (2006-05); bug fix in order[[BR]] * " (2006-08); bug fix+new method in pow for negatives+fixed corresponding examples.[[BR]] Recall an example from abelian groups. {{{#!python 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''' ''' `is_AbelianGroupElement` ''' (x ) '''Class: {{{AbelianGroupElement}}}''' '''class `AbelianGroupElement` ''' ''' `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 sage: a^-11 a sage: a*b in F True }}} '''Functions:''' `as_permutation` , `list` , `order` , `random` , `word_problem` ''' `as_permutation` ''' (self ) Return the element of the permutation group G (isomorphic to the abelian group A) associated to a in A. |
Trying out html2moin.py processor; this is one step in processing doc pages for a notebook help browser, as well as a step to making a wiki-version of the documentation.
14.3 Abelian group elements
[http://modular.math.washington.edu/sage/doc/html/ref/node144.html parent] |
[http://modular.math.washington.edu/sage/doc/html/ref/contents.html SAGE Reference Manual] |
[http://modular.math.washington.edu/sage/doc/html/ref/modindex.html module index] |
[http://modular.math.washington.edu/sage/doc/html/ref/genindex.html general index] |
Previous: [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group.html 14.2 Multiplicative Abelian Groups] Up: [http://modular.math.washington.edu/sage/doc/html/ref/node144.html 14. Groups] Next: [http://modular.math.washington.edu/sage/doc/html/ref/module-sage.groups.abelian-gps.abelian-group-morphism.html 14.4 Homomorphisms of abelian]
14.3 Abelian group elements
Anchor(SECTION0016300000000000000000)
Module: sage.groups.abelian_gps.abelian_group_element
Anchor(module-sage.groups.abelian-gps.abelian-group-element)
Author Log: BR
- David Joyner (2006-02); based on free_abelian_monoid_element.py, written
by David Kohel.BR
David Joyner (2006-05); bug fix in orderBR
- " (2006-08); bug fix+new method in pow for negatives+fixed corresponding
examples.BR
Recall an example from abelian groups.
1 sage: F = AbelianGroup(5,[4,5,5,7,8],names = list("abcde"))
2 sage: (a,b,c,d,e) = F.gens()
3 sage: x = a*b^2*e*d^20*e^12
4 sage: x
5 a*b^2*d^6*e^5
6 sage: x = a^10*b^12*c^13*d^20*e^12
7 sage: x
8 a^2*b^2*c^3*d^6*e^4
9 sage: y = a^13*b^19*c^23*d^27*e^72
10 sage: y
11 a*b^4*c^3*d^6
12 sage: x*y
13 a^3*b*c*d^5*e^4
14 sage: x.list()
15 [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
is_AbelianGroupElement (x )
Class: AbelianGroupElement
class AbelianGroupElement 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 sage: a^-11 a sage: a*b in F True
Functions: as_permutation , list , order , random , word_problem
as_permutation (self )
Return the element of the permutation group G (isomorphic to the abelian group A) associated to a in A.