[sage-devel] Re: GAP interface: complicated objects

2007-06-01 Thread Nathan Dunfield
On May 31, 11:38 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > > Now there is a GAP package that allows use of ACE within GAP, and > > perhaps that offers better performance. I'll give it a try tomorrow > > and report back. > > I've made it an optional SAGE package and posted it to the reposi

[sage-devel] Re: GAP interface: complicated objects

2007-05-31 Thread William Stein
On 5/31/07, Nathan Dunfield <[EMAIL PROTECTED]> wrote: > On May 31, 3:10 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > > Do you understand why Magma is *much* faster than GAP at finding > > low-index subgroups? Is it just compiled versus interpreted code, or > > does MAGMA implement a much bett

[sage-devel] Re: GAP interface: complicated objects

2007-05-31 Thread Nathan Dunfield
On May 31, 3:10 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > Do you understand why Magma is *much* faster than GAP at finding > low-index subgroups? Is it just compiled versus interpreted code, or > does MAGMA implement a much better algorithm? William, Both programs use the same basic coset

[sage-devel] Re: GAP interface: complicated objects

2007-05-31 Thread William Stein
On 5/31/07, Nathan Dunfield <[EMAIL PROTECTED]> wrote: > William, David, and Jack, > > Many thanks for all the excellent suggestions. Initially, I'll use > Jack's local variable trick, though as David says a more complete > implementation would probably want to keep track of the parent free > gr

[sage-devel] Re: GAP interface: complicated objects

2007-05-31 Thread Nathan Dunfield
William, David, and Jack, Many thanks for all the excellent suggestions. Initially, I'll use Jack's local variable trick, though as David says a more complete implementation would probably want to keep track of the parent free group. There's also a clean multistep way that doesn't introduce a

[sage-devel] Re: GAP interface: complicated objects

2007-05-28 Thread Jack Schmidt
One trick to get a few local temporary variables in GAP is to use functions. For instance: sage: gap.new("CallFuncList(function() local F; F := FreeGroup(2); return F/[F.1*F.2*F.1^-1*F.2^-1]; end,[])") I believe David Joyner has already suggested a better method for this particular example, s

[sage-devel] Re: GAP interface: complicated objects

2007-05-28 Thread David Joyner
To create a fp group you have to define relations on the generators of a free group. To define the generators, you have to have a notation for the group. Why not have the _init_ method of the class define a "(free) base group", "generators (of the free gp)", "relations"? Something roughly (this is

[sage-devel] Re: GAP interface: complicated objects

2007-05-28 Thread William Stein
On 5/28/07, Nathan Dunfield <[EMAIL PROTECTED]> wrote: > I'm trying to hack up a quick finitely presented group class, and am > trying to write the _gap_init_ method. In simple cases, _gap_init_ > returns a string, but I can't come up with one that works; e.g. the > following fails > > sage: gap