| 1 | initial version |
ZZ refers to the ring of integers, whereas Integer refers to the type of an element of the ring ZZ. When you execute, say ZZ(int(10)), int(10) is coerced to an Integer. In your example above you can verify this.
sage: print "Type of elements:", type(a), "vs", type(b), "vs", type(c)
Type of elements: <type 'sage.rings.integer.Integer'> vs <type 'sage.rings.integer.Integer'> vs <type 'sage.rings.integer.Integer'>
The elements a, b, and c are of the same type.
| 2 | improved style |
Yes, Integer is the type of elements in ZZ. ZZ refers to the ring of integers, whereas Integer refers to the type of an element of the ring ZZ. When you execute, say ZZ(int(10)), int(10) is coerced to an Integer. In your example above you can verify this.
sage: print "Type of elements:", type(a), "vs", type(b), "vs", type(c)
Type of elements: <type 'sage.rings.integer.Integer'> vs <type 'sage.rings.integer.Integer'> vs <type 'sage.rings.integer.Integer'>
The elements a, b, and c are of the same type.
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.