Documentation

Lean.Elab.InfoTree.Basic

Merges the inner partial context into the outer context s.t. fields of the inner context overwrite fields of the outer context. Panics if the invariant described in the documentation for PartialContextInfo is violated.

When traversing an InfoTree, this function should be used to combine the context of outer nodes with the partial context of their subtrees. This ensures that the traversal has the context from the inner node to the root node of the InfoTree available, with partial contexts of inner nodes taking priority over contexts of outer nodes.

Instances For

    Obtains the LocalContext from this CompletionInfo if available and yields an empty context otherwise.

    Instances For

      Instantiate the holes on the given tree with the assignment table. (analogous to instantiating the metavariables in an expression)

      Applies s.lazyAssignment to s.trees, asynchronously.

      Instances For
          Instances For

            Helper function for propagating the tactic metavariable context to its children nodes. We need this function because we preserve TacticInfo nodes during backtracking and their children. Moreover, we backtrack the metavariable context to undo metavariable assignments. TacticInfo nodes save the metavariable context before/after the tactic application, and can be pretty printed without any extra information. This is not the case for TermInfo nodes. Without this function, the formatting method would often fail when processing TermInfo nodes that are children of TacticInfo nodes that have been preserved during backtracking. Saving the metavariable context at TermInfo nodes is also not a good option because at TermInfo creation time, the metavariable context often miss information, e.g., a TC problem has not been resolved, a postponed subterm has not been elaborated, etc.

            See Term.SavedState.restore.

            Instances For
              Instances For

                Adds the given trailing substring to all adjacent syntax in the info tree if any, otherwise returns none.

                Adds the given trailing substring to all adjacent syntax in the info tree.

                Instances For