Challenge 1: Running solve/1 on parent/2 and grandparent/2 — Possible Solution ==================================================================== meta_demo.pl: solve(true) :- !. solve((A, B)) :- !, solve(A), solve(B). solve(A) :- clause(A, Body), solve(Body). parent(tom, bob). parent(tom, liz). parent(bob, ann). parent(liz, jim). grandparent(X, Z) :- parent(X, Y), parent(Y, Z). Queries: ?- solve(parent(tom, bob)). true. ?- solve(grandparent(tom, Z)). Z = ann ; Z = jim. Explanation: solve(parent(tom, bob)) falls through to the third clause: clause(parent(tom, bob), Body) finds the matching fact directly, with Body unified with true, and solve(true) then succeeds via the first clause's cut. solve(grandparent(tom, Z)) follows the exact trace the chapter walked through -- clause/2 finds grandparent's own rule body, the conjunction is split into two solve/1 calls via the second clause, and each parent/2 lookup is resolved via clause/2 exactly the same way, ultimately backtracking through both of tom's grandchildren, ann and jim, matching the chapter's own stated result exactly. WHY THIS WORKS AS AN ANSWER ------------------------------ This runs the meta-interpreter unmodified against the chapter's own facts and rule, confirming both a simple fact query and the full grandparent/2 trace produce exactly the results the chapter's own hand-traced walkthrough predicted.