On Dec 2, 2007 5:42 PM, Iftikhar Burhanuddin <[EMAIL PROTECTED]> wrote: > > Hi folks, > > Under the current coercion model would a coercion exception (of type > 'exceptions.TypeError') be raised, given that a python int and not a ZZ > integer is being coerced to an element of M_2(GF(7)), instead of the > computation going through? >
I'm not sure what you're asking, but to clarify the bug that Craig reported I think had absolutely nothing whatever to do with the coercion model. The problem was that the constructor for matrices mod n did correctly coerce elements to unsigned ints (in the range 0..n-1) in case of constructing a scalar matrix. -- William > Regards, > Ifti > > > On Sun, 2 Dec 2007, Craig Citro wrote: > > I haven't looked deeply into this at all, so it could be very easy > > pickings for someone who knows the coercion model (i.e. robert or > > david roe). something goes awry when you add an int to a matrix over a > > finite field, and one of the entries becomes 0. this is trac 1374, and > > here's the sample session there: > > > > sage: M = MatrixSpace(GF(5),2,2) > > > > sage: A = M([1,0,0,1]) > > > > sage: A - int(-1) > > > > [2 0] > > [0 2] > > > > sage: B = M([4,0,0,1]) > > > > sage: B - int(-1) > > > > > > ------------------------------------------------------------ > > Unhandled SIGBUS: A bus error occured in SAGE. > > This probably occured because a *compiled* component > > of SAGE has a bug in it (typically accessing invalid memory) > > or is not properly wrapped with _sig_on, _sig_off. > > You might want to run SAGE under gdb with 'sage -gdb' to debug this. > > SAGE will now terminate (sorry). > > ------------------------------------------------------------ > > > > -cc > > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com 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/ -~----------~----~----~----~------~----~------~--~---