Additional version description like "nightly-2018-03-11"
Equations
- Lean.versionStringCore = toString Lean.version.major ++ "." ++ toString Lean.version.minor ++ "." ++ toString Lean.version.patch
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
- Lean.isIdFirst c = (Char.isAlpha c || decide (c = Char.ofNat 95) || Lean.isLetterLike c)
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
Equations
- Lean.Name.getRoot Lean.Name.anonymous = Lean.Name.anonymous
- Lean.Name.getRoot (Lean.Name.str Lean.Name.anonymous a a_1) = Lean.Name.str Lean.Name.anonymous a a_1
- Lean.Name.getRoot (Lean.Name.num Lean.Name.anonymous a a_1) = Lean.Name.num Lean.Name.anonymous a a_1
- Lean.Name.getRoot (Lean.Name.str n a a_1) = Lean.Name.getRoot n
- Lean.Name.getRoot (Lean.Name.num n a a_1) = Lean.Name.getRoot n
Equations
- Lean.Name.isInaccessibleUserName (Lean.Name.str a s a_1) = (String.contains s (Char.ofNat 10013) || s == "_inaccessible")
- Lean.Name.isInaccessibleUserName (Lean.Name.num p a a_1) = Lean.Name.isInaccessibleUserName p
- Lean.Name.isInaccessibleUserName _fun_discr = false
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Name.toStringWithSep sep escape Lean.Name.anonymous = "[anonymous]"
- Lean.Name.toStringWithSep sep escape (Lean.Name.str Lean.Name.anonymous s a) = Lean.Name.toStringWithSep.maybeEscape escape s
- Lean.Name.toStringWithSep sep escape (Lean.Name.num Lean.Name.anonymous v a) = toString v
- Lean.Name.toStringWithSep sep escape (Lean.Name.str n s a) = Lean.Name.toStringWithSep sep escape n ++ sep ++ Lean.Name.toStringWithSep.maybeEscape escape s
- Lean.Name.toStringWithSep sep escape (Lean.Name.num n v a) = Lean.Name.toStringWithSep sep escape n ++ sep ++ Nat.repr v
Equations
- Lean.Name.toStringWithSep.maybeEscape escape s = if escape = true then Option.getD (Lean.Name.escapePart s) s else s
Equations
- Lean.Name.toString.maybePseudoSyntax n = match Lean.Name.getRoot n with | Lean.Name.str a s a_1 => String.isPrefixOf "#" s || String.isPrefixOf "?" s | x => false
Equations
- Lean.Name.instToStringName = { toString := fun n => Lean.Name.toString n }
Equations
- One or more equations did not get rendered due to their size.
- Lean.Name.reprPrec Lean.Name.anonymous prec = Std.Format.text "Lean.Name.anonymous"
- Lean.Name.reprPrec (Lean.Name.num a a_1 a_2) prec = Repr.addAppParen (Std.Format.text "Lean.Name.mkNum " ++ Lean.Name.reprPrec a 1024 ++ Std.Format.text " " ++ repr a_1) prec
Equations
- Lean.Name.instReprName = { reprPrec := Lean.Name.reprPrec }
Equations
- Lean.Name.instReprSyntax = { reprPrec := [anonymous] }
Equations
- Lean.Name.capitalize _fun_discr = match _fun_discr with | Lean.Name.str p s a => Lean.Name.mkStr p (String.capitalize s) | n => n
Equations
- One or more equations did not get rendered due to their size.
- Lean.Name.replacePrefix Lean.Name.anonymous Lean.Name.anonymous _fun_discr = _fun_discr
- Lean.Name.replacePrefix Lean.Name.anonymous _fun_discr _fun_discr = Lean.Name.anonymous
eraseSuffix? n s return n' if n is of the form n == n' ++ s.
Equations
- Lean.Name.appendAfter n suffix = Lean.Name.modifyBase n fun x => match x with | Lean.Name.str p s a => Lean.Name.mkStr p (s ++ suffix) | n => Lean.Name.mkStr n suffix
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
- Lean.instInhabitedNameGenerator = { default := { namePrefix := default, idx := default } }
Equations
- Lean.NameGenerator.curr g = Lean.Name.mkNum g.namePrefix g.idx
Equations
- Lean.NameGenerator.next g = { namePrefix := g.namePrefix, idx := g.idx + 1 }
Equations
- Lean.NameGenerator.mkChild g = ({ namePrefix := Lean.Name.mkNum g.namePrefix g.idx, idx := 1 }, { namePrefix := g.namePrefix, idx := g.idx + 1 })
- getNGen : m Lean.NameGenerator
- setNGen : Lean.NameGenerator → m Unit
Equations
- Lean.mkFreshId = do let ngen ← Lean.getNGen let r : Lean.Name := Lean.NameGenerator.curr ngen Lean.setNGen (Lean.NameGenerator.next ngen) pure r
Equations
- Lean.monadNameGeneratorLift m n = { getNGen := liftM Lean.getNGen, setNGen := fun ngen => liftM (Lean.setNGen ngen) }
Equations
Equations
Equations
- Lean.TSyntax.instCoeTSyntaxConsSyntaxNodeKindNil = { coe := fun stx => { raw := stx.raw } }
Equations
- Lean.TSyntax.instCoeTSyntaxConsSyntaxNodeKindNil_1 = { coe := fun stx => { raw := stx.raw } }
Equations
- Lean.TSyntax.instCoeIdentTerm = { coe := fun s => { raw := s.raw } }
Equations
- Lean.TSyntax.instCoeDepTermMkConsSyntaxNodeKindMkStrAnonymousNilIdentIdent = { coe := { raw := Lean.Syntax.ident info ss n res } }
Equations
- Lean.TSyntax.instCoeStrLitTerm = { coe := fun s => { raw := s.raw } }
Equations
- Lean.TSyntax.instCoeNameLitTerm = { coe := fun s => { raw := s.raw } }
Equations
- Lean.TSyntax.instCoeNumLitTerm = { coe := fun s => { raw := s.raw } }
Equations
- Lean.TSyntax.instCoeCharLitTerm = { coe := fun s => { raw := s.raw } }
Equations
- Lean.TSyntax.instCoeNumLitPrec = { coe := fun s => { raw := s.raw } }
Equations
- Lean.TSyntax.Compat.instCoeTailSyntaxTSyntax = { coe := fun s => { raw := s } }
Equations
- Lean.TSyntax.Compat.instCoeTailArraySyntaxTSyntaxArray = { coe := Lean.TSyntaxArray.mk }
Equations
- Lean.Syntax.instBEqSyntax = { beq := Lean.Syntax.structEq }
Equations
Equations
- Lean.Syntax.getTrailingSize stx = match Lean.Syntax.getTailInfo? stx with | some (Lean.SourceInfo.original leading pos trailing endPos) => Substring.bsize trailing | x => 0
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
- Lean.Syntax.setTailInfo stx info = match Lean.Syntax.setTailInfoAux info stx with | some stx => stx | none => stx
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Syntax.setHeadInfo stx info = match Lean.Syntax.setHeadInfoAux info stx with | some stx => stx | none => stx
Equations
- One or more equations did not get rendered due to their size.
Return the first atom/identifier that has position information
Equations
- Lean.Syntax.copyHeadTailInfoFrom target source = Lean.Syntax.setTailInfo (Lean.Syntax.setHeadInfo target (Lean.Syntax.getHeadInfo source)) (Lean.Syntax.getTailInfo source)
Ensure head position is synthetic. The server regards syntax as "original" only if both head and tail info are original.
Equations
Use the head atom/identifier of the current ref as the ref
Equations
- Lean.withHeadRefOnly x = do let a ← Lean.getRef match Lean.Syntax.getHead? a with | none => x | some ref => Lean.withRef ref x
Equations
- Lean.mkNode k args = { raw := Lean.Syntax.node Lean.SourceInfo.none k args }
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
- Lean.mkIdentFrom src val = { raw := Lean.Syntax.ident (Lean.SourceInfo.fromRef src) (String.toSubstring (toString val)) val [] }
Equations
- Lean.mkIdentFromRef val = do let a ← Lean.getRef pure (Lean.mkIdentFrom a val)
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.
Equations
- Lean.mkCIdentFromRef c = do let a ← Lean.getRef pure (Lean.mkCIdentFrom a c).raw
Equations
Equations
- Lean.mkIdent val = { raw := Lean.Syntax.ident Lean.SourceInfo.none (String.toSubstring (toString val)) val [] }
Equations
- Lean.mkNullNode args = (Lean.mkNode Lean.nullKind args).raw
Equations
- Lean.mkGroupNode args = (Lean.mkNode Lean.groupKind args).raw
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.mkOptionalNode arg = match arg with | some arg => Lean.mkNullNode #[arg] | none => Lean.mkNullNode
Equations
- Lean.mkHole ref = (Lean.mkNode `Lean.Parser.Term.hole #[Lean.mkAtomFrom ref "_"]).raw
Equations
- Lean.Syntax.mkSep a sep = Lean.mkNullNode (Lean.mkSepArray a sep)
Equations
- Lean.Syntax.SepArray.ofElems elems = { elemsAndSeps := Lean.mkSepArray elems (if String.isEmpty sep = true then Lean.mkNullNode else Lean.mkAtom sep) }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Syntax.instCoeArraySyntaxSepArray = { coe := Lean.Syntax.SepArray.ofElems }
Equations
- Lean.Syntax.instCoeTSyntaxArrayTSepArray = { coe := fun a => { elemsAndSeps := Lean.mkSepArray (Lean.TSyntaxArray.raw a) (Lean.mkAtom sep) } }
Create syntax representing a Lean term application, but avoid degenerate empty applications.
Equations
- Lean.Syntax.mkApp fn _fun_discr = match _fun_discr with | #[] => fn | args => { raw := (Lean.mkNode `Lean.Parser.Term.app #[fn.raw, Lean.mkNullNode (Lean.TSyntaxArray.raw args)]).raw }
Equations
- Lean.Syntax.mkCApp fn args = Lean.Syntax.mkApp { raw := (Lean.mkCIdent fn).raw } args
Equations
- Lean.Syntax.mkLit kind val info = let atom := Lean.Syntax.atom info val; Lean.mkNode kind #[atom]
Equations
- Lean.Syntax.mkStrLit val info = Lean.Syntax.mkLit Lean.strLitKind (String.quote val) info
Equations
- Lean.Syntax.mkNumLit val info = Lean.Syntax.mkLit Lean.numLitKind val info
Equations
- Lean.Syntax.mkScientificLit val info = Lean.Syntax.mkLit Lean.scientificLitKind val info
Equations
- Lean.Syntax.mkNameLit val info = Lean.Syntax.mkLit Lean.nameLitKind val info
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
- Lean.Syntax.isScientificLit? stx = match Lean.Syntax.isLit? Lean.scientificLitKind stx with | some val => Lean.Syntax.decodeScientificLitVal? val | x => none
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Syntax.toNat stx = match Lean.Syntax.isNatLit? stx with | some val => val | none => 0
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Syntax.decodeStrLit s = Lean.Syntax.decodeStrLitAux s { byteIdx := 1 } ""
Equations
- Lean.Syntax.isStrLit? stx = match Lean.Syntax.isLit? Lean.strLitKind stx with | some val => Lean.Syntax.decodeStrLit val | x => none
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Syntax.isCharLit? stx = match Lean.Syntax.isLit? Lean.charLitKind stx with | some val => Lean.Syntax.decodeCharLit val | x => none
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
- Lean.Syntax.isNameLit? stx = match Lean.Syntax.isLit? Lean.nameLitKind stx with | some val => Lean.Syntax.decodeNameLit val | x => none
Equations
- Lean.Syntax.hasArgs _fun_discr = match _fun_discr with | Lean.Syntax.node info kind args => decide (Array.size args > 0) | x => false
Equations
- Lean.Syntax.isAtom _fun_discr = match _fun_discr with | Lean.Syntax.atom info val => true | x => false
Equations
- Lean.Syntax.isToken token _fun_discr = match _fun_discr with | Lean.Syntax.atom info val => String.trim val == String.trim token | x => false
Equations
- Lean.Syntax.isNone stx = match stx with | Lean.Syntax.node info k args => k == Lean.nullKind && Array.size args == 0 | Lean.Syntax.missing => true | x => false
Equations
- Lean.Syntax.getOptionalIdent? stx = match Lean.Syntax.getOptional? stx with | some stx => some (Lean.Syntax.getId stx) | none => none
Equations
- Lean.Syntax.find? stx p = Lean.Syntax.findAux p stx
Equations
- Lean.TSyntax.getNat s = Option.get! (Lean.Syntax.isNatLit? s.raw)
Equations
- Lean.TSyntax.getId s = Lean.Syntax.getId s.raw
Equations
Equations
- Lean.TSyntax.Compat.instCoeTailArraySyntaxTSepArray = { coe := fun a => { elemsAndSeps := Lean.mkSepArray (Lean.TSyntaxArray.raw (Lean.TSyntaxArray.mk a)) (Lean.mkAtom sep) } }
- quote : α → Lean.TSyntax k
Reflect a runtime datum back to surface syntax (best-effort).
Instances
- Lean.instQuote
- Lean.instQuoteSubstringMkStrAnonymous
- Lean.instQuoteTermMkStrAnonymous
- Lean.Option.hasQuote
- Lean.instQuoteListMkStrAnonymous
- Lean.instQuoteNatNumLitKind
- Lean.instQuoteArrayMkStrAnonymous
- Lean.instQuoteProdMkStrAnonymous
- Lean.instQuoteBoolMkStrAnonymous
- Lean.instQuoteNameMkStrAnonymous
- Lean.instQuoteStringStrLitKind
- Lean.Level.instQuoteLevelMkStrAnonymous
Equations
- Lean.instQuote = Lean.Quote.mk k' fun a => CoeHTCT.coe (Lean.quote k a)
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instQuoteStringStrLitKind = Lean.Quote.mk Lean.strLitKind fun val => Lean.Syntax.mkStrLit val
Equations
Equations
- Lean.instQuoteSubstringMkStrAnonymous = Lean.Quote.mk `term fun s => Lean.Syntax.mkCApp `String.toSubstring #[Lean.quote `term (Substring.toString s)]
Equations
- Lean.quoteNameMk Lean.Name.anonymous = { raw := (Lean.mkCIdent `Lean.Name.anonymous).raw }
- Lean.quoteNameMk (Lean.Name.str p s a) = Lean.Syntax.mkCApp `Lean.Name.mkStr #[Lean.quoteNameMk p, Lean.quote `term s]
- Lean.quoteNameMk (Lean.Name.num p n a) = Lean.Syntax.mkCApp `Lean.Name.mkNum #[Lean.quoteNameMk p, Lean.quote `term n]
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instQuoteProdMkStrAnonymous = Lean.Quote.mk `term fun x => match x with | (a, b) => Lean.Syntax.mkCApp `Prod.mk #[Lean.quote `term a, Lean.quote `term b]
Equations
- Lean.instQuoteListMkStrAnonymous = Lean.Quote.mk `term Lean.quoteList
Equations
- Lean.instQuoteArrayMkStrAnonymous = Lean.Quote.mk `term fun xs => Lean.Syntax.mkCApp `List.toArray #[Lean.quote `term (Array.toList xs)]
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
- Lean.termEval_prec_ = Lean.ParserDescr.node `Lean.termEval_prec_ 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "eval_prec ") (Lean.ParserDescr.cat `prec 1024))
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.termEval_prio_ = Lean.ParserDescr.node `Lean.termEval_prio_ 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "eval_prio ") (Lean.ParserDescr.cat `prio 1024))
Equations
- Lean.evalOptPrio _fun_discr = match _fun_discr with | some prio => Lean.evalPrio prio.raw | none => pure 1000
Equations
Equations
- Array.filterSepElemsM a p = Array.filterSepElemsMAux a p 0 #[]
Equations
- Array.filterSepElems a p = Id.run (Array.filterSepElemsM a p)
Equations
- Array.mapSepElemsM a f = Array.mapSepElemsMAux a f 0 #[]
Equations
- Array.mapSepElems a f = Id.run (Array.mapSepElemsM a f)
Equations
- Lean.Syntax.SepArray.getElems sa = Array.getSepElems sa.elemsAndSeps
Equations
- Lean.Syntax.TSepArray.getElems sa = Lean.TSyntaxArray.mk (Array.getSepElems sa.elemsAndSeps)
Equations
- Lean.Syntax.instCoeTailSepArrayArraySyntax = { coe := Lean.Syntax.SepArray.getElems }
Equations
- Lean.Syntax.instCoeTSepArrayTSyntaxArray = { coe := Lean.Syntax.TSepArray.getElems }
Equations
- Lean.Syntax.instCoeTSyntaxArray = { coe := fun a => Lean.TSyntaxArray.mk (Lean.TSyntaxArray.raw a) }
Equations
- Lean.Syntax.instCoeTSyntaxArrayArraySyntax = { coe := fun a => Lean.TSyntaxArray.raw a }
Equations
- Lean.Syntax.instCoeIdentTSyntaxConsSyntaxNodeKindMkStrAnonymousNil = { coe := fun id => Lean.mkNode `Lean.Parser.Command.declId #[id.raw, Lean.mkNullNode] }
Equations
- Lean.Syntax.instCoeTermTSyntaxConsSyntaxNodeKindMkStrAnonymousNil = { coe := fun stx => { raw := stx.raw } }
Equations
- Lean.Syntax.isInterpolatedStrLit? stx = match Lean.Syntax.isLit? Lean.interpolatedStrLitKind stx with | none => none | some val => Lean.Syntax.decodeInterpStrLit val
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.
- all: Lean.Meta.TransparencyMode
- default: Lean.Meta.TransparencyMode
- reducible: Lean.Meta.TransparencyMode
- instances: Lean.Meta.TransparencyMode
Equations
- Lean.Meta.instBEqTransparencyMode = { beq := [anonymous] }
Equations
- Lean.Meta.instReprTransparencyMode = { reprPrec := [anonymous] }
- all: Lean.Meta.EtaStructMode
- notClasses: Lean.Meta.EtaStructMode
- none: Lean.Meta.EtaStructMode
Equations
- Lean.Meta.instInhabitedEtaStructMode = { default := Lean.Meta.EtaStructMode.all }
Equations
- Lean.Meta.instBEqEtaStructMode = { beq := [anonymous] }
Equations
- Lean.Meta.instReprEtaStructMode = { reprPrec := [anonymous] }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.DSimp.instBEqConfig = { beq := [anonymous] }
Equations
- Lean.Meta.DSimp.instReprConfig = { reprPrec := [anonymous] }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.Simp.instBEqConfig = { beq := [anonymous] }
Equations
- Lean.Meta.Simp.instReprConfig = { reprPrec := [anonymous] }
Equations
- One or more equations did not get rendered due to their size.
- transparency : Lean.Meta.TransparencyMode
- offsetCnstrs : Bool
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.