hi guys can help will prolog questions
1. Write the following two predicates without using arithmetic.
(a) Define a predicate mult3 length such that mult3 length(Xs) holds if
and only if Xs is a list and the length of Xs is a multiple of 3.
(b) Define a predicate ge5 length such that ge5 length(Xs) holds if and
only if Xs is a list that has a length of at least 5.
2. Define a predicate sorted such that sorted(Xs) holds of a list of integers Xs
if and only if Xs is sorted.
3. Define a predicate sublist such that sublist(Xs, Ys) holds if and only if Ys
is a sublist of Xs. For example,
?- sublist( [ a, b, c, d, e ], [ a, b, d ] ).
yes
?- sublist( [ a, b, c, d, e ], [ c, b ] ).
no
?- sublist( [ a, b, c, d, e ], [ a, k, e ] ).
no