Creating user-defined rings.

asked 2017-06-08 10:19:07 +0200

I want to create rings of the form {-(p-1)/2, ... , 0, ... , (p-1)/2} , but Zmod(p) gives {0, ... , p-1}. How can this be done? Is there a way I could create custom-rings from lists? Like range(-d. d+1) ?

edit retag flag offensive close merge delete


I will just point out that the Sage integer modulus rings do include these, but by default use the least nonnegative residue. If you want least absolute residues you still can use them, then will just be printed in the "usual" way. You could conceivably put in some custom _repr_ method for this...

kcrisman gravatar imagekcrisman ( 2017-06-08 13:54:22 +0200 )edit