# [GAP Forum] Fox derivatives

Joachim Neubueser joachim.neubueser at math.rwth-aachen.de
Fri Jul 30 10:27:29 BST 2004

```Dear Karol Palka

You wrote:

> Dear Forum,
>
> is it possible to compute the Fox  derivatives of a word in GAP ?
> It's quite important and not very difficult tool in homology theory of
> finitely presented groups. (Maybe somebody  can implement it ?)
>
> Karol Palka,
> Warsaw Univ.

This letter  to the  GAP Forum  of July 10  was unfortunately  held up
until yesterday, because you are not  a member of the GAP Forum and so
your letter did not get  posted automatically to all Forum members but
was  only found  in a  revision 'by  hand' of  mail to  the  Forum. So
independently of the following, may I recommend that you register as a
Forum member as explained on the GAP website for future cases.

I  have yesterday  forwarded your  letter to  Professor Derek  Holt at

If you have  further questions feel free to  write either to Professor
Holt or to the address gap-support as explained on the GAP website.

Kind regards and apologies for the delay,

Joachim Neubueser

----------------------------------------------------------------------
I think the (rather easy) function below computes the required Fox
derivatives. This is for right actions, however, and it is quite likely that
he would prefer it for left actions. Maybe he can adapt it himself? Anyway,
let me know if there are any problems.

Derek.

FoxDerivative := function(F,i,w)
## F should be a free group of rank r, i an integer with 1 <= i <= r,
## and w a word in F.
## The value of the i-th Fox derivative of F on w is returned as a list
## of pairs [k,v] (v in F, k = 1 or -1) representing the element
## sum k * v  of the group algebra ZF.
local len, er, j, fd;
fd := [];
len := Length(w);
for j in [1..len] do
er := ExtRepOfObj(Subword(w,j,j));
if er[1] = i and er[2] = 1 then Add(fd,[1,Subword(w,j+1,len)]); fi;
if er[1] = i and er[2] = -1 then Add(fd,[-1,Subword(w,j,len)]); fi;
od;
return fd;
end;

------------------------------------------------------------------------

```