On Fri, Mar 30, 2012 at 11:52 PM, Aaron Meurer <[email protected]> wrote: > > In what way can it not represent any ring?
Sorry, I chose the wrong word. Indeed the class Ring can represent any ring, just as a Domain (the parent class of Ring) can represent any algebraic domain. However, the Ring class knows nothing of the ring operations. Instead (at least in my reading), it relies on the objects to implement the corresponding operations. This creates an algebraically weird bound between elements and the ring operations, while oddly leaving the ring aside. Therefore, if I define a type of elements MyElement, it can only be a member of one ring. Moreover, I cannot define a ring and an abelian group (with a group operation different from the addition in the ring) over a set of MyElements, because the operations are bound to MyElements instead of being tied with the ring or the group. There is yet a different aspect to this problem. When working with algebraic structures we are certainly willing to know some stuff about the operations, like whether they are commutative, associative, etc. With the current design of Ring in polys, one will again have to include all this metadata into the type of the elements of the ring, which is obviously very bad. I do understand that the design of Ring has solid background and I in no way attempt to say that it has been implemented wrong. However, I seriously doubt that this class can actually serve as a good representation of an abstract ring. Sergiu -- You received this message because you are subscribed to the Google Groups "sympy" group. 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/sympy?hl=en.
