Introduction
The formal methods community currently faces a "Tower of Babel" problem. A variety of proof assistants—including Coq, Agda, Isabelle, and Twelf—each utilize distinct logical foundations and internal languages. This fragmentation creates a significant barrier to interoperability: a proof verified in one system cannot be easily exported to or utilized by another.
Traditional methods of bridging these gaps, such as "deep embeddings," often prove inefficient. By treating foreign logics as data, these embeddings strip away the native computational behavior of proofs, leading to bloated file sizes and sluggish verification. This paper proposes the λΠ-calculus modulo as a universal "melting pot" for formal proofs, creating a framework capable of hosting diverse logical systems while preserving their computational efficiency.
The λΠ-calculus Modulo
The core of this approach is the λΠ-calculus, a well-established framework for minimal first-order logic. The authors' primary innovation is the addition of "modulo" functionality—specifically, extensible definitional equality.
In traditional type systems, two types are considered equal only if they are syntactically identical or can be reduced via fixed rules like β-reduction. The λΠ-calculus modulo allows users to define their own rewrite rules. This enables "shallow embeddings," where the equations of a foreign logic are transformed into native rewrite rules. Consequently, the framework’s engine can handle the heavy lifting of computation directly, keeping proofs small and "computationally active."
Dedukti: A High-Performance Proof Checker
To demonstrate the practical utility of this theory, the authors developed Dedukti, a proof checker designed for speed and scalability. Dedukti employs several key technical strategies:
- Bidirectional Type-Checking: By separating the process of inferring a type from checking a term against a known type, Dedukti minimizes the need for explicit type annotations, resulting in more compact proof files.
- Normalization by Evaluation (NbE): To optimize verification, Dedukti translates proofs into Haskell code. It leverages the GHC compiler’s highly optimized execution environment to perform the computations necessary for verifying proof equality.
- Higher-Order Abstract Syntax (HOAS): By using the host language’s (Haskell) binders to manage variables, Dedukti avoids the complexities and errors associated with manual variable renaming and capture.
Key Insights and Results
The authors advocate for a "Melting Pot" philosophy. Rather than attempting to construct a single, monolithic "super-logic"—which is often mathematically fraught and inconsistent—they provide a simple, configurable core. By moving from axioms (which require explicit, recorded proof steps) to rewrite rules (which are processed automatically during type checking), the framework restores the "computational soul" of formal proofs.
Universality and Efficiency
The paper demonstrates that the λΠ-calculus modulo can express any functional Pure Type System (PTS), establishing it as a viable universal target for proof exchange. Furthermore, shallow embeddings lead to significantly smaller proof objects. Because the "detours" in reasoning are handled by the rewrite engine rather than being explicitly recorded as proof steps, the resulting files are easier to store and faster to verify.
The authors validated these claims by encoding System F and successfully checking the entire standard library of the Coq proof assistant (as detailed in companion research).
Limitations and Future Directions
While powerful, the system currently faces a "trust gap." Dedukti assumes that user-provided rewrite rules are well-behaved—meaning they are confluent and terminating. If a user provides a rule that induces an infinite loop, the checker will hang. Currently, Dedukti verifies types but does not verify the validity of the rewrite rules themselves.
Future work aims to bridge this gap by developing tools to automatically check the consistency and termination of rewrite rules. Additionally, the authors are exploring Just-In-Time (JIT) compilation to mitigate the startup overhead of the GHC compiler, focusing compilation efforts on the "hotspots" of a proof to further enhance performance.
Summary updated