ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 22 Oct 2013 23:51:28 -0500How are free group homomorphisms implemented?http://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?Tue, 22 Oct 2013 18:11:52 -0500http://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>
http://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.Tue, 22 Oct 2013 23:51:28 -0500http://ask.sagemath.org/question/10647/how-are-free-group-homomorphisms-implemented/?answer=15591#post-id-15591