Hint 1: The sets, A and B are equal if A is contained in B and B is
contained in A, where set containment is defined: X is contained in Y
if every element of X is a member of Y. Earlier, we wrote a
predicate memb? that would determine if a single element was a member
of a list. It would be worth looking at this definition again. We
ought to be able to define a predicate "contains?" that takes two
lists as arguments and returns #t if the first argument is contained
in the second when they are viewed as sets and returns #f if they are
unequal as sets. Think about this.
Hint2 (for contains?):
A predicate that calls itself is reasonable here.
You need a stopping condition. If A is empty (determined by the
built-in predicate null?), then A is certainly contained in B.
If the first element of A is not in B then A is certainly NOT
contained in B.
If the first element of A is in B, then A is contained in B if the
rest of A is contained in B.