Add documentation for is_permutation