On Sep 22, 2008, at 11:37 PM, Mike Hansen wrote: > > Hello, > On Mon, Sep 22, 2008 at 11:34 PM, cesarnda <[EMAIL PROTECTED]> wrote: >> >> If I do: >> >> sage: MS = MatrixSpace(IntegerModRing(9), 5,5) >> sage: G = MS([[5, 0, 0, 0, 4],[4, 5, 0, 0, 0],[0, 4, 5, 0, 0],[0, >> 0,4, >> 5, 0], [0, 0, 0, 4, 5]]) >> sage: G.base_ring() >> Ring of integers modulo 9 >> >> is there a way to get the base ring as an integer? > > Do you mean you want the matrix as a matrix over the integers rather > than over the integers mod 9? If so, then you can do the following: > > sage: H = G.change_ring(ZZ); H > > [5 0 0 0 4] > [4 5 0 0 0] > [0 4 5 0 0] > [0 0 4 5 0] > [0 0 0 4 5] > sage: H.base_ring() > Integer Ring
Or, if you meant the modulus of the ring, you can get that with sage: G.base_ring().order() 9 - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@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-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---