Hi Marco, On 18 Apr., 21:28, mmarco <mma...@unizar.es> wrote: > I am trying to implement free groups in sage. I try to inherit from > ParentWithGens, and seems to work.
I recommend to use sage.structure.parent.Parent, which also supports generators. If I recall correctly, ParentWithGens is very old stuff that does not use the coercion framework that exists for Parent. > But when i call the .hom procedure > passing the image of the generators, it fails. > ... > def gap(self): > return self._gap_repr_ Note: As much as I know, one should not implement a method "gap", but a method "gap_init" (or "_gap_init_"? I am not sure). Sorry, I guess changing from ParentWithGens to plain Parent would probably not be enough to solve the problem. But it should be a step into the right direction. The people on sage-combinat-devel could tell you more. Best regards, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org