@@ -1400,8 +1400,8 @@ def __init__(self, A, basis, check=True):
1400
1400
raise ValueError ("lattice must contain 1" )
1401
1401
1402
1402
# check if multiplicatively closed
1403
- M1 = basis_for_quaternion_lattice (basis )
1404
- M2 = basis_for_quaternion_lattice (list (basis ) + [x * y for x in basis for y in basis ])
1403
+ M1 = basis_for_quaternion_lattice (basis , reverse = False )
1404
+ M2 = basis_for_quaternion_lattice (list (basis ) + [x * y for x in basis for y in basis ], reverse = False )
1405
1405
if M1 != M2 :
1406
1406
raise ValueError ("given lattice must be a ring" )
1407
1407
@@ -2549,7 +2549,7 @@ def __mul__(self, right):
2549
2549
# if self.__right_order == right.__left_order:
2550
2550
# left_order = self.__left_order
2551
2551
# right_order = right.__right_order
2552
- basis = tuple (basis_for_quaternion_lattice (gens ))
2552
+ basis = tuple (basis_for_quaternion_lattice (gens , reverse = False ))
2553
2553
A = self .quaternion_algebra ()
2554
2554
return A .ideal (basis , check = False )
2555
2555
@@ -2692,7 +2692,7 @@ def multiply_by_conjugate(self, J):
2692
2692
"""
2693
2693
Jbar = [b .conjugate () for b in J .basis ()]
2694
2694
gens = [a * b for a in self .basis () for b in Jbar ]
2695
- basis = tuple (basis_for_quaternion_lattice (gens ))
2695
+ basis = tuple (basis_for_quaternion_lattice (gens , reverse = False ))
2696
2696
R = self .quaternion_algebra ()
2697
2697
return R .ideal (basis , check = False )
2698
2698
@@ -2900,7 +2900,7 @@ def cyclic_right_subideals(self, p, alpha=None):
2900
2900
#######################################################################
2901
2901
2902
2902
2903
- def basis_for_quaternion_lattice (gens , reverse = False ):
2903
+ def basis_for_quaternion_lattice (gens , reverse = None ):
2904
2904
r"""
2905
2905
Return a basis for the `\ZZ`-lattice in a quaternion algebra
2906
2906
spanned by the given gens.
@@ -2919,12 +2919,18 @@ def basis_for_quaternion_lattice(gens, reverse=False):
2919
2919
sage: from sage.algebras.quatalg.quaternion_algebra import basis_for_quaternion_lattice
2920
2920
sage: A.<i,j,k> = QuaternionAlgebra(-1,-7)
2921
2921
sage: basis_for_quaternion_lattice([i+j, i-j, 2*k, A(1/3)])
2922
+ doctest:warning ... DeprecationWarning: ...
2922
2923
[1/3, i + j, 2*j, 2*k]
2923
2924
2924
2925
sage: basis_for_quaternion_lattice([A(1),i,j,k])
2925
2926
[1, i, j, k]
2926
2927
2927
2928
"""
2929
+ if reverse is None :
2930
+ from sage .misc .superseded import deprecation
2931
+ deprecation (34880 , 'The default value for the "reverse" argument to basis_for_quaternion_lattice() will'
2932
+ ' change from False to True. Pass the argument explicitly to silence this warning.' )
2933
+ reverse = False
2928
2934
if not gens :
2929
2935
return []
2930
2936
Z , d = quaternion_algebra_cython .integral_matrix_and_denom_from_rational_quaternions (gens , reverse )
0 commit comments