cs.LGNov 21, 2026

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

Authors: Justin Asher, Pietro Pellegrino

Organizations: Project Numina · University of Naples Federico II

Abstract

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.

Figures & tables

Appendix figures & tables13 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. LeanDojo-v2: A Comprehensive Library for AI-Assisted Theorem Proving in Lean

    Nov 6, 2026Ryan Hsiang, William Adkisson, Robert Joseph George +1Lean Theorem ProvingLarge Language Model-Guided Theorem Proving

  2. AXLE: A Cloud Infrastructure for Lean 4 Theorem Proving Utilities

    Jun 24, 2026Jimmy Xin, Alex Schneidman, Chris Cummins +3Interactive Theorem ProvingFormal Verification