Constructive Second-Order Proofs in Logical Databases

Michel de Rougemont

Abstract

This paper bridges the gap between database theory and formal logic by introducing "uniform proofs"—functions that generate a specific proof for any given database state. By treating logical queries as inductive definitions on finite structures, it is demonstrated that polynomial-time computability is fundamentally linked to the existence of these constructive, second-order proofs.

Introduction

In classical logic programming, such as standard Prolog, data and logical rules are often treated as a single set of first-order axioms. Consequently, any change in the underlying data necessitates a complete re-evaluation of the theory, an inefficient process for databases where data is volatile but the schema remains stable. Michel de Rougemont addresses this by shifting toward inductive definability, treating a database as a finite relational structure rather than a static set of axioms. The goal is to compile logical definitions independently of specific data, allowing for efficient query evaluation and a clearer understanding of computational complexity.

Inductive Queries and Uniform Proofs

The framework relies on several key concepts to bridge logic and computation:

  • Inductive Queries: These are queries defined by a system of first-order formulas that reach a fixed point. A classic example is the transitive closure of a graph.
  • Uniform Proofs: The paper's central innovation, a uniform proof is a polynomial-time function that produces an "effective proof" (a labeled tree) for a query given a specific database structure. It serves as a template for proving properties across an entire class of databases.
  • Witnesses: To handle existential quantifiers (e.g., "there exists an X such that..."), the system stores "witnesses"—specific elements in the database that satisfy the condition—alongside the inductive sets. This justifies the proof at no extra computational cost.
Classes of graphs $G_1(n)$ and $G_2(n)$ used to illustrate inductive queries.

Implementation and Complexity

Inductive definitions are compiled into actual C-code using "call-by-value" for parameters and "call-by-sets" for recursion. This effectively pre-computes parts of the logic at compile-time. The system uses set-based data structures (like GRIDS) to bridge high-level logic and low-level implementation.

A primary result of this work is the formal proof (Theorems 1 & 2) that a query is computable in polynomial time if and only if a uniform proof exists for it. This provides a solid logical foundation for P-time database queries. Furthermore, the system is non-monotonic; unlike classical first-order logic, adding new facts can invalidate previous proofs due to "inductive closure" (a form of the Closed World Assumption).

Conclusion and Future Work

While the framework provides a robust link between logic and P-time complexity, challenges remain regarding efficiency. The author notes that the construction becomes inefficient as the "arity" (number of arguments in a relation) increases, leading to a combinatorial explosion in set sizes. Future work will focus on "intensional analysis"—using the properties of uniform proofs to predict and optimize these inefficiencies before the code is executed. Additionally, more robust handling of general negation in inductive systems remains an area for further exploration.

Summary updated

BibTeX
@inproceedings{rougemont1987constructive,
  author = {Michel de Rougemont},
  title = {{Constructive Second-Order Proofs in Logical Databases}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1987},
}
Figure