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