Functorial

Functorial

Spec engineering with mathematical precision.

How it works

A proof checker only answers the question you asked.

So the question is the job. We call that job specification engineering: a person states what the system must do, a model searches for the proof, and a checker has the last word.

  1. 1

    You write the spec

    Decide what must be true, and say it in Lean. This is the part that cannot be delegated.

  2. 2

    AI searches

    A model looks for a proof or a counterexample. A counterexample means the program is wrong, or the spec is.

  3. 3

    The checker decides

    Lean's kernel accepts the proof or it does not. Nobody has to take the model's word for it.

Sort.lean checked
theorem sort_spec (l : List Nat) :
    Sorted (sort l) ∧ (sort l).Perm l := by
  constructor
  · simpa [Sorted, sort] using
      l.pairwise_mergeSort (le := (· ≤ ·))
        (by simp; omega) (by simp; omega)
  · exact l.mergeSort_perm _

✓ Lean accepted. No sorry. Axioms: propext, Quot.sound.

you AI Lean

The first spec in the demo says only that the output is sorted. A function that returns the empty list meets it. Own the meaning is the principle that catches that.

Functorial Academy

Learn Lean by proving things.

Every answer you type is checked by real Lean 4 with all of Mathlib loaded. Nothing is compared to a stored answer. If Lean accepts it, it is correct.

courses
5
units
47
exercises
559
stored answers
0

Faithfulness Review

Lean can tell you a proof is correct. It cannot tell you the proof is about your theorem.

An autoformalizer turns a paper into Lean, and Lean checks the Lean. The open question is whether the Lean says what the paper says.

In a faithfulness review you step through every correspondence between the paper and the Lean code, statement by statement and hypothesis by hypothesis, and grade each one. The mappings are the product.

The term was coined by Tobi Lehman in Math, AI, Lean and the Faithfulness Review.

  • Lean certificate This exact source builds, with no sorry, on these axioms, with this toolchain.
  • Faithfulness certificate A named person checked that each Lean declaration says what the paper says.

Talk · Portland State University · 20 November 2026

Faithfulness reviews of Lean autoformalizations

Tobi Lehman introduces the faithfulness review: why a checked proof is not yet a checked claim, and how to review the gap between a paper and its formalization. 64 minutes.

Watch on YouTube

Principles

  1. 1

    Own the meaning

    A proved specification can still miss the requirement. You can delegate finding a proof, but not understanding what is to be proved.

  2. 2

    Make the claim inspectable

    A checked proof establishes a precise statement under stated assumptions. Show the statement, the definitions, the assumptions and the proof status.

  3. 3

    State the conditions and the scope

    A guarantee applies only when its assumptions hold and its model fits the situation. Say when that is.

Get the spec right, and sleep at night.

Latest

What we have shipped lately.

Have a program, a distributed system, or a paper that has to be right?

Tell us what you are working on. We will set up a call.