# Documentation

Lean.Elab.Term

Saved context for postponed terms and tactics to be executed.

Instances For
• Use typeclass resolution to synthesize value for metavariable.

typeClass: Lean.Elab.Term.SyntheticMVarKind
• Use coercion to synthesize value for the metavariable. if f? is some f, we produce an application type mismatch error message. Otherwise, if header? is some header, we generate the error (header ++ "has type" ++ eType ++ "but it is expected to have type" ++ expectedType) Otherwise, we generate the error ("type mismatch" ++ e ++ "has type" ++ eType ++ "but it is expected to have type" ++ expectedType)

coe:
• Use tactic to synthesize value for metavariable.

tactic:
• Metavariable represents a hole whose elaboration has been postponed.

postponed:

We use synthetic metavariables as placeholders for pending elaboration steps.

Instances For
Equations
• One or more equations did not get rendered due to their size.
Equations
• Metavariable for implicit arguments. ctx is the parent application.

implicitArg:
• Metavariable for explicit holes provided by the user (e.g., _ and ?m)

hole: Lean.Elab.Term.MVarErrorKind
• "Custom", msgData stores the additional error messages.

custom:

We can optionally associate an error context with a metavariable (see MVarErrorInfo). We have three different kinds of error context.

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

We can optionally associate an error context with metavariables.

Instances For
Equations

Nested let rec expressions are eagerly lifted by the elaborator. We store the information necessary for performing the lifting here.

Instances For
Equations
• One or more equations did not get rendered due to their size.
• levelNames :
• syntheticMVars :
• pendingMVars :
• mvarErrorInfos :
• letRecsToLift :

State of the TermElabM monad.

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

State of the TacticM monad.

Instances For
Equations

Snapshots are used to implement the save tactic. This tactic caches the state of the system, and allows us to "replay" expensive proofs efficiently. This is only relevant implementing the LSP server.

Instances For

Key for the cache used to implement the save tactic.

Instances For
Equations
Equations

Cache for the save tactic.

Instances For
Equations
• declName? :
• Map .auxDecl local declarations used to encode recursive declarations to their full-names.

auxDeclToFullName :
• When mayPostpone == true, an elaboration function may interrupt its execution by throwing Exception.postpone. The function elabTerm catches this exception and creates fresh synthetic metavariable ?m, stores ?m in the list of pending synthetic metavariables, and returns ?m.

mayPostpone : Bool
• When errToSorry is set to true, the method elabTerm catches exceptions and converts them into synthetic sorrys. The implementation of choice nodes and overloaded symbols rely on the fact that when errToSorry is set to false for an elaboration function F, then errToSorry remains false for all elaboration functions invoked by F. That is, it is safe to transition errToSorry from true to false, but we must not set errToSorry to true when it is currently set to false.

errToSorry : Bool
• When autoBoundImplicit is set to true, instead of producing an "unknown identifier" error for unbound variables, we generate an internal exception. This exception is caught at elabBinders and elabTypeWithUnboldImplicit. Both methods add implicit declarations for the unbound variable and try again.

autoBoundImplicit : Bool
• autoBoundImplicits :
• A name n is only eligible to be an auto implicit name if autoBoundImplicitForbidden n = false. We use this predicate to disallow f to be considered an auto implicit name in a definition such as

def f : f → Bool := fun _ => true
→ Bool := fun _ => true

autoBoundImplicitForbidden :
• Map from user name to internal unique name

sectionVars :
• Map from internal name to fvar

sectionFVars :
• Enable/disable implicit lambdas feature.

implicitLambda : Bool
• Noncomputable sections automatically add the noncomputable modifier to any declaration we cannot generate code for

isNoncomputableSection : Bool
• When true we skip TC failures. We use this option when processing patterns

ignoreTCFailures : Bool
• true when elaborating patterns. It affects how we elaborate named holes.

inPattern : Bool
• Cache for the save tactic. It is only some in the LSP server.

tacticCache? :
• If true, we store in the Expr the Syntax for recursive applications (i.e., applications of free variables tagged with isAuxDecl). We store the Syntax using mkRecAppWithSyntax. We use the Syntax object to produce better error messages at Structural.lean and WF.lean.

saveRecAppSyntax : Bool
• If holesAsSyntheticOpaque is true, then we mark metavariables associated with _s as synthethicOpaque if they do not occur in patterns. This option is useful when elaborating terms in tactics such as refine' where we want holes there to become new goals. See issue #1681, we have refine' (fun x => _)

holesAsSyntheticOpaque : Bool
Instances For
@[inline]
Equations
@[inline]
Equations
@[always_inline]
Equations
Equations
• Lean.Elab.Term.instInhabitedTermElabM = { default := throw default }

Backtrackable state for the TermElabM monad.

Instances For
Equations
def Lean.Elab.Term.SavedState.restore (restoreInfo : ) :
Equations
• One or more equations did not get rendered due to their size.
@[inline]
Equations

Execute x, save resulting expression and new state. We remove any Info created by x. The info nodes are committed when we execute applyResult. We use observing to implement overloaded notation and decls. We want to save Info nodes for the chosen alternative.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.applyResult {α : Type} (result : ) :

Apply the result/exception and state captured with observing. We use this method to implement overloaded notation and symbols.

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

Execute x, but keep state modifications only if x did not postpone. This method is useful to implement elaboration functions that cannot decide whether they need to postpone or not without updating the state.

Equations
• = do let r ←

Return the universe level names explicitly provided by the user.

Equations

Given a free variable fvar, return its declaration. This function panics if fvar is not a free variable.

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

Execute x but discard changes performed at Term.State and Meta.State. Recall that the Environment and InfoState are at Core.State. Thus, any updates to it will be preserved. This method is useful for performing computations where all metavariable must be resolved or discarded. The InfoTrees are not discarded, however, and wrapped in InfoTree.Context to store their metavariable context.

Equations

Execute x without storing Syntax for recursive applications. See saveRecAppSyntax field at Context.

Equations
• One or more equations did not get rendered due to their size.
Equations
@[implemented_by Lean.Elab.Term.mkTermElabAttributeUnsafe]
• fieldIdx:
• Field suffix? is for producing better error messages because x.y may be a field access or a hierachical/composite name. ref is the syntax object representing the field. targetStx is the target object being accessed.

fieldName:

Auxiliary datatatype for presenting a Lean lvalue modifier. We represent a unelaborated lvalue as a Syntax (or Expr) and List LVal. Example: a.foo.1 is represented as the Syntax a and the list [LVal.fieldName "foo", LVal.fieldIdx 1].

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

Return the name of the declaration being elaborated if available.

Equations

Return the list of nested let rec declarations that need to be lifted.

Equations

Return the declaration of the given metavariable

Equations
def Lean.Elab.Term.withDeclName {α : Type} (name : Lean.Name) (x : ) :

Execute x with declName? := name. See getDeclName?

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.setLevelNames (levelNames : ) :

Update the universe level parameter names.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.withLevelNames {α : Type} (levelNames : ) (x : ) :

Execute x using levelNames as the universe level parameter names. See getLevelNames.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.withAuxDecl {α : Type} (shortDeclName : Lean.Name) (type : Lean.Expr) (declName : Lean.Name) (k : ) :

Declare an auxiliary local declaration shortDeclName : type for elaborating recursive declaration declName, update the mapping auxDeclToFullName, and then execute k.

Equations
• One or more equations did not get rendered due to their size.
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.withoutErrToSorry {m : TypeType u_1} {α : Type} [inst : ] :
m αm α

Execute x without converting errors (i.e., exceptions) to sorry applications. Recall that when errToSorry = true, the method elabTerm catches exceptions and convert them into sorry applications.

Equations
• Lean.Elab.Term.withoutErrToSorry = monadMap fun {β} => Lean.Elab.Term.withoutErrToSorryImp

For testing TermElabM methods. The #eval command will sign the error.

Equations
Equations
def Lean.Elab.Term.liftLevelM {α : Type} (x : ) :
Equations
• One or more equations did not get rendered due to their size.
Equations
def Lean.Elab.Term.withPushMacroExpansionStack {α : Type} (beforeStx : Lean.Syntax) (afterStx : Lean.Syntax) (x : ) :

Elaborate x with stx on the macro stack

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.withMacroExpansion {α : Type} (beforeStx : Lean.Syntax) (afterStx : Lean.Syntax) (x : ) :

Elaborate x with stx on the macro stack and produce macro expansion info

Equations

Add the given metavariable to the list of pending synthetic metavariables. The method synthesizeSyntheticMVars is used to process the metavariables on this list.

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

Auxiliary method for reporting errors of the form "... contains metavariables ...". This kind of error is thrown, for example, at Match.lean where elaboration cannot continue if there are metavariables in patterns. We only want to log it if we haven't logged any error so far.

Equations
• = do let __do_lift ← Lean.MonadLog.hasErrors if __do_lift = true then Lean.Elab.throwAbortTerm else
Equations
• One or more equations did not get rendered due to their size.

Append mvarErrorInfo argument name (if available) to the message. Remark: if the argument name contains macro scopes we do not append it.

Equations
• One or more equations did not get rendered due to their size.
Equations
• = match extraMsg? with | none => msg | some extraMsg => msg ++ extraMsg
def Lean.Elab.Term.logUnassignedUsingErrorInfos (pendingMVarIds : ) (extraMsg? : ) :

Try to log errors for the unassigned metavariables pendingMVarIds.

Return true if there were "unfilled holes", and we should "abort" declaration. TODO: try to fill "all" holes using synthetic "sorry's"

Remark: We only log the "unfilled holes" as new errors if no error has been logged so far.

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

Ensure metavariables registered using registerMVarErrorInfos (and used in the given declaration) have been assigned.

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

Execute x without allowing it to postpone elaboration tasks. That is, tryPostpone is a noop.

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

Creates syntax for ( : )

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.levelMVarToParam (e : Lean.Expr) (except : optParam () fun x => false) :

Convert unassigned universe level metavariables into parameters. The new parameter names are fresh names of the form u_i with regard to ctx.levelNames, which is updated with the new names.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.mkFreshBinderName {m : } [inst : ] [inst : ] :

Auxiliary method for creating fresh binder names. Do not confuse with the method for creating fresh free/meta variable ids.

Equations
• Lean.Elab.Term.mkFreshBinderName =
def Lean.Elab.Term.mkFreshIdent {m : } [inst : ] [inst : ] (ref : Lean.Syntax) (canonical : ) :

Auxiliary method for creating a Syntax.ident containing a fresh name. This method is intended for creating fresh binder names. It is just a thin layer on top of mkFreshUserName.

Equations
def Lean.Elab.Term.applyAttributesAt (declName : Lean.Name) (attrs : ) (applicationTime : Lean.AttributeApplicationTime) :

Apply given attributes at a given application time

Equations
def Lean.Elab.Term.applyAttributes (declName : Lean.Name) (attrs : ) :
Equations
def Lean.Elab.Term.mkTypeMismatchError (header? : ) (e : Lean.Expr) (eType : Lean.Expr) (expectedType : Lean.Expr) :
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.throwTypeMismatchError {α : Type} (header? : ) (expectedType : Lean.Expr) (eType : Lean.Expr) (e : Lean.Expr) (f? : optParam () none) (extraMsg? : ) :
Equations
• One or more equations did not get rendered due to their size.
Equations
• One or more equations did not get rendered due to their size.
@[inline]
Equations

See containsPostponedTerm

Return true if e contains a pending metavariable. Remark: it also visits let-declarations.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.synthesizeInstMVarCore (instMVar : Lean.MVarId) (maxResultSize? : optParam () none) :

Try to synthesize metavariable using type class resolution. This method assumes the local context and local instances of instMVar coincide with the current local context and local instances. Return true if the instance was synthesized successfully, and false if the instance contains unassigned metavariables that are blocking the type class resolution procedure. Throw an exception if resolution or assignment irrevocably fails.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.mkCoe (expectedType : Lean.Expr) (e : Lean.Expr) (f? : optParam () none) (errorMsgHeader? : optParam () none) :
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.ensureHasType (expectedType? : ) (e : Lean.Expr) (errorMsgHeader? : optParam () none) (f? : optParam () none) :

If expectedType? is some t, then ensure t and eType are definitionally equal. If they are not, then try coercions.

Argument f? is used only for generating error messages.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.exceptionToSorry (ex : Lean.Exception) (expectedType? : ) :

Log the given exception, and create an synthetic sorry for representing the failed elaboration step with exception ex.

Equations

If mayPostpone == true, throw Expection.postpone.

Equations

Return true if e reduces (by unfolding only [reducible] declarations) to ?m ...

Equations

If mayPostpone == true and e's head is a metavariable, throw Exception.postpone.

Equations

If e? = some e, then tryPostponeIfMVar e, otherwise it is just tryPostpone.

Equations
• = match e? with | some e => | none => Lean.Elab.Term.tryPostpone
def Lean.Elab.Term.tryPostponeIfHasMVars? (expectedType? : ) :

Throws Exception.postpone, if expectedType? contains unassigned metavariables. It is a noop if mayPostpone == false.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.tryPostponeIfHasMVars (expectedType? : ) (msg : String) :

Throws Exception.postpone, if expectedType? contains unassigned metavariables. If mayPostpone == false, it throws error msg.

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

Save relevant context for term elaboration postponement.

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

Execute x with the context saved using saveContext.

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

Create an auxiliary annotation to make sure we create a Info even if e is a metavariable. See mkTermInfo.

We use this functions because some elaboration functions elaborate subterms that may not be immediately part of the resulting term. Example:

let_mvar% ?m := b; wait_if_type_mvar% ?m; body


If the type of b is not known, then wait_if_type_mvar% ?m; body is postponed and just return a fresh metavariable ?n. The elaborator for

let_mvar% ?m := b; wait_if_type_mvar% ?m; body


returns mkSaveInfoAnnotation ?n to make sure the info nodes created when elaborating b are "saved". This is a bit hackish, but elaborators like let_mvar% are rare.

Equations
Equations

Return some mvarId if e corresponds to a hole that is going to be filled "later" by executing a tactic or resuming elaboration.

We do not save ofTermInfo for this kind of node in the InfoTree.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.mkTermInfo (elaborator : Lean.Name) (stx : Lean.Syntax) (e : Lean.Expr) (expectedType? : optParam () none) (lctx? : ) (isBinder : ) :
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.addTermInfo (stx : Lean.Syntax) (e : Lean.Expr) (expectedType? : optParam () none) (lctx? : ) (elaborator : ) (isBinder : ) (force : ) :

Pushes a new leaf node to the info tree associating the expression e to the syntax stx. As a result, when the user hovers over stx they will see the type of e, and if e is a constant they will see the constant's doc string.

• expectedType?: the expected type of e at the point of elaboration, if available
• lctx?: the local context in which to interpret e (otherwise it will use ← getLCtx← getLCtx)
• elaborator: a declaration name used as an alternative target for go-to-definition
• isBinder: if true, this will be treated as defining e (which should be a local constant) for the purpose of go-to-definition on local variables
• force: In patterns, the effect of addTermInfo is usually suppressed and replaced by a patternWithRef? annotation which will be turned into a term info on the post-match-elaboration expression. This flag overrides that behavior and adds the term info immediately. (See https://github.com/leanprover/lean4/pull/1664.)
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.addTermInfo' (stx : Lean.Syntax) (e : Lean.Expr) (expectedType? : optParam () none) (lctx? : ) (elaborator : ) (isBinder : ) :
Equations
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.postponeElabTerm (stx : Lean.Syntax) (expectedType? : ) :

Postpone the elaboration of stx, return a metavariable that acts as a placeholder, and ensures the info tree is updated and a hole id is introduced. When stx is elaborated, new info nodes are created and attached to the new hole id in the info tree.

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

Block usage of implicit lambdas if stx is @f or @f arg1 ... or fun with an implicit binder annotation.

Equations
• One or more equations did not get rendered due to their size.
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.resolveLocalName.go (localDecl : Lean.LocalDecl) (givenNameView : Lean.MacroScopesView) (fullDeclName : Lean.Name) (ns : Lean.Name) :
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.resolveLocalName.loop (view : Lean.MacroScopesView) (findLocalDecl? : ) (n : Lean.Name) (projs : ) (globalDeclFound : Bool) :
Equations
• One or more equations did not get rendered due to their size.

Return true iff stx is a Syntax.ident, and it is a local variable.

Equations
• One or more equations did not get rendered due to their size.
Instances For
def Lean.Elab.Term.addDotCompletionInfo (stx : Lean.Syntax) (e : Lean.Expr) (expectedType? : ) (field? : optParam () none) :

Store in the InfoTree that e is a "dot"-completion target.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.elabTerm (stx : Lean.Syntax) (expectedType? : ) (catchExPostpone : ) (implicitLambda : ) :

Main function for elaborating terms. It extracts the elaboration methods from the environment using the node kind. Recall that the environment has a mapping from SyntaxNodeKind to TermElab methods. It creates a fresh macro scope for executing the elaboration method. All unlogged trace messages produced by the elaboration method are logged using the position information at stx. If the elaboration method throws an Exception.error and errToSorry == true, the error is logged and a synthetic sorry expression is returned. If the elaboration throws Exception.postpone and catchExPostpone == true, a new synthetic metavariable of kind SyntheticMVarKind.postponed is created, registered, and returned. The option catchExPostpone == false is used to implement resumeElabTerm to prevent the creation of another synthetic metavariable when resuming the elaboration.

If implicitLambda == true, then disable implicit lambdas feature for the given syntax, but not for its subterms. We use this flag to implement, for example, the @ modifier. If Context.implicitLambda == false, then this parameter has no effect.

Equations
def Lean.Elab.Term.elabTermEnsuringType (stx : Lean.Syntax) (expectedType? : ) (catchExPostpone : ) (implicitLambda : ) (errorMsgHeader? : optParam () none) :
Equations
• One or more equations did not get rendered due to their size.

Execute x and return some if no new errors were recorded or exceptions was thrown. Otherwise, return none

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

Adapt a syntax transformation to a regular, term-producing elaborator.

Equations

Create a new metavariable with the given type, and try to synthesize it. It type class resolution cannot be executed (e.g., it is stuck because of metavariables in type), register metavariable as a pending one.

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

Make sure e is a type by inferring its type and making sure it is a Expr.sort or is unifiable with Expr.sort, or can be coerced into one.

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

Elaborate stx and ensure result is a type.

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

Enable auto-bound implicits, and execute k while catching auto bound implicit exceptions. When an exception is caught, a new local declaration is created, registered, and k is tried to be executed again.

Equations
• One or more equations did not get rendered due to their size.
Equations
• One or more equations did not get rendered due to their size.
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.collectUnassignedMVars (type : Lean.Expr) (init : optParam () #[]) (except : optParam () fun x => false) :

Collect unassigned metavariables in type that are not already in init and not satisfying except.

Equations
• One or more equations did not get rendered due to their size.
partial def Lean.Elab.Term.collectUnassignedMVars.go (except : optParam () fun x => false) (mvarIds : ) (result : ) :

Return autoBoundImplicits ++ xs This methoid throws an error if a variable in autoBoundImplicits depends on some x in xs. The autoBoundImplicits may contain free variables created by the auto-implicit feature, and unassigned free variables. It avoids the hack used at autoBoundImplicitsOld.

Remark: we cannot simply replace every occurrence of addAutoBoundImplicitsOld with this one because a particular use-case may not be able to handle the metavariables in the array being given to k.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.addAutoBoundImplicits.go (xs : ) (todo : ) (autos : ) :
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.addAutoBoundImplicits' {α : Type} (xs : ) (type : Lean.Expr) (k : ) :

Similar to autoBoundImplicits, but immediately if the resulting array of expressions contains metavariables, it immediately use mkForallFVars + forallBoundedTelescope to convert them into free variables. The type type is modified during the process if type depends on xs. We use this method to simplify the conversion of code using autoBoundImplicitsOld to autoBoundImplicits

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

Return true if mvarId is an auxiliary metavariable created for compiling let rec or it is delayed assigned to one.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.mkConst (constName : Lean.Name) (explicitLevels : ) :

Create an Expr.const using the given name and explicit levels. Remark: fresh universe metavariables are created if the constant has more universe parameters than explicitLevels.

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.resolveName (stx : Lean.Syntax) (n : Lean.Name) (preresolved : ) (explicitLevels : ) (expectedType? : optParam () none) :
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.resolveName.process (n : Lean.Name) (explicitLevels : ) (candidates : ) :
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.resolveName' (ident : Lean.Syntax) (explicitLevels : ) (expectedType? : optParam () none) :

Similar to resolveName, but creates identifiers for the main part and each projection with position information derived from ident. Example: Assume resolveName v.head.bla.boo produces (v.head, ["bla", "boo"]), then this method produces (v.head, id, [f₁, f₂]) where id is an identifier for v.head, and f₁ and f₂ are identifiers for fields "bla" and "boo".

Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.resolveId? (stx : Lean.Syntax) (kind : optParam String "term") (withInfo : ) :
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.Term.TermElabM.run {α : Type} (x : ) (ctx : optParam Lean.Elab.Term.Context { declName? := none, auxDeclToFullName := , macroStack := [], mayPostpone := true, errToSorry := true, autoBoundImplicit := false, autoBoundImplicits := { root := , tail := , size := 0, shift := Lean.PersistentArray.initShift, tailOff := 0 }, autoBoundImplicitForbidden := fun x => false, sectionVars := , sectionFVars := , implicitLambda := true, isNoncomputableSection := false, ignoreTCFailures := false, inPattern := false, tacticCache? := none, saveRecAppSyntax := true, holesAsSyntheticOpaque := false }) (s : optParam Lean.Elab.Term.State { levelNames := [], syntheticMVars := , pendingMVars := , mvarErrorInfos := , letRecsToLift := [] }) :
Equations
@[inline]
def Lean.Elab.Term.TermElabM.run' {α : Type} (x : ) (ctx : optParam Lean.Elab.Term.Context { declName? := none, auxDeclToFullName := , macroStack := [], mayPostpone := true, errToSorry := true, autoBoundImplicit := false, autoBoundImplicits := { root := , tail := , size := 0, shift := Lean.PersistentArray.initShift, tailOff := 0 }, autoBoundImplicitForbidden := fun x => false, sectionVars := , sectionFVars := , implicitLambda := true, isNoncomputableSection := false, ignoreTCFailures := false, inPattern := false, tacticCache? := none, saveRecAppSyntax := true, holesAsSyntheticOpaque := false }) (s : optParam Lean.Elab.Term.State { levelNames := [], syntheticMVars := , pendingMVars := , mvarErrorInfos := , letRecsToLift := [] }) :
Equations
• = (fun x => x.fst) <$> Equations • One or more equations did not get rendered due to their size. instance Lean.Elab.Term.instMetaEvalTermElabM {α : Type} [inst : ] : Equations • One or more equations did not get rendered due to their size. Execute x and then tries to solve pending universe constraints. Note that, stuck constraints will not be discarded. Equations def Lean.Elab.Term.expandDeclId (currNamespace : Lean.Name) (currLevelNames : ) (declId : Lean.Syntax) (modifiers : Lean.Elab.Modifiers) : Equations • One or more equations did not get rendered due to their size. Helper function for "embedding" an Expr in Syntax. It creates a named hole ?m and immediately assigns e to it. Examples: let e := mkConst Nat.zero (Nat.succ$(← exprToSyntax e))
← exprToSyntax e))
`
Equations
• One or more equations did not get rendered due to their size.
def Lean.Elab.withoutModifyingStateWithInfoAndMessages {m : TypeType u_1} {α : Type} [inst : ] [inst : ] (x : m α) :
m α
Equations