[m-dev.] Assocative predicates

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Apr 17 15:14:36 AEST 1998

> :- pragma assert(all [A,B,C,R,T] (
>     append(A, B, T), append(T, C, R) <=>
>     append(B, C, T), append(A, T, R))).

You'd better not assert this, because it is not true. What you want is

:- pragma assert(all [A,B,C,R,AB,BC] (
	append(A, B, AB), append(AB, C, R) <=>
	append(B, C, BC), append(A, BC, R))).

It is far from guaranteed that AB = BC.


More information about the developers mailing list