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.TypeStar

4 declarations. Mathlib docs · Source

def Lean.Elab.Term.mkFreshLevelName E1 #

List Lean.Name → optParam Lean.Name `u → Lean.Name

Given a namePrefix ( `u by default), returns the first name out of namePrefix_1, namePrefix_2, ... which does not appear in usedLevelNames. Note mkFreshLevelName does not attempt to use namePrefix itself as a level name.

def Lean.Elab.Term.mkFreshLevelParam E1 #

optParam Lean.Name `u →
  (optParam (List Lean.Name → Lean.Name → List Lean.Name) fun x head ↦ head :: x) → Lean.Elab.TermElabM Lean.Level

Creates a fresh Level parameter which does not appear in the current state's levelNames, and updates the state to include the new level parameter.

By default, the new level parameter is of the form u_i and is included in the state as the most recent level parameter (at the front of the list).

Supplying a namePrefix will cause the new level parameter to be of the form namePrefix_i, with i starting at 1.

The new level name can be inserted at a custom position in the list of level names by providing a function insert : List Name → Name → List Name which will be called as insert currentLevelNames newLevelName. It is expected that the result will contain the new level name and still contain all current level names.

def Lean.Elab.Term.«termSort*» E1 #

Lean.ParserDescr

The syntax variable (X Y ... Z : Sort*) creates a new distinct implicit universe variable for each variable in the sequence.

def Lean.Elab.Term.«termType*» E1 #

Lean.ParserDescr

The syntax variable (X Y ... Z : Type*) creates a new distinct implicit universe variable > 0 for each variable in the sequence.