Additions to Lean.Meta.DiscrTree
#
partial def
Lean.Meta.DiscrTree.getSubexpressionMatches
{α : Type}
(d : Lean.Meta.DiscrTree α)
(e : 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.
Check if a keys : Array DiscTree.Key
is "specific",
i.e. something other than [*]
or [=, *, *, *]
.
Equations
- One or more equations did not get rendered due to their size.