# Mathematical software for computing in integral group rings of discrete groups?

I'm doing computations in the integral group ring of a discrete group, in particular the discrete Heisenberg group. In this case elements are integral combinations of monomials $x^k y^m z^n$, where the generators $x$, $y$, and $z$ satisfy $xz=zx$, $yz=zy$, and $yx=xyz$. Is there mathematical software for doing calculations with such objects, for example to compute powers of an element?

I've not been able to do this inside standard mathematical software like Mathematica.

• As long as you have have an implementation of the group you're interested in and you have a way to sort elements of that group, you can implement the group-ring in a fairly simple and efficient fashion. In C++ I'd implement it as a class built around a std::map< GroupObject, RingObject >, and overload constructors, operators, etc, appropriately. – Ryan Budney Aug 2 '10 at 21:09
• Is there a GAP package for this? Or MAGMA? – Jon Bannon Aug 2 '10 at 23:27
• I don't have any answer nor any clue of where to look, but I too would be interested to hear of a software solution that didn't involve me (belatedly) learning OOP – Yemon Choi Aug 3 '10 at 4:30
• Yemon - one reason for my question to to investigate when such an element has an inverse in the convolution algebra of the group. Your recent paper shows that one-sided inverses are automatically two-sided inverses for arbitrary discrete groups, and for finite-rank abelian groups there is a finite algorithm to decide invertibility. But is there such an algorithm for, e.g., the discrete Heisenberg group? Very interesting question! – Douglas Lind Aug 3 '10 at 14:50
• Jon- GAP seems to deal with finitely generated algebras only (but this is based on a quick look). I talked with one of the chief programmers for MAGMA a year ago, and he said it might be possible to do in MAGMA but there's no off-the-shelf way. I also talked with SAGE people (after all, William Stein is just down the hall from me), and they cooked up something which sort of worked. – Douglas Lind Aug 3 '10 at 14:55

You can do this with GAP. The example below assumes that you have the polycyclic package installed.

First, you tell GAP which group you want to work with. Luckily, Heisenberg groups are polycyclic, and the polycyclic package provides a command to obtain them:

gap> G:=HeisenbergPcpGroup(1);
Pcp-group with orders [ 0, 0, 0 ]


Note that we could have also defined it by some other means if polycyclic was not available (e.g. as a matrix group), but this way is the most convenient. Now let's form the integral group ring:

gap> ZG:=GroupRing(Integers,G);
<free left module over Integers, and ring-with-one, with 6 generators>


The extra three generators come from the inverses of x, y and z (note that internally it calls them g1,g2,g3; it would be possible to change that with some effort, but that's beyond the scope here). Let's assign the corresponding generators of the group ring to variables x, y, z, and verify the relations you have given:

gap> x:=ZG.1;; y:=ZG.2;; z:=ZG.3;;
gap> x*z=z*x and y*z=z*y and y*x=x*y*z;
true


Here is an example of powering a group element (this works with more complicated ones, too, but I picked a small one to keep the output readable).

gap> (x+7*y)^2;
(1)*g1^2+(7)*g1*g2*g3+(7)*g1*g2+(49)*g2^2


I hope this helps.