Package sage :: Package algebras :: Module quaternion_algebra :: Class QuaternionAlgebra_generic
[hide private]
[frames] | no frames]

Class QuaternionAlgebra_generic

source code

                      object --+                            
                               |                            
structure.sage_object.SageObject --+                        
                                   |                        
             structure.parent.Parent --+                    
                                       |                    
    structure.parent_base.ParentWithBase --+                
                                           |                
        structure.parent_gens.ParentWithGens --+            
                                               |            
                                 rings.ring.Ring --+        
                                                   |        
                                  rings.ring.Algebra --+    
                                                       |    
                                              object --+    
                                                       |    
               free_algebra_quotient.FreeAlgebraQuotient --+
                                                           |
                                                          QuaternionAlgebra_generic
Known Subclasses:
QuaternionAlgebra_faster

Instance Methods [hide private]
 
__init__(self, K, basis_traces=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., ramified_primes=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...) source code
 
__call__(self, x)
File: sage/rings/ring.pyx (starting at line 37) Coerce x into the ring.
source code
 
__repr__(self)
File: sage/structure/sage_object.pyx (starting at line 86)
source code
 
gen(self, i)
The i-th generator of the quaternion algebra.
source code
 
basis(self) source code
 
discriminant(self)
Given a quaternion algebra A defined over the field of rational numbers, return the discriminant of A, i.e.
source code
 
gram_matrix(self)
The Gram matrix of the inner product determined by the norm.
source code
 
inner_product_matrix(self) source code
 
is_commutative(self)
EXAMPLES:...
source code
 
is_division_algebra(self)
Return True if the quaternion algebra is a division algebra (i.e.
source code
 
is_exact(self)
Return True if elements of this quaternion algebra are represented exactly, i.e.
source code
 
is_field(self)
Return False always, since all quaternion algebras are noncommutative and all fields are commutative.
source code
 
is_finite(self)
Return True if the quaternion algebra is a finite ring, i.e.
source code
 
is_integral_domain(self)
Return False always, since all quaternion algebras are noncommutative and integral domains are commutative (in SAGE).
source code
 
is_noetherian(self)
Return True always, since any quaternion algebra is a noetherian ring (because it's a finitely-generated module over a field, which is noetherian).
source code
 
order(self)
Return the number of elements of the quaternion algebra, or +Infinity if the algebra is not finite.
source code
 
ramified_primes(self) source code
 
random_element(self)
File: sage/rings/ring.pyx (starting at line 642) Return a random integer coerced into this ring, where the integer is chosen uniformly from the interval [-bound,bound].
source code
 
vector_space(self) source code

Inherited from free_algebra_quotient.FreeAlgebraQuotient: __contains__, __eq__, _repr_, dimension, free_algebra, matrix_action, module, monoid, monomial_basis, ngens, rank

Inherited from rings.ring.Algebra: __new__, characteristic

Inherited from rings.ring.Ring: __getitem__, __hash__, __iter__, __len__, __mul__, __rmul__, __rxor__, __xor__, _ideal_class_, base_extend, category, ideal, is_atomic_repr, is_prime_field, is_ring, is_subring, one_element, principal_ideal, unit_ideal, zero_element, zero_ideal, zeta, zeta_order

Inherited from rings.ring.Ring (private): _r_action

Inherited from structure.parent_gens.ParentWithGens: __getslice__, __getstate__, __setstate__, _is_valid_homomorphism_, gens, gens_dict, hom, inject_variables, injvar, latex_name, latex_variable_names, list, objgen, objgens, variable_name, variable_names

Inherited from structure.parent_base.ParentWithBase: Hom, base, base_extend_canonical, base_extend_canonical_sym, base_extend_recursive, base_ring

Inherited from structure.parent.Parent: _coerce_, coerce_map_from, coerce_map_from_impl, construction, get_action, get_action_impl, has_coerce_map_from, has_coerce_map_from_impl, init_coerce

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__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from structure.parent.Parent (private): _has_coerce_map_from

Inherited from object: __class__

Method Details [hide private]

__init__(self, K, basis_traces=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., ramified_primes=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)
(Constructor)

source code 

        

Overrides: free_algebra_quotient.FreeAlgebraQuotient.__init__

__call__(self, x)
(Call operator)

source code 
File: sage/rings/ring.pyx (starting at line 37)

Coerce x into the ring.

Overrides: free_algebra_quotient.FreeAlgebraQuotient.__call__

__repr__(self)
(Representation operator)

source code 
File: sage/structure/sage_object.pyx (starting at line 86)

Overrides: structure.sage_object.SageObject.__repr__
(inherited documentation)

gen(self, i)

source code 

The i-th generator of the quaternion algebra.

Overrides: free_algebra_quotient.FreeAlgebraQuotient.gen

discriminant(self)

source code 

Given a quaternion algebra A defined over the field of rational numbers, return the discriminant of A, i.e. the product of the ramified primes of A.

is_commutative(self)

source code 

EXAMPLES:
    sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3,-7)
    sage: Q.is_commutative()
    False

Overrides: rings.ring.Ring.is_commutative

is_division_algebra(self)

source code 

Return True if the quaternion algebra is a division algebra
(i.e. a ring, not necessarily commutative, in which every nonzero
element is invertible).  So if this returns False, the quaternion
algebra is isomorphic to the 2x2 matrix algebra.

At the moment, this is implemented only for finite fields.

EXAMPLES:
    sage: Q.<i,j,k> = QuaternionAlgebra(GF(5), -3, -7)
    sage: Q.is_division_algebra()
    False

is_exact(self)

source code 

Return True if elements of this quaternion algebra are represented exactly, i.e. there is no precision loss when doing arithmetic.  A quaternion algebra is exact if and only if its base field is exact.

EXAMPLES:
    sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7)
    sage: Q.is_exact()
    True
    sage: Q.<i,j,k> = QuaternionAlgebra(Qp(7), -3, -7)
    sage: Q.is_exact()
    False

Overrides: rings.ring.Ring.is_exact

is_field(self)

source code 

Return False always, since all quaternion algebras are noncommutative and all fields are commutative.

EXAMPLES:
    sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7)
    sage: Q.is_field()
    False

Overrides: rings.ring.Ring.is_field

is_finite(self)

source code 

Return True if the quaternion algebra is a finite ring, i.e. if and only if the base field is finite.

EXAMPLES:
    sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7)
    sage: Q.is_finite()
    False
    sage: Q.<i,j,k> = QuaternionAlgebra(GF(5), -3, -7)
    sage: Q.is_finite()
    True

Overrides: rings.ring.Ring.is_finite

is_integral_domain(self)

source code 

Return False always, since all quaternion algebras are noncommutative and integral domains are commutative (in SAGE).

EXAMPLES:
    sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7)
    sage: Q.is_integral_domain()
    False

Overrides: rings.ring.Ring.is_integral_domain

is_noetherian(self)

source code 

Return True always, since any quaternion algebra is a noetherian ring (because it's a finitely-generated module over a field, which is noetherian).

EXAMPLES:
    sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7)
    sage: Q.is_noetherian()
    True

Overrides: rings.ring.Ring.is_noetherian

order(self)

source code 

Return the number of elements of the quaternion algebra, or +Infinity if the algebra is not finite.

EXAMPLES:
    sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7)
    sage: Q.order()
    +Infinity
    sage: Q.<i,j,k> = QuaternionAlgebra(GF(5), -3, -7)
    sage: Q.order()
    20

Overrides: rings.ring.Ring.order

random_element(self)

source code 
File: sage/rings/ring.pyx (starting at line 642)

Return a random integer coerced into this ring, where the
integer is chosen uniformly from the interval [-bound,bound].

INPUT:
    bound -- integer (default: 2)
    
ALGORITHM:
     -- uses Python's randint.

TESTS:
The following example returns a NotImplementedError since the generic
ring class \code(__call__) function ruturns a NotImplementedError.
Note that \code(sage.rings.ring.Ring.random_element) performs a
call in the generic ring class by a random integer.
    sage: R = sage.rings.ring.Ring(ZZ); R
    <type 'sage.rings.ring.Ring'>
    sage: R.random_element()
    Traceback (most recent call last):
    ...
    NotImplementedError

Overrides: rings.ring.Ring.random_element
(inherited documentation)