CTAN Comprehensive TeX Archive Network

Directory macros/latex/contrib/leanify

README.md

leanify — a article checked by Lean

Version 0.3, 2026-11-06.

Leanify compiles an ordinary mathematical article, written in , to the Lean proof assistant: every definition and theorem becomes a Lean statement checked by the kernel, and the proofs are checked sentence by sentence against the results they cite. The same source is typeset as the paper you submit.

The package leanify.sty is the typesetting side:

  • it loads the notation the Leanify grammar reads (mathtools, amssymb);
  • with shell escape, inside a Lean project, it runs lake exe leanify check on every compile and reports the findings as warnings at their lines;
  • with the option status, it marks every labelled result in the margin with its verification status (checked, derived, partly checked, compiled, false);
  • without options and without shell escape, it changes nothing in the typeset article, so the article compiles anywhere, e.g. on arXiv.
\usepackage{leanify}            % check as you compile
\usepackage[status]{leanify}    % and show the verification status
\usepackage[certify]{leanify}   % and build the certificate first

The package needs 2022-06-01 or newer. Checking needs the Lean toolchain (lake on the PATH) and the Leanify Lean package; typesetting does not.

Documentation: leanify-doc.pdf, and the full documentation, tutorial and demo at https://corrram.github.io/leanify/. Source and issues: https://github.com/Corrram/leanify.

Licence

Copyright (C) 2026 Marcus Rockel. Released under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0).

Download the contents of this package in one zip archive (277.9k).

Leanify – A article checked by the Lean proof assistant

This package connects mathematical articles written in with the Leanify proof checker and the Lean proof assistant. It translates mathematical definitions, statements, and proofs supported by its grammar into Lean for formal verification. The same source is used to typeset the article.

The leanify package provides the integration. It loads the required mathematical notation packages and, when shell escape is enabled within a configured Lean project, invokes the checker during compilation. Diagnostic messages are reported as warnings at the corresponding source lines. The status option displays the verification status of labelled results in the margins.

Without shell escape, no external checker is invoked. Without options, the package leaves the typeset article unchanged. Thus, articles can also be compiled without the Lean toolchain, for example on arXiv. Formal verification requires the Lean toolchain and the separate Leanify checker.

PackageLeanify
Home page
Bug tracker
Repository
Version0.3
LicensesApache License, version 2.0
Copyright2026 Markus Rockel
MaintainerMarkus Rockel
TopicsCallback
Maths
Debug support
Proof
...
Guest Book Sitemap Contact Contact Author