← Latest papers
💻 computer science

Definitional Inversion, Without Normalisation

This paper introduces a novel domain-theoretic proof technique that establishes definitional inversion properties for dependent type systems without relying on normalization, thereby enabling meta-theoretic analysis of non-normalizing systems like Idris and Lean as well as those with type-in-type.

Original authors: Mario Carneiro, Thierry Coquand, Adrien Frabetti Mathieu, Meven Lennon-Bertrand, Paul-André Melliès, Stephanie Weirich

Published 2026-07-16
📖 6 min read🧠 Deep dive

Original authors: Mario Carneiro, Thierry Coquand, Adrien Frabetti Mathieu, Meven Lennon-Bertrand, Paul-André Melliès, Stephanie Weirich

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 building a massive, magical library where every book is a mathematical proof, and the shelves themselves are made of logic. This is the world of dependent type systems, the secret engine behind modern proof assistants like Lean and programming languages like Idris. In this world, the rules are incredibly strict: if you try to put a "cat" on a shelf labeled "numbers," the library's security system (the type checker) should immediately scream "Error!" and stop you. This security relies on a concept called definitional equality, which is the library's way of deciding if two things are essentially the same. For example, is a "square" just a "rectangle with equal sides"? If the system says yes, it treats them as identical.

However, checking these rules is tricky. Traditionally, to prove the library is safe, mathematicians had to show that every single book could be simplified down to its simplest, most basic form (a process called normalization). But many modern, powerful libraries are designed to be infinite or self-referential, meaning they can't be simplified down to a final stop. It's like trying to flatten a fractal; you just keep finding more detail. For a long time, if a system couldn't be simplified, we couldn't prove it was safe. This paper introduces a new way to check the library's safety without needing to flatten the fractal first.


The Infinite Puzzle and the Magic Mirror

Think of a dependent type system as a giant, self-checking puzzle. The pieces are types (like "numbers" or "functions"), and the goal is to make sure that when you snap two pieces together, they fit perfectly. The most critical rule in this puzzle is definitional inversion. It's the logic that says: "If two complex structures look the same, their parts must be the same too." For instance, if you have two function types that are identical, the paper proves that their input types and output types must also be identical. This is crucial because it allows the computer to safely break down complex code into smaller pieces without getting confused.

For decades, the only way to prove these pieces fit was to use a method called confluence (checking if different paths of simplification lead to the same result) or logical relations (a complex way of comparing how terms behave). But these old tools hit a wall. Confluence breaks down when you add certain "extensional" rules (like η\eta-laws, which say a function is defined entirely by what it does, not how it's written). Logical relations usually require the system to be "normalizing" (able to stop simplifying), which rules out many powerful, real-world programming languages that allow infinite loops or self-referential types.

The New Approach: A Map of Possibilities

The authors, a team of computer scientists and mathematicians, propose a fresh strategy based on domain theory. Instead of trying to force the puzzle pieces to simplify into a single final shape, they build a map of all possible behaviors.

Imagine you are trying to identify a mysterious creature in a dark forest.

  • The Old Way: You wait for the creature to stop moving and reveal its true, final form. If the creature never stops moving (because it's an infinite loop), you can't identify it, and the forest is unsafe.
  • The New Way: You don't wait for the creature to stop. Instead, you observe its footprints. You note that it leaves a "left-foot" print, then a "right-foot" print, then a "left-foot" print again. Even if the creature never stops walking, you can still deduce its shape by looking at the pattern of its steps.

In the paper's language, these "footprints" are called compact elements or finite observations. The authors construct a mathematical "domain" (a structured space) where every type is represented not by a final answer, but by the set of all the finite things we can observe about it. They use a technique called finitary projectors to slice this domain into manageable chunks.

What They Found

Using this "footprint" method, the team successfully proved that definitional inversion holds true even in systems that:

  1. Never stop simplifying (non-normalizing), such as those with a "type-in-type" rule (where a type can contain itself).
  2. Include η\eta-laws, which are tricky rules that make functions and pairs behave more intuitively but break traditional proof methods.

They demonstrated this on a small, core version of a type theory called MLTTη\eta (Martin-Löf Type Theory with η\eta-laws). They showed that even in this chaotic, potentially infinite system, if two types are equal, their building blocks must be equal too. This is a big deal because it proves that the "safety net" of the type system works even when the system is allowed to be messy and infinite.

Why This Matters

The authors didn't just solve a puzzle for a tiny toy system; they showed that their method is robust. They extended their proof to include:

  • Dependent sums (pairs of data).
  • Unit types (a type with only one value).
  • Fixed-point combinators (tools that allow for infinite recursion).
  • Natural numbers with pattern matching.
  • Identity types (proving two things are the same).
  • Proof-irrelevant propositions (where the content of a proof doesn't matter, only that it exists).

They even built a model for a "universe of strict propositions," showing that their technique can handle the complex features found in real-world tools like Lean, Agda, and Rocq.

The Limits and the Future

The paper is very clear about what it doesn't do. It does not prove that these systems are "normalizing" (that they always stop). In fact, it explicitly works for systems that don't stop. It also doesn't solve the problem of "neutrals" (variables that haven't been filled in yet) in the same way it solves for closed terms, though it hints at how that might be done in the future.

The authors have already turned their mathematical proofs into code, verifying them three times over in three different proof assistants (Agda, Lean, and Rocq). This suggests that their method is not just a theoretical idea but a practical tool.

The Takeaway

This paper is like handing the builders of the magical library a new pair of glasses. Before, they could only check the library's safety if the books were static and finished. Now, they can check the safety of books that are still being written, or books that refer to themselves forever. By focusing on the observable behavior (the footprints) rather than the final destination (the stop), they have opened the door to verifying the most powerful, complex, and potentially infinite type systems we can imagine. This paves the way for "Lean4Lean" and "MetaRocq"—projects where proof assistants verify their own code—making the tools we use to build mathematics and software even more trustworthy.

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 →