Let be the set of Boolean variables occurring in or the initial query , and put . Represent a current query by a subset : the Boolean literals in this set are the outstanding obligations. The initial state is , and the goal test is .
An action chooses a Horn clause with positive Boolean literal , provided . Its search transition model is precisely the given resolution inference rule:
Thus it removes the obligation and inserts all negative Boolean literals of . Repeated Boolean literals merge because queries are sets. A Horn clause without a positive Boolean literal supplies no action under the rule specified in this paper; it must not be treated as an additional way of finishing the query.
Give every action unit cost. A graph path with actions gives a proof containing queries, so minimizing either quantity gives the same shortest proof. Uniform-cost search orders the search frontier by the number of actions already taken and applies the goal test when removing a search node for expansion. Recording parent actions reconstructs the proof.
There are at most two choices, present or absent, for each of the negative Boolean literals. Therefore
This bounds the state space, including the empty query, rather than the possibly infinite search tree of action histories.[ref]
Yes: is an admissible heuristic. One application of the resolution inference rule removes just one current negative Boolean literal. It may add other negative Boolean literals, and some of those may already occur, but it cannot remove any other current obligation. Consequently
If actions lead from to , applying this inequality at every step gives . Thus
It is also a consistent heuristic, since and . In particular, merging duplicate obligations cannot invalidate the lower bound: removing several duplicates from the representation never counts as removing several distinct members of a set.