[sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-09 Thread javier
You are absolutely right, GAP deals perfectly with the conjugacy classes of groups of matrices. Apparently what is not implemented is the conversion of GAP matrices back into sage matrices: sage: F = GF(5) sage: gens = [matrix(F,2,[1,2, -1, 1]), matrix(F,2, [1,1, 0,1])] sage: G = MatrixGroup(gens)

[sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-09 Thread Dima Pasechnik
[...] > > And finally for those groups who are not known to gap, the fallback > > (sage-only) method should be in the category FiniteGroups to be inherited by > > any group. > > I hadn't thought of that. Since all the groups I used are defined as > permutation groups I never ran into trouble, but

[sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-09 Thread javier
Hi there, I am trying to get my code moved to the source files, but am finding some problems (it is my first time!). What I did was: - cloning sage to my own branch (called sage-groups), - Added a new file $SAGE_ROOT/devel/sage-groups/sage/groups/ group_conjugacy_class.py with my class code - mod

Re: [sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-08 Thread William Stein
On Fri, Jan 8, 2010 at 10:26 AM, Mike Hansen wrote: > On Fri, Jan 8, 2010 at 12:19 PM, Simon King wrote: >> By the way, is there any chance to create a "libGAP", i.e., a way to >> avoid the pexpect interface, similar to what has been done in >> libsingular? > > See http://trac.sagemath.org/sage_t

Re: [sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-08 Thread David Joyner
On Fri, Jan 8, 2010 at 11:55 AM, javier wrote: > Hi all, > > I have been working on this and after a while decided that my original > approach wasn't the most appropriate and started rewriting everything > for scratch. > > After thinking about this problem making "conjugacy_class" a method > that

Re: [sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-08 Thread Mike Hansen
On Fri, Jan 8, 2010 at 12:19 PM, Simon King wrote: > By the way, is there any chance to create a "libGAP", i.e., a way to > avoid the pexpect interface, similar to what has been done in > libsingular? See http://trac.sagemath.org/sage_trac/ticket/6391 --Mike -- To post to this group, send an em

[sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-08 Thread Simon King
Hi all, On 8 Jan., 19:04, Nick Alexander wrote: > On 8-Jan-10, at 8:55 AM, javier wrote: > > After thinking about this problem making "conjugacy_class" a method > > that returns a list (or set) didn't feel right. GAP has many methods > > working on conjugacy classes, so the most natural thing to

Re: [sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-08 Thread Nick Alexander
On 8-Jan-10, at 8:55 AM, javier wrote: Hi all, I have been working on this and after a while decided that my original approach wasn't the most appropriate and started rewriting everything for scratch. After thinking about this problem making "conjugacy_class" a method that returns a list (or

[sage-devel] Re: Conjugacy classes: Sage vs GAP

2010-01-08 Thread javier
Hi all, I have been working on this and after a while decided that my original approach wasn't the most appropriate and started rewriting everything for scratch. After thinking about this problem making "conjugacy_class" a method that returns a list (or set) didn't feel right. GAP has many method

Re: [sage-devel] Re: Conjugacy classes: Sage vs GAP

2009-12-03 Thread Florent Hivert
> Yes, have a look at sage/groups/group.pyx. It has a FiniteGroup > class, where I think you should put your main method (that's what > Florent said as well, I think). Yep ! This will probably needs some cleanup when we will merge categories with the other generic stuff but I think this is the ri

Re: [sage-devel] Re: Conjugacy classes: Sage vs GAP

2009-12-03 Thread Alex Ghitza
Hi Javier, On Thu, Dec 03, 2009 at 11:03:43AM -0800, Robert Bradshaw wrote: > On Dec 3, 2009, at 10:04 AM, javier wrote: > > > This also makes sense. I don't really know which choice would be > > better. Maybe having both, doing something like > > > > def conjugacy_class(self): > >G = self.p

[sage-devel] Re: Conjugacy classes: Sage vs GAP

2009-12-03 Thread Rob Beezer
On Dec 3, 7:09 am, javier wrote: > My question: would it be interesting to include the wrapper for the > GAP function in sage? +1 There are places where Sage/GAP just give you one of something, when you might want all of them, and it is simply conjugacy that will produce them all. For small e

Re: [sage-devel] Re: Conjugacy classes: Sage vs GAP

2009-12-03 Thread Robert Bradshaw
On Dec 3, 2009, at 10:04 AM, javier wrote: > Hi there, > > On Dec 3, 5:08 pm, Florent Hivert > wrote: >> However, I thing it should be a method of the group: >>G.conjugacy_class(g). > > that was my original idea, to keep it close to GAP original > definition. > >> Or even of the element itsel

[sage-devel] Re: Conjugacy classes: Sage vs GAP

2009-12-03 Thread javier
Hi there, On Dec 3, 5:08 pm, Florent Hivert wrote: > However, I thing it should be a method of the group: >    G.conjugacy_class(g). that was my original idea, to keep it close to GAP original definition. > Or even of the element itself since it knows G as it's parent: >    g.conjugacy_class()

[sage-devel] Re: Conjugacy classes: Sage vs GAP

2009-12-03 Thread kcrisman
> And finally for those groups who are not known to gap, the fallback > (sage-only) method should be in the category FiniteGroups to be inherited by > any group. Speaking of such groups, this is a bit mysterious (sometimes a calculation will say to download the optional database, sometimes no err