def has_math(lines):
    """Test if math appears anywhere in the post."""
    for line in lines:
        if '$$' in line:
            return True
        elif '$' in line:
            return True
    return False