Package sage :: Package groups :: Package abelian_gps :: Module dual_abelian_group_element :: Class DualAbelianGroupElement
[hide private]
[frames] | no frames]

Class DualAbelianGroupElement

source code

                      object --+            
                               |            
structure.sage_object.SageObject --+        
                                   |        
           structure.element.Element --+    
                                       |    
         structure.element.MonoidElement --+
                                           |
                                          DualAbelianGroupElement

Instance Methods [hide private]
 
__init__(self, F, X)
Create an element X of the DualAbelianGroup of F.
source code
 
list(self)
Return (a reference to) the underlying list used to represent this element.
source code
 
_repr_(self)
File: sage/structure/element.pyx (starting at line 291)
source code
 
__mul__(self, y)
File: sage/structure/element.pyx (starting at line 1073) Top-level multiplication operator for monoid elements.
source code
 
__pow__(self, n)
requires that len(invs) = n
source code
 
__cmp__(self, other)
cmp(x,y)
source code
 
order(self)
Returns the (finite) order of this element.
source code
 
__call__(self, g)
Computes the value of a character self on a group element...
source code
 
word_problem(self, words, display=True)
This is a rather hackish method and is included for completeness.
source code

Inherited from structure.element.MonoidElement: __new__, __nonzero__, __rmul__, __rpow__, _mul_, multiplicative_order

Inherited from structure.element.Element: __eq__, __ge__, __gt__, __hash__, __le__, __lt__, __ne__, __reduce__, __rxor__, __xor__, _cmp_, _im_gens_, _richcmp_, base_base_extend, base_base_extend_canonical_sym, base_extend, base_extend_canonical, base_extend_canonical_sym, base_extend_recursive, base_ring, category, is_zero, n, parent, subs, substitute

Inherited from structure.sage_object.SageObject: __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, F, X)
(Constructor)

source code 

Create an element X of the DualAbelianGroup of F.

EXAMPLES:
    sage: F = AbelianGroup(3,[7,8,9])
    sage: Fd = DualAbelianGroup(F,names="ABC")
    sage: A,B,C = Fd.gens()
    sage: A*B^-1 in Fd
    True

Overrides: structure.element.Element.__init__

list(self)

source code 

Return (a reference to) the underlying list used to represent
this element.  If this is a word in an abelian group on $n$
generators, then this is a list of nonnegative integers of
length $n$.

EXAMPLES:
    sage: F = AbelianGroup(5,[2, 3, 5, 7, 8], names="abcde")
    sage: a,b,c,d,e = F.gens()
    sage: Ad = DualAbelianGroup(F, names = "ABCDE")
    sage: A,B,C,D,E = Ad.gens()
    sage: (A*B*C^2*D^20*E^65).list()
    [1, 1, 2, 6, 1]
    sage: X = A*B*C^2*D^2*E^-6
    sage: X.list()
    [1, 1, 2, 2, 2]
    sage: X.list()[1] = -1
    sage: X
    A*B^-1*C^2*D^2*E^2

_repr_(self)

source code 
File: sage/structure/element.pyx (starting at line 291)

Overrides: structure.element.Element._repr_
(inherited documentation)

__mul__(self, y)

source code 
File: sage/structure/element.pyx (starting at line 1073)

Top-level multiplication operator for monoid elements.
See extensive documentation at the top of element.pyx.

Overrides: structure.element.MonoidElement.__mul__
(inherited documentation)

__pow__(self, n)

source code 

requires that len(invs) = n

Overrides: structure.element.MonoidElement.__pow__

__cmp__(self, other)
(Comparison operator)

source code 
cmp(x,y)

Overrides: structure.element.Element.__cmp__
(inherited documentation)

order(self)

source code 

Returns the (finite) order of this element.

EXAMPLES:
    sage: F = AbelianGroup(3,[7,8,9])
    sage: Fd = DualAbelianGroup(F)
    sage: A,B,C = Fd.gens()
    sage: (B*C).order()
    72

Overrides: structure.element.MonoidElement.order

__call__(self, g)
(Call operator)

source code 

Computes the value of a character self on a group element
g (g must be an element of self.group())

EXAMPLES:
    sage: F = AbelianGroup(5, [2,3,5,7,8], names="abcde")
    sage: a,b,c,d,e = F.gens()
    sage: Fd = DualAbelianGroup(F, names="ABCDE")
    sage: A,B,C,D,E = Fd.gens()
    sage: A*B^2*D^7
    A*B^2
    sage: A(a)    ## random last few digits
    -1.0000000000000000 + 0.00000000000000013834419720915037*I
    sage: B(b)    ## random last few digits
    -0.49999999999999983 + 0.86602540378443871*I
    sage: A(a*b)    ## random last few digits
    -1.0000000000000000 + 0.00000000000000013834419720915037*I

word_problem(self, words, display=True)

source code 

This is a rather hackish method and is included for completeness.

The word problem for an instance of DualAbelianGroup as it can
for an AbelianGroup. The reason why is that word problem
for an instance of AbelianGroup simply calls GAP (which
has abelian groups implemented) and invokes "EpimorphismFromFreeGroup"
and "PreImagesRepresentative". GAP does not have duals of
abelian groups implemented. So, by using the same name
for the generators, the method below converts the problem for
the dual group to the corresponding problem on the group
itself and uses GAP to solve that.

EXAMPLES:
    sage: G = AbelianGroup(5,[3, 5, 5, 7, 8],names="abcde")
    sage: Gd = DualAbelianGroup(G,names="abcde")
    sage: a,b,c,d,e = Gd.gens()
    sage: u = a^3*b*c*d^2*e^5
    sage: v = a^2*b*c^2*d^3*e^3
    sage: w = a^7*b^3*c^5*d^4*e^4
    sage: x = a^3*b^2*c^2*d^3*e^5
    sage: y = a^2*b^4*c^2*d^4*e^5
    sage: e.word_problem([u,v,w,x,y],display=False)
    [[b^2*c^2*d^3*e^5, 245]]

The command e.word_problem([u,v,w,x,y],display=True) returns
the same list but also prints $e = (b^2*c^2*d^3*e^5)^245$.