1 | initial version |
Sage uses the parent/element pattern for most mathematical objects, see the documentation on coercion for details. For integers the parent is IntegerRing
(with ZZ
as shortcut) and the element are Integer
.
sage: i = 1
sage: type(i)
sage.rings.integer.Integer
sage: type(i.parent())
sage.rings.integer_ring.IntegerRing_class
sage: ZZ is IntegerRing() is i.parent()
True