On 2013-03-19, Victor Miller <victorsmil...@gmail.com> wrote: > ------=_Part_554_9793948.1363718282627 > Content-Type: text/plain; charset=ISO-8859-1 > > Suppose that A is an m by n integer matrix. Its Gram matrix is G = A*A^t. > If A is not full rank, then G has some eigenvalues of 0. If I do > G.LLL_gram() I get a somewhat uniformative error message like: > > Value Error: ma matrix from Full MatrixSpace of 10 by 2 dense matrices over > Integer Ring cannot be converted to a matrix in Full MatrixSpace of 10 by > 10 dense matrices over Integer Ring! > > I understand that pari (which is what I understand, actually computes > LLL_gram) doesn't like non-definite matrices. But, in this case it looks > like it returned something to SAGE of lower dimension (what?) and SAGE > didn't know what to do with it. Can the error message at least be changed > to something more informative.
This is certainly easy to fix, but here is a workaround that seems to work. Let's make a low rank, say, 3x3 matrix: sage: A=matrix([[1,2,3]]) sage: G=A.T*A; G [1 2 3] [2 4 6] [3 6 9] sage: x=G._pari_(); x # this is what PARI will get [1, 2, 3; 2, 4, 6; 3, 6, 9] sage: x.lllgram() # compute its LLL in PARI [1; 0; 0] HTH, Dmitrii > > I've found a work around for some of my matrices: Let N be some big > integer, and let G'= N*G + identity_matrix(G.nrows()). This perturbs G a > little so that the 0 eigenvalues go away. > > Victor > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@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.