Machine Theorem Discovery

Fangzhen Lin

Abstract

Machine theorem discovery frames core AI challenges—such as planning, game theory, and software verification—as logical quests. By automating the generation and verification of conjectures within specific domains, researchers can identify deep properties like loop invariants or Nash equilibrium conditions. This paper proposes a general framework for discovering "weakest conjectures" using small model construction and formal logic, transforming intractable proof problems into manageable model-checking tasks.

Introduction

Historically, automated theorem discovery was focused on general mathematical fields like number theory or geometry. However, AI practitioners often face hurdles in highly specific, "messy" domains. For instance, in planning, one must determine if a property holds after any sequence of actions; in game theory, the conditions for a unique Nash equilibrium must be established; and in software verification, finding loop invariants is critical to proving program correctness. Proving these properties directly is often computationally intractable. This paper addresses these challenges by proposing a framework to automatically discover "helper" properties—conjectures that are likely true—which simplify the larger proof.

Methodology

The proposed framework utilizes an iterative algorithm for discovery, leveraging modern Knowledge Representation (KR) tools and high-performance solvers like SAT and SMT solvers.

The input and output specifications for the theorem discovery process.

The process follows five key input steps as shown in the figure above:

  1. Language Description: Defining sorts, predicates, constants, and functions.
  2. Model Construction: Building a collection of small, concrete models of the domain.
  3. Model Confirmation: Establishing a relation where a model $M$ confirms a sentence $\phi$ if it satisfies required properties.
  4. Theorem Proving (Optional): Using a prover to check if a sentence is a theorem in the given theory.
  5. Hypothesis Space Specification: Defining the types of statements (e.g., atomic sentences, binary clauses) the machine should search for.

The system then generates the "weakest conjectures"—the most general true statements that are not redundant. A key insight is the "Small Model Shortcut": for certain logical structures, if a property holds for all small models, it is mathematically guaranteed to be a theorem for all models.

Applications and Results

The framework has been applied to several domains using synthetic benchmarks and domain axiomatizations:

  • Planning: Using standard benchmarks like "logistics" and "blocks world," the system successfully discovered complete sets of state invariants, defining "legal" states without human intervention.
  • Game Theory: The algorithm rediscovered known mathematical classes and identified new conditions for the uniqueness of Nash equilibria in finite two-person games.
  • Software Verification: Analyzing programs from the SV-COMP (Software Verification Competition), the framework discovered loop invariants that off-the-shelf SMT solvers like Z3 could not solve independently. By identifying simple lemmas (e.g., $a(n) + b(n) = 3n$), the system converted impossible verification tasks into straightforward inductive proofs.

Discussion and Future Work

A primary distinction of this work is the focus on "discovery" over traditional "learning." While machine learning identifies patterns from data, theorem discovery extracts truths from axioms. These approaches are complementary; machine learning could suggest formula "shapes," while the discovery engine provides rigorous verification.

However, limitations remain. The "Hypothesis Space Bottleneck" requires humans to define the shape of potential theorems. Furthermore, search complexity increases exponentially as the hypothesis space grows. Future research points toward hybrid systems where supervised learning guides the search space navigation, while the logical framework ensures the formal correctness that "black box" AI currently lacks.

Summary updated

BibTeX
@article{lin2018machine,
  author = {Fangzhen Lin},
  title = {{Machine Theorem Discovery}},
  journal = {AI Mag.},
  year = {2018},
  doi = {10.1609/aimag.v39i2.2794},
}
Figure