Use and abuse of instance parameters in the Lean mathematical library

Anne Baanen
2/3/2022
cs.LO

Official code: lean-forward/mathlib-classes (1 star, Lean, last commit 2023-04-01).

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.

Show full abstract

This paper analyses representative examples of design patterns involving instance parameters in the current Lean 3 version of mathlib, focussing on complications arising at scale and how the mathlib community deals with them.

View on arXivView PDF

Code Implementations(1)

Use and abuse of instance parameters in the Lean mathematical library

11LeanFeb 8, 20223 years ago

Similar Papers

Cite this paper

@article{baanen2022abuse,
  title  = {Use and abuse of instance parameters in the Lean mathematical library},
  author = {Anne Baanen},
  year   = {2022},
  eprint = {2202.01629},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.01629}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.01629.svg)](https://codeofpaper.com/paper/2202.01629)

Discussion