:- true pred list_diff(_A,_L,L3)
         : ( list(_A,gnd), rt2(_L), var(L3) )
        => ( list(_A,gnd), list(_L,gnd), list(L3,gnd), length(_A,_B), length(_L,_C) )
         + cost(ub,steps,_C*_B+3*_B+1).

:- true pred list_diff(_A,_L,L3)
         : ( list(_A,gnd), list(_L,gnd), var(L3) )
        => ( list(_A,gnd), list(_L,gnd), list(L3,gnd), length(_A,_B), length(_L,_C) )
         + cost(ub,steps,_C*_B+3*_B+1).

:- true pred memberchk(X,_A)
         : ( gnd(X), list(_A,gnd) )
        => ( gnd(X), rt2(_A), length(_A,_B) )
         + cost(ub,steps,_B+2).