def sum_decomposable(perm):
    """Determines whether the permutation is expressible as the direct sum of
    two permutations.

    >>> p = Permutation.random(4).direct_sum(Permutation.random(15))
    >>> p.sum_decomposable()
    True
    >>> p.reverse().sum_decomposable()
    False
    """
    p = list(perm)
    n = perm.__len__()
    for i in range(1, n):
        if set(range(0, i)) == set(p[0:i]):
            return True
    return False
