← Latest papers
🤖 AI

When Agda met Vampire

This paper presents a prototype system that bridges Agda and the Vampire ATP by translating proof obligations through a shared equational Horn fragment, enabling the automatic generation of constructive proofs for complex mathematical properties that previously required days of manual effort.

Original authors: Artjoms Šinkarovs, Michael Rawson

Published 2026-02-24
📖 5 min read🧠 Deep dive

Original authors: Artjoms Šinkarovs, Michael Rawson

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a master architect (the Proof Assistant, specifically Agda) building a skyscraper that must be perfectly safe. Every single brick, beam, and bolt must be inspected and approved by a strict, by-the-book inspector. If even one brick is slightly out of place, the whole building is considered unsafe.

The problem is that this inspector is incredibly thorough but also incredibly slow. They check every single detail manually. If you need to prove that a specific window fits a specific frame, the inspector might take hours to verify it, even though it's a standard window.

Enter Vampire, a super-fast, high-speed robot detective. Vampire is amazing at solving puzzles and finding connections instantly. However, Vampire has a catch: it speaks a different language (Classical Logic) and uses a different set of rules than your strict inspector. If you ask Vampire to solve a problem, it might shout, "I found the answer!" but its explanation is written in a code your inspector doesn't understand or trust.

This paper is about building a translator and a bridge between the slow, strict Architect and the fast, chaotic Robot.

The Core Problem: Two Different Worlds

  • Agda (The Architect): Works in "Constructive Logic." This means to prove something exists, you must actually build it. It's like saying, "I can prove I have a key because I'm holding one in my hand."
  • Vampire (The Robot): Works in "Classical Logic." It's okay with saying, "I can prove a key exists because if it didn't, the door would be locked, which is impossible." It's faster but doesn't always "hold the key" in its hand; it just knows it's there.

Usually, these two can't talk to each other. If you send a job to Vampire, it comes back with a proof that Agda rejects because it's "too classical."

The Solution: The "Horn Clause" Bridge

The authors realized that while the two languages are very different, they share a small, common dialect called Horn Clauses. Think of this as a simple, universal "pidgin" language that both the Architect and the Robot can understand. It's like a simplified version of English where you only say things like:

  • "If A is true, and B is true, then C is true."
  • "If X equals Y, and Y equals Z, then X equals Z."

They didn't try to translate the entire complex language of the Architect. Instead, they identified the specific, routine tasks (like checking if two algebraic expressions are equal) that fit into this simple dialect.

How It Works: The Three-Step Dance

  1. The Translation (Agda to Vampire):
    When the Architect (Agda) gets stuck on a boring, repetitive task (like proving a complex math property about roots of unity), it uses a special mirror (called Reflection) to look at the problem. It translates the complex math problem into the simple "Horn Clause" dialect and sends it to the Robot (Vampire).

  2. The Detective Work (Vampire Solves):
    Vampire zooms in, solves the puzzle in a fraction of a second, and shouts back a solution. But, because Vampire is a classical detective, its solution looks like a refutation (e.g., "It is impossible for the answer to be false!").

  3. The Reconstruction (Vampire to Agda):
    This is the magic trick. The authors built a small, clever engine (written in Prolog, a language good at logic puzzles) that acts as a translator.

    • It takes Vampire's "impossible to be false" proof.
    • It mechanically rewrites it, step-by-step, into a "here is the key" proof.
    • It turns the classical logic back into constructive logic.
    • Finally, it hands this new, perfectly formatted proof back to the Architect (Agda).

Agda checks the new proof. Since it was built step-by-step according to Agda's strict rules, Agda accepts it immediately.

The Real-World Test: The Complex Field

To prove this works, the authors tried it on a real, difficult problem: verifying properties of a "complex field with roots of unity."

  • Without the bridge: A professional mathematician using Agda had to spend two full days manually proving these properties.
  • With the bridge: The system did it automatically in a fraction of a second.

Why This Matters

Think of it like a spell-checker for mathematicians.
Before, if you wanted to write a long, complex book of proofs, you had to check every single sentence manually. It was exhausting and slow.
Now, this system acts like a "Hammer" (a term used in this field). It handles the boring, repetitive, mechanical parts of the proof so the human mathematician can focus on the big, creative ideas.

In summary:
The authors built a lightweight translator that lets a slow, strict, constructive proof assistant borrow the speed of a fast, classical theorem prover. They translate the problem into a simple language, let the robot solve it, and then translate the robot's messy solution back into a clean, trustworthy proof that the strict inspector will accept. It saves days of work and makes building verified software much easier.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →