Theorem Proving with Structure Sharing and Efficient Unification

Alberto Martelli, Ugo Montanari

Abstract

This paper addresses the "efficiency wall" encountered in 1970s automated theorem proving by integrating two distinct computational strategies: Boyer and Moore’s memory-efficient structure sharing and Martelli and Montanari’s quasi-linear unification. By refining how variables are bound and stored, the authors propose a system that mitigates the exponential time-complexity blowups inherent in earlier proof checkers. The proposed modifications aim to reduce the worst-case complexity of proof verification from double-exponential to exponential, providing a more viable framework for interactive logic verification.

Introduction

In the late 1960s and early 1970s, the initial enthusiasm for fully autonomous automated theorem proving (ATP) began to wane as researchers encountered significant scalability issues. Complete search strategies, such as standard resolution, proved too slow for complex, real-world applications. Consequently, the field shifted its focus toward interactive proof checkers—tools where a human expert guides the logical progression and the machine verifies the validity of each step.

Despite this shift, a massive performance bottleneck remained: the process of unification. Unification, the algorithmic task of making two logical expressions identical by finding appropriate variable substitutions, is the engine of proof verification. This paper explores how to optimize this engine within the constraints of limited computational memory.

The Problem: The Unification Bottleneck

At the time of this research, the gold standard for memory efficiency was the "structure sharing" technique introduced by Boyer and Moore. This method avoided the costly process of copying large logical formulas by using pointers to shared structures. However, standard unification algorithms were not optimized for these shared representations.

In certain scenarios, checking a proof of $n$ steps using these methods could require a staggering $2^{2^n}$ operations. This double-exponential complexity made even relatively simple proofs computationally impossible to verify, creating an algorithmic nightmare for the development of practical proof assistants.

Proposed Methodology

The authors propose a hybrid approach that integrates a "quasi-linear" unification algorithm directly into the Boyer-Moore structure-sharing framework. This integration is achieved through several key technical refinements:

  • Quasi-linear Unification: The algorithm utilizes "counters" to track when a variable is ready to be bound, specifically optimized for LISP-like data structures common in AI research.
  • Integrated Storage: To address the "initialization tax"—the overhead of setting up the unification algorithm for every step—the authors suggest storing counter contents directly within the variable bindings. This is particularly effective for small, practical proofs where setup time often exceeds execution time.
  • Binding Rewriting: The system suggests rewriting variable bindings during the proof process to maximize the degree of sharing. By recognizing previously matched structures, subsequent unifications can be performed more rapidly.
  • Variable Pruning: The authors implement a form of logical "garbage collection" that detects and removes bindings for variables that are no longer accessible, ensuring the database remains lean and efficient.

Key Insights and Theoretical Results

The paper draws heavily on the influential view proposed by Robert Kowalski: that logic formalisms should be treated as programming languages and proof checkers as their interpreters. This perspective allows for the application of traditional compiler and interpreter optimization techniques to formal logic.

A major theoretical insight of the paper is the value of re-assignment. In the original Boyer-Moore technique, a variable is typically bound only once. Martelli and Montanari argue that allowing a variable to be assigned multiple times to express "structure matchings" can lead to exponential time savings over the duration of a long proof.

By juxtaposing their quasi-linear method with structure sharing, the authors claim a significant reduction in worst-case complexity. The proposed modifications aim to tame the growth of proof-checking time, moving the upper bound from $2^{2^n}$ to $2^n$. This represents a significant leap in the viability of complex theorem verification.

Conclusion

While this paper focuses on algorithmic complexity and formal logic rather than empirical benchmarking, it identifies a critical storage-time tradeoff. The authors demonstrate that adopting slightly more complex storage mechanisms (such as multiple variable assignments) can yield massive gains in processing speed.

Future work remains to be done in providing empirical wall-clock runtimes and detailing the specific data structures required to prevent logical inconsistencies during multiple assignments. However, the conceptual framework provided here offers a clear roadmap for more efficient theorem-proving software, suggesting that the "sharing" expressed by these bindings may eventually help humans better understand the underlying structure of the theorems being proved.

Summary updated

BibTeX
@inproceedings{martelli1977theorem,
  author = {Alberto Martelli and Ugo Montanari},
  title = {{Theorem Proving with Structure Sharing and Efficient Unification}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1977},
}
Figure