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 / V01. The language of Mathlib

Mathlib.Lean.Meta.DiscrTree

2 declarations. Mathlib docs · Source

opaque Lean.Meta.DiscrTree.getSubexpressionMatches E1 #

{α : Type} → Lean.Meta.DiscrTree α → Lean.Expr → Lean.MetaM (Array α)

Find keys which match the expression, or some subexpression.

Note that repeated subexpressions will be visited each time they appear, making this operation potentially very expensive. It would be good to solve this problem!

Implementation: we reverse the results from getMatch, so that we return lemmas matching larger subexpressions first, and amongst those we return more specific lemmas first.

def Lean.Meta.DiscrTree.keysSpecific E1 #

Array Lean.Meta.DiscrTree.Key → Bool

Check if a keys : Array DiscTree.Key is "specific", i.e. something other than [*] or [=, *, *, *].