The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.Linter.DeclType

1 declarations. Mathlib docs · Source

Declaration type linters

We bundle a number of linters that act on declaration types into a single linter:

  • The concrete instances linter, which is defined in this file
  • The overlapping instances linter
  • The unused Fintype in type linter
  • The unused Decidable in type linter

We bundle them because each of them acts on the Lean.Elab.Term.BodyInfo in the info tree, and it is expensive to do this search many times over.

These linters run even if the declaration contains an error. This is important because it means that a user will get a warning as soon as possible.

def Mathlib.Linter.declTypeLinter E1 #

Lean.Linter

Run all of the instance parameter linters. This linter collects the declaration bodies from the info trees, so that this work does not need to be duplicated.