
/* con(N) is the standard example requiring N contractions */

con(N) :- pdtrans(N,neg neg ( e(x,neg p(x)) or a(x,p(x)))).

/* con2(N) also requires N contractions but is much harder than con(N) */

con2(N) :- pdtrans(N,neg neg (a(x,p(x) or neg p(x)))).

/* an old examination problem  */

prob(N) :- pdtrans(N,neg neg ( a(x,p(x) imp e(y,q(y) and r(x,y))) and
                    neg a(x,q(x) imp e(y,p(y) and r(x,y))) imp
                    e(x,q(x) and neg p(x)))).

/* contrans(N) is the transformed version of con(N), requiring no 
     contractions. Used to be difficult before imp locking was introduced. */
 
contrans(N) :- pdtrans(N,a(x,(r(x) iff neg p(x))) imp neg neg 
                  (e(x,r(x)) or a(x,p(x)))).

/* seq(N) - if p is transitive and for all x there is a y with p(x,y), then
       p(x,x) must hold for some x (in a finite domain). A grotesque abuse
         of propositional logic. */

seq(N) :- pdtrans(N,a(x,e(y,p(x,y))) and 
                   a(x,a(y,a(z,p(x,y) and p(y,z) imp p(x,z)))) imp
                    e(x,p(x,x))).

