** xPerm**: Fast index canonicalization
for tensor computer algebra

**Author**: José M. Martín-García, © 2003-2015 under GPL

**Article**: J. M. Martín-García,

*Comp. Phys. Commun.*

**179**(2008) 597-603 , arXiv: 0803.0862

# Introduction

*xPerm* extends *Mathematica* capabilities in
computations with large groups of permutations, focusing on the
problem of index canonicalization under permutation symmetries
of tensor expressions.
It has been written as a combination of a *Mathematica* package
and a C subroutine. The latter performs the most demanding parts of
the computations and can also be linked from any other program or
computer algebra system. There are two main goals:

- Computation of a strong generating set for a group of permutations, given a generating set for that group. We use the Schreier-Sims algorithm, as described by Butler.
- Computation of a canonical representative of cosets and double cosets. We use the algorithms developed by R. Portugal and collaborators.

*xPerm* is not, and will not be, an alternative to professional
packages like
GAP or
MAGMA for algebraic
computations. It just solves the two issues that are needed in *xTensor*.

The authors of the canonicalization algorithms have implemented
similar capabilities in a Maple package called
*Canon*.

See xPerm.History.

Note on the name: Copied from *Efficient Representation of Perm Groups*,
by Donald E. Knuth: ''Following a suggestion of Vaughan Pratt,
we adopt the convention that perm = permutation, perhaps thereby saving
millions of syllables in future research.''

# Download and installation

Current version: 1.2.3 (as of 23 August 2015). It is recommended to
download the main *xAct* bundle, but
you can also download the different files separately:

- xPerm.nb: source file with all definitions and comments. Many examples. You need this file if you want to understand and/or modify the internals of the package.
- xPerm.m:
package file. This file is automatically generated by
*Mathematica*when xPerm.nb is saved. This is the only essential file. - xPermDoc.nb: main documentation file.
- xPerm.History: detailed log of changes.

- xperm.c: gnu-C code for SchreierSims and CanonicalPerm. Authors of other free-software tensor computer algebra systems are encouraged to link to this code, to gain efficiency, with the proviso that they must require from their users that the publication above is cited any time the combination of codes is used.
- xperm.tm: MathLink template for xperm.c. To compile it, a few paths must be changed.
- xperm.linux.32-bit or
xperm.linux.64-bit:
Linux executable obtained by compilation of xperm.c and
xperm.tm (and the
*MathLink*library of*Mathematica*). - xperm.win32 or xperm.win64. Windows executables.
- xperm.mac:
Mac executable.

- General Public License

See the Installation notes.

There is a problem with versions 2.1 of the glibc library of linux. Fixes can be obtained from Mathematica Support page.

# Other documentation

Most examples in Butler's book have been repeated (and sometimes
corrected) with *xPerm* in the notebook
ButlerExamples.nb.