book/TPiL/Examples.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned Theorem Proving in Lean documentation, Pinned Theorem Proving in Lean 4 book index
98 declarations, 7 contain sorry, 0 declared as axioms
Imports (5)
SubVerso.Examples- Lean.Data.NameMap
- Lean.DocString.Syntax
VersoManualVerso.Code.HighlightedToTex
- def
TPiL.projectDirline 20 source - def
TPiL.alphabetline 22 sourceno axioms what this means
Statement uses:
String - def
TPiL.hashStringline 24 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
UInt64,StringProof uses:
Id.run,Nat,UInt64.toNat,Bind.bind,Id,Prod,ForIn.forIn,Lean.Loop,Unit,Lean.Loop.mk,Prod.mk,Prod.fst,Prod.snd,ite,ForInStep,GT.gt,OfNat.ofNat,String.push,String.Pos.Raw.get!, TPiL.alphabet and 6 more12 instances, coercions and auxiliary constants left out.
- def
TPiL.exampleSubversoRevThe SubVerso revision recorded in the example project's Lake manifest line 45 sourceSource documentation
The SubVerso revision recorded in the example project's Lake manifest.
That revision writes the extracted JSON, and the copy of SubVerso that Verso brings in here reads it back, so the serialization the two agree on is part of what an extraction depends on.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Monad,Lean.MonadError,MonadLiftT,BaseIO,IO,StringProof uses:
System.FilePath,HDiv.hDiv,System.FilePath.mk,Bind.bind,Bool,liftM,System.FilePath.pathExists,Unit,EIO,IO.Error,IO.FS.readFile,TPiL.exampleSubversoRev.match_4,Except,Lean.Json,Lean.Json.parse,TPiL.exampleSubversoRev.match_3,Array,Lean.Json.getObjValAs?,Prod,Optionand 22 more19 instances, coercions and auxiliary constants left out.
def exampleSubversoRev : m String := do …
Mentions: m
- def
TPiL.extractFileExtracts the highlighted contents of an example line 69 sourceSource documentation
Extracts the highlighted contents of an example.
When
expectErrorsis set, building the example is allowed to fail: the errors it reports are described in the document, and checked against the extracted messages there. Extraction itself must still succeed.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Monad,Lean.MonadError,MonadLiftT,BaseIO,IO,MonadFinally,Lean.MonadTrace,Lean.AddMessageContext,Lean.MonadOptions,Lean.MonadAlwaysExcept,String,Option,optParam,Bool,Bool.false,Array,SubVerso.Module.ModuleItemProof uses:
System.FilePath,HDiv.hDiv,System.FilePath.mk,Bind.bind,liftM,System.FilePath.pathExists,Unit,EIO,IO.Error,IO.FS.readFile,Pure.pure,String.Slice.copy,String.trimAscii, TPiL.exampleSubversoRev,UInt64,Hashable.hash,Prod,Prod.mk, TPiL.hashString,HAppend.hAppendand 57 more27 instances, coercions and auxiliary constants left out.
def extractFile (contents : String) (suppressNamespaces : Option String) (expectErrors : Bool := false) : m (Array ModuleItem) := do …Mentions: m
- def
TPiL.hasAtLeastMline 180 source - def
TPiL.hasAtLeastline 190 source - def
TPiL.splitExampleline 193 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,Prod,OptionProof uses:
Id.run,Array,SubVerso.Highlighting.Highlighted.lines,SubVerso.Highlighting.Highlighted.empty,Bind.bind,Id,ForIn'.forIn',Std.Legacy.Range,Nat,inferInstance,Membership,Std.Legacy.Range.mk,OfNat.ofNat,Array.size,Nat.zero_lt_one,Prod.mk,Option.none,Membership.mem,Prod.fst,Prod.sndand 18 more15 instances, coercions and auxiliary constants left out.
- def
TPiL.hlIsWsline 207 sourceno axioms what this means
Statement uses:
SubVerso.Highlighting.Highlighted,BoolProof uses:
Inhabited.default1 instances, coercions and auxiliary constants left out.
- inductive
TPiL.LineTypeline 220 source - def
TPiL.lineTypeline 225 source - def
TPiL.detachPrefixline 232 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Array,SubVerso.Module.ModuleItem,Prod,OptionProof uses:
Id.run,List.toArray,List.nil,Bind.bind,Id,ForIn'.forIn',Std.Legacy.Range,Nat,inferInstance,Membership,Std.Legacy.Range.mk,OfNat.ofNat,Array.size,Nat.zero_lt_one,Prod.mk,Option.none,Membership.mem,Prod.fst,Prod.snd,SubVerso.Highlighting.Highlightedand 30 more22 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- def
TPiL.detachSuffixline 264 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Array,SubVerso.Module.ModuleItem,Prod,OptionProof uses:
Id.run,List.toArray,List.nil,Bind.bind,Id,ForIn'.forIn',Std.Legacy.Range,Nat,inferInstance,Membership,Std.Legacy.Range.mk,OfNat.ofNat,Array.size,Nat.zero_lt_one,Prod.mk,Option.none,Membership.mem,Prod.fst,Prod.snd,HSub.hSuband 30 more23 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- def
TPiL.splitExample'line 299 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Array,SubVerso.Module.ModuleItem,Prod,OptionProof uses:
TPiL.splitExample'.match_2, TPiL.detachPrefix,TPiL.splitExample'.match_1, TPiL.detachSuffix,Prod.mk - def
TPiL.copyButtonCssline 306 sourceno axioms what this means
Statement uses:
String - def
TPiL.copyButtonJsline 375 sourceno axioms what this means
Statement uses:
String - def
TPiL.examplesCssline 547 sourceno axioms what this means
Statement uses:
String - def
TPiL.tpilBlockline 559 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Genre.Manual.BlockDescrProof uses:
Verso.Genre.Manual.BlockDescr.mk,Verso.Genre.Manual.HtmlAssets.mk,Verso.Genre.Manual.HtmlAssets.features,Verso.Genre.Manual.BlockDescr.toHtmlAssets,Verso.Genre.Manual.HtmlAssets.extraCss,Verso.Genre.Manual.HtmlAssets.extraJs,Std.HashSet.insert,Verso.Genre.Manual.JsFile,Verso.Genre.Manual.HtmlAssets.extraJsFiles,Verso.Genre.Manual.JsFile.mk,Verso.Genre.Manual.StaticJsFile.mk,Bool.false,List.toArray,String,List.nil,Verso.Genre.Manual.JS.mk, TPiL.copyButtonJs,Option.none,Verso.Genre.Manual.JsSourceMap,Verso.Genre.Manual.CssFileand 15 more4 instances, coercions and auxiliary constants left out.
- def
TPiL.tpilInlineline 571 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Genre.Manual.InlineDescrProof uses:
Verso.Genre.Manual.InlineDescr.mk,Verso.Genre.Manual.HtmlAssets.mk,Verso.Genre.Manual.HtmlAssets.features,Verso.Genre.Manual.InlineDescr.toHtmlAssets,Verso.Genre.Manual.HtmlAssets.extraCss,Verso.Genre.Manual.HtmlAssets.extraJs,Std.HashSet.insert,Verso.Genre.Manual.JsFile,Verso.Genre.Manual.HtmlAssets.extraJsFiles,Verso.Genre.Manual.JsFile.mk,Verso.Genre.Manual.StaticJsFile.mk,Bool.false,List.toArray,String,List.nil,Verso.Genre.Manual.JS.mk, TPiL.copyButtonJs,Option.none,Verso.Genre.Manual.JsSourceMap,Verso.Genre.Manual.CssFileand 15 more4 instances, coercions and auxiliary constants left out.
- structure
TPiL.ExampleItemline 582 sourceno axioms what this means
- def
TPiL.verbatimBlockline 588 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,Verso.Output.TeXProof uses:
SubVerso.Highlighting.Highlighted.toVerbatimTeX,SubVerso.Highlighting.Highlighted.trimOneLeadingNl,SubVerso.Highlighting.Highlighted.trimOneTrailingNl,Bool.false,Verso.Output.TeX.seq,List.toArray,List.cons,Verso.Output.TeX.raw,ToString.toString,String,List.nil1 instances, coercions and auxiliary constants left out.
- def
TPiL.proofStateStyleline 814 sourceno axioms what this means
Statement uses:
String - def
TPiL.kbdCSSline 919 sourceno axioms what this means
Statement uses:
String - def
TPiL.oneCodeStrline 993 source - def
TPiL.codeStrsline 1000 source - structure
TPiL.Keptline 1013 sourceno axioms what this means
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- instance
TPiL.(instance at line 1019)line 1019 source - def
TPiL.Kept.addline 1022 sourcestandard axioms: Quot.sound, propext what this means
Statement uses: TPiL.Kept
Proof uses:
TPiL.Kept.mk,Array.set,TPiL.Kept.values,TPiL.Kept.next,TPiL.Kept.in_bounds,ite,Nat,Eq,OfNat.ofNat,HSub.hSub,Array.size5 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- instance
TPiL.(instance at line 1030)line 1030 source - instance
TPiL.(instance at line 1039)line 1039 source - def
TPiL.allProofInfoline 1052 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,ArrayProof uses:
TPiL.allProofInfo.go,List.toArray,List.nil - def
TPiL.saveBackrefline 1069 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,Verso.Doc.Elab.DocElabM,UnitProof uses:
Array.foldl,HAppend.hAppend,SubVerso.Highlighting.Highlighted.text, TPiL.allProofInfo,OfNat.ofNat,Nat,Array.size,Lean.MonadEnv.modifyEnv,Lean.Environment,Lean.EnvExtension.modifyState, TPiL.Kept,TPiL.recentHighlightsExt, TPiL.Kept.add,Lean.EnvExtension.asyncMode,Lean.Name.anonymous4 instances, coercions and auxiliary constants left out.
- structure
TPiL.ProofStateline 1076 sourceno axioms what this means
- def
TPiL.allInfoExtracts all messages from the given code line 1087 sourceSource documentation
Extracts all messages from the given code.
standard axioms: Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,Array,Prod,SubVerso.Highlighting.Highlighted.Message,OptionProof uses:
WellFounded.fix,WellFoundedRelation,invImage,TPiL.allInfo.match_2,SubVerso.Highlighting.Highlighted.seq,Array.flatMap,Subtype,Membership.mem,Array.map_unattach.match_1,Array.attach,SubVerso.Highlighting.Highlighted.Span.Kind,SubVerso.Highlighting.Highlighted.MessageContents,SubVerso.Highlighting.Highlighted.point,List.toArray,List.cons,Prod.mk,SubVerso.Highlighting.Highlighted.Message.mk,Option.none,List.nil,SubVerso.Highlighting.Highlighted.Goaland 12 more9 instances, coercions and auxiliary constants left out.
def allInfo (hl : Highlighted) : Array (Highlighted.Message × Option Highlighted) := …
- def
TPiL.trailingTextSplits the trailing text off some code line 1101 sourceSource documentation
Splits the trailing text off some code.
Comments are read as text only when
commentsis set. Everywhere else they are part of the code and are shown as they were written.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,optParam,Bool,Bool.false,Prod,String1 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
def trailingText (hl : Highlighted) (comments := false) : Highlighted × String := …
- def
TPiL.messageComment?Splits the marker that introduces a message off a comment's text, along with the severity it names, if any line 1132 sourceSource documentation
Splits the marker that introduces a message off a comment's text, along with the severity it names, if any.
A comment below a command describes the message it produces only when marked this way, which tells it apart from a comment that remarks on the code.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,Option,ProdProof uses:
String.Slice,String.trimAsciiStart,ite,Eq,Bool,Bool.not,String.Slice.startsWith,Bool.true,Option.none,String.Slice.drop,String.length,Option.some,Prod.mk,String.Slice.copy,String.Slice.trimAsciiStart,OfNat.ofNat,Nat,TPiL.messageComment?.match_2,List,Std.Iter.toListand 17 more16 instances, coercions and auxiliary constants left out.
def messageComment? (s : String) : Option (Option String × String) := …
- structure
TPiL.ExpectedMessageA comment that describes the message a command produces line 1155 sourceSource documentation
A comment that describes the message a command produces.
no axioms what this means
structure ExpectedMessage where …
- def
TPiL.commentContentsExtracts the text of a comment, which may span several lines line 1169 sourceSource documentation
Extracts the text of a comment, which may span several lines.
Each line contributes its content after the delimiter and the single space that conventionally follows it. Any further indentation is part of the text, because messages indent their details.
private def commentContents (s : String) : Option ExpectedMessage := …
Mentions: TPiL.ExpectedMessage
- def
TPiL.expectedCommentThe comment that describes a message line 1190 sourceSource documentation
The comment that describes a message.
A message of one line is written on the command's own line; a longer one is written on the lines below it, at the command's indentation.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
StringProof uses:
HAppend.hAppend,List,List.map,String.Slice,String.Slice.copy,Std.Iter.toList,Std.Iterators.Types.Map,String.Slice.SplitIterator,String.Slice.Pattern.ToForwardSearcher.DefaultForwardSearcher,Char,Bool,BEq.beq,Char.ofNat,String.toSlice,String.Slice.Subslice,Id,MonadLiftT.monadLift,Pure.pure,Std.Iterators.PostconditionT,String.Slice.Subslice.toSliceand 10 more16 instances, coercions and auxiliary constants left out.
def expectedComment (indent severity : String) (msg : String) : String := …
- def
TPiL.messageSeverityNameThe name of a message's severity line 1203 sourceSource documentation
The name of a message's severity.
no axioms what this means
Statement uses:
SubVerso.Highlighting.Highlighted.Message,StringProof uses:
TPiL.messageSeverityName.match_1,SubVerso.Highlighting.Highlighted.Span.Kind,SubVerso.Highlighting.Highlighted.Message.severity,Unitdef messageSeverityName (msg : Highlighted.Message) : String := …
- def
TPiL.lastLineIndentThe indentation of the last line of some code line 1210 sourceSource documentation
The indentation of the last line of some code.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
StringProof uses:
TPiL.lastLineIndent.match_1,Option,String.Slice,List.getLast?,Std.Iter.toList,Std.Iterators.Types.Map,String.Slice.SplitIterator,String.Slice.Pattern.ToForwardSearcher.DefaultForwardSearcher,Char,Bool,BEq.beq,Char.ofNat,String.toSlice,String.Slice.Subslice,Id,MonadLiftT.monadLift,Pure.pure,Std.Iterators.PostconditionT,String.Slice.Subslice.toSlice,String.splitand 3 more13 instances, coercions and auxiliary constants left out.
def lastLineIndent (s : String) : String := …
- def
TPiL.trailingCommentExtracts a trailing comment from code, if present line 1220 sourceSource documentation
Extracts a trailing comment from code, if present.
Returns the code along with the comment and its trailing whitespace.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,Prod,Option, TPiL.ExpectedMessageProof uses:
String, TPiL.trailingText,Bool.true,TPiL.trailingComment.match_1,Prod.snd,Prod.mk,Prod.fst,Option.some,Unit,Option.none1 instances, coercions and auxiliary constants left out.
def trailingComment (hl : Highlighted) : Highlighted × Option ExpectedMessage := …
Mentions: TPiL.ExpectedMessage
- inductive
TPiL.ShowProofStatesline 1229 sourceno axioms what this means
- structure
TPiL.LeanConfigline 1234 sourceno axioms what this means
- instance
TPiL.(instance at line 1248)line 1248 source - instance
TPiL.(instance at line 1266)line 1266 source - structure
TPiL.SavedLeanConfigline 1276 sourceno axioms what this means
- instance
TPiL.(instance at line 1280)line 1280 source - def
TPiL.isNewlineline 1288 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,BoolProof uses:
WellFounded.fix,WellFoundedRelation,invImage,TPiL.isNewline.match_1,String,SubVerso.Highlighting.Highlighted.text,BEq.beq,SubVerso.Highlighting.Highlighted.unparsed,SubVerso.Highlighting.Token,SubVerso.Highlighting.Highlighted.token,Bool.false,Array,SubVerso.Highlighting.Highlighted.seq,Id.run,Bind.bind,Id,Prod,Option,Unit,ForIn'.forIn'and 35 more21 instances, coercions and auxiliary constants left out.
- def
TPiL.commentColumnThe column at which the comment on a line begins, if it has one line 1304 sourceSource documentation
The column at which the comment on a line begins, if it has one.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,Option,NatProof uses:
Prod.snd,TPiL.commentColumn.go,OfNat.ofNat1 instances, coercions and auxiliary constants left out.
def commentColumn (hl : Highlighted) : Option Nat := (go 0 hl).2 …
- def
TPiL.isMessageCommentLineWhether a line is a comment that introduces a message line 1318 sourceSource documentation
Whether a line is a comment that introduces a message.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,BoolProof uses:
String.Slice,String.trimAsciiStart,SubVerso.Highlighting.Highlighted.toString,Bool.and,String.Slice.startsWith,String,Option.isSome,Prod,Option, TPiL.messageComment?,String.Slice.copy,String.Slice.dropWhile,Char,BEq.beq,Char.ofNat4 instances, coercions and auxiliary constants left out.
def isMessageCommentLine (hl : Highlighted) : Bool := …
- def
TPiL.isCommentLineWhether a line consists of a comment, along with any surrounding whitespace line 1323 sourceSource documentation
Whether a line consists of a comment, along with any surrounding whitespace.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
SubVerso.Highlighting.Highlighted,BoolProof uses:
Bool.and,TPiL.isCommentLine.hasComment,Bool.not,TPiL.isCommentLine.hasCodedef isCommentLine (hl : Highlighted) : Bool := …
- def
TPiL.fixupAnchorCommentsLeading anchor comments are always incorrect line 1348 sourceSource documentation
Leading anchor comments are always incorrect. They probably result from Lean placing them with the next command, so we should move them back up before processing them.
Line comments form one comment when they share a column, and a comment that describes a command follows it directly: on the command's own line, on the lines below it, or both. Those move back as well. A comment at some other column, or one held off by a blank line, is a separate comment that belongs to the command below it.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Array,SubVerso.Module.ModuleItemProof uses:
Id.run,List.toArray,List.nil,Option,Option.none,Bind.bind,Id,Prod,ForIn.forIn,inferInstance,Membership,Prod.mk,Prod.fst,Prod.snd,Unit,ForInStep,Option.some,Pure.pure,ForInStep.yield,iteand 48 more17 instances, coercions and auxiliary constants left out.
def fixupAnchorComments (items : Array ModuleItem) : Array ModuleItem := Id.run do …
- def
TPiL.logCommentMismatchReports a comment that doesn't describe the message its command produced line 1400 sourceSource documentation
Reports a comment that doesn't describe the message its command produced.
The corrected block is offered when the command occurs just once, so that replacing it is unambiguous. Any existing comment is dropped, which moves it to the place that suits the message.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Lean.Syntax.StrLit,String,Lean.MessageData,Verso.Doc.Elab.DocElabM,UnitProof uses:
List,String.Slice,Std.Iter.toList,Std.Iterators.Types.Map,String.Slice.SplitIterator,String.Slice.Pattern.ForwardSliceSearcher,String.toSlice,Lean.TSyntax.getString,String.Slice.Subslice,Id,MonadLiftT.monadLift,Pure.pure,Std.Iterators.PostconditionT,String.Slice.Subslice.toSlice,String.split,ite,Eq,Bool,BEq.beq,Natand 59 more36 instances, coercions and auxiliary constants left out.
def logCommentMismatch (block : StrLit) (itemText strippedText severity msg : String) (what : MessageData) : DocElabM Unit := do … - def
TPiL.checkSeverityReports a comment that names a severity other than the one its command produced line 1423 sourceSource documentation
Reports a comment that names a severity other than the one its command produced.
A comment that names no severity describes a message of any kind.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Lean.Syntax.StrLit,String, TPiL.ExpectedMessage,SubVerso.Highlighting.Highlighted.Message,Verso.Doc.Elab.DocElabM,UnitProof uses: TPiL.messageSeverityName,
TPiL.extractFile.match_1,Option,TPiL.ExpectedMessage.severity,ite,Eq,Bool,BEq.beq,Bool.true,Pure.pure,Unit.unit, TPiL.logCommentMismatch,SubVerso.Highlighting.Highlighted.Message.toString,List.nil,Lean.Name,HAppend.hAppend,Lean.MessageData,Lean.ToMessageData.toMessageData9 instances, coercions and auxiliary constants left out.
def checkSeverity (block : StrLit) (itemText strippedText : String) (expected : ExpectedMessage) (msg : Highlighted.Message) : DocElabM Unit := do …Mentions: TPiL.ExpectedMessage
- def
TPiL.showGoalsline 1431 source - def
TPiL.leanline 1444 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.CodeBlockExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntax,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.lean.match_13,Verso.Doc.Elab.DocElabM,Bind.bind, TPiL.LeanConfig,Verso.ArgParse.parseThe,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Context,Lean.Meta.Stateand 158 more56 instances, coercions and auxiliary constants left out.
- def
TPiL.saveline 1547 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.CodeBlockExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntax,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.lean.match_13,Verso.Doc.Elab.DocElabM,Bind.bind, TPiL.SavedLeanConfig,Verso.ArgParse.parseThe,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Context,Lean.Meta.Stateand 66 more42 instances, coercions and auxiliary constants left out.
- def
TPiL.savedAnchorline 1569 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.CodeBlockExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntax,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.lean.match_13,Verso.Doc.Elab.DocElabM,Bind.bind,Lean.Syntax.Ident,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Context,Lean.Meta.Stateand 65 more43 instances, coercions and auxiliary constants left out.
- structure
TPiL.ProofStateConfigline 1581 sourceno axioms what this means
- structure
TPiL.GoalConfigline 1584 sourceno axioms what this means
- def
TPiL.strOrNameline 1589 source - instance
TPiL.(instance at line 1597)line 1597 source - instance
TPiL.(instance at line 1600)line 1600 source - def
TPiL.proofStatesorry line 1606 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.CodeBlockExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntax,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.lean.match_13,Verso.Doc.Elab.DocElabM,Bind.bind, TPiL.ProofStateConfig,Verso.ArgParse.parseThe,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Context,Lean.Meta.Stateand 95 more44 instances, coercions and auxiliary constants left out.
- def
TPiL.goalsorry line 1626 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind, TPiL.GoalConfig,Verso.ArgParse.parseThe,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 89 more40 instances, coercions and auxiliary constants left out.
- structure
TPiL.Helperline 1647 sourceno axioms what this means
- def
TPiL.Helper.fromModuleline 1655 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,IO, TPiL.HelperProof uses:
UInt64,Hashable.hash,HAppend.hAppend, TPiL.hashString,System.FilePath,HDiv.hDiv,System.FilePath.mk,Bind.bind,IO.Error,Bool,liftM,BaseIO,EIO,System.FilePath.pathExists,Unit,IO.FS.readFile,Pure.pure,String.Slice.copy,String.trimAscii,IO.FS.writeFileand 79 more34 instances, coercions and auxiliary constants left out.
- def
TPiL.setupline 1801 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.DirectiveExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.setup.match_1,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 50 more32 instances, coercions and auxiliary constants left out.
- def
TPiL.prioritizedElabline 1821 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
Monad,Bool,ArrayProof uses:
Prod,Nat,List.toArray,List.nil,Bind.bind,ForIn'.forIn',Std.Legacy.Range,inferInstance,Membership,Std.Legacy.Range.mk,OfNat.ofNat,Array.size,Nat.zero_lt_one,Prod.mk,Membership.mem,Prod.fst,Prod.snd,GetElem.getElem,LT.lt,ForInStepand 12 more16 instances, coercions and auxiliary constants left out.
- def
TPiL.isLeanBlockline 1835 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Lean.TSyntax,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,Lean.Core.CoreM,BoolProof uses:
ite,Eq,Lean.Syntax.isOfKind,Lean.TSyntax.raw,Lean.Name.mkStr4,Bool.true,Lean.Syntax,Lean.Syntax.getArg,OfNat.ofNat,Nat,Lean.Syntax.matchesNull,cond,Bool.or,Bool.false,Lean.TSyntax.mk,Lean.TSyntaxArray,Lean.TSyntaxArray.mk,Lean.Syntax.getArgs,Bind.bind,Lean.Nameand 12 more9 instances, coercions and auxiliary constants left out.
- def
TPiL.leanFirstElaborates Lean blocks first, maintaining the order of blocks line 1846 sourceSource documentation
Elaborates Lean blocks first, maintaining the order of blocks. This makes their code available for
leanRef.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.DirectiveExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.setup.match_1,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 16 more19 instances, coercions and auxiliary constants left out.
def leanFirst : DirectiveExpander | args, contents => do ArgParse.done.run args -- Elaborate Lean blocks first, so inlines in prior blocks can refer to them prioritizedElab (isLeanBlock ·) elabBlock contents @[code_block_expander setup]Mentions: in, TPiL.prioritizedElab, TPiL.isLeanBlock, TPiL.setup
- def
TPiL.setupCodeline 1855 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.CodeBlockExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntax,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.lean.match_13,Verso.Doc.Elab.DocElabM,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Context,Lean.Meta.Stateand 19 more23 instances, coercions and auxiliary constants left out.
- def
TPiL.commentline 1863 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.DirectiveExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.setup.match_1,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Pure.pure,List.toArray3 instances, coercions and auxiliary constants left out.
- def
TPiL.TODOline 1867 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.DirectiveExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.setup.match_1,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Pure.pure,List.toArray3 instances, coercions and auxiliary constants left out.
- def
TPiL.TODOinlineline 1871 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Pure.pure,List.toArray3 instances, coercions and auxiliary constants left out.
- def
TPiL.kwline 1875 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 45 more32 instances, coercions and auxiliary constants left out.
- def
TPiL.attrline 1883 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 45 more32 instances, coercions and auxiliary constants left out.
- def
TPiL.tacticline 1892 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 45 more32 instances, coercions and auxiliary constants left out.
- def
TPiL.kbdline 1900 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 39 more32 instances, coercions and auxiliary constants left out.
- def
TPiL.optionline 1907 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 30 more31 instances, coercions and auxiliary constants left out.
- def
TPiL.currentHelperline 1914 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.DocElabM, TPiL.HelperProof uses:
Bind.bind,Lean.Environment,Lean.MonadEnv.getEnv,TPiL.currentHelper.match_1,Option,Lean.EnvExtension.getState,TPiL.helperExt,Lean.EnvExtension.asyncMode,Lean.Name.anonymous,Pure.pure,TPiL.defaultHelperExt,Lean.Name,Lean.getMainModule,liftM,EIO,IO.Error,IO, TPiL.Helper.fromModule,HAppend.hAppend,Stringand 5 more14 instances, coercions and auxiliary constants left out.
- def
TPiL.multiVar?line 1922 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,Option,Prod,ArrayProof uses:
List.toArray,List.nil,String.Slice,String.trimAscii,Bind.bind,ForIn.forIn,Lean.Loop,Unit,Lean.Loop.mk,Prod.mk,Option.none,Prod.snd,Prod.fst,String.Slice.takeWhile,Char,Bool,TPiL.multiVar?.alpha,Nat,Std.Iter.length,String.Slice.PosIteratorand 36 more19 instances, coercions and auxiliary constants left out.
- def
TPiL.highlightInlineline 1949 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,optParam,Option,Option.none,Verso.Doc.Elab.DocElabM,SubVerso.Highlighting.HighlightedProof uses:
Bind.bind, TPiL.Helper, TPiL.currentHelper,MonadExcept.tryCatch,Lean.Exception,Unit,TPiL.highlightInline.match_1,Prod,Array, TPiL.multiVar?,SubVerso.Highlighting.Highlighted.empty,ForIn.forIn,inferInstance,Membership,ForInStep,liftM,EIO,IO.Error,IO,TPiL.Helper.highlightand 23 more26 instances, coercions and auxiliary constants left out.
- def
TPiL.highlightCommandline 1969 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,Verso.Doc.Elab.DocElabM,SubVerso.Highlighting.HighlightedProof uses:
Bind.bind, TPiL.Helper, TPiL.currentHelper,liftM,EIO,IO.Error,IO,TPiL.Helper.command5 instances, coercions and auxiliary constants left out.
- def
TPiL.highlightSignatureline 1973 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,Verso.Doc.Elab.DocElabM,SubVerso.Highlighting.HighlightedProof uses:
Bind.bind, TPiL.Helper, TPiL.currentHelper,liftM,EIO,IO.Error,IO,TPiL.Helper.signature5 instances, coercions and auxiliary constants left out.
- def
TPiL.highlightNameline 1977 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
String,Verso.Doc.Elab.DocElabM,SubVerso.Highlighting.HighlightedProof uses:
Bind.bind, TPiL.Helper, TPiL.currentHelper,liftM,EIO,IO.Error,IO,TPiL.Helper.name5 instances, coercions and auxiliary constants left out.
- def
TPiL.leanInlinesorry line 1982 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,ite,Eq,Bool,Bool.true,Option,String,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabMand 63 more36 instances, coercions and auxiliary constants left out.
- def
TPiL.namesorry line 2001 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,ite,Eq,Bool,Bool.true,Option,String,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabMand 77 more39 instances, coercions and auxiliary constants left out.
- def
TPiL.leanCommandsorry line 2039 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 78 more43 instances, coercions and auxiliary constants left out.
- def
TPiL.leanCommandBlocksorry line 2062 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.CodeBlockExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntax,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.lean.match_13,Verso.Doc.Elab.DocElabM,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Context,Lean.Meta.Stateand 74 more35 instances, coercions and auxiliary constants left out.
- def
TPiL.signaturesorry line 2084 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.CodeBlockExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntax,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.lean.match_13,Verso.Doc.Elab.DocElabM,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Context,Lean.Meta.Stateand 74 more35 instances, coercions and auxiliary constants left out.
- def
TPiL.leanRefline 2106 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,ite,Eq,Bool,Bool.true,Option,String,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabMand 72 more41 instances, coercions and auxiliary constants left out.
- def
TPiL.emptyline 2124 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Verso.Doc.Elab.RoleExpanderProof uses:
Array,Verso.Doc.Arg,Lean.TSyntaxArray,List.cons,Lean.SyntaxNodeKind,Lean.Name.mkStr1,List.nil,TPiL.goal.match_4,Verso.Doc.Elab.DocElabM,Lean.TSyntax,Bind.bind,Unit,Verso.ArgParse.run,Lean.Core.CoreM,Lean.Elab.Term.TermElabM,StateRefT',IO.RealWorld,Lean.Elab.Term.State,Lean.Meta.MetaM,Lean.Elab.Term.Contextand 8 more22 instances, coercions and auxiliary constants left out.
- def
TPiL.keywordsline 2129 source - def
TPiL.tacticsline 2138 source - def
TPiL.leanLitsline 2144 source - def
TPiL.suggestInternal detail of suggestion mechanism line 2154 sourceSource documentation
Internal detail of suggestion mechanism.
private def suggest : InlineExpander | `(inline| code( $str )) => do let str' := str.getString …