'Check if the homomorphism is surjective'

def is_surjective(self):

    from sympy import S
    im = self.image().order()
    oth = self.codomain.order()
    if ((im == S.Infinity) and (oth == S.Infinity)):
        return None
    else:
        return (im == oth)
