##################################################################### ## foxcalc.gap ## ## Chris Staecker ## ## ## ## The Fox Derivative. ## ## ## ## Use it like: ## ## FoxDerivative(w, x, F, ZF, e) ## ## This gives the Fox derivative of the word w with respect to ## ## the generator x, where F is the free group containing w and x, ## ## ZF is the integral group ring on F (this is where the answer ## ## will live), and e is the canonical embedding e:F -> ZF ## ## ## ## Last modified: 5/24/09 ## ## ## ## This code is licenced cc-by-sa-3.0: ## ## http://creativecommons.org/licenses/by-sa/3.0/ ## ## If you find this code useful, I'd appreciate it if you let me ## ## know. ## ## ## ##################################################################### # The derivative in the free group F of the word w with respect to x # ZF is the integer group ring on F, and e is the embedding F -> ZF FoxDerivative := function(w, x, F, ZF, e) local f, h, t; if Length(w) <= 1 then if w = x then return One(ZF); elif w =x^-1 then return -(x^-1)^e; else return Zero(ZF); fi; else # The head and tail of w h := Subword(w, 1, 1); t := h^-1 * w; return FoxDerivative(h, x, F, ZF, e) + (h^e) * FoxDerivative(t, x, F, ZF, e); fi; end;