
/* so far, with this new approach, "add to the right"
we need only prefix */



prefix(L,L).
prefix(L1,L2) -> prefix(L1,cons(L2,E)).
prefix(L1,nil) -> L1=nil.
prefix(L1,cons(L2,E)) -> L1=cons(L2,E),prefix(L1,L2).


/* lists equality */

(cons(L1,E1)=cons(L2,E2)) == (L1=L2 and E1=E2).
nil=cons(L,E) -> [].

precedence([prefix,cons,nil,undef]).

