On Sat, Mar 31, 2012 at 8:22 PM, Tom Bachmann <[email protected]> wrote: > > On 31.03.2012 16:05, Sergiu Ivanov wrote: >> >> Summarising: when you work in concrete rings (integers, reals, etc.) >> and focus on elements thereof, the "real" stuff is indeed in elements. >> However, if the focus is on the rings themselves, the situation is >> utterly different. Consider, for example, a quite real task of >> deciding whether a ring with a given set of generators is commutative >> or not. The focus is on rings. >> > > Maybe this is the crux of the matter. Some questions inherently deal with > the *whole* algebraic structure (is this ring commutative? is it a field?). > The elements themselves don't really enter. Other questions deal mostly with > elements (is this polynomial irreducible? do these polynomials generate a > radical ideal?). > > There are borderline questions, like "is this element invertible?" or "is > this relation trivial in the group we are studying?".
Yes, that's what I was trying to say. > I guess the reason why I did not consider this dichotomy so far is that > groebner basis computations seem, to me, to very much fall in the second > category (being about elements, not the whole ring). Indeed, you're absolutely right. However, the goal I follow by suggesting different data structures for rings is slightly more ambitious (I hope) than just serving the needs of Groebner walk. I am thinking of the moment when someone will be implementing ring theory in SymPy. I suggest designing a data structure which will be as future-ready as possible, so that one will eventually be able to replace my crude structures with better ones without too much hassle. In my vision, the framework of structures I suggest in my proposal is both minimal and serves my needs sufficiently well. I hope that this makes it quite future-ready. > Actually, thinking about it, this discussion does not seem terribly useful. > Either approach can emulate the other easily (one can define R.mul(a, b) to > return a*b, and one can define a*b to return R.mul(a,b), assuming elements > know to which ring they belong). How can one approach have a decisive > advantage over the other if they are almost equivalent? Well, what I have in mind is modelling some mathematical definitions with objects. In the mathematical setup, the operations of the ring and hence the ring itself are fully separate from the set on which it is defined. While the practical situations that have been brought up off-hand in this thread do not elucidate much difference, I am quite sure that this separation has an important number of implications, which we cannot forgo. Generally, when trying to do object-oriented modelling, I try to follow this rule of the thumb: model the entities you see in the real world as closely as possible. I'm not that experienced, though, so I'd be very glad to hear some people with software architect hats pronounce on this matter :-) 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.
