Package sage :: Package algebras :: Module quaternion_algebra_element :: Class QuaternionAlgebraElement
[hide private]
[frames] | no frames]

Class QuaternionAlgebraElement

source code

                          object --+                        
                                   |                        
    structure.sage_object.SageObject --+                    
                                       |                    
               structure.element.Element --+                
                                           |                
             structure.element.ModuleElement --+            
                                               |            
                   structure.element.RingElement --+        
                                                   |        
                    structure.element.AlgebraElement --+    
                                                       |    
free_algebra_quotient_element.FreeAlgebraQuotientElement --+
                                                           |
                                                          QuaternionAlgebraElement
Known Subclasses:
QuaternionAlgebraElement_fast

Instance Methods [hide private]
 
__init__(self, H, x)
Create the element x of the quaternion algebra H.
source code
 
__cmp__(self, x)
cmp(x,y)
source code
 
conjugate(self)
Return the conjugate of this element.
source code
 
reduced_trace(self)
Return the reduced trace of this element.
source code
 
reduced_norm(self)
Return the reduced norm of this element.
source code
 
charpoly(self, var)
Return the characteristic polynomial of this element in terms of the given variable.
source code
 
characteristic_polynomial(self, var)
Return the characteristic polynomial of this element in terms of the given variable.
source code
 
minpoly(self, var)
Return the minimal polynomial of this element in terms of the given variable.
source code
 
minimal_polynomial(self, var)
Return the minimal polynomial of this element in terms of the given variable.
source code
 
is_unit(self)
Return True if the element is an invertible element of the quaternion algebra.
source code
 
additive_order(self)
File: sage/structure/element.pyx (starting at line 1549) Return the additive order of self.
source code
 
is_scalar(self)
Return True is this element of a quaternion algebra is a scalar (i.e.
source code
 
is_pure(self)
Return True is this element of a quaternion algebra is "pure" (i.e.
source code
 
scalar_part(self)
Return the part of the quaternion 'self' that lies in the base field/ring.
source code
 
pure_part(self)
Return the part of the quaternion 'self' that lies in the vector subspace "<i,j,k>" (figuratively speaking).
source code
 
_div_(self, other)
Right division in the quaternion algebra EXAMPLES: sage: A.<i,j,k>=QuaternionAlgebra(QQ,-1,-1) sage: x=3*i-j+2 sage: y=i-1 sage: x/y 1/2 - 5/2*i + 1/2*j - 1/2*k Note that 1/x will raise an AttributeError.
source code
 
_backslash_(self, other)
Left division in the quaternion algebra...
source code

Inherited from free_algebra_quotient_element.FreeAlgebraQuotientElement: __neg__, _add_, _latex_, _lmul_, _mul_, _repr_, _rmul_, _sub_, vector

Inherited from structure.element.AlgebraElement: __new__

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

Inherited from structure.element.ModuleElement: __add__, __iadd__, __isub__, __radd__, __rsub__, __sub__, _iadd_, _ilmul_, _isub_, _neg_

Inherited from structure.element.Element: __eq__, __ge__, __gt__, __hash__, __le__, __lt__, __ne__, __nonzero__, __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, H, x)
(Constructor)

source code 

Create the element x of the quaternion algebra H.

Overrides: free_algebra_quotient_element.FreeAlgebraQuotientElement.__init__

__cmp__(self, x)
(Comparison operator)

source code 
cmp(x,y)

Overrides: free_algebra_quotient_element.FreeAlgebraQuotientElement.__cmp__

conjugate(self)

source code 

Return the conjugate of this element.

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
    sage: x=3*i-j+2
    sage: x.conjugate()
    2 - 3*i + j

reduced_trace(self)

source code 

Return the reduced trace of this element.

\note{In a quaternion algebra $A$, every element $x$ is
quadratic over the center, thus $x^2 = \Tr(x)*x - \Nr(x)$, so
we solve for a linear relation $(1,-\Tr(x),\Nr(x))$ among
$[x^2, x, 1]$ for the reduced trace of $x$.}

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
    sage: x=3*i-j+2
    sage: x.reduced_trace()
    4

reduced_norm(self)

source code 

Return the reduced norm of this element.

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
    sage: x=3*i-j+2
    sage: x.reduced_norm()
    51

charpoly(self, var)

source code 

Return the characteristic polynomial of this element in terms
of the given variable.

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
    sage: x=3*i-j+2
    sage: x.charpoly('t')
    t^2 - 4*t + 51

characteristic_polynomial(self, var)

source code 

Return the characteristic polynomial of this element in terms
of the given variable.

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
    sage: x=3*i-j+2
    sage: x.charpoly('t')
    t^2 - 4*t + 51

minpoly(self, var)

source code 

Return the minimal polynomial of this element in terms
of the given variable.

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
    sage: x=3*i-j+2
    sage: x.minpoly('t')
    t^2 - 4*t + 51

minimal_polynomial(self, var)

source code 

Return the minimal polynomial of this element in terms
of the given variable.

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
    sage: x=3*i-j+2
    sage: x.minpoly('t')
    t^2 - 4*t + 51

is_unit(self)

source code 

Return True if the element is an invertible element of the
quaternion algebra.

EXAMPLES:
    sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
    sage: i.is_unit()
    True
    sage: (i-5+j*k).is_unit()
    True
    sage: A(0).is_unit()
    False

Overrides: structure.element.RingElement.is_unit

additive_order(self)

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

Return the additive order of self.

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

is_scalar(self)

source code 

Return True is this element of a quaternion algebra is
a scalar (i.e. lies in the base field).

EXAMPLES:
    sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
    sage: i.is_scalar()
    False
    sage: (i-5+j*k).is_scalar()
    False
    sage: A(12).is_scalar()
    True

is_pure(self)

source code 

Return True is this element of a quaternion algebra is
"pure" (i.e. has no scalar component, or has reduced-trace zero).

EXAMPLES:
    sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
    sage: i.is_pure()
    True
    sage: (i-5+j*k).is_pure()
    False
    sage: A(12).is_pure()
    False

scalar_part(self)

source code 

Return the part of the quaternion 'self' that lies in the base field/ring.
This is given by the reduced trace (note: we assume characteristic not 2).
We could cheat, using self.vector(), but we really don't know what basis
is in place.  Do we?
EXAMPLES:
    sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
    sage: i.scalar_part()
    0
    sage: x = A([1,-3/2,0,2])
    sage: x.scalar_part()
     1

pure_part(self)

source code 

Return the part of the quaternion 'self' that lies in the vector subspace
"<i,j,k>" (figuratively speaking).  We just strip off the scalar part...
EXAMPLES:
    sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
    sage: x = A([1,-3/2,0,2])
    sage: x.pure_part()
     -3/2*i + 2*k

_div_(self, other)

source code 

Right division in the quaternion algebra

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-1,-1)
    sage: x=3*i-j+2
    sage: y=i-1
    sage: x/y
    1/2 - 5/2*i + 1/2*j - 1/2*k

Note that 1/x will raise an AttributeError.  The way to get
the inverse of x is
    sage: A(1)/x
    1/7 - 3/14*i + 1/14*j

Overrides: structure.element.RingElement._div_

_backslash_(self, other)

source code 

Left division in the quaternion algebra

EXAMPLES:
    sage: A.<i,j,k>=QuaternionAlgebra(QQ,-1,-1)
    sage: x=3*i-j+2
    sage: y=i-1
    sage: x\y
    1/14 + 5/14*i - 1/14*j - 1/14*k