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
  • One or more equations did not get rendered due to their size.
Instances For

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

    Instances For

      Add an entry to the pre-discrimination tree.

      Equations
      Instances For

        Convert a pre-discrimination tree to a RefinedDiscrTree.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Merge two discrimination trees.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Combine two initial results.

            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. (it gets called by addConstToPreDiscrTree). This uses parallel computation.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[irreducible]
                def Lean.Meta.RefinedDiscrTree.createImportedDiscrTree.go {α : Type} (env : Environment) (act : NameConstantInfoMetaM (List (α × List (Key × LazyEntry)))) (constantsPerTask capacityPerTask : Nat) (cctx : Core.Context) (ngen : NameGenerator) (tasks : Array (Task (Lean.Meta.RefinedDiscrTree.InitResults✝ α))) (start cnt idx : Nat) :

                Allocate constants to tasks according to constantsPerTask.

                Equations
                • One or more equations did not get rendered due to their size.
                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. (it gets called by addConstToPreDiscrTree)

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Create a reference for a RefinedDiscrTree for current module declarations.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For