← Latest papers
🔢 mathematics

The continuous functional calculus in Lean

This paper documents the first formalization of the continuous functional calculus in any proof assistant, detailing its implementation in Lean's Mathlib library, the underlying mathematical theory, and the key design decisions that ensured usability for the mathematical community.

Original authors: Anatole Dedecker, Jireh Loreaux

Published 2026-06-08
📖 6 min read🧠 Deep dive

Original authors: Anatole Dedecker, Jireh Loreaux

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 chef working in a very complex, high-tech kitchen. This kitchen represents the world of C-algebras*, a branch of mathematics dealing with operators (like machines that transform data) that can be incredibly difficult to understand directly.

The paper you are reading is a report by two chefs, Anatole and Jireh, who have just built a new, revolutionary kitchen tool called the Continuous Functional Calculus. They have also built a digital recipe book (in a programming language called Lean) that teaches computers how to use this tool perfectly.

Here is the story of what they did, explained simply.

1. The Problem: The "Black Box" Machine

In this mathematical kitchen, you often have a special machine (an element aa) that does something complicated. You want to do something new to it, like take its square root, or apply a complex curve to it.

In the old days, to do this, you had to take the machine apart, understand its internal gears (its "spectrum"), and then rebuild it. It was like trying to change the flavor of a soup by taking the pot apart, analyzing the chemistry of every molecule, and then reassembling it. It was slow, error-prone, and required a PhD in chemistry just to make a simple change.

2. The Solution: The "Magic Label"

The Continuous Functional Calculus is a magic label. Instead of taking the machine apart, you simply stick a label on it that says, "Apply this function ff to me."

  • The Old Way: "I need to calculate the square root of this machine. I must first prove the machine is normal, find its internal spectrum, prove the square root function is continuous on that spectrum, and then reconstruct the machine."
  • The New Way: "I have a machine aa. I want to apply the function f(x)=xf(x) = \sqrt{x}. I just write f(a)f(a)."

The paper explains how the authors built a digital version of this "magic label" system in Lean, a proof assistant that checks math for errors. They didn't just write the math; they designed the interface so that a human (or a computer) can use it easily without getting stuck on technical details.

3. The Design: "Write First, Think Later"

One of the biggest challenges in programming math is that computers are very strict. If you ask a computer to calculate 1/01/0, it crashes. If you ask it to apply a function to a machine that isn't "normal," it might crash.

The authors decided to use a strategy they call "Junk Values."

  • The Analogy: Imagine a vending machine. If you put in a coin and press "Soda," it gives you a soda. If you press "Soda" but the machine is broken, a normal vending machine might explode or give an error.
  • The Lean Approach: The authors programmed their machine so that if you press "Soda" on a broken machine, it just gives you a dummy soda (a "junk value," like 0). It doesn't crash. It just says, "Here is a soda, but it's a placeholder."
  • Why this helps: This allows mathematicians to write down long, complex recipes (equations) without stopping to check if every single step is valid right now. They can write the whole recipe first, and only check the validity of the specific steps when they need to prove the final result is correct. This makes the work much faster and less frustrating.

4. The "Universal Adapter" (Classes)

The authors realized that this "magic label" tool needs to work in different types of kitchens:

  • Complex numbers (the standard kitchen).
  • Real numbers (a simpler kitchen).
  • Non-negative numbers (a kitchen where you can't have negative ingredients).

Instead of building three separate, incompatible tools, they built one Universal Adapter (called a "Class" in Lean). This adapter knows how to fit into any of these kitchens. If you are working with real numbers, it automatically switches to the real-number mode. If you are working with matrices, it switches to matrix mode.

5. The "Non-Unital" Challenge (The Kitchen Without a Main Switch)

Most math tools assume there is a "main switch" (an identity element) in the kitchen. But some mathematical kitchens (non-unital algebras) don't have one.

  • The Analogy: Imagine a light switch that controls the whole room. In a "unital" kitchen, the switch exists. In a "non-unital" kitchen, the switch is missing.
  • The Solution: The authors figured out how to build their tool so it works even if the main switch is missing. They did this by pretending the kitchen has a switch for a moment, doing the work, and then removing the switch again. This allows the tool to work in any kitchen, whether it has a switch or not.

6. Why This Matters

Before this paper, if a mathematician wanted to use this tool in a computer proof, they had to jump through so many hoops (proving continuity, proving normality, handling different number types) that it was often easier to just do the math on paper and ignore the computer.

The authors' goal was to make the computer interface as easy as writing on paper.

  • Before: You had to carry around a heavy backpack of proof certificates for every single step.
  • After: The computer has a "smart assistant" (called autoParam) that automatically finds those certificates for you. If you write sqrt(a), the computer automatically checks if a is a valid candidate for a square root. If it is, great! If not, it tells you.

Summary

The paper documents the construction of a user-friendly, universal, and robust digital tool for manipulating complex mathematical machines.

  • They replaced rigid, crash-prone definitions with flexible ones that use "junk values" to keep things moving.
  • They built a universal adapter to handle different types of numbers (Real, Complex, Non-negative).
  • They ensured it works even in "broken" kitchens (non-unital algebras).
  • They added automation so users don't have to manually prove every tiny detail.

The result is a system where mathematicians can focus on the ideas (the recipe) rather than the syntax (chopping the vegetables), making the formalization of advanced operator theory possible for the first time in a proof assistant.

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 →