Introduction to
Logic Programming
What
versus
How
 

Exercise 10.8 - Sorting


sort is a binary relation that holds of two lists if and only if the second list is a version of the first list in sorted order. For example, sort([2,1,3,2],[1,2,2,3]) is true. Write a logic program that defines the sort relation in terms of min.