Hi Robert!

On 10 Nov., 18:31, Robert Goss <[email protected]> wrote:
> I am trying to compute the fundamental group of some simplicial
> complexes in sage. Is there a way of creating a group with a given set
> of generators and relations?

You could use the fact that GAP is part of Sage. Using the GAP
interface, you could do the following, although this seems a bit
awkward:

# Note the combination of single quote and double quote, '"a"'.
# This is to ensure that GAP recieves a string.
sage: F = gap.FreeGroup('"a"','"b"')

# Make the generators known to Sage:
sage: a,b = F.GeneratorsOfGroup()

# Create the factor group:
sage: G = F/gap([a^3,b^2,(a*b)^3])

# Indeed, the result makes sense:
sage: G.Order()
12
sage: (G.1*G.2)^4 == G.1*G.2
True

# Now you can get the presentation of G
# by the usual GAP commands, but
# used in Python syntax:
sage: G.PresentationFpGroup()
<presentation with 2 gens and 3 rels of total length 11>

If I am not mistaken, Free Groups are not directly available in Sage.
It is a shame, since I think wrapping GAP's functionality would be
pretty straight forward.
I think Sage should eventually be able to do
  F.<a,b> = FreeGroup()
  G = F/[a^3,b^2,(a*b)^3]

Best regards,
Simon

-- 
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-support
URL: http://www.sagemath.org

Reply via email to