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.



Mathematical software for computing in integral group rings of discrete groups?
You can do this with [GAP](http://www.gap-system.org/). The example below assumes that you have the [polycyclic](http://www.gap-system.org/Packages/polycyclic.html) 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.


