are_conjugate(rperm(20,3),rperm(20,3))
rperm(20,3) %~% cycle(1:3)
z <- rperm(300,4)
stopifnot(all(are_conjugate(z,id)==is.id(z)))
data(megaminx)
stopifnot(all(are_conjugate(megaminx,megaminx^as.cycle(sample(129)))))
Run the code above in your browser using DataCamp Workspace