Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to define / create a new Ring

Hi!

I just installed the version 6.5 of Sage. Then I saw in the help some page/tutorial about Basic Rings but I could not find an article (I googled) or an answer for the following:

How can I create a new ring? For example: How can I create a kind of ring of Integers (called ZZ in Sage) where I have only , say, even numbers?

Examples:

sage: sqrt(4) in myZZ True

sage: 3 in myZZ False

Thank you for any help!