# The function cnj(u,v) returns the conjugation of v by # the inverse of u cnj:=function(u,v) return u*v/u; end; # The arguments of the function conjorbita(lista,u) # are "lista", a list of elements in a group, and "u", an element # of the same group. It returns the simultaneous conjugation # of all the elements in "lista" by "u". conjorbita:=function(lista,u) return List(lista,x->x^u); end; # The function prdct(lista) applied to "lista", a list of # elements of a group, yields the reversed product # of the elements of "lista". prdct:=function(lista) return Product(Reversed(lista)); end; # Next goal is to define Hurwitz moves on # lists of elements in a group. The function q(lista,j) # has two arguments; the first one "lista" is a list of # n elements in the group and the second one "j" is # an integer between 1 and n-1. The result is the # Hurwitz move of "lista" under the action of the # j-th canonical generator s_j of the braid group in n strings. q:=function(lista,j) local resultado,i; resultado:=[]; for i in [1..j-1] do resultado[i]:=lista[i]; od; resultado[j]:=lista[j+1]; resultado[j+1]:=cnj(lista[j+1],lista[j]); for i in [j+2..n] do resultado[i]:=lista[i]; od; return resultado; end; # The function prodtrenzas(listaent,lista) computes the # product of Hurwitz moves applied to a list of elements # in a group. The argument "lista" is the list of elements. # The argument "listaent" is a list of integers, where # positive integers j refer to the Hurwitz move s_j; # -j refers to the inverse of s_j. # The integer list "listaent" codes the product of the # elementary Hurwitz moves. prodtrenzas:=function(listaent,lista) local a,aux,img; aux:=ShallowCopy(lista); for a in listaent do img:=q(aux,a); aux:=ShallowCopy(img); od; return aux; end;