Use and Abuse of Instance Parameters in the Lean Mathematical Library

Abstract The Lean mathematical library Mathlib features extensive use of the typeclass pattern for organising mathematical structures, based on Lean’s mechanism of instance parameters. Related mechanisms for typeclasses are available in other provers including Agda, Coq and Isabelle with varying degrees of adoption. This paper analyses representative examples of design patterns involving instance parameters in the finalized Lean 3 version of Mathlib, focussing on complications arising at scale and how the Mathlib community deals with them.

Authors

Institutions

Publication Details

Journal
Journal of Automated Reasoning
Published
2024-12-12
DOI
https://doi.org/10.1007/s10817-024-09712-7
Citations
2
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.69

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Use and Abuse of Instance Parameters in the Lean Mathematical Library

Anne Baanen
2 citations
Journal of Automated Reasoning
Logic, programming, and type systems
0.69
article

Use and Abuse of Instance Parameters in the Lean Mathematical Library

Anne Baanen
article en
2 citations

Abstract

Abstract The Lean mathematical library Mathlib features extensive use of the typeclass pattern for organising mathematical structures, based on Lean’s mechanism of instance parameters. Related mechanisms for typeclasses are available in other provers including Agda, Coq and Isabelle with varying degrees of adoption. This paper analyses representative examples of design patterns involving instance parameters in the finalized Lean 3 version of Mathlib, focussing on complications arising at scale and how the Mathlib community deals with them.

Journal of Automated ReasoningVol. 69(1)
Vrije Universiteit Amsterdam (NL)
Nederlandse Organisatie voor Wetenschappelijk Onderzoek
Quality Education
Openalex Percentile: Top 23%
Logic, programming, and type systems
0.69
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.