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
- Lean.Meta.Sym.withLocalDeclS name bi type k = Lean.Meta.withLocalDecl name bi type fun (x : Lean.Expr) => do let __do_lift ← liftM (Lean.Meta.Sym.Internal.mkFVarS x.fvarId!) k __do_lift
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
Normalizes universe levels in constants and sorts.
Equations
- One or more equations did not get rendered due to their size.