In Lisp, suppose I have these two rules in the knowledge base:
(append nil ?x ?x)
(<- (append (cons ?x ?l1) ?l2 (cons ?x ?l3))
(append ?l1 ?l2 ?l3))
Then how could I infer that if we ask
(ask '(append (cons a (cons b nil))
(cons c nil)
?l)
'?l))
we will get the result '((cons a (cons b (cons c nil)))
?
This is one example from my Lisp class, I hope you could help me understand this retriever. Thank you.