For problem 2 in the book, your code should be able to handle queries such as: (infer? (length (cons 1 (cons 2 nil)) Ans) (print Ans)) and have them work. You don't have to able to run predicates involving arithmetic "backwards". Note on diffaddtoend - it is *NOT* the same as diffappend. Example: (infer? (diffaddtoend 3 (diff X X) L)) makes L = (diff (cons 3 X) X), while (infer? (diffappend 3 (diff X X) L)) can't be satisfied, as its first "argument" isn't a list. Note on diffreverse - you don't have to run it backwards.