# Lean Census: A Distributional Analysis of AI-Generated Lean Code

arXiv: https://arxiv.org/abs/2611.28430 · HTML: https://mlsanity.com/paper/2611.28430/

## Key facts

- No citing papers in the map yet (data through 24 Nov 2026).
- Builds on 16 of its 45 references that are in the map.
- Submitted 21 Nov 2026, announced 24 Nov 2026.

## Builds on (most cited first, 16 of 16)

- [The Lean mathematical library](https://mlsanity.com/paper/1910.09336/) (2019)
- [Top-Down Synthesis for Library Learning](https://mlsanity.com/paper/2211.16605/) (2022)
- [LILO: Learning Interpretable Libraries by Compressing and Documenting Code](https://mlsanity.com/paper/2310.19791/) (2023)
- [Speed at the Cost of Quality: How Cursor AI Increases Short-Term Velocity and Long-Term Complexity in Open-Source Projects](https://mlsanity.com/paper/2511.04427/) (2025)
- [ProofOptimizer: Training Language Models to Simplify Proofs without Human Demonstrations](https://mlsanity.com/paper/2510.15700/) (2025)
- [HepLean: Digitalising high energy physics](https://mlsanity.com/paper/2405.08863/) (2024)
- [Formalising the h-principle and sphere eversion](https://mlsanity.com/paper/2210.07746/) (2022)
- [The Network Structure of Mathlib](https://mlsanity.com/paper/2604.24797/) (2026)
- [Sorries Are Not the Hard Part: An Expert-Review Case Study of a Semi-Autonomous Formalization](https://mlsanity.com/paper/2606.13925/) (2026)
- [Abstraction boundaries and spec driven development in pure mathematics](https://mlsanity.com/paper/2309.14870/) (2023)
- [Library Learning Doesn't: The Curious Case of the Single-Use "Library"](https://mlsanity.com/paper/2410.20274/) (2024)
- [Proof-Refactor: Refactoring Generated Formal Proofs into Modular Artifacts](https://mlsanity.com/paper/2606.03743/) (2026)
- [Realms: A Structure for Consolidating Knowledge about Mathematical Theories](https://mlsanity.com/paper/1405.5956/) (2014)
- [A formalization of Dedekind domains and class groups of global fields](https://mlsanity.com/paper/2102.02600/) (2021)
- [ProofJudge: Tool-Grounded LLM Evaluation of Formal Proof Quality in Mathlib](https://mlsanity.com/paper/2608.20432/) (2026)
- [AI has its own style in mathematical proving](https://mlsanity.com/paper/2611.16527/) (2026)

## Abstract (arXiv)

We compare two human-written and four AI-generated Lean libraries with Mathlib through the distributions of simple statistics of their code. For each library we measure inline claims in proofs, proof length, how often each declaration is used, and design choices such as instances and private declarations, and we read each against the variation among Mathlib's own areas. The AI-generated libraries have more inline claims per theorem, longer proofs, fewer instances, and more private declarations than the human-written ones. We release the code for the analysis as a package, lean-census, at https://github.com/project-numina/lean-census.
