def termlists_are_equal(terms1, terms2):
    """ Check whether two given lists of terms are (syntactic-wise) equal. """
    return len(terms1) == len(terms2) and all(x.is_syntactically_equal(y) for x, y in zip(terms1, terms2))