[sage-support] Re: Inverse in integer mod ring
On Apr 5, 7:43 am, William Stein wrote: > On Sat, Apr 4, 2009 at 2:20 PM, Kwankyu wrote: > > > In the example above, R(3)^-1 produces the right answer (my mistake). > > Anyway the ticket for inverse operation for matrices over integer mod > > ring is now in Ticket #5683. > > > Kwankyu > > I posted a patch athttp://trac.sagemath.org/sage_trac/ticket/5683 > > Somebody should review it. The patch now has a positive review. John Cremona > > William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Inverse in integer mod ring
On Sat, Apr 4, 2009 at 2:20 PM, Kwankyu wrote: > > In the example above, R(3)^-1 produces the right answer (my mistake). > Anyway the ticket for inverse operation for matrices over integer mod > ring is now in Ticket #5683. > > Kwankyu I posted a patch at http://trac.sagemath.org/sage_trac/ticket/5683 Somebody should review it. William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Inverse in integer mod ring
In the example above, R(3)^-1 produces the right answer (my mistake). Anyway the ticket for inverse operation for matrices over integer mod ring is now in Ticket #5683. Kwankyu --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Inverse in integer mod ring
On Sat, Apr 4, 2009 at 1:12 PM, Kwankyu wrote: > > Thanks Robert. But inverse operation in non integral domain is not > supposed to be implemented in Sage? or is it just a missing feature > yet? Missing feature. Somebody should *definitely* implement this. A first reasonable thing would be "lift to ZZ, invert, reduce". Make a trac ticket. William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Inverse in integer mod ring
Thanks Robert. But inverse operation in non integral domain is not supposed to be implemented in Sage? or is it just a missing feature yet? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Inverse in integer mod ring
On Apr 4, 2009, at 12:55 PM, Kwankyu wrote: > Hi, > > I get this: > > sage: R=IntegerModRing(8) > sage: m=matrix(R,2,[2,1,3,3]);m.det() > sage: m.inverse() > Traceback (most recent call last): > ... > TypeError: self must be an integral domain. > sage: m^-1 > Traceback (most recent call last): > ... > TypeError: self must be an integral domain. > > Actually, R(3)^-1 produces an error message. I use Sage 3.4. Is > someone implementing the inverse operation in integer mod rings? You could try lifting, computing the inverse there, then reducing. sage: m.change_ring(ZZ).inverse().change_ring(R) [1 5] [7 6] sage: m.change_ring(ZZ).inverse().change_ring(R) * m [1 0] [0 1] The problem is that the inverse is typically defined over the fraction field, and so it must be an integral domain to have one. - Robert --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---