Ring over arbitrary Set

1 view
Skip to first unread message

bsdz

unread,
Jan 22, 2009, 9:39:58 AM1/22/09
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
Reply all
Reply to author
Forward
0 new messages