The monthly · N° 1 · November 2026
Back to the issue
React
Share
Illustration: A bench-top inspection gate with a tray feeding in and a tray collecting out; its green checkpoint housing stands for the small kernel that checks every step of a proof.
Illustration made with AI for ai notis

From the daily edition · 18 Oct 2026Research

How Lean checks an AI-written proof, and where that stops

Lean's manual describes a kernel check, an axiom listing and two stronger tools, and says a passing check is meaningful if the theorem statement matches its intended meaning.

548 wordsPublished 18 Oct 2026

It rests on 16 checked facts from 7 sources.

Open on ainotis.com

In short

  • Lean's manual describes its trusted kernel as a small implementation of a type checker, and says newly elaborated inductive types and definitions must be checked by it.
  • #print axioms lists what a declaration uses; sorryAx in the list means the theorem or a dependency uses sorry or is incomplete. Lean has four standard axioms.
  • The manual separates whether a theorem has a valid proof from what its statement means, and calls the basic check meaningful if the statement matches its intended meaning.

Lean is an open-source system that works both as a programming language and as a proof assistant. You use it to write precise, verifiable code and formal proofs.

Lean's manual describes its trusted kernel as a small, robust implementation of a type checker for the core type theory. New inductive types or definitions must be checked by the kernel to guard against potential bugs in elaboration.

The idea behind the check is called propositions as types. A statement is a type, and a proof of it is simply an object of that type. In interactive proving, every step has to be justified by appealing to prior definitions and theorems, all the way down to basic axioms and rules.

Lean's manual says proof terms are sufficient evidence of the truth of a theorem and are amenable to independent verification.

The check has limits, and the manual lists them. A proof can contain the sorry placeholder, which Lean says can prove anything and is not intended to occur in finished proofs. Running the command #print axioms on a theorem shows which axioms it depends on. A result that lists sorryAx is incomplete.

Lean counts four standard axioms: propext, Classical.choice and Quot.sound, which the manual calls important parts of how mathematics is done in Lean, and sorryAx, which is not intended to occur in finished proofs.

The manual also separates two questions: whether a theorem has a valid proof, and what the theorem statement means. It says that if there are doubts the theorem means what it appears to mean, its statement and all referenced definitions must be investigated carefully.

For higher stakes it describes the lean4checker tool, which replays the stored declarations through the kernel, and a tool called Comparator, which builds the proof in a sandbox and checks that the proved statements match those in a trusted challenge file.

The manual says the check is meaningful if one believes the theorem statement matches its intended meaning and trusts the authors of the imported libraries to be honest.

What it means for you · our view

A passing Lean check answers whether a proof is valid, and leaves open whether the theorem proved is the one you wanted. The manual says to investigate the statement and the definitions it refers to when there is doubt, in particular custom notation and type classes.

For higher stakes it describes lean4checker, which replays stored declarations through the kernel, and Comparator, which checks the proved statements against a trusted challenge file.

When someone presents an AI-written result as verified in Lean, ask for the #print axioms output and read the theorem statement against the claim being made before you rely on it.

How we checked this · the sources16 checked facts from 7 sources.
  1. Lean programming language and theorem prover · Lean FRO · archived copy

    1. The Lean home page describes Lean as an open-source programming language and proof assistant that enables correct, maintainable and formally verified code, and says Lean lets you write precise, verifiable code and formal proofs.
      Toned downchecked 18 Oct 2026
  2. Lean reference: Elaboration and Compilation · Lean FRO / Lean project · archived copy

    1. Lean's reference manual says: 'Lean's trusted kernel is a small, robust implementation of a type checker for the core type theory.'
      checked 18 Oct 2026
      Lean's trusted kernel is a small, robust implementation of a type checker for the core type theory.
    2. The manual says newly elaborated inductive types and definitions 'must be checked by the kernel to guard against potential bugs in elaboration'.
      checked 18 Oct 2026
      Before new inductive types or definitions are added to the environment by the command or term elaborators, they must be checked by the kernel to guard against potential bugs in elaboration.
  3. Theorem Proving in Lean 4: Propositions and Proofs · Lean FRO / Lean project · archived copy

    1. Theorem Proving in Lean 4 describes propositions-as-types as an instance of the Curry-Howard isomorphism and says 'A proof of p is then simply an object t : p of the right type.'
      checked 18 Oct 2026
      ...is an instance of the Curry-Howard isomorphism , sometimes known as the propositions-as-types paradigm. ... A proof of p is then simply an object t : p of the right type.
    2. Theorem Proving in Lean 4 says: 'The sorry identifier magically produces a proof of anything, or provides an object of any data type at all.'
      checked 18 Oct 2026
      The sorry identifier magically produces a proof of anything, or provides an object of any data type at all. Of course, it is unsound as a proof method
  4. Theorem Proving in Lean 4: Introduction · Lean FRO / Lean project · archived copy

    1. Theorem Proving in Lean 4 says that in interactive proving, every step of a calculation has to be justified by appealing to prior definitions and theorems, all the way down to basic axioms and rules.
      checked 18 Oct 2026
  5. The Lean Language Reference: The Type System · Lean FRO · archived copy

    1. Lean's reference manual says proof terms are sufficient evidence of the truth of a theorem and are amenable to independent verification.
      checked 18 Oct 2026
  6. The Lean Language Reference: Axioms · Lean FRO · archived copy

    1. The Axioms page says sorryAx is used in the implementation of the sorry tactic and term, and that uses of this axiom are not intended to occur in finished proofs, as it can be used to prove anything.
      checked 18 Oct 2026
      The axiom sorryAx is used as part of the implementation of the sorry tactic and sorry term. Uses of this axiom are not intended to occur in finished proofs, as it can be used to prove anything
    2. The Axioms page says the command #print axioms prints the axioms used by a declaration, directly or indirectly.
      checked 18 Oct 2026
      #print axioms ... Prints the axioms used by a declaration, directly or indirectly.
    3. The Axioms page says Lean has four standard axioms: Classical.choice, propext and Quot.sound, which it calls important parts of how mathematics is done in Lean and says are known to be consistent, and sorryAx, which implements sorry and is not intended to occur in finished proofs.
      Toned downchecked 18 Oct 2026
      There are four standard axioms in Lean. The first three axioms are important parts of how mathematics is done in Lean: Classical.choice ... propext ... Quot.sound ... The axiom sorryAx is used as part of the implementation of the sorry tactic ... Lean itself provides three such axioms that are known to be consistent.
  7. The Lean Language Reference: Validating a Lean Proof · Lean FRO · archived copy

    1. The Validating a Lean Proof page says that if sorryAx is reported by #print axioms, the theorem or a dependency uses sorry or is incomplete.
      checked 18 Oct 2026
      If sorryAx is reported, then this theorem or one of its dependencies uses sorry or is otherwise incomplete.
    2. The Validating a Lean Proof page separates the question of whether a theorem has a valid proof from the question of what the theorem statement means, and counts un-reviewed AI-generated proofs and programs as malicious in its sense: code that goes out of its way to trick or mislead the user, exploit bugs or compromise the system.
      Toned downchecked 18 Oct 2026
      we use malicious to describe code that goes out of its way to trick or mislead the user, exploit bugs or compromise the system. This includes un-reviewed AI-generated proofs and programs. Furthermore it is important to distinguish the question does the theorem have a valid proof from what does the theorem statement mean.
    3. The Validating a Lean Proof page says that if there are doubts that the theorem means what it appears to mean, its statement and all referenced definitions must be investigated carefully, in particular with regard to custom notation and type classes.
      Toned downchecked 18 Oct 2026
      If there are doubts that the theorem means what it appears to mean, its statement and all referenced definitions must be investigated carefully, in particular with regard to custom notation and type classes.
    4. The Validating a Lean Proof page says lean4checker reads the declarations and proofs as stored by lean in the .olean files and replays them through the kernel.
      checked 18 Oct 2026
      The lean4checker tool reads the declarations and proofs as they are stored by lean during building (the .olean files ), and replays them through the kernel. It trusts that the .olean files are structurally correct.
    5. The Validating a Lean Proof page says Comparator, meant for high-risk cases such as proof marketplaces, high-reward proof competitions and unaligned AI, builds the proof in a sandbox, exports the proof term, and outside the sandbox replays the proofs and checks that the proved theorem statements match those in a trusted challenge file.
      Toned downchecked 18 Oct 2026
      This should only be necessary for high risk scenarios (proof marketplaces, high-reward proof competitions, unaligned AI). ... Comparator will build the proof in a sandboxed environment, to protect against malicious code in the build step. The proof term is exported to a serialized format. Outside the sandbox ... it validates the exported format, replays the proofs using both Lean's kernel and/or an external checker and also ensures that the proved theorem statements match those in the trusted challenge file.
    6. The Validating a Lean Proof page says the basic check is meaningful if one believes the formal theorem statement corresponds to its intended informal meaning and trusts the authors of the imported libraries to be honest.
      Toned downchecked 18 Oct 2026
      This check is meaningful if one believes the formal theorem statement corresponds to its intended informal meanings and trusts the authors of the imported libraries to be honest

Next in this issue11 of 11The record

OpenAI paused 25% of its production engineering projects, Brockman says

The monthly · N° 1 · November 2026 Back to the issue