Hi
Is it possible to create a Ring over an arbitrary set in Sage? I have
a Python class and would like my instances to form a Ring.
I read somewhere that the built-in sage.rings.integer.Integer class
inherits from the Element class to allow it to form a Ring. Is there a
simpler example anywhere?
I am perhaps expecting something along the lines of: -
class MySet:
def __init__(self,..):
...
def my_op1(self, element2)
...
R = Ring(MySet, my_op1, my_op2)
x = MySet()
y = MySet()
# I would expect this to be a SymbolicArithmetic object
expr = R.get_expression()
expr.add(x) # x
expr.multiply(y) # xy
expr.add(x) # xy + x
Thanks
Blair
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---