Difference Unification

David A. Basin, Toby WalshIJCAI 1993

Abstract

Difference Unification (DUNIFY) is a powerful generalization of standard unification used in automated reasoning. While traditional unification makes terms equal by substituting variables, difference unification identifies structural "mismatches" between terms and marks them with annotations. These annotations guide a specialized rewriting process called "rippling," allowing theorem provers to bridge gaps in proofs more efficiently by systematically moving or removing these differences.

Introduction

In automated theorem proving, unification is the fundamental process of finding variable assignments that make two symbolic expressions identical. However, standard unification is limited by its binary nature: it either succeeds or fails. In many complex proofs—especially those involving mathematical induction—we often encounter terms that are almost the same but have structural differences. For example, an induction hypothesis might look like $P(n)$, while the goal is $P(n+1)$. Standard unification fails here. Difference Unification addresses the need for a formal, automated way to identify these structural differences dynamically.

The DUNIFY Algorithm

The authors propose a new algorithm called DUNIFY (Difference Unification). Unlike standard unification, it returns a set of annotations that identify a "skeleton" (the matching part of the terms) and "wave-fronts" (the extra bits of structure that do not match).

DUNIFY is implemented as a modular set of transformation rules, such as HIDE, DECOMPOSE, and IMITATE. This makes it extensible to higher-order logic or equational theories. To manage the potentially exponential search space of possible annotations, the authors introduce a Left-first Search strategy. This meta-interpreter prioritizes "minimal" annotations—those that hide the least amount of structure—to keep the subsequent search space manageable.

Rippling and Wave-Rules

Once differences are identified and annotated, they are managed through a process called "rippling." This involves using specialized "wave-rules" to systematically move or remove wave-fronts until the goal matches the hypothesis.

Wave-rules (6-8) demonstrating the transformation of summations and algebraic terms during the rippling process.

As shown in the figure above, these rules define how to manipulate summations and algebraic terms to reduce structural differences. For instance, Rule (7) allows a constant to be moved outside a summation, while Rule (8) performs a partial fraction-like decomposition to simplify terms.

Applications in Series Summation

While rippling was originally developed for inductive proofs, Difference Unification expands its utility to general "difference reduction" tasks, such as symbolic integration and series summation. A primary example is the automatic derivation of closed-form solutions for complex series.

A complex series summation problem solved using the Difference Unification and rippling paradigm.

By alternating between annotating differences with DUNIFY and reducing them via rippling, the system can solve problems like the one illustrated above, which were previously difficult for automated systems to handle without manual guidance.

Key Results and Complexity

The authors formally prove that their DUNIFY algorithm is both sound and complete. While they show that general difference matching with variables is NP-hard, the "Left-first Search" strategy effectively finds useful, minimal solutions in practice. This "unify-then-ripple" loop successfully demonstrates a new paradigm for automated reasoning that can handle complex mathematical challenges beyond simple induction.

Conclusion

Difference Unification transforms unification from a simple matching tool into a sophisticated diagnostic process. By formalizing how terms almost match, it enables theorem provers to bridge complex logical gaps more efficiently across a variety of mathematical domains, from associative normalization to series summation.

Summary updated

BibTeX
@inproceedings{basin1993difference,
  author = {David A. Basin and Toby Walsh},
  title = {{Difference Unification}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1993},
}
Figure