Additions to Lean.Meta.DiscrTree
#
Inserts a new key into a discrimination tree,
but only if it is not of the form #[*]
or #[=, *, *, *]
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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.
Apply a function to the array of values at each node in a DiscrTree
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This implementation as a single tail-recursive function is chosen to not blow the
interpreter stack when the Trie
is very deep
Apply a function to the array of values at each node in a DiscrTree
.
Equations
- Lean.Meta.DiscrTree.mapArrays d f = { root := Lean.PersistentHashMap.map d.root fun t => Lean.Meta.DiscrTree.Trie.mapArrays t f }