Reference articles on history, science, culture and more
Encyclopedia

LowerUnits

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:

Theorem: Let φ {\displaystyle \varphi } {\displaystyle \varphi } be a potentially redundant proof, and η {\displaystyle \eta } {\displaystyle \eta } be the redundant proof | redundant node. If η {\displaystyle \eta } {\displaystyle \eta }’s clause is a unit clause, then φ {\displaystyle \varphi } {\displaystyle \varphi } 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 \eta 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 \eta ^{\prime } occurs above in the subproof that derives another unit node \eta. In such cases, \eta depends on \eta ^{\prime }. Let \ell be the single literal of the unit clause of \eta ^{\prime }. Then any occurrence of {\overline {\ell }} in the subproof above \eta will not be cancelled by resolution inferences with \eta ^{\prime } anymore. Consequently, {\overline {\ell }} will be propagated downwards when the proof is fixed and will appear in the clause of \eta. Difficulties with such dependencies can be easily avoided if we reinsert the upper unit node \eta ^{\prime } after reinserting the unit node \eta (i.e. after reinsertion, \eta ^{\prime } must appear below \eta, to cancel the extra literal {\overline {\ell }} from \eta’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 \kappa and the proof is fixed, the clause \kappa ^{\prime } in the root node of the new proof is not equal to \kappa 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 \kappa ^{\prime } with the clauses of (some of) the collected unit nodes, in order to obtain a proof of \kappa again.

01Algorithm

General structure of the algorithm

Algorithm LowerUnits Input: A proof ψ {\displaystyle \psi } {\displaystyle \psi } Output: A proof ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }} with no global redundancy with unit redundant node (unitsQueue, ψ b {\displaystyle \psi _{b}} {\displaystyle \psi _{b}}) ← collectUnits( ψ {\displaystyle \psi } {\displaystyle \psi }); ψ f {\displaystyle \psi _{f}} {\displaystyle \psi _{f}} ← fix( ψ b {\displaystyle \psi _{b}} {\displaystyle \psi _{b}}); fixedUnitsQueue ← fix(unitsQueue); ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }} ← reinsertUnits( ψ f {\displaystyle \psi _{f}} {\displaystyle \psi _{f}}, fixedUnitsQueue); return ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }};
  • "" denotes assignment. For instance, "largest item" 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 ψ {\displaystyle \psi } {\displaystyle \psi } Output: A pair containing a queue of all unit nodes (unitsQueue) that are used more than once in ψ {\displaystyle \psi } {\displaystyle \psi } and a broken proof ψ b {\displaystyle \psi _{b}} {\displaystyle \psi _{b}} ψ b {\displaystyle \psi _{b}} {\displaystyle \psi _{b}} ψ {\displaystyle \psi } {\displaystyle \psi }; traverse ψ b {\displaystyle \psi _{b}} {\displaystyle \psi _{b}} bottom-up and foreach node η {\displaystyle \eta } {\displaystyle \eta } in ψ b {\displaystyle \psi _{b}} {\displaystyle \psi _{b}} do if η {\displaystyle \eta } {\displaystyle \eta } is unit and η {\displaystyle \eta } {\displaystyle \eta } has more than one child then add η {\displaystyle \eta } {\displaystyle \eta } to unitsQueue; remove η {\displaystyle \eta } {\displaystyle \eta } from ψ b {\displaystyle \psi _{b}} {\displaystyle \psi _{b}}; end end return (unitsQueue, ψ b {\displaystyle \psi _{b}} {\displaystyle \psi _{b}});
  • "" denotes assignment. For instance, "largest item" 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 ψ f {\displaystyle \psi _{f}} {\displaystyle \psi _{f}} (with a single root) and a queue q {\displaystyle q} {\displaystyle q} of root nodes Output: A proof ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }} ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }} ψ f {\displaystyle \psi _{f}} {\displaystyle \psi _{f}}; while q ≠ ∅ {\displaystyle q\neq \emptyset } {\displaystyle q\neq \emptyset } do η {\displaystyle \eta } {\displaystyle \eta } ← first element of q {\displaystyle q} {\displaystyle q}; q {\displaystyle q} {\displaystyle q} ← tail of q {\displaystyle q} {\displaystyle q}; if η {\displaystyle \eta } {\displaystyle \eta } is resolvable with root of ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }} then ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }} ← resolvent of η {\displaystyle \eta } {\displaystyle \eta } with the root of ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }}; end end return ψ ′ {\displaystyle \psi ^{\prime }} {\displaystyle \psi ^{\prime }};
  • "" denotes assignment. For instance, "largest item" means that the value of largest changes to the value of item.
  • "return" terminates the algorithm and outputs the following value.
Watch videos about LowerUnitsExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article LowerUnits, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.