Hi, I'm getting a strange error message in the library that I'm having trouble reproducing at the prompt for determinants over GF(2). The full commands to create the message are below, using the sage in ~jonhanke/sage3.3.rc0_bad directory on the sage.math machine. Thanks,
-Jon =) ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------- | Sage Version 3.3.rc0, Release Date: 2009-02-11 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: sage: sage: MM = matrix(ZZ, 6, 6, [0, 0, 1, 2, 2, 2, 0, 0, 0, 1, 0, 1, 1, 0, 2, 2, 3, 0, 2, 1, 2, 3, 1, 2, 2, 0, 3, 1, 1, 0, 2, 1, 0, 2, 0, 1]) sage: QQ = QuadraticForm(ZZ, 2*MM) sage: QQ.maximal_form() Watson lattice B = [0 0 2 4 4 4] [0 0 0 2 0 2] [2 0 4 4 6 0] [4 2 4 6 2 4] [4 0 6 2 2 0] [4 2 0 4 0 2] pp1 = [2, 3] pp2 = [2, 3] p = 2 small_gram = [15 7 12 6 3 6] [ 7 5 6 6 0 3] [12 6 9 6 3 6] [ 6 6 6 6 0 3] [ 3 0 3 0 0 0] [ 6 3 6 3 0 0] small_gram_det = -81 small_gram_ed = [1, 1, 1, 1, 1, 1] --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/jonhanke/.sage/temp/ sage.math.washington.edu/20191/_home_jonhanke__sage_init_sage_0.py in <module>() /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/quadratic_forms/quadratic_form__neighbors.pyc in maximal_form(self) 308 print "small_gram_det = ", small_gram.det() 309 print "small_gram_ed = ", small_gram.elementary_divisors() --> 310 Tp = find_basis_of_maximal_isotropic_subspace(matrix(GF(p), small_gram)) 311 TZ = matrix(ZZ,Tp).transpose() * dp_cols_small.transpose() 312 T_huge = T_huge.augment(cofacp*TZ) /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/quadratic_forms/extras.pyc in find_basis_of_maximal_isotropic_subspace(G) 105 106 ## Find one isotropic vector --> 107 v = find_isotropic_vector_at_prime(G) 108 109 ## Check if we're done. /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/quadratic_forms/extras.pyc in find_isotropic_vector_at_prime(G) 38 p = G.parent().base_ring().characteristic() 39 ## Check that G % p is non-degenerate... or allow it an use the kernel. ---> 40 G_det = G.det() 41 if G_det == 0: 42 raise NotImplementedError, "Must input a non-degenerate matrix over GF(p)." /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/matrix/matrix2.so in sage.matrix.matrix2.Matrix.det (sage/matrix/matrix2.c:6331)() /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/matrix/matrix_modn_dense.so in sage.matrix.matrix_modn_dense.Matrix_modn_dense.determinant (sage/matrix/matrix_modn_dense.c:10704)() /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/matrix/matrix2.so in sage.matrix.matrix2.Matrix.determinant (sage/matrix/matrix2.c:5951)() /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/matrix/matrix_modn_dense.so in sage.matrix.matrix_modn_dense.Matrix_modn_dense.charpoly (sage/matrix/matrix_modn_dense.c:7109)() /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/matrix/matrix2.so in sage.matrix.matrix2.Matrix.charpoly (sage/matrix/matrix2.c:7195)() /home/jonhanke/sage-3.3.rc0/local/lib/python2.5/site-packages/sage/matrix/matrix_modn_dense.so in sage.matrix.matrix_modn_dense.Matrix_modn_dense._charpoly_hessenberg (sage/matrix/matrix_modn_dense.c:10131)() TypeError: Cannot convert sage.matrix.matrix_mod2_dense.Matrix_mod2_dense to sage.matrix.matrix_modn_dense.Matrix_modn_dense sage: ------------------------------------------------------------------------------------------------------------------------------------------------------- sage: G = matrix(GF(2),[1,1,0,0,1,0, 1,1,0,0,0,1, 0,0,1,0,1,0, 0,0,0,0,0,1, 1,0,1,0,0,0, 0, 1,0,1,0,0 ]) sage: G [1 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 0] sage: G = matrix(GF(2),6,6,[1,1,0,0,1,0, 1,1,0,0,0,1, 0,0,1,0,1,0, 0,0,0,0,0,1, 1,0,1,0,0,0, 0, 1,0,1,0,0 ]) sage: G [1 1 0 0 1 0] [1 1 0 0 0 1] [0 0 1 0 1 0] [0 0 0 0 0 1] [1 0 1 0 0 0] [0 1 0 1 0 0] sage: G.det() 1 sage: type(G) <type 'sage.matrix.matrix_mod2_dense.Matrix_mod2_dense'> sage: G = matrix(ZZ,6,6,[1,1,0,0,1,0, 1,1,0,0,0,1, 0,0,1,0,1,0, 0,0,0,0,0,1, 1,0,1,0,0,0, 0, 1,0,1,0,0 ]) sage: G2 = matrix(GF(2),G) sage: G2.det() 1 sage: --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---