Hi guys, Thanks for looking into this. I ended up working around the problem by lifting to Z and doing the charpoly there (I know in advance the output precision, and the complexity is not that important for my application, so it's no big deal). I've put up a patch for review here: http://sagetrac.org/sage_trac/ticket/793 (wink wink nudge nudge)
david On Mar 19, 10:00 am, David Kohel <drko...@gmail.com> wrote: > Hi, > > The algorithm used doesn't need to be specific to the p-adics, > but shouldn't apply an algorithm for fields or integral domains. > > Rather than the matrix code, it looks like this is the source of > the problem: > > sage: M.parent().base_ring() > 101-adic Ring with capped relative precision 2 > sage: R.is_integral_domain() > True > > With such a result, the wrong linear algebra is applied. > > One could possibly identify which algorithms to apply for real > complex fields, p-adics, and power series rings from this: > > sage: R.is_exact() > False > > Inexact rings are only approximations to mathematical > objects. However, in this case the intended ring is the > quotient ring Z/p^nZ (= Z_p/p^n Z_p), which is 'exact' > (i.e. a well-defined ring) but is not an integral domain. > > I would hope that the matrix code would then pick up a > valid algorithm to apply, even if not the most efficient. > > --David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---