4.65 Exercise 4.65
As a reminder, the wheel rule is implemented as follows:
(rule (wheel ?person) (and (supervisor ?middle-manager ?person) (supervisor ?x ?middle-manager)))
The purpose of this rule is to find all people who are a supervisor of someone who is also a supervisor.
One thing to immediately be worried about is people who are supervisors of multiple people. Each one of these supervisor relationships would provide a new pair of bindings for ?x and ?middle-manager such that, for a given ?person who supervises ?middle-manager, there will be multiple justifications for ?person being a wheel. Because ?person is the only binding used in the conclusion of the rule, this will cause ?person to be reported multiple times in the results. This is the situation that Cy D. Fect has run into.