Documentation

Mathlib.Lean.Meta.RefinedDiscrTree.Initialize

Constructing a RefinedDiscrTree #

RefinedDiscrTree is lazy, so to add an entry, we need to compute the first Key and a LazyEntry. These are computed by initializeLazyEntry.

We provide RefinedDiscrTree.insert for directly performing this insert.

For initializing a RefinedDiscrTree using all imported constants, we provide createImportedDiscrTree, which loops through all imported constants, and does this with a parallel computation.

There is also createModuleDiscrTree which does the same but with the constants from the current file.

Directly insert a Key, LazyEntry pair into a RefinedDiscrTree.

Equations
    Instances For

      Structure for quickly initializing a lazy discrimination tree with a large number of elements using concurrent functions for generating entries.

      This preliminary structure is converted to a RefinedDiscrTree via toRefinedDiscrTree.

      Instances For

        Add an entry to the PreDiscrTree.

        Equations
          Instances For

            Convert a PreDiscrTree to a RefinedDiscrTree.

            Equations
              Instances For

                Merge two PreDiscrTrees.

                Equations
                  Instances For

                    Return true if declName is automatically generated, or otherwise unsuitable as a lemma suggestion.

                    Equations
                      Instances For
                        def Lean.Meta.RefinedDiscrTree.createImportedDiscrTree {α : Type} (ngen : NameGenerator) (env : Environment) (act : NameConstantInfoMetaM (List (α × List (Key × LazyEntry)))) (constantsPerTask capacityPerTask : Nat) :

                        Create a RefinedDiscrTree consisting of all entries generated by act from imported constants; addConstToPreDiscrTree calls this helper. This uses parallel computation.

                        Equations
                          Instances For

                            A discriminator tree for the current module's declarations only.

                            Note: We use different discrimination trees for imported and current module declarations since imported declarations are typically much more numerous but not changed while the current module is edited.

                            Instances For

                              Create a RefinedDiscrTree for current module declarations, consisting of all entries generated by act from constants in the current file. This is called by addConstToPreDiscrTree.

                              Equations
                                Instances For

                                  Create a reference for a RefinedDiscrTree for current module declarations.

                                  Equations
                                    Instances For