def is_sorted(t):
    """Predicate, true if t is sorted in ascending order.
    t: list
    """
    # sorted(t) will return a sorted version of t, without changing t.
    # == will compare the two lists to see if their value is the same
    # The is operator would fail here, even if the lists look identical
    # i.e. return (t is sorted(t)) would return false always.
    return t==sorted(t)