Documentation

Lean.Meta.Sym.Util

def Lean.Meta.Sym.withLocalDeclS {n : Type → Type u_1} {α : Type} [Monad n] [MonadControlT MetaM n] [MonadLiftT SymM n] (name : Name) (bi : BinderInfo) (type : Expr) (k : Expr → n α) :
n α

Similar to withLocalDecl, but the free variable passed to k is registered in the SymM share set. Use it when the free variable is substituted into maximally shared terms, e.g. via instantiateRevS.

Equations
Instances For
    def Lean.Meta.Sym.withLetDeclS {n : Type → Type u_1} {α : Type} [Monad n] [MonadControlT MetaM n] [MonadLiftT SymM n] (name : Name) (type val : Expr) (k : Expr → n α) (nondep : Bool := false) :
    n α

    withLetDecl variant that registers the free variable in the share set. See withLocalDeclS.

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

      Instantiates metavariables and applies shareCommon, which maintains the SymM invariants enabled in the current configuration (see Sym.Config).

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

        Instantiates assigned metavariables, applies shareCommon, and eliminates holes (aka none cells) in the local context.

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

          Debug helper: throws if any subexpression of e is not in the table of maximally shared terms.

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

            Debug helper: throws if any subexpression of the goal's target type is not in the table of maximally shared.

            Equations
            Instances For

              Normalizes universe levels in constants and sorts.

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