import re


def is_fun(func, ir):
    """
    Check that the intermediate representation (ir) describes
    a function with name func.
    """
    return type(ir) == list and type(ir[0]) == str and re.match(func + r'\b', ir[0])