On Oct 30, 2006, at 11:51 PM, William Stein wrote:
> Generators is badly named. It should be SageObjectWithGenerators, > since > inheritence is an "is a" relationship, and everything that inherits > from a class should satisfy an "is a" relationship with it. E.g., > a polynomial Ring "is a" object with generators. David Kohel and I > discussed this sort of algebra stuff a long time ago, and decided that > if possible most parent objects in SAGE should have some sort of base > structure, e.g., a base ring. So I propose: > > class SageObjectWithGenerators(SageObject): > cdef gens (whatever that var is called) > > class SageObjectOverBaseWithGenerators(SageObjectWithGenerators): > cdef object base_ring > ... > > Then things like rings, matrix spaces, etc., will all inherit from > SageObjectOverBaseWithGenerators. Other things which don't > have a base ring (e.g., monoids, groups, etc.) inherit from > SageObjectWithGenerators. Does that work. First: is it safe to call it "base_ring"? Will it always be a *ring*? If you do it this way, then automatically every object with a base ring has to have generators too. Is this really what you want? Does this mean something like, we are assuming that the elements can literally be "generated" by the generators and the elements of the base ring? David --~--~---------~--~----~------------~-------~--~----~ 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/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
