.[as.cycle("123456789"),as.cycle("12")]
x <- rperm(10,7)
y <- rperm(10,8)
z <- rperm(10,9)
uu <-
commutator(commutator(x,y),z^x) *
commutator(commutator(z,x),y^z) *
commutator(commutator(y,z),x^y)
stopifnot(all(is.id(uu))) # this is the Hall-Witt identity
.[x,y]
is.id(.[.[x,y],z^x] * .[.[z,x],y^z] * .[.[y,z],x^y])
is.id(.[.[x,-y],z]^y * .[.[y,-z],x]^z * .[.[z,-x],y]^x)
Run the code above in your browser using DataLab