| 1 | initial version |
Maybe you can try to use the Zmod rings instead of the mod function?
sage: ring_q = Zmod(691) # defining the ring of integers modulo 691
sage: ring_q(345543423) # converting an integer to this ring
581
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.