Prolog program that defines a relation max(X,Y,Max) where Max is the greater of X and Y.
domains x = integer predicates max(x,x,x) clauses max(X,Y,Max) :- X > Y,!, Max = X. max(X,Y,Max) :- Max = Y. Output : Goal: max(2,3,Max) Max=3 1 Solution Goal: max(-1,-4,Max) Max=-1 1 Solution