Documentation

Mathlib.Lean.Meta.DiscrTree

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
      partial def Lean.Meta.DiscrTree.Trie.mapArrays.go {α : Type} {s : Bool} {β : Type} (f : Array αArray β) (cs : Array (Lean.Meta.DiscrTree.Key s × Lean.Meta.DiscrTree.Trie β s)) (vs : Array β) (todo : Array (Lean.Meta.DiscrTree.Key s × Lean.Meta.DiscrTree.Trie α s)) (ps : Lean.Meta.DiscrTree.Ctxt) :

      This implementation as a single tail-recursive function is chosen to not blow the interpreter stack when the Trie is very deep

      def Lean.Meta.DiscrTree.mapArrays {α : Type} {s : Bool} {β : Type} (d : Lean.Meta.DiscrTree α s) (f : Array αArray β) :

      Apply a function to the array of values at each node in a DiscrTree.

      Equations
      Instances For