def is_function(x):
    """
    Checks if the provided expression x is a function term. i.e., a tuple
    where the first element is callable.
    """
    return isinstance(x, tuple) and len(x) > 0 and callable(x[0])