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

Commit

Permalink
Fixed transpose mistake.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmasdeu authored and AurelPage committed Mar 2, 2017
1 parent b7a7864 commit aa554bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def basis_for_quaternion_lattice(self, gens, ideal_list=None, reverse=False):
Fractional ideal (1), Fractional ideal (1)))
sage: A.basis_for_quaternion_lattice([1,i,j,k],[K.ideal(1),A.discriminant(),K.ideal(1),A.discriminant()])
((1, i, j, k), (Fractional ideal (1), Fractional ideal (10, b + 5), Fractional ideal (1), Fractional ideal (10, b + 5)))
sage: A.basis_for_quaternion_lattice([1,i+j+2*k,j+3*i,k],[K.ideal(1),A.discriminant(),K.ideal(1),A.discriminant()]) # random output
sage: A.basis_for_quaternion_lattice([1,i+j+2*k,j+3*i,k],[K.ideal(1),A.discriminant(),K.ideal(1),A.discriminant()])
((1, i + 3*j, j, k), (Fractional ideal (1), Fractional ideal (20, 2*b + 10), Fractional ideal (1), Fractional ideal (10, b + 5)))
"""
Expand Down Expand Up @@ -403,7 +403,7 @@ def basis_for_quaternion_lattice(self, gens, ideal_list=None, reverse=False):
I = [F.ideal(id) for id in I1]

#and back to sage quaternion algebra elements
basis_elts = [sum(Mnl * bl for Mnl, bl in zip(M.column(n),self.basis())) for n in range(M.ncols())]
basis_elts = [sum(Mnl * bl for Mnl, bl in zip(Mn,self.basis())) for Mn in M.rows()]

#if each ideal in I is principal, there is a basis:
#check
Expand Down

0 comments on commit aa554bc

Please sign in to comment.