bsdz
unread,Jan 22, 2009, 9:39:58 AM1/22/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-support
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