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.Tue, 12 Jun 2012 10:45:31 +0200Permutation group: (1234)=(12)(13)(14)https://ask.sagemath.org/question/9060/permutation-group-1234121314/How do I show in sage that
(1234)=(12)(13)(14)
I tried make use of:
PermutationGroup([1,2]) * PermutationGroup([1,3])
but it doesn't do what is needed.Tue, 12 Jun 2012 09:25:04 +0200https://ask.sagemath.org/question/9060/permutation-group-1234121314/Answer by kcrisman for <p>How do I show in sage that </p>
<pre><code> (1234)=(12)(13)(14)
</code></pre>
<p>I tried make use of:</p>
<pre><code> PermutationGroup([1,2]) * PermutationGroup([1,3])
</code></pre>
<p>but it doesn't do what is needed.</p>
https://ask.sagemath.org/question/9060/permutation-group-1234121314/?answer=13691#post-id-13691Sage's built-in help is useful here.
sage: PermutationGroup?
Definition: PermutationGroup(gens=None, gap_group=None, domain=None, canonicalize=True, category=None)
Docstring:
Return the permutation group associated to x (typically a list of
generators).
INPUT:
* "gens" - list of generators (default: "None")
* "gap_group" - a gap permutation group (default: "None")
* "canonicalize" - bool (default: "True"); if "True", sort
generators and remove duplicates
OUTPUT:
* A permutation group.
So indeed you get a permutation group, with these things as generators. You can't multiply groups.
A similar look at help will show you that `Permutation` does not give an element of a group, though you can convert an element of such a group to one.
But you *can* get group elements from your group. Try this.
sage: G = SymmetricGroup(4)
sage: G([(1,2)])
(1,2)
sage: G([(1,2)])*G([(1,3)])*G([(1,4)])
(1,2,3,4)
Tue, 12 Jun 2012 09:57:45 +0200https://ask.sagemath.org/question/9060/permutation-group-1234121314/?answer=13691#post-id-13691Comment by DSM for <p>Sage's built-in help is useful here.</p>
<pre><code>sage: PermutationGroup?
Definition: PermutationGroup(gens=None, gap_group=None, domain=None, canonicalize=True, category=None)
Docstring:
Return the permutation group associated to x (typically a list of
generators).
INPUT:
* "gens" - list of generators (default: "None")
* "gap_group" - a gap permutation group (default: "None")
* "canonicalize" - bool (default: "True"); if "True", sort
generators and remove duplicates
OUTPUT:
* A permutation group.
</code></pre>
<p>So indeed you get a permutation group, with these things as generators. You can't multiply groups.</p>
<p>A similar look at help will show you that <code>Permutation</code> does not give an element of a group, though you can convert an element of such a group to one.</p>
<p>But you <em>can</em> get group elements from your group. Try this.</p>
<pre><code>sage: G = SymmetricGroup(4)
sage: G([(1,2)])
(1,2)
sage: G([(1,2)])*G([(1,3)])*G([(1,4)])
(1,2,3,4)
</code></pre>
https://ask.sagemath.org/question/9060/permutation-group-1234121314/?comment=19623#post-id-19623`Permutation((1,2)) * Permutation((1,3)) * Permutation((1,4)) == Permutation((1,2,3,4))` should also work.
Tue, 12 Jun 2012 10:32:44 +0200https://ask.sagemath.org/question/9060/permutation-group-1234121314/?comment=19623#post-id-19623Comment by kcrisman for <p>Sage's built-in help is useful here.</p>
<pre><code>sage: PermutationGroup?
Definition: PermutationGroup(gens=None, gap_group=None, domain=None, canonicalize=True, category=None)
Docstring:
Return the permutation group associated to x (typically a list of
generators).
INPUT:
* "gens" - list of generators (default: "None")
* "gap_group" - a gap permutation group (default: "None")
* "canonicalize" - bool (default: "True"); if "True", sort
generators and remove duplicates
OUTPUT:
* A permutation group.
</code></pre>
<p>So indeed you get a permutation group, with these things as generators. You can't multiply groups.</p>
<p>A similar look at help will show you that <code>Permutation</code> does not give an element of a group, though you can convert an element of such a group to one.</p>
<p>But you <em>can</em> get group elements from your group. Try this.</p>
<pre><code>sage: G = SymmetricGroup(4)
sage: G([(1,2)])
(1,2)
sage: G([(1,2)])*G([(1,3)])*G([(1,4)])
(1,2,3,4)
</code></pre>
https://ask.sagemath.org/question/9060/permutation-group-1234121314/?comment=19622#post-id-19622Good point, but I don't think they'll be group elements, will they? Well, it's somewhat a semantic issue anyway until one starts using the actual methods of these classes.Tue, 12 Jun 2012 10:45:31 +0200https://ask.sagemath.org/question/9060/permutation-group-1234121314/?comment=19622#post-id-19622