Compare two Key
s. The ordering is total but otherwise arbitrary. (It uses
Name.quickCmp
internally.)
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.DiscrTree.Key.instOrdKey = { compare := Lean.Meta.DiscrTree.Key.cmp }
Monadically fold the keys and values stored in a Trie
.
Fold the keys and values stored in a Trie
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Monadically fold the values stored in a Trie
.
Fold the values stored in a Trie
.
Equations
- Lean.Meta.DiscrTree.Trie.foldValues f init t = Id.run (Lean.Meta.DiscrTree.Trie.foldValuesM f init t)
Instances For
The number of values stored in a Trie
.
Merge two Trie
s. Duplicate values are preserved.
Auxiliary definition for mergePreservingDuplicates
.
Monadically fold over the keys and values stored in a DiscrTree
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fold over the keys and values stored in a DiscrTree
Equations
- Lean.Meta.DiscrTree.fold f init t = Id.run (Lean.Meta.DiscrTree.foldM (fun (s : σ) (keys : Array Lean.Meta.DiscrTree.Key) (a : α) => pure (f s keys a)) init t)
Instances For
Monadically fold over the values stored in a DiscrTree
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fold over the values stored in a DiscrTree
.
Equations
- Lean.Meta.DiscrTree.foldValues f init t = Id.run (Lean.Meta.DiscrTree.foldValuesM f init t)
Instances For
Extract the values stored in a DiscrTree
.
Equations
- Lean.Meta.DiscrTree.values t = Lean.Meta.DiscrTree.foldValues (fun (as : Array α) (a : α) => Array.push as a) #[] t
Instances For
Extract the keys and values stored in a DiscrTree
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Get the number of values stored in a DiscrTree
. O(n) in the size of the tree.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Merge two DiscrTree
s. Duplicate values are preserved.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
Apply a monadic function to the array of values at each node in a DiscrTree
.
Apply a monadic 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
Apply a function to the array of values at each node in a DiscrTree
.
Equations
- Lean.Meta.DiscrTree.mapArrays d f = Id.run (Lean.Meta.DiscrTree.mapArraysM d fun (A : Array α) => pure (f A))