- def: Lean.Elab.DefKind
- instance: Lean.Elab.DefKind
- theorem: Lean.Elab.DefKind
- example: Lean.Elab.DefKind
- opaque: Lean.Elab.DefKind
- abbrev: Lean.Elab.DefKind
Instances For
Equations
- Lean.Elab.instInhabitedDefKind = { default := Lean.Elab.DefKind.def }
Equations
- Lean.Elab.instBEqDefKind = { beq := Lean.Elab.beqDefKind✝ }
Equations
- Lean.Elab.DefKind.example.isExample = true
- x.isExample = false
Instances For
Header elaboration data of a DefView
.
- shortDeclName : Lean.Name
Short name. Recall that all declarations in Lean 4 are potentially recursive. We use
shortDeclName
to refer to them atvalueStx
, and other declarations in the same mutual block. - declName : Lean.Name
Full name for this declaration. This is the name that will be added to the
Environment
. Universe level parameter names explicitly provided by the user.
- binderIds : Array Lean.Syntax
Syntax objects for the binders occurring before
:
, we use them to populate theInfoTree
when elaboratingvalueStx
. - numParams : Nat
Number of parameters before
:
, it also includes auto-implicit parameters automatically added by Lean. - type : Lean.Expr
Type including parameters.
Instances For
Snapshot after processing of a definition body.
- state : Lean.Elab.Term.SavedState
State after elaboration.
- value : Lean.Expr
Elaboration result.
Instances For
Equations
- Lean.Elab.instToSnapshotTreeBodyProcessedSnapshot = { toSnapshotTree := fun (s : Lean.Elab.BodyProcessedSnapshot) => { element := s.toSnapshot, children := #[] } }
Snapshot after elaboration of a definition header.
Elaboration results.
- state : Lean.Elab.Term.SavedState
Resulting elaboration state, including any environment additions.
- tacStx? : Option Lean.Syntax
Syntax of top-level tactic block if any, for checking reuse of
tacSnap?
. Incremental execution of main tactic block, if any.
- bodyStx : Lean.Syntax
Syntax of definition body, for checking reuse of
bodySnap
. Result of body elaboration.
Instances For
State before elaboration of a mutual definition.
- fullHeaderRef : Lean.Syntax
Unstructured syntax object comprising the full "header" of the definition from the modifiers (incl. docstring) up to the value, used for determining header elaboration reuse.
- headerProcessedSnap : Lean.Language.SnapshotTask (Option Lean.Elab.HeaderProcessedSnapshot)
Elaboration result, unless fatal exception occurred.
Instances For
Snapshot after syntax tree has been split into separate mutual def headers.
- defs : Array Lean.Elab.DefParsed
Definitions of this mutual block.
Instances For
- kind : Lean.Elab.DefKind
- ref : Lean.Syntax
- headerRef : Lean.Syntax
An unstructured syntax object that comprises the "header" of the definition, i.e. everything up to the value. Used as a more specific ref for header elaboration.
- modifiers : Lean.Elab.Modifiers
- declId : Lean.Syntax
- binders : Lean.Syntax
- type? : Option Lean.Syntax
- value : Lean.Syntax
- headerSnap? : Option (Lean.Language.SnapshotBundle (Option Lean.Elab.HeaderProcessedSnapshot))
Snapshot for incremental processing of this definition.
Invariant: If the bundle's
old?
is set, then elaboration of the header is guaranteed to result in the same elaboration result and state, i.e. reuse is possible. - deriving? : Option (Array Lean.Syntax)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- view.isInstance = view.modifiers.attrs.any fun (attr : Lean.Elab.Attribute) => attr.name == `instance
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.