Challenge 1: A grandparent/2 Rule Over Three Generations — Possible Solution ==================================================================== family.pl: parent(george, susan). parent(susan, tom). parent(tom, alice). grandparent(X, Z) :- parent(X, Y), parent(Y, Z). Query: ?- grandparent(george, tom). true. ?- grandparent(susan, alice). true. ?- grandparent(george, alice). false. Explanation: grandparent(george, tom) succeeds because parent(george, Y) can bind Y = susan, and parent(susan, tom) is itself a genuine fact -- both goals in the rule's body are satisfied, so the rule's head holds. grandparent(george, alice) correctly fails, since george is alice's great-grandparent, not her grandparent -- no single Y makes BOTH parent(george, Y) and parent(Y, alice) true at once. WHY THIS WORKS AS AN ANSWER ------------------------------ This builds a real three-generation family using the chapter's own parent/2 shape, defines grandparent/2 exactly as the chapter introduces it, and queries both a true and a false case to confirm the rule only succeeds for genuine two-generation gaps.