Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #13569: document and test new argument ideal_list
Browse files Browse the repository at this point in the history
  • Loading branch information
tornaria committed Aug 27, 2014
1 parent f824306 commit 9858d7e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ def basis_for_quaternion_lattice(self, gens, ideal_list=None, reverse=False):
- ``gens`` -- list of elements of the quaternion algebra
- ``ideal_list`` -- list of `\\ZZ_F`-ideals (optional, for a pseudo-basis)
- ``reverse`` -- (when A is over the rationals) when computing the HNF do it on the basis
(k,j,i,1) instead of (1,i,j,k). This ensures
that if ``gens`` are the generators for an order,
Expand Down Expand Up @@ -1129,6 +1131,7 @@ def quaternion_order(self, basis, ideal_list=None, check=True):
INPUT:
- ``basis`` - list of 4 elements of ``self``
- ``ideal_list`` -- list of 4 `\\ZZ_F`-ideals (optional, for a pseudo-basis)
- ``check`` - bool (default: ``True``)
EXAMPLES::
Expand All @@ -1137,6 +1140,21 @@ def quaternion_order(self, basis, ideal_list=None, check=True):
sage: Q.quaternion_order([1,i,j,k])
Order of Quaternion Algebra (-11, -1) with base ring Rational Field with basis (1, i, j, k)
sage: K.<b> = NumberField(x^2+5)
sage: A.<i,j,k> = QuaternionAlgebra(K,b,2*b)
sage: A.quaternion_order([1,i,j,k])
Order of Quaternion Algebra (b, 2*b) with base ring Number Field in b with defining polynomial x^2 + 5 with basis (1, i, j, k)
sage: id1 = K.ideal(1)
sage: id2 = K.ideal(2)
sage: A.quaternion_order([1,i,j,k], [id1,id1,id1,id1])
Order of Quaternion Algebra (b, 2*b) with base ring Number Field in b with defining polynomial x^2 + 5 with basis (1, i, j, k)
sage: A.quaternion_order([1,i,j,k/2], [id1,id1,id1,id2])
Order of Quaternion Algebra (b, 2*b) with base ring Number Field in b with defining polynomial x^2 + 5 with basis (1, i, j, k)
sage: idD = A.discriminant()
sage: A.quaternion_order([1,i,j,k], [id1,idD,id1,idD])
Order of Quaternion Algebra (b, 2*b) with base ring Number Field in b with defining polynomial x^2 + 5 with pseudo-basis ((1, i, j, k), (Fractional ideal (1), Fractional ideal (10, b + 5), Fractional ideal (1), Fractional ideal (10, b + 5)))
We test out ``check=False``::
sage: Q.quaternion_order([1,i,j,k], check=False)
Expand Down Expand Up @@ -1349,6 +1367,7 @@ def __init__(self, A, basis, ideal_list=None, check=True):
- ``A`` - a quaternion algebra
- ``basis`` - list of 4 integral quaternions in ``A``
- ``ideal_list`` -- list of 4 `\\ZZ_F`-ideals (optional, for a pseudo-basis)
- ``check`` - whether to do type and other consistency checks
.. WARNING::
Expand Down

0 comments on commit 9858d7e

Please sign in to comment.