Hi Nils, I actually fixed this bug already -- I think in response to a bug report from Thea a while ago. Unfortunately, I haven't released a new version of SAGE with the fix. I will be releasing a new version of SAGE within the next few days, hopefully. Do you want me to try to extract out a patch (I think I posted one in an email to Thea).
By the way, what do you think of: https://sage.math.washington.edu:8102/ William On 6/21/07, Nils Bruin <[EMAIL PROTECTED]> wrote: > > The bug below is actually a blocker for certain linear algebra > problems over Z/dZ. From what I can see, > apparently, elements of Integers(D) can be of one of IntegerMod_int, > IntegerMod_int64 or IntegerMod_gmp > and apparently they get mixed in the same parent. Coercion problems > ensue. > Unfortunately, resolving the problem is way beyond me. Would it be > possible for someone who knows about the architecture to look into > this problem? > > http://www.sagemath.org:9002/sage_trac/ticket/387 > > Example: > > A=matrix([(70, 49, -20, -34, 57), (-49, -14, 95, 43, 85), (-95, -63, > 68, 52, 12), (11,-16, -50, 43, 76), (-55, 83, 55, 40, -14)]) > D=A.determinant() > R=Integers(D) > MD=MatrixSpace(R,A.nrows(),A.ncols()) > AD=MD(A) > # You would expect elements of R and entries of AD to be of exactly > the same type. > # this is not the case, however: > print parent(AD.row(1)[1]) > print parent(R(3)) > # Indeed, the types of these are not the same: > print type(AD.row(1)[1]) > print type(R(3)) > # and this has consequences: You'd expect the following to work, but > it gives an error: > R(3)*AD.row(1) > > > > > -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
