Documentation

Mathlib.Lean.Meta.RefinedDiscrTree.Basic

Basic Definitions for RefinedDiscrTree #

Definitions #

Discrimination tree key.

  • star : NatKey

    A metavariable. This key matches with anything. It stores an index.

  • opaque : Key

    An opaque variable. This key only matches with itself or Key.star.

  • const : NameNatKey

    A constant. It stores the name and the arity.

  • fvar : FVarIdNatKey

    A free variable. It stores the FVarId and the arity.

  • bvar : NatNatKey

    A bound variable, from a lambda or forall binder. It stores the De Bruijn index and the arity.

  • lit : LiteralKey

    A literal.

  • sort : Key

    A sort. Universe levels are ignored.

  • lam : Key

    A lambda function.

  • forall : Key

    A dependent arrow.

  • proj : NameNatNatKey

    A projection. It stores the structure name, the projection index and the arity.

Instances For

    Constructor index used for ordering Key. Note that the index of the star pattern is 0, so that when looking up in a Trie, we can look at the start of the sorted array for all .star patterns.

    Equations
      Instances For

        Return the number of arguments that the Key takes.

        Equations
          Instances For

            Discrimination tree trie. See RefinedDiscrTree.

            Instances For
              def Lean.Meta.RefinedDiscrTree.Trie.mkPath {α : Type} (keys : Array Key) (child : Trie α) :
              Trie α

              Trie.path constructor that only inserts the path if it is non-empty.

              Equations
                Instances For
                  def Lean.Meta.RefinedDiscrTree.Trie.singleton {α : Type} (keys : Array Key) (value : α) (i : Nat) :
                  Trie α

                  Trie constructor for a single value, taking the keys starting at index i.

                  Equations
                    Instances For
                      def Lean.Meta.RefinedDiscrTree.Trie.mkNode2 {α : Type} (k1 : Key) (t1 : Trie α) (k2 : Key) (t2 : Trie α) :
                      Trie α

                      Trie.node constructor for combining two Key, Trie α pairs.

                      Equations
                        Instances For

                          Return the values from a Trie α, assuming that it is a leaf

                          Equations
                            Instances For

                              Return the children of a Trie α, assuming that it is not a leaf. The result is sorted by the Key's

                              Equations
                                Instances For

                                  Discrimination tree. It is an index from expressions to values of type α.

                                  Instances For