| Home | Trees | Indices | Help |
|---|
|
|
Ring $\Z/n\Z$ of integers modulo $n$
EXAMPLES:
sage: R = Integers(97)
sage: a = R(5)
sage: a**100000000000000000000000000000000000000000000000000000000000000
61
This example illustrates the relation between $\Z/p\Z$ and $\F_p$. In
particular, there is a canonical map to $\F_p$, but not in the other
direction.
sage: r = Integers(7)
sage: s = GF(7)
sage: r.has_coerce_map_from(s)
False
sage: s.has_coerce_map_from(r)
True
sage: s(1) + r(1)
2
sage: parent(s(1) + r(1))
Finite Field of size 7
sage: parent(r(1) + s(1))
Finite Field of size 7
We list the elements of $\Z/3\Z$
sage: R = Integers(3)
sage: list(R)
[0, 1, 2]
AUTHORS
-- William Stein (initial code)
-- David Joyner (2005-12-22): most examples
-- Robert Bradshaw (2006-08-24): convert to SageX
-- William Stein (2007-04-29): square_roots_of_one
|
|||
|
IntegerModRing_generic The ring of integers modulo N, with N composite. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_objsIntegerModRing =
|
|||
|
|||
Return the quotient ring $\ZZ / n\ZZ$.
INPUT:
order -- integer (default: 0), positive or negative
EXAMPLES:
sage: IntegerModRing(15)
Ring of integers modulo 15
sage: IntegerModRing(7)
Ring of integers modulo 7
sage: IntegerModRing(-100)
Ring of integers modulo 100
Note that you can also use \code{Integers}, which is a synonym
for \code{IntegerModRing}.
sage: Integers(18)
Ring of integers modulo 18
|
Return True if x is an integer modulo ring.
EXAMPLES:
sage: R = IntegerModRing(17)
sage: is_IntegerModRing(R)
True
sage: is_IntegerModRing(GF(13))
True
sage: is_IntegerModRing(GF(4, 'a'))
False
sage: is_IntegerModRing(10)
False
sage: is_IntegerModRing(ZZ)
False
|
Return the quotient ring $\ZZ / n\ZZ$.
INPUT:
order -- integer (default: 0), positive or negative
EXAMPLES:
sage: IntegerModRing(15)
Ring of integers modulo 15
sage: IntegerModRing(7)
Ring of integers modulo 7
sage: IntegerModRing(-100)
Ring of integers modulo 100
Note that you can also use \code{Integers}, which is a synonym
for \code{IntegerModRing}.
sage: Integers(18)
Ring of integers modulo 18
|
Return the quotient ring $\ZZ / n\ZZ$.
INPUT:
order -- integer (default: 0), positive or negative
EXAMPLES:
sage: IntegerModRing(15)
Ring of integers modulo 15
sage: IntegerModRing(7)
Ring of integers modulo 7
sage: IntegerModRing(-100)
Ring of integers modulo 100
Note that you can also use \code{Integers}, which is a synonym
for \code{IntegerModRing}.
sage: Integers(18)
Ring of integers modulo 18
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:28 2008 | http://epydoc.sourceforge.net |