Creating user-defined rings.
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)
?
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...