Documentation

Init.Meta

@[extern lean_get_githash]
@[extern c inline "LEAN_VERSION_IS_RELEASE"]
@[extern c inline "lean_mk_string(LEAN_SPECIAL_VERSION_DESC)"]

Additional version description like "nightly-2018-03-11"

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.
@[extern c inline "LEAN_IS_STAGE0"]
Equations
Equations
  • One or more equations did not get rendered due to their size.
Equations
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
  • One or more equations did not get rendered due to their size.
Equations
Equations
Equations

eraseSuffix? n s return n' if n is of the form n == n' ++ s.

@[inline]

Remove macros scopes, apply f, and put them back

Equations
  • One or more equations did not get rendered due to their size.
@[export lean_name_append_after]
Equations
@[export lean_name_append_index_after]
Equations
  • One or more equations did not get rendered due to their size.
@[export lean_name_append_before]
Equations
  • One or more equations did not get rendered due to their size.
structure Lean.NameGenerator:
Type
Equations
@[inline]
Equations
@[inline]
Equations
def Lean.mkFreshId {m : TypeType} [inst : Monad m] [inst : Lean.MonadNameGenerator m] :
Equations
instance Lean.monadNameGeneratorLift (m : TypeType) (n : TypeType) [inst : MonadLift m n] [inst : Lean.MonadNameGenerator m] :
Equations
@[inline]
abbrev Lean.Syntax.Term:
Type
Equations
@[inline]
Equations
@[inline]
abbrev Lean.Syntax.Level:
Type
Equations
@[inline]
abbrev Lean.Syntax.Prec:
Type
Equations
@[inline]
abbrev Lean.Syntax.Prio:
Type
Equations
Equations
  • Lean.TSyntax.instCoeTSyntaxConsSyntaxNodeKindNil = { coe := fun stx => { raw := stx.raw } }
Equations
  • Lean.TSyntax.instCoeTSyntaxConsSyntaxNodeKindNil_1 = { coe := fun stx => { raw := stx.raw } }
Equations
Equations
  • Lean.TSyntax.instCoeDepTermMkConsSyntaxNodeKindMkStrAnonymousNilIdentIdent = { coe := { raw := Lean.Syntax.ident info ss n res } }
Equations
  • Lean.TSyntax.Compat.instCoeTailSyntaxTSyntax = { coe := fun s => { raw := s } }
Equations
  • Lean.TSyntax.Compat.instCoeTailArraySyntaxTSyntaxArray = { coe := Lean.TSyntaxArray.mk }
Equations
  • Lean.Syntax.instBEqTSyntax = { beq := fun a a_1 => a.raw == a_1.raw }
Equations

Return substring of original input covering stx. Result is meaningful only if all involved SourceInfo.originals refer to the same string (as is the case after parsing).

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.

Return the first atom/identifier that has position information

Ensure head position is synthetic. The server regards syntax as "original" only if both head and tail info are original.

Equations
@[inline]
def Lean.withHeadRefOnly {m : TypeType} [inst : Monad m] [inst : Lean.MonadRef m] {α : Type} (x : m α) :
m α

Use the head atom/identifier of the current ref as the ref

Equations
structure Lean.Module:
Type

Expand all macros in the given syntax

Create an identifier copying the position from src. To refer to a specific constant, use mkCIdentFrom instead.

Equations
def Lean.mkIdentFromRef {m : TypeType} [inst : Monad m] [inst : Lean.MonadRef m] (val : Lean.Name) :
Equations

Create an identifier referring to a constant c copying the position from src. This variant of mkIdentFrom makes sure that the identifier cannot accidentally be captured.

Equations
  • One or more equations did not get rendered due to their size.
def Lean.mkCIdentFromRef {m : TypeType} [inst : Monad m] [inst : Lean.MonadRef m] (c : Lean.Name) :
Equations
@[export lean_mk_syntax_ident]
Equations
Equations
  • One or more equations did not get rendered due to their size.
Equations
Equations
Equations
def Lean.Syntax.SepArray.ofElemsUsingRef {m : TypeType} [inst : Monad m] [inst : Lean.MonadRef m] {sep : String} (elems : Array Lean.Syntax) :
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • Lean.Syntax.instCoeArraySyntaxSepArray = { coe := Lean.Syntax.SepArray.ofElems }
Equations

Create syntax representing a Lean term application, but avoid degenerate empty applications.

Equations
Equations
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
  • One or more equations did not get rendered due to their size.
partial def Lean.Syntax.decodeScientificLitVal?.decodeAfterExp (s : String) (i : String.Pos) (val : Nat) (e : Nat) (sign : Bool) (exp : Nat) :
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.
Equations
  • One or more equations did not get rendered due to their size.

Split a name literal (without the backtick) into its dot-separated components. For example, foo.bla.«bo.o»["foo", "bla", "«bo.o»"]. If the literal cannot be parsed, return [].

Equations
Equations
  • One or more equations did not get rendered due to their size.
Equations
Equations
Equations
Equations
Equations
instance Lean.instQuote {α : Type} {k : Lean.SyntaxNodeKind} {k' : Lean.SyntaxNodeKind} [inst : Lean.Quote α k] [inst : CoeHTCT (Lean.TSyntax k) (Lean.TSyntax k')] :
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.
instance Lean.instQuoteProdMkStrAnonymous {α : Type} {β : Type} [inst : Lean.Quote α] [inst : Lean.Quote β] :
Lean.Quote (α × β)
Equations
instance Lean.instQuoteListMkStrAnonymous {α : Type} [inst : Lean.Quote α] :
Equations
instance Lean.instQuoteArrayMkStrAnonymous {α : Type} [inst : Lean.Quote α] :
Equations
instance Lean.Option.hasQuote {α : Type} [inst : Lean.Quote α] :
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.
Equations
@[inline]
abbrev Array.getSepElems {α : Type u_1} (as : Array α) :
Equations
def Array.filterSepElemsM {m : TypeType} [inst : Monad m] (a : Array Lean.Syntax) (p : Lean.Syntaxm Bool) :
Equations
def Array.mapSepElemsM {m : TypeType} [inst : Monad m] (a : Array Lean.Syntax) (f : Lean.Syntaxm Lean.Syntax) :
Equations
Equations
  • Lean.Syntax.instCoeTailSepArrayArraySyntax = { coe := Lean.Syntax.SepArray.getElems }
Equations
  • Lean.Syntax.instCoeTSepArrayTSyntaxArray = { coe := Lean.Syntax.TSepArray.getElems }
Equations
Equations
Equations
@[inline]
abbrev autoParam (α : Sort u) (tactic : Lean.Syntax) :
Sort u

Gadget for automatic parameter support. This is similar to the optParam gadget, but it uses the given tactic. Like optParam, this gadget only affects elaboration. For example, the tactic will not be invoked during type class resolution.

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.
structure Lean.Meta.DSimp.Config:
Type
Equations
  • One or more equations did not get rendered due to their size.
structure Lean.Meta.Simp.Config:
Type
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.
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.
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.
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.
Equations
  • One or more equations did not get rendered due to their size.