<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://leandrovendramin.org/magma/feed.xml" rel="self" type="application/atom+xml" /><link href="https://leandrovendramin.org/magma/" rel="alternate" type="text/html" /><updated>2026-03-08T16:01:44+00:00</updated><id>https://leandrovendramin.org/magma/feed.xml</id><title type="html">VUB Magma Seminar</title><subtitle></subtitle><author><name>VUB Algebra Research Group</name><email>Leandro.Vendramin@vub.be</email></author><entry><title type="html">Some small Nichols algebras</title><link href="https://leandrovendramin.org/magma/questions/some-small-nichols-algebras/" rel="alternate" type="text/html" title="Some small Nichols algebras" /><published>2026-03-07T00:00:00+00:00</published><updated>2026-03-07T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/questions/some-small-nichols-algebras</id><content type="html" xml:base="https://leandrovendramin.org/magma/questions/some-small-nichols-algebras/"><![CDATA[<p>In <a href="https://leandrovendramin.org/heckenberger/">Heckenberger’s course</a> <em>Nichols
algebras and root systems</em> there are three exercises where one needs to compute
the dimension of certain small Nichols algebras over certain
two-dimensional (complex) braided vector spaces of diagonal type.</p>

<p>We need to construct quantum symmetrizers. First, we define the braiding
$c_i$ as an endomorphism of $V^{\otimes n}$. For this purpose, we simply compute
$c_i=\operatorname{id}^{\otimes (i-1)}\otimes
c\otimes\operatorname{id}^{\otimes(n-i-1)}$.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; Braiding := function(c, i, n)
function&gt; d := Isqrt(Nrows(c));
function&gt; R := BaseRing(c);
function&gt; return TensorProduct(TensorProduct(IdentityMatrix(R, d^(i-1)), c),\
 IdentityMatrix(R, d^(n-i-1)));
function&gt; end function;
</code></pre></div></div>
<p>We also need the shuffle map, namely 
$\operatorname{id}+c_1+c_1c_2+\cdots+c_1c_2\cdots c_{n-1}$.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; ProductOfBraidings := function(c, i, n)
function&gt; m := Braiding(c, 1, n);
function&gt; for k in [2..i] do
function|for&gt; m := m*Braiding(c, k, n);
function|for&gt; end for;
function&gt; return m;
function&gt; end function;
</code></pre></div></div>
<p>Now, to compute the quantum symmetrizer, we use the recursive formula 
$S_{n+1}=(S_n\otimes\operatorname{id})(
\operatorname{id}+c_1+c_1c_2+\cdots+c_1c_2\cdots c_n)$.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; Symmetrizer := function(c, n)
function&gt; d := Isqrt(Nrows(c));
function&gt; R := BaseRing(c);
function&gt; if n eq 1 then
function|if&gt; return IdentityMatrix(R, d);
function|if&gt; end if;
function&gt; m := IdentityMatrix(R, d^n);
function&gt; for i in [1..n-1] do
function|for&gt; m := m + ProductOfBraidings(c, i, n);
function|for&gt; end for;
function&gt; return TensorProduct(IdentityMatrix(R, d), $$(c, n-1))*m;
function&gt; end function;
</code></pre></div></div>
<p>The following function computes the dimensions of homogeneous
components of a Nichols algebra:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; ComputeDimension := function(c, n)
function&gt; if n eq 0 then
function|if&gt; return 1;
function|if&gt; else
function|if&gt; return Rank(Symmetrizer(c, n));
function|if&gt; end if;
function&gt; end function;
</code></pre></div></div>
<p>Heckenberger’s exercises are the following. 
Let $V$ be a complex vector space with basis $x_1,x_2$. The braidings 
are of the form $c(x_i\otimes x_j)=q_{ij} x_j\otimes x_i$ for $i,j\in{1,2}$. 
There are three braidings to consider:</p>
<ol>
  <li>$q_{11}=q_{22}=-1$ and $q_{12}q_{21}=1$.</li>
  <li>$q_{11}=q_{22}=-1$ and $q_{12}q_{21}=-1$.</li>
  <li>$q_{11}=q_{22}=-1$ and $q_{12}q_{21}=\omega$, where $\omega^2+\omega+1=0$.</li>
</ol>

<p>So we create a braiding for each $2\times 2$ matrix $q$.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; DimensionTwoDiagonalBraiding := function(q)
function&gt; local R;
function&gt; R := BaseRing(q);
function&gt; return Matrix(R, [
function|return&gt; [q[1,1], 0, 0, 0],
function|return&gt; [0, 0, q[1,2], 0],
function|return&gt; [0, q[2,1], 0, 0],
function|return&gt; [0, 0, 0, q[2,2]]
function|return&gt; ]);
function&gt; end function;
</code></pre></div></div>

<p>Let us solve the exercise for the first braiding, namely</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; c := DimensionTwoDiagonalBraiding(Matrix(Rationals(), [[-1,-1],[-1,-1]]));
&gt; c;
[-1  0  0  0]
[ 0  0 -1  0]
[ 0 -1  0  0]
[ 0  0  0 -1]
</code></pre></div></div>
<p>Now use the following code to get some dimensions of homogeneous components:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; c := DimensionTwoDiagonalBraiding(Matrix(Rationals(), [[-1,-1],[-1,-1]]));
&gt; k := 0;
&gt; dim := 0;
&gt; repeat
repeat&gt; d := ComputeDimension(c, k);
repeat&gt; if not d eq 0 then
repeat|if&gt; print d;
repeat|if&gt; end if;
repeat&gt; dim := dim+d;
repeat&gt; k := k+1;
repeat&gt; until d eq 0;
1
2
1
&gt; dim 
4
</code></pre></div></div>
<p>For the second item, we need to consider the following braiding:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; c := DimensionTwoDiagonalBraiding(Matrix(Rationals(), [[-1,1],[-1,-1]]));
&gt; c;
[-1  0  0  0]
[ 0  0  1  0]
[ 0 -1  0  0]
[ 0  0  0 -1]
</code></pre></div></div>
<p>The same code, applied to this braiding,
produces the sequence of dimensions 
<code class="language-plaintext highlighter-rouge">1, 2, 2, 2, 1</code> 
and hence an algebra of dimension 8. 
For the third exercise, the braiding is the following:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; c := DimensionTwoDiagonalBraiding(Matrix(K, [[-1,w],[1,-1]]));
&gt; c;
[-1  0  0  0]
[ 0  0  w  0]
[ 0  1  0  0]
[ 0  0  0 -1]
</code></pre></div></div>
<p>where <code class="language-plaintext highlighter-rouge">w</code> is a primitive cubic root of unity.  The dimensions of homogeneous
components are <code class="language-plaintext highlighter-rouge">1, 2, 2, 2, 2, 2, 1</code> and the dimension of the algebra is 12.</p>

<h3 id="better-with-sparce-matrices">Better with sparce matrices?</h3>

<p>There is a trick to try to gain some speed: use <code class="language-plaintext highlighter-rouge">SparseMatrix</code>
for the quantum symmetrizer. Here is an alternative code for the function
<code class="language-plaintext highlighter-rouge">ComputeDimension</code>:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; ComputeDimensionSparseMatrix := function(c, n)
function&gt; if n eq 0 then
function|if&gt; return 1;
function|if&gt; else
function|if&gt; return Rank(SparseMatrix(Symmetrizer(c, n)));
function|if&gt; end if;
function&gt; end function;
</code></pre></div></div>
<p>In these examples, I cannot find a huge speed improvement, though.</p>]]></content><author><name>Leandro Vendramin</name></author><category term="questions" /><category term="algebra" /><category term="Nichols algebra" /><summary type="html"><![CDATA[In Heckenberger’s course Nichols algebras and root systems there are three exercises where one needs to compute the dimension of certain small Nichols algebras over certain two-dimensional (complex) braided vector spaces of diagonal type.]]></summary></entry><entry><title type="html">Structure constants</title><link href="https://leandrovendramin.org/magma/questions/structure-constants/" rel="alternate" type="text/html" title="Structure constants" /><published>2026-01-16T00:00:00+00:00</published><updated>2026-01-16T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/questions/structure-constants</id><content type="html" xml:base="https://leandrovendramin.org/magma/questions/structure-constants/"><![CDATA[<p>Are algebras given by structure constants better?</p>

<p>Magma can work with finite-dimensional algebras, but this can be tricky. Let us
start with the <em>quaternion algebra</em> $\langle i,j: i^2=j^2=-1, ij=-ji\rangle$.
We can introduce this algebra by generators and relations:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; F&lt;a,b&gt; := FreeAlgebra(Rationals(), 2);
&gt; A&lt;i,j&gt; := quo&lt;F|a^2+1,b^2+1,a*b+b*a&gt;;
&gt; i^2;
-1
&gt; j^2;
-1
&gt; i*j;
-j*i
&gt; Dimension(A);
4
</code></pre></div></div>
<p>But the problem is that we cannot do very much with this presentation: asking
for a basis, the center, or the Jacobson radical produces an error message.</p>

<p>As an alternative, we can construct the algebra using its <em>structure
constants</em>.  Recall that if $A$ is an $n$-dimensional algebra with basis
$e_1,\dots,e_n$, its structure constants are the scalars $a_{ijk}$ such that
$e_ie_j=\sum_{k=1}^na_{ijk}e_k$ for all $1\leq i,j\leq n$. Let us 
construct the array of structure constants of the quaternion algebra. For this, let 
$n=4$, $e_1=1$, $e_2=i$, $e_3=j$ and $e_4=k$. Since 
$e_2e_1=e_2$
we get that 
$a_{211}=a_{213}=a_{214}=0$ and 
$a_{212}=1$. Similarly, 
since $e_2^2=-e_1$, 
$a_{221}=-1$ and $a_{222}=a_{223}=a_{224}=0$. In this way 
we get the structure constants:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; a := [[[ 0 : k in [1..4]] : j in [1..4]] : i in [1..4]];
&gt; a[1][1][1] := 1;
&gt; a[1][2][2] := 1;
&gt; a[1][3][3] := 1;
&gt; a[1][4][4] := 1;
&gt; a[2][1][2] := 1;
&gt; a[2][2][1] := -1;
&gt; a[2][3][4] := 1;
&gt; a[2][4][3] := -1;
&gt; a[3][1][3] := 1;
&gt; a[3][2][4] := -1;
&gt; a[3][3][1] := -1;
&gt; a[3][4][2] := 1;
&gt; a[4][1][4] := 1;
&gt; a[4][2][3] := 1;
&gt; a[4][3][2] := -1;
&gt; a[4][4][1] := -1;
</code></pre></div></div>

<p>Now we can construct the quaternion algebra as the 
algebra with that particular structure constants:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; A := Algebra&lt; Rationals(), 4 | a &gt;;
&gt; Dimension(A);
4
&gt; Basis(A);
[ (1 0 0 0), (0 1 0 0), (0 0 1 0), (0 0 0 1) ]
&gt; JacobsonRadical(A);
Algebra of dimension 0 with base ring Rational Field
&gt; Center(A);
Algebra of dimension 1 with base ring Rational Field
&gt; IsSimple(A);
true
</code></pre></div></div>
<p>Of course, we could have done this:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; A&lt;i,j&gt; := QuaternionAlgebra&lt;Rationals()|-1, -1&gt;;
&gt; Basis(A);
[ 1, i, j, k ]
&gt; Center(A);
Associative Algebra of dimension 1 with base ring Rational Field
&gt; JacobsonRadical(A);
Associative Algebra of dimension 0 with base ring Rational Field
&gt; IsSimple(A);
true
</code></pre></div></div>]]></content><author><name>VUB Algebra Research Group</name></author><category term="questions" /><category term="algebra" /><category term="structure constants" /><summary type="html"><![CDATA[Are algebras given by structure constants better?]]></summary></entry><entry><title type="html">Permutation matrices</title><link href="https://leandrovendramin.org/magma/questions/permutation-matrices/" rel="alternate" type="text/html" title="Permutation matrices" /><published>2025-12-17T00:00:00+00:00</published><updated>2025-12-17T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/questions/permutation-matrices</id><content type="html" xml:base="https://leandrovendramin.org/magma/questions/permutation-matrices/"><![CDATA[<p>How we deal with permutation matrices?</p>

<p>In Magma, vectors are row vectors and permutation matrices act on the right.
For a permutation $\sigma$, 
the corresponding permutation matrix constructed 
with <code class="language-plaintext highlighter-rouge">PermutationMatrix</code> 
permutes the coordinates according to $\sigma$. Here is an example 
corresponding to the permutation $\sigma=(1234)\in\mathbb{S}_5$:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; m := PermutationMatrix(Integers(), [2,3,4,1,5]);
&gt; v := Vector(Integers(), [0,0,0,0,1]);
&gt; v*m;
(0 0 0 0 1)
&gt; w := Vector(Integers(), [1,0,0,0,0]);
&gt; w*m;
(0 1 0 0 0)
</code></pre></div></div>

<p>Here is another example:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; s := Sym(3)!(1,2);
&gt; m := PermutationMatrix(Integers(), [ x^s : x in [1,2,3] ]);
&gt; m;
[0 1 0]
[1 0 0]
[0 0 1]
&gt; Vector(Integers(), [0,1,0])*m;
(1 0 0)
&gt; Vector(Integers(), [0,0,1])*m;
(0 0 1)
</code></pre></div></div>]]></content><author><name>VUB Algebra Research Group</name></author><category term="questions" /><category term="linear algebra" /><category term="permutation" /><category term="permutation matrix" /><summary type="html"><![CDATA[How we deal with permutation matrices?]]></summary></entry><entry><title type="html">Guralnick theorem</title><link href="https://leandrovendramin.org/magma/exercises/guralnick-theorem/" rel="alternate" type="text/html" title="Guralnick theorem" /><published>2025-12-15T00:00:00+00:00</published><updated>2025-12-15T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/exercises/guralnick-theorem</id><content type="html" xml:base="https://leandrovendramin.org/magma/exercises/guralnick-theorem/"><![CDATA[<p><strong>Exercise.</strong> Prove the following result:</p>

<p><strong>Theorem (Guralnick).</strong>
There is a group $G$ of order $\leq200$ such that $[G,G]\ne\lbrace [x,y]:x,y\in G\rbrace$
if and only if $n\in\lbrace 96,128,144, 162, 168, 192\rbrace$.</p>

<p>The theorem appeared in [Guralnick, R. Commutators and commutator subgroups.
<em>Adv. in Math.</em> 45 (1982), no. 3, 319–330].</p>

<p><strong>Solution.</strong> To simplify a bit the presentation, we
first define a function that returns the set 
of commutators of a group:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; SetOfCommutators := function(G)
function&gt; return { (x,y) : x,y in G };
function&gt; end function;
</code></pre></div></div>
<p>Now we use this function. We send the parameter <code class="language-plaintext highlighter-rouge">Warning := false</code> to the
function <code class="language-plaintext highlighter-rouge">SmallGroups</code> to avoid the warning messages.  Otherwise, Magma warns
us that the requested calculation involves a huge number of groups:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; time { #G : G in SmallGroups([1..200]:Warning:=false) | 
&gt; not #DerivedSubgroup(G) eq #SetOfCommutators(G) };
{ 96, 128, 144, 162, 168, 192 }
Time: 34.360
</code></pre></div></div>
<p>The calculation took 34 seconds.</p>]]></content><author><name>Leandro Vendramin</name></author><category term="exercises" /><category term="group" /><category term="commutator" /><summary type="html"><![CDATA[Exercise. Prove the following result:]]></summary></entry><entry><title type="html">Iterating over an automorphism group</title><link href="https://leandrovendramin.org/magma/questions/iterating-over-an-automorphism-group/" rel="alternate" type="text/html" title="Iterating over an automorphism group" /><published>2025-12-10T00:00:00+00:00</published><updated>2025-12-10T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/questions/iterating-over-an-automorphism-group</id><content type="html" xml:base="https://leandrovendramin.org/magma/questions/iterating-over-an-automorphism-group/"><![CDATA[<p>How can we iterate over the elements of an automorphism group?</p>

<p>Let us assume we need to iterate over the six automorphisms
of the Klein group.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; G := AbelianGroup([2,2]);
&gt; A := AutomorphismGroup(G);
</code></pre></div></div>
<p>The naive idea doesn’t work. Typing</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; { a : a in A };
</code></pre></div></div>
<p>produces an error message, saying: <em>Iteration is not possible over this object</em>. 
Thus one cannot directly iterate over automorphism groups. We first need to convert
the automorphism group into a structure suitable for iteration.
<code class="language-plaintext highlighter-rouge">PermutationGroup</code> and <code class="language-plaintext highlighter-rouge">FPGroup</code> do not work, and something strange happens
with <code class="language-plaintext highlighter-rouge">PCGroup</code>. So what we should do? Here is the trick:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; p, P := PermutationRepresentation(A);
</code></pre></div></div>
<p>Here, <code class="language-plaintext highlighter-rouge">p</code> is a (bijective) map from <code class="language-plaintext highlighter-rouge">A</code> onto the permutation group <code class="language-plaintext highlighter-rouge">P</code>. 
We can iterate over <code class="language-plaintext highlighter-rouge">P</code>, and we need to use the inverse of the 
map <code class="language-plaintext highlighter-rouge">p</code> to identity our elements inside <code class="language-plaintext highlighter-rouge">A</code>.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; { x @@ p : x in P };
{
    Automorphism of Abelian Group isomorphic to Z/2 + Z/2
    Defined on 2 generators
    Relations:
        2*G.1 = 0
        2*G.2 = 0 of order 1 which maps:
        G.1 |--&gt; G.1
        G.2 |--&gt; G.2,
    Automorphism of Abelian Group isomorphic to Z/2 + Z/2
    Defined on 2 generators
    Relations:
        2*G.1 = 0
        2*G.2 = 0 which maps:
        G.1 |--&gt; G.1
        G.2 |--&gt; G.1 + G.2,
    Automorphism of Abelian Group isomorphic to Z/2 + Z/2
    Defined on 2 generators
    Relations:
        2*G.1 = 0
        2*G.2 = 0 which maps:
        G.1 |--&gt; G.2
        G.2 |--&gt; G.1,
    Automorphism of Abelian Group isomorphic to Z/2 + Z/2
    Defined on 2 generators
    Relations:
        2*G.1 = 0
        2*G.2 = 0 which maps:
        G.1 |--&gt; G.1 + G.2
        G.2 |--&gt; G.2,
    Automorphism of Abelian Group isomorphic to Z/2 + Z/2
    Defined on 2 generators
    Relations:
        2*G.1 = 0
        2*G.2 = 0 which maps:
        G.1 |--&gt; G.2
        G.2 |--&gt; G.1 + G.2,
    Automorphism of Abelian Group isomorphic to Z/2 + Z/2
    Defined on 2 generators
    Relations:
        2*G.1 = 0
        2*G.2 = 0 which maps:
        G.1 |--&gt; G.1 + G.2
        G.2 |--&gt; G.1
}
</code></pre></div></div>]]></content><author><name>VUB Algebra Research Group</name></author><category term="questions" /><category term="group" /><category term="automorphism group" /><category term="iteration" /><summary type="html"><![CDATA[How can we iterate over the elements of an automorphism group?]]></summary></entry><entry><title type="html">Setting memory limit</title><link href="https://leandrovendramin.org/magma/tips/setting-memory-limit/" rel="alternate" type="text/html" title="Setting memory limit" /><published>2025-12-06T00:00:00+00:00</published><updated>2025-12-06T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/tips/setting-memory-limit</id><content type="html" xml:base="https://leandrovendramin.org/magma/tips/setting-memory-limit/"><![CDATA[<p>The function <code class="language-plaintext highlighter-rouge">SetMemoryLimit</code> sets the memory limit (in bytes). The parameter 0
means <strong>no limit</strong>. To see the current setting, use the function
<code class="language-plaintext highlighter-rouge">GetMemoryLimit</code>.</p>]]></content><author><name>VUB Algebra Research Group</name></author><category term="tips" /><category term="memory" /><summary type="html"><![CDATA[The function SetMemoryLimit sets the memory limit (in bytes). The parameter 0 means no limit. To see the current setting, use the function GetMemoryLimit.]]></summary></entry><entry><title type="html">Computing all Sylow subgroups</title><link href="https://leandrovendramin.org/magma/questions/computing-all-sylow-subgroups/" rel="alternate" type="text/html" title="Computing all Sylow subgroups" /><published>2025-12-05T00:00:00+00:00</published><updated>2025-12-05T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/questions/computing-all-sylow-subgroups</id><content type="html" xml:base="https://leandrovendramin.org/magma/questions/computing-all-sylow-subgroups/"><![CDATA[<p>How can we quickly get all Sylow subgroups
of a given group?</p>

<p>To compute Sylow subgroups we have the function 
<code class="language-plaintext highlighter-rouge">SylowSubgroup</code>, but this function returns
only one Sylow subgroup. 
How can we quickly get them all? Here is an answer:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; S3 := Sym(3);
&gt; P := SylowSubgroup(S3,2);
&gt; { P^x : x in S3 };
{
    Permutation group acting on a set of cardinality 3
    Order = 2
        (1, 3),
    Permutation group acting on a set of cardinality 3
    Order = 2
        (1, 2),
    Permutation group acting on a set of cardinality 3
    Order = 2
        (2, 3)
} 
</code></pre></div></div>
<p>Possibly faster: conjugate the Sylow subgroup computed 
by each element of a (right) transversal of the Sylow. 
Here is the code:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; t := Transversal(S3,P);
&gt; { P^x : x in t };
{
    Permutation group acting on a set of cardinality 3
    Order = 2
        (1, 3),
    Permutation group acting on a set of cardinality 3
    Order = 2
        (1, 2),
    Permutation group acting on a set of cardinality 3
    Order = 2
        (2, 3)
}    
</code></pre></div></div>
<p>Alternatively, we can also use the function <code class="language-plaintext highlighter-rouge">Conjugates</code>.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; Conjugates(S3,P);
{
    Permutation group acting on a set of cardinality 3
    Order = 2
        (1, 3),
    Permutation group acting on a set of cardinality 3
    Order = 2
        (1, 2),
    Permutation group acting on a set of cardinality 3
    Order = 2
        (2, 3)
} 
</code></pre></div></div>]]></content><author><name>VUB Algebra Research Group</name></author><category term="questions" /><category term="group" /><category term="Sylow subgroup" /><category term="subgroup" /><category term="conjugation" /><summary type="html"><![CDATA[How can we quickly get all Sylow subgroups of a given group?]]></summary></entry><entry><title type="html">Computing preimages</title><link href="https://leandrovendramin.org/magma/questions/computing-preimages/" rel="alternate" type="text/html" title="Computing preimages" /><published>2025-12-05T00:00:00+00:00</published><updated>2025-12-05T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/questions/computing-preimages</id><content type="html" xml:base="https://leandrovendramin.org/magma/questions/computing-preimages/"><![CDATA[<p>Let $G=SL_2(5)$ and $p\colon G\to G/Z(G)$ be the canonical 
map. Typically, Magma will represent $G/Z(G)$
as a permutation group:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; G := SL(2,5);
&gt; Z := Center(G);
&gt; Q, p := quo&lt; G|Z &gt;;
&gt; GroupName(Q);
A5
</code></pre></div></div>
<p>Let us compute some preimages. Let us take a random element 
<code class="language-plaintext highlighter-rouge">y</code> of <code class="language-plaintext highlighter-rouge">Q</code>, namely</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; y := Random(Q);
&gt; y;
(1, 3, 5, 4, 2)
&gt; x := y @@ p;
&gt; x;
[1 0]
[4 1]
</code></pre></div></div>
<p>How do I get <em>all</em> the preimages of an element $y$? One needs the (right)
coset $(\ker p)x$, where $x$ is such that $p(x)=y$. For this, I need to convert
my matrix group into a permutation group:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; f, P := PermutationRepresentation(G);
</code></pre></div></div>
<p>The map <code class="language-plaintext highlighter-rouge">f</code> we get is a bijective group homomorphism $SL_2(5)\to P$, where $P$ is
a permutation group. The preimage of $y$ has size two, and it is 
the right coset $(\ker p)x$. Let us compute this:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; N := f(K);
&gt; K := Kernel(p);
</code></pre></div></div>
<p>Now the preimage is the set</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; { Inverse(f)(n*f(x)) : n in N };
{
    [1 0]
    [4 1],

    [4 0]
    [1 4]
}
</code></pre></div></div>]]></content><author><name>Leandro Vendramin</name></author><category term="questions" /><category term="homomorphism" /><category term="group" /><category term="quotient" /><category term="normal subgroup" /><summary type="html"><![CDATA[Let $G=SL_2(5)$ and $p\colon G\to G/Z(G)$ be the canonical map. Typically, Magma will represent $G/Z(G)$ as a permutation group: &gt; G := SL(2,5); &gt; Z := Center(G); &gt; Q, p := quo&lt; G|Z &gt;; &gt; GroupName(Q); A5 Let us compute some preimages. Let us take a random element y of Q, namely &gt; y := Random(Q); &gt; y; (1, 3, 5, 4, 2) &gt; x := y @@ p; &gt; x; [1 0] [4 1] How do I get all the preimages of an element $y$? One needs the (right) coset $(\ker p)x$, where $x$ is such that $p(x)=y$. For this, I need to convert my matrix group into a permutation group: &gt; f, P := PermutationRepresentation(G); The map f we get is a bijective group homomorphism $SL_2(5)\to P$, where $P$ is a permutation group. The preimage of $y$ has size two, and it is the right coset $(\ker p)x$. Let us compute this: &gt; N := f(K); &gt; K := Kernel(p); Now the preimage is the set ``` { Inverse(f)(n*f(x)) : n in N }; { [1 0] [4 1],]]></summary></entry><entry><title type="html">Direct products</title><link href="https://leandrovendramin.org/magma/questions/direct-products/" rel="alternate" type="text/html" title="Direct products" /><published>2025-12-05T00:00:00+00:00</published><updated>2025-12-05T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/questions/direct-products</id><content type="html" xml:base="https://leandrovendramin.org/magma/questions/direct-products/"><![CDATA[<p>To compute the direct product of two or more groups, Magma provides the
function <code class="language-plaintext highlighter-rouge">DirectProduct</code>. This function returns a group that is isomorphic to
the direct product of the given groups, along with two lists of homomorphisms.
The first list contains the embeddings of the original groups into the direct
product, and the second list contains the projections from the direct product
onto the original groups.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>C2 := CyclicGroup(2);;
C4 := CyclicGroup(4);;
G, a, b := DirectProduct(C2,C4);
</code></pre></div></div>
<p>The group <code class="language-plaintext highlighter-rouge">G</code> is <code class="language-plaintext highlighter-rouge">C2*C4</code>, and 
the variable <code class="language-plaintext highlighter-rouge">a</code> is the following list:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[
    Mapping from: GrpPerm: C2 to GrpPerm: G,
    Mapping from: GrpPerm: C4 to GrpPerm: G
]
&gt; b;
[
    Mapping from: GrpPerm: G to GrpPerm: C2,
    Mapping from: GrpPerm: G to GrpPerm: C4
]
</code></pre></div></div>
<p>We can also send a list of groups
to the function <code class="language-plaintext highlighter-rouge">DirectProduct</code>. Here is an example:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>G := DirectProduct([C2,C4,C2,C2]);
</code></pre></div></div>]]></content><author><name>VUB Algebra Research Group</name></author><category term="questions" /><category term="group" /><category term="direct product" /><summary type="html"><![CDATA[To compute the direct product of two or more groups, Magma provides the function DirectProduct. This function returns a group that is isomorphic to the direct product of the given groups, along with two lists of homomorphisms. The first list contains the embeddings of the original groups into the direct product, and the second list contains the projections from the direct product onto the original groups. C2 := CyclicGroup(2);; C4 := CyclicGroup(4);; G, a, b := DirectProduct(C2,C4); The group G is C2*C4, and the variable a is the following list: [ Mapping from: GrpPerm: C2 to GrpPerm: G, Mapping from: GrpPerm: C4 to GrpPerm: G ] &gt; b; [ Mapping from: GrpPerm: G to GrpPerm: C2, Mapping from: GrpPerm: G to GrpPerm: C4 ] We can also send a list of groups to the function DirectProduct. Here is an example: G := DirectProduct([C2,C4,C2,C2]);]]></summary></entry><entry><title type="html">Groups of order 12 as semidirect products</title><link href="https://leandrovendramin.org/magma/exercises/groups-of-order-12-as-semidirect-products/" rel="alternate" type="text/html" title="Groups of order 12 as semidirect products" /><published>2025-12-05T00:00:00+00:00</published><updated>2025-12-05T00:00:00+00:00</updated><id>https://leandrovendramin.org/magma/exercises/groups-of-order-12-as-semidirect-products</id><content type="html" xml:base="https://leandrovendramin.org/magma/exercises/groups-of-order-12-as-semidirect-products/"><![CDATA[<p><strong>Exercise.</strong> Construct all groups of order 12 that are semidirect products.</p>

<p><strong>Solution.</strong> An exercise in elementary group theory states that every group of
order 12 is a semidirect product of a group of order three and a group of order
four. The groups of order three are isomorphic to $C_3$, and the groups of
order four are isomorphic to $C_4$ or $C_2\times C_2$. We need to know how
$C_3$ acts by automorphisms on $C_4$ and $C_2\times C_2$, and how $C_4$ and
$C_2\times C_2$ act by automorphism on $C_3$.</p>

<h5 id="case-1">Case 1.</h5>

<p>We first start with the group $(C_2\times C_2)\rtimes C_3$. We need the actions
by automorphism of $C_3$ on $C_2\times C_2$, that is the group homomorphisms
$C_3\to \operatorname{Aut}(C_2\times C_2)$.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; C2xC2&lt;a,b&gt; := AbelianGroup([2,2]);
&gt; C3&lt;g&gt; := CyclicGroup(3);
&gt; A := AutomorphismGroup(C2xC2);
</code></pre></div></div>
<p>We cannot iterate over an automorphism group. Thus
we construct a permutation representation <code class="language-plaintext highlighter-rouge">P</code> 
of <code class="language-plaintext highlighter-rouge">A</code>.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; p, P := PermutationRepresentation(A);
</code></pre></div></div>
<p>Now we construct a list with all the six maps 
$C_3\to \operatorname{Aut}(C_2\times C_2)$; not all are 
group homomorphisms.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; maps := [ hom&lt;C3-&gt;A | &lt;g,Inverse(p)(P!x)&gt;&gt; : x in P ];
</code></pre></div></div>
<p>Here, <code class="language-plaintext highlighter-rouge">Inverse(p)(P!x)</code> is the automorphism of $C_2\times C_2$ 
corresponding to the permutation <code class="language-plaintext highlighter-rouge">x</code> by the bijection <code class="language-plaintext highlighter-rouge">p</code>. We 
crucial fact here is that we cannot iterate over <code class="language-plaintext highlighter-rouge">A</code> but
we can do it over <code class="language-plaintext highlighter-rouge">P</code>.</p>

<p>Now to get all semidirect products of the form $(C_2\times C_2)\rtimes C_3$ we
need to run over all <em>homomorphisms</em> in the list <code class="language-plaintext highlighter-rouge">maps</code>. However, we can’t use
the function <code class="language-plaintext highlighter-rouge">IsHomomorphism</code> for our maps. Thus we need our function to test
whether a map is a homomorphism:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; is_homomorphism := function(f)
function&gt; local dom, x, y;
function&gt; dom := Domain(f);
function&gt; for x in dom do
function|for&gt; for y in dom do
function|for|for&gt; if not (f(x*y) eq f(x)*f(y)) then
function|for|for|if&gt; return false;
function|for|for|if&gt; end if;
function|for|for&gt; end for;
function|for&gt; end for;
function&gt; return true;
function&gt; end function;
</code></pre></div></div>
<p>This function is rather naive, but is more than enough for our purposes. So let
us use it. The code</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; for f in maps do
for&gt; if is_homomorphism(f) then
for|if&gt; G := SemidirectProduct(C2xC2, C3, f);
for|if&gt; print GroupName(G);
for|if&gt; end if;
for&gt; end for;
C2*C6
A4
A4
</code></pre></div></div>

<h5 id="case-2">Case 2</h5>

<p>What about semidirect products of the form $C_4\rtimes C_3$? In this case, we
will only get the cyclic group of order twelve.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; C3&lt;g&gt; := AbelianGroup([3]);
&gt; C4 := AbelianGroup([4]);
&gt; A := AutomorphismGroup(C4);
&gt; p, P := PermutationRepresentation(A);
&gt; maps := [ hom&lt; C3-&gt;A | &lt;g,Inverse(p)(P!x)&gt; &gt; : x in P ];
</code></pre></div></div>
<p>Now we need to use the function <code class="language-plaintext highlighter-rouge">is_homomorphism</code> we constructed before 
and we are done. The code</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; { GroupName(SemidirectProduct(C4,C3,f)) : f in maps | is_homomorphism(f) };
{ C12 }
</code></pre></div></div>

<h5 id="case-3">Case 3</h5>

<p>We now construct the groups of the form $C_3\rtimes C_4$. We now
that $\operatorname{Aut}(C_3)\simeq C_2$. So there is only one non-trivial 
automorphism of $C_3$, namely
$C_3\to C_3$, $x\mapsto -x$ (if the additive notation is used).</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; C4&lt;g&gt; := AbelianGroup([4]);
&gt; C3 := AbelianGroup([3]);
&gt; A&lt;a&gt; := AutomorphismGroup(C3);
</code></pre></div></div>
<p>Note that our <code class="language-plaintext highlighter-rouge">a</code> is the automorphism $x\mapsto -x$ of $C_3$. 
In fact, the command</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; a eq hom&lt;C3-&gt;C3|x:-&gt;-x&gt;;
true
</code></pre></div></div>
<p>Now we construct the 
group homomorphism $C_4\to \operatorname{Aut}(C_3)$ sending
the generator <code class="language-plaintext highlighter-rouge">g</code> of $C_4$ to the automorphism <code class="language-plaintext highlighter-rouge">a</code>:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; f := hom&lt;C4-&gt;A|&lt;g,a&gt;&gt;;
</code></pre></div></div>
<p>We can check that this <code class="language-plaintext highlighter-rouge">f</code> is a homomorphism, but we leave this
as an exercise. Now we construct the semidirect product and check
the structure of the group constructed:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; G := SemidirectProduct(C3,C4,f);
&gt; GroupName(G);
C_3:C_4
</code></pre></div></div>
<p>This means that our <code class="language-plaintext highlighter-rouge">G</code> is isomorphic to <em>a</em> semidirect product 
of the form $C_3\rtimes C_4$.</p>

<h5 id="case-4">Case 4</h5>

<p>There is one case left, namely the semidirect products of the form $C_3\rtimes
(C_2\times C_2)$. Assume that $C_2\times C_2=\langle a,b\rangle$. Let us first
construct the groups:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; C2xC2&lt;a,b&gt; := AbelianGroup([2,2]);
&gt; C3 := AbelianGroup([3]);
&gt; A := AutomorphismGroup(C3);
</code></pre></div></div>
<p>Thus we know that $\operatorname{Aut}(C_3)=\{\operatorname{id},\alpha\}$. There are four
possible homomorphisms $C_2\times C_2\to \operatorname{Aut}(C_3)$, as the generator $a$ and $b$ can be
mapped independently to either the identity or $\alpha$, Again, we use a permutation
representation to be able to iterate over an automorphism group:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; p, P := PermutationRepresentation(A);
&gt; maps := [ hom&lt; C2xC2-&gt;A | &lt;a,Inverse(p)(P!x)&gt;, &lt;b,Inverse(p)(P!y)&gt;&gt; : x, y in P ];
</code></pre></div></div>
<p>Now we run over <code class="language-plaintext highlighter-rouge">maps</code> and construct the corresponding semidirect products. The code</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; { GroupName(SemidirectProduct(C3,C2xC2,f)) : f in maps };
{ D6, C2*C6 } 
</code></pre></div></div>
<p>Therefore, in this case, we obtain the dihedral group of order twelve, 
and the direct product $C_2\times C_6$.</p>]]></content><author><name>Leandro Vendramin</name></author><category term="exercises" /><category term="group" /><category term="semidirect product" /><category term="homomorphism" /><category term="automorphism group" /><category term="conjugation" /><summary type="html"><![CDATA[Exercise. Construct all groups of order 12 that are semidirect products.]]></summary></entry></feed>