Re: [sage-devel] Re: Groups and ParentWithGens vs. Parent

2012-11-07 Thread Robert Bradshaw
On Wed, Nov 7, 2012 at 2:43 AM, Florent Hivert wrote: > Hi, > >> > So, if you want a general framework, I could imagine that the following >> > could work. Provide Parent with a method, say, >> > def to_generator_data(self,x) >> > which by default raises a NotImplementedError. >> > And t

Re: [sage-devel] Re: Groups and ParentWithGens vs. Parent

2012-11-07 Thread Florent Hivert
Hi, > > So, if you want a general framework, I could imagine that the following > > could work. Provide Parent with a method, say, > > def to_generator_data(self,x) > > which by default raises a NotImplementedError. > > And then, there could be a method > > def from_generator_data(se

[sage-devel] Re: Groups and ParentWithGens vs. Parent

2012-11-05 Thread Volker Braun
I went through the Abelian groups and ported them over to the new Parent. Together with some cleanups to whatever I came across in the process. This is in http://trac.sagemath.org/13687 Since it is a pretty big patch I would appreciate if somebody could review it before conflicting stuff start

Re: [sage-devel] Re: Groups and ParentWithGens vs. Parent

2012-11-05 Thread Robert Bradshaw
On Mon, Nov 5, 2012 at 2:18 AM, Simon King wrote: > Hi Marco, > > On 2012-11-04, mmarco wrote: >> I don't know if this is the right place and time to ask this: what >> about morphisms for Parent with generators? I mean, in some cases, you >> can define a morphism just by passing a list with the i

[sage-devel] Re: Groups and ParentWithGens vs. Parent

2012-11-05 Thread mmarco
I think that, at some point, the framework should be aware of the internal operations in the corresponding parent. I mean: if we are talking about algebras, the expression of an element in terms of the generators will include products, sums, and multiplication by scalars. If we are talking about a

[sage-devel] Re: Groups and ParentWithGens vs. Parent

2012-11-05 Thread Simon King
Hi Marco, On 2012-11-04, mmarco wrote: > I don't know if this is the right place and time to ask this: what > about morphisms for Parent with generators? I mean, in some cases, you > can define a morphism just by passing a list with the images of the > generators to .hom() But apparentñy, it has

[sage-devel] Re: Groups and ParentWithGens vs. Parent

2012-11-04 Thread mmarco
I don't know if this is the right place and time to ask this: what about morphisms for Parent with generators? I mean, in some cases, you can define a morphism just by passing a list with the images of the generators to .hom() But apparentñy, it has to be done by hand for each case. Would it be pos

[sage-devel] Re: Groups and ParentWithGens vs. Parent

2012-11-03 Thread Simon King
Hi Volker, On 2012-11-02, Volker Braun wrote: > --=_Part_681_27110033.1351894239886 > Content-Type: text/plain; charset=ISO-8859-1 > > Is there any Parent that has generators in Sage? Yes, all have. That's to say, sage.structure.parent.Parent provides the infrastructure for generators. Jus