English

The Network Structure of Mathlib

Logic in Computer Science 2026-05-06 v2 Programming Languages Social and Information Networks History and Overview

Abstract

The ongoing development of Lean 4's Mathlib has produced a macroscopic structural complexity that interweaves logical, mathematical, and infrastructural dependencies. We present a network analysis of this library, extracting its dependency structure into a multilayer graph of 308,129 declarations, 8.4 million edges, and 7,563 modules. By introducing graph decompositions that isolate explicit edges from those synthesized by the compiler or driven by proofs, we quantify the structural properties of formalized mathematics. Our analysis reveals three findings. First, taxonomies designed by humans diverge from logical structures, exhibiting a 50.9% coupling across namespaces. Second, developers utilize a median of 1.6% of the imported scope. Third, formalization compresses semantic hierarchies, with network centrality capturing language infrastructure rather than mathematical relevance.

Keywords

Cite

@article{arxiv.2604.24797,
  title  = {The Network Structure of Mathlib},
  author = {Xinze Li and Nanyun Peng and Simone Severini and Patrick Shafto},
  journal= {arXiv preprint arXiv:2604.24797},
  year   = {2026}
}
R2 v1 2026-07-01T12:37:45.244Z