ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 23 Oct 2013 06:51:28 +0200How are free group homomorphisms implemented?https://ask.sagemath.org/question/10647/how-are-free-group-homomorphisms-implemented/I see from the documentation that homomorphisms are implemented for matrix groups, symmetric groups, and abelian groups. I would assume that homomorphisms would be implemented for free groups, but I get an error if I do the following:
<blockquote>
<code><p>
sage: F.<a,b> = FreeGroup(2)<p>
sage: F.hom([a,b]) # Should be unique homomorphism with a |--> a, b |--> b <p>
TypeError Traceback (most recent call last)
...<p>
TypeError: Unable to coerce x (=[a, b]) to a morphism in Set of Morphisms from Free Group on generators {a, b} to Free Group on generators {a, b} in Category of groups
</code>
</blockquote>
Do I have the syntax wrong, or are these not implemented?Wed, 23 Oct 2013 01:11:52 +0200https://ask.sagemath.org/question/10647/how-are-free-group-homomorphisms-implemented/Answer by vdelecroix for <p>I see from the documentation that homomorphisms are implemented for matrix groups, symmetric groups, and abelian groups. I would assume that homomorphisms would be implemented for free groups, but I get an error if I do the following:</p>
<blockquote>
<code><p>
sage: F.<a,b> = FreeGroup(2)</p><p>
sage: F.hom([a,b]) # Should be unique homomorphism with a |--> a, b |--> b </p><p>
TypeError Traceback (most recent call last)
...</p></code><p><code>
TypeError: Unable to coerce x (=[a, b]) to a morphism in Set of Morphisms from Free Group on generators {a, b} to Free Group on generators {a, b} in Category of groups
</code>
</p></blockquote>
<p>Do I have the syntax wrong, or are these not implemented?</p>
https://ask.sagemath.org/question/10647/how-are-free-group-homomorphisms-implemented/?answer=15591#post-id-15591Hello,
Free group are currently implemented using GAP and it seems that morphisms are not supported.
You may have a look at [sage-train-track](https://github.com/coulbois/sage-train-track) where a ad-hoc implementation of FreeGroup is provided together with its automorphisms... and much more.Wed, 23 Oct 2013 06:51:28 +0200https://ask.sagemath.org/question/10647/how-are-free-group-homomorphisms-implemented/?answer=15591#post-id-15591