Package sage :: Package algebras :: Module algebra_order_element :: Class AlgebraOrderElement
[hide private]
[frames] | no frames]

Class AlgebraOrderElement

source code

                      object --+                    
                               |                    
structure.sage_object.SageObject --+                
                                   |                
           structure.element.Element --+            
                                       |            
         structure.element.ModuleElement --+        
                                           |        
               structure.element.RingElement --+    
                                               |    
                structure.element.AlgebraElement --+
                                                   |
                                                  AlgebraOrderElement
Known Subclasses:
quaternion_order_element.QuaternionOrderElement, algebra_order_ideal_element.AlgebraOrderIdealElement


    



Instance Methods [hide private]
 
__init__(self, A, x, check=True)
Create the element x of the algebra order A.
source code
 
__repr__(self) source code
 
ambient_algebra_element(self) source code
 
trace(self)
The trace of the element with respect to its action by left or right multiplication on the order.
source code
 
norm(self)
The determinant (= norm) of the element with respect to its action by left or right multiplication on the order.
source code
 
charpoly(self, var)
The characteristic polynomial of the element with respect to its action by left or right multiplication on the order.
source code
 
characteristic_polynomial(self, var)
The characteristic polynomial of the element with respect to its action by left or right multiplication on the order.
source code
 
minpoly(self, var)
The minimal polynomial of the element with respect to its action by left or right multiplication on the order.
source code
 
minimal_polynomial(self, var)
The minimal polynomial of the element with respect to its action by left or right multiplication on the order.
source code
 
__add__(self, y)
File: sage/structure/element.pyx (starting at line 691) Top-level addition operator for ModuleElements.
source code
 
__radd__(self, y)
Can be deleted once this moves to the base ring class.
source code
 
__neg__(self)
File: sage/structure/element.pyx (starting at line 845) Top-level negation operator for ModuleElements.
source code
 
__sub__(self, y)
File: sage/structure/element.pyx (starting at line 774) Top-level subtraction operator for ModuleElements.
source code
 
__mul__(self, y)
File: sage/structure/element.pyx (starting at line 1254) Top-level multiplication operator for ring elements.
source code

Inherited from structure.element.AlgebraElement: __new__

Inherited from structure.element.RingElement: __div__, __idiv__, __imul__, __invert__, __pos__, __pow__, __rdiv__, __rmul__, __rpow__, __rtruediv__, __truediv__, _div_, _idiv_, _imul_, _mul_, abs, additive_order, is_nilpotent, is_one, is_unit, multiplicative_order, order

Inherited from structure.element.ModuleElement: __iadd__, __isub__, __rsub__, _add_, _iadd_, _ilmul_, _isub_, _lmul_, _neg_, _rmul_, _sub_

Inherited from structure.element.Element: __cmp__, __eq__, __ge__, __gt__, __hash__, __le__, __lt__, __ne__, __nonzero__, __reduce__, __rxor__, __xor__, _cmp_, _im_gens_, _repr_, _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: _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, A, x, check=True)
(Constructor)

source code 

Create the element x of the algebra order A.

Overrides: structure.element.Element.__init__

__repr__(self)
(Representation operator)

source code 

        

Overrides: structure.sage_object.SageObject.__repr__

__add__(self, y)
(Addition operator)

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

Top-level addition operator for ModuleElements.

See extensive documentation at the top of element.pyx.

Overrides: structure.element.ModuleElement.__add__
(inherited documentation)

__radd__(self, y)
(Right-side addition operator)

source code 

Can be deleted once this moves to the base ring class.

Overrides: structure.element.ModuleElement.__radd__

__neg__(self)

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

Top-level negation operator for ModuleElements.
See extensive documentation at the top of element.pyx.

Overrides: structure.element.ModuleElement.__neg__
(inherited documentation)

__sub__(self, y)
(Subtraction operator)

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

Top-level subtraction operator for ModuleElements.
See extensive documentation at the top of element.pyx.

Overrides: structure.element.ModuleElement.__sub__
(inherited documentation)

__mul__(self, y)

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

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

AUTHOR:

    Gonzalo Tornaria (2007-06-25) - write base-extending test cases and fix them

TEST CASES:

    (scalar * vector)

    sage: x, y = var('x, y')

    sage: parent(ZZ(1)*vector(ZZ,[1,2]))
    Ambient free module of rank 2 over the principal ideal domain Integer Ring
    sage: parent(QQ(1)*vector(ZZ,[1,2]))
    Vector space of dimension 2 over Rational Field
    sage: parent(ZZ(1)*vector(QQ,[1,2]))
    Vector space of dimension 2 over Rational Field
    sage: parent(QQ(1)*vector(QQ,[1,2]))
    Vector space of dimension 2 over Rational Field

    sage: parent(QQ(1)*vector(ZZ[x],[1,2]))
    Ambient free module of rank 2 over the principal ideal domain Univariate Polynomial Ring in x over Rational Field
    sage: parent(ZZ[x](1)*vector(QQ,[1,2]))
    Ambient free module of rank 2 over the principal ideal domain Univariate Polynomial Ring in x over Rational Field

    sage: parent(QQ(1)*vector(ZZ[x][y],[1,2]))
    Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field
    sage: parent(ZZ[x][y](1)*vector(QQ,[1,2]))
    Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field

    sage: parent(QQ[x](1)*vector(ZZ[x][y],[1,2]))
    Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field
    sage: parent(ZZ[x][y](1)*vector(QQ[x],[1,2]))
    Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field

    sage: parent(QQ[y](1)*vector(ZZ[x][y],[1,2]))
    Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field
    sage: parent(ZZ[x][y](1)*vector(QQ[y],[1,2]))
    Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field

    sage: parent(ZZ[x](1)*vector(ZZ[y],[1,2]))
    Traceback (most recent call last):
    ...
    TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial Ring in x over Integer Ring' and 'Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in y over Integer Ring'
    sage: parent(ZZ[x](1)*vector(QQ[y],[1,2]))
    Traceback (most recent call last):
    ...
    TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial Ring in x over Integer Ring' and 'Ambient free module of rank 2 over the principal ideal domain Univariate Polynomial Ring in y over Rational Field'
    sage: parent(QQ[x](1)*vector(ZZ[y],[1,2]))
    Traceback (most recent call last):
    ...
    TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial Ring in x over Rational Field' and 'Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in y over Integer Ring'
    sage: parent(QQ[x](1)*vector(QQ[y],[1,2]))
    Traceback (most recent call last):
    ...
    TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial Ring in x over Rational Field' and 'Ambient free module of rank 2 over the principal ideal domain Univariate Polynomial Ring in y over Rational Field'

    (scalar * matrix)

    sage: parent(ZZ(1)*matrix(ZZ,2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
    sage: parent(QQ(1)*matrix(ZZ,2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Rational Field
    sage: parent(ZZ(1)*matrix(QQ,2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Rational Field
    sage: parent(QQ(1)*matrix(QQ,2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Rational Field

    sage: parent(QQ(1)*matrix(ZZ[x],2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in x over Rational Field
    sage: parent(ZZ[x](1)*matrix(QQ,2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in x over Rational Field

    sage: parent(QQ(1)*matrix(ZZ[x][y],2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field
    sage: parent(ZZ[x][y](1)*matrix(QQ,2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field

    sage: parent(QQ[x](1)*matrix(ZZ[x][y],2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field
    sage: parent(ZZ[x][y](1)*matrix(QQ[x],2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field

    sage: parent(QQ[y](1)*matrix(ZZ[x][y],2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field
    sage: parent(ZZ[x][y](1)*matrix(QQ[y],2,2,[1,2,3,4]))
    Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Rational Field

    sage: parent(ZZ[x](1)*matrix(ZZ[y],2,2,[1,2,3,4]))
    Traceback (most recent call last):
    ...
    TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial Ring in x over Integer Ring' and 'Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Integer Ring'
    sage: parent(ZZ[x](1)*matrix(QQ[y],2,2,[1,2,3,4]))
    Traceback (most recent call last):
    ...
    TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial Ring in x over Integer Ring' and 'Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Rational Field'
    sage: parent(QQ[x](1)*matrix(ZZ[y],2,2,[1,2,3,4]))
    Traceback (most recent call last):
    ...
    TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial Ring in x over Rational Field' and 'Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Integer Ring'
    sage: parent(QQ[x](1)*matrix(QQ[y],2,2,[1,2,3,4]))
    Traceback (most recent call last):
    ...
    TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial Ring in x over Rational Field' and 'Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in y over Rational Field'

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