LowerUnits

From HandWiki

In proof compression LowerUnits (LU) is an algorithm used to compress propositional logic resolution proofs. The main idea of LowerUnits is to exploit the following fact:[1]

Theorem: Let [math]\displaystyle{ \varphi }[/math] be a potentially redundant proof, and [math]\displaystyle{ \eta }[/math] be the redundant proof | redundant node. If [math]\displaystyle{ \eta }[/math]’s clause is a unit clause, 
then [math]\displaystyle{ \varphi }[/math] is redundant.

The algorithm targets exactly the class of global redundancy stemming from multiple resolutions with unit clauses. The algorithm takes its name from the fact that, when this rewriting is done and the resulting proof is displayed as a DAG (directed acyclic graph), the unit node [math]\displaystyle{ \eta }[/math] appears lower (i.e., closer to the root) than it used to appear in the original proof.

A naive implementation exploiting theorem would require the proof to be traversed and fixed after each unit node is lowered. It is possible, however, to do better by first collecting and removing all the unit nodes in a single traversal, and afterwards fixing the whole proof in a single second traversal. Finally, the collected and fixed unit nodes have to be reinserted at the bottom of the proof.

Care must be taken with cases when a unit node [math]\displaystyle{ \eta^{\prime} }[/math] occurs above in the subproof that derives another unit node [math]\displaystyle{ \eta }[/math]. In such cases, [math]\displaystyle{ \eta }[/math] depends on [math]\displaystyle{ \eta^{\prime} }[/math]. Let [math]\displaystyle{ \ell }[/math] be the single literal of the unit clause of [math]\displaystyle{ \eta^{\prime} }[/math]. Then any occurrence of [math]\displaystyle{ \overline{\ell} }[/math] in the subproof above [math]\displaystyle{ \eta }[/math] will not be cancelled by resolution inferences with [math]\displaystyle{ \eta^{\prime} }[/math] anymore. Consequently, [math]\displaystyle{ \overline{\ell} }[/math] will be propagated downwards when the proof is fixed and will appear in the clause of [math]\displaystyle{ \eta }[/math]. Difficulties with such dependencies can be easily avoided if we reinsert the upper unit node [math]\displaystyle{ \eta^{\prime} }[/math] after reinserting the unit node [math]\displaystyle{ \eta }[/math] (i.e. after reinsertion, [math]\displaystyle{ \eta^{\prime} }[/math] must appear below [math]\displaystyle{ \eta }[/math], to cancel the extra literal [math]\displaystyle{ \overline{\ell} }[/math] from [math]\displaystyle{ \eta }[/math]’s clause). This can be ensured by collecting the unit nodes in a queue during a bottom-up traversal of the proof and reinserting them in the order they were queued.

The algorithm for fixing a proof containing many roots performs a top-down traversal of the proof, recomputing the resolvents and replacing broken nodes (e.g. nodes having deletedNodeMarker as one of their parents) by their surviving parents (e.g. the other parent, in case one parent was deletedNodeMarker).

When unit nodes are collected and removed from a proof of a clause [math]\displaystyle{ \kappa }[/math] and the proof is fixed, the clause [math]\displaystyle{ \kappa^{\prime} }[/math] in the root node of the new proof is not equal to [math]\displaystyle{ \kappa }[/math] anymore, but contains (some of) the duals of the literals of the unit clauses that have been removed from the proof. The reinsertion of unit nodes at the bottom of the proof resolves [math]\displaystyle{ \kappa^{\prime} }[/math] with the clauses of (some of) the collected unit nodes, in order to obtain a proof of [math]\displaystyle{ \kappa }[/math] again.

Algorithm

General structure of the algorithm

Algorithm LowerUnits
  Input: A proof [math]\displaystyle{ \psi }[/math]
  Output: A proof [math]\displaystyle{ \psi^{\prime} }[/math] with no global redundancy with unit redundant node
  (unitsQueue, [math]\displaystyle{ \psi_{b} }[/math]) ← collectUnits([math]\displaystyle{ \psi }[/math]); 
  [math]\displaystyle{ \psi_{f} }[/math] ← fix([math]\displaystyle{ \psi_{b} }[/math]); 
  fixedUnitsQueue ← fix(unitsQueue); 
  [math]\displaystyle{ \psi^{\prime} }[/math] ← reinsertUnits([math]\displaystyle{ \psi_{f} }[/math], fixedUnitsQueue);
  return [math]\displaystyle{ \psi^{\prime} }[/math];
  • "←" denotes assignment. For instance, "largestitem" means that the value of largest changes to the value of item.
  • "return" terminates the algorithm and outputs the following value.

We collect the unit clauses as follow

Algorithm CollectUnits
  Input: A proof [math]\displaystyle{ \psi }[/math]
  Output: A pair containing a queue of all unit nodes (unitsQueue) that are used more than once in [math]\displaystyle{ \psi }[/math] and a broken proof [math]\displaystyle{ \psi_{b} }[/math]
[math]\displaystyle{ \psi_{b} }[/math][math]\displaystyle{ \psi }[/math]; 
traverse [math]\displaystyle{ \psi_{b} }[/math] bottom-up and foreach node [math]\displaystyle{ \eta }[/math] in [math]\displaystyle{ \psi_{b} }[/math] do
  if [math]\displaystyle{ \eta }[/math] is unit and [math]\displaystyle{ \eta }[/math] has more than one child then
      add [math]\displaystyle{ \eta }[/math] to unitsQueue; 
      remove [math]\displaystyle{ \eta }[/math] from [math]\displaystyle{ \psi_{b} }[/math]; 
  end
end
return (unitsQueue, [math]\displaystyle{ \psi_{b} }[/math]); 
  • "←" denotes assignment. For instance, "largestitem" means that the value of largest changes to the value of item.
  • "return" terminates the algorithm and outputs the following value.

Then we reinsert the units

Algorithm ReinsertUnits
  Input: A proof [math]\displaystyle{ \psi_{f} }[/math] (with a single root) and a queue [math]\displaystyle{ q }[/math] of root nodes 
  Output: A proof [math]\displaystyle{ \psi^{\prime} }[/math]
[math]\displaystyle{ \psi^{\prime} }[/math][math]\displaystyle{ \psi_{f} }[/math]; 
while [math]\displaystyle{ q\neq\emptyset }[/math] do
    [math]\displaystyle{ \eta }[/math] ← first element of [math]\displaystyle{ q }[/math];
    [math]\displaystyle{ q }[/math] ← tail of [math]\displaystyle{ q }[/math];
    if [math]\displaystyle{ \eta }[/math] is resolvable with root of [math]\displaystyle{ \psi^{\prime} }[/math] then
        [math]\displaystyle{ \psi^{\prime} }[/math] ← resolvent of [math]\displaystyle{ \eta }[/math] with the root of [math]\displaystyle{ \psi^{\prime} }[/math]; 
    end 
end
return [math]\displaystyle{ \psi^{\prime} }[/math];
  • "←" denotes assignment. For instance, "largestitem" means that the value of largest changes to the value of item.
  • "return" terminates the algorithm and outputs the following value.

Notes

  1. Fontaine, Pascal; Merz, Stephan; Woltzenlogel Paleo, Bruno. Compression of Propositional Resolution Proofs via Partial Regularization. 23rd International Conference on Automated Deduction, 2011.