pari's qflllgram function returns (given input a positive semidefinite
square G, not necessarily positive definite) a "unimodular" U such
that the columns of GT are an LLL-reduced basis for the lattice
spanned by the columns of G. That's from the documentation, but when
G is singular U will not be square, so I would not call it unimodular.
So what is wrong is Sage's interface in the case where G is not
definite. In the lines
MS = matrix_space.MatrixSpace(ZZ,n)
U = MS(U.python())
# Fix last column so that det = +1
if U.det() == -1:
for i in range(n):
U[i,n-1] = - U[i,n-1]
return U
in the first line it should say MatrixSpace(ZZ,n,U.ncols()) and then
the determinant fix should be omitted unless U.nows()==U.ncols().
That would be an easy patch!
John
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sage-support...@googlegroups.com.
> To post to this group, send email to
sage-s...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/sage-support?hl=en.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>