不严格的推导如下:
intcou([X,Y],[W,Z],[H,T]):-X<W,Z<Y,H is W,T is Z,H<T.
intcou([X,Y],[W,Z],[H,T]):-X<W,Y<Z,H is W,T is Y,H<T.
intcou([X,Y],[W,Z],[H,T]):-X>W,Z>Y,H is Z,T is W,H<T.
intcou([X,Y],[W,Z],[H,T]):-X>W,Y>Z,H is Y,T is W,H<T.
intcou([X,Y],[W,Z],[]):-W>Y.
intcou([X,Y],[W,Z],[]):-X>Z.
intcous([H,H2|[]],X):-intcou(H,H2,X).
intcous([H,H2|T],X):-intcou(H,H2,S),intcous([S|T],X).
?- intcous([[1,10],[2,9],[3,8],[4,5]],X).
X = [4, 5] ;