4.10.2.1 IntegerMod Objects

class IntegerMod
IntegerMod( parent, value)

Instances of class IntegerMod have the following functions (in addition to inherited functions and special functions):

copy,$  $ crt,$  $ is_square,$  $ lift,$  $ modulus,$  $ order,$  $ pari,$  $ rational_reconstruction,$  $ sqrt

Further documentation:

crt( other)

Use the Chinese Remainder Theorem to find an element of the integers modulo the product of the moduli that reduces to self and to other. The modulus of other must be coprime to the modulus of self.

order( )

Returns the order of self.

rational_reconstruction( )

sage: from integer_mod_ring import *
sage: R = IntegerModRing(97)
sage: a = R(2) / R(3)
sage: a
33
sage: a.rational_reconstruction()
2/3

Instances of class IntegerMod also have the following special functions:

__abs__,$  $ __add__,$  $ __cmp__,$  $ __div__,$  $ __float__,$  $ __int__,$  $ __invert__,$  $ __long__,$  $ __mod__,$  $ __mul__,$  $ __neg__,$  $ __pos__,$  $ __pow__,$  $ __radd__,$  $ __rdiv__,$  $ __rmul__,$  $ __rsub__,$  $ __sub__

Further documentation:

__mod__( right)
Returns the int got by reducing a lift of this modulo right.

See About this document... for information on suggesting changes.