Tom, I think I understand your points, but I'd still like to ask you
whether you find it acceptable to have the classes I have suggested in
SymPy?


Also, I think we got a little carried away by the whole Ring.mul vs __mul__ business. I think it has been established now that the approaches are interchangeable. Regarding other aspects of your proposal:

- "class Ring which will contain two instances of Operation and will have only the basic functions, such as storing a set of generators."

This is *more* concrete than the current Ring class. In particular, what do you mean by storing a set of generators? What are generators of QQ? What of ZZ(x)?

- deriving RingIdeal from ring, treating it as a subring:

I don't think that makes sense. Ideals have no natural multiplicative unit, whereas a type of ring I tend to think of has (admittedly, this may sometimes be relaxed). But I do agree there should be an Ideal class, which somehow relates to a particular ring. [I'm from a commutative algebra background. To me an ideal is a particular kind of module. However, I think it is helpful to have a separate class, since there are a couple of operations that make sense on ideals that don't on modules.]

- PolynomialRingIdeal will store a reference to the field

What for? It stores a reference to the ring, which already has a reference to the field.


I think I should make it clear that I agree that the kinds of classes you sketch are desirable and needed. As I have said a couple of times I am somewhat reluctant to designing large, boiler-plate class hierarchies (as you say, most of your classes will not really *do* anything), mainly because I don't feel confident I can anticipate the needs of *actual* code correctly. However, this should not discourage you. If you feel it helps your project, by all means implement these classes (imho).

As I have also said before, I have some interest in implementing commutative algebra / algebraic geometry code for sympy myself. But as I said, I feel like I work in a "lower level" of the class hierarchy. I may create classes called e.g. "Ideal", but please feel free to understand them as "ParticularIdeal", i.e. so that you can add more suitable, general base classes above.

Best,
Tom

--
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.

Reply via email to