FormalConjecturesUtil/Linters/StubLinter.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 project documentation, Formal Conjectures paper, arXiv v1
3 declarations, 1 contain sorry, 0 declared as axioms
The Stub Linter
The StubLinter ensures that no stubs, placeholder definitions (e.g. opaque, def ... := sorry),
or new axioms are introduced in the repository.
Imports (1)
Imported by 1 file
- def
StubLinter.hasSorryChecks whether a syntax node containssorry,admit, orsorryAxsorry line 38 sourceSource documentation
Checks whether a syntax node contains
sorry,admit, orsorryAx.no axioms what this means
Statement uses:
Lean.Syntax,BoolProof uses:
bne,Option,Lean.Syntax.find?,Bool.or,Lean.Syntax.isOfKind,Lean.Name.mkStr4,Bool.and,Lean.Syntax.isIdent,BEq.beq,Lean.Name,Lean.Syntax.getId,Lean.Name.mkStr1,Lean.Name.eraseMacroScopes,Option.none3 instances, coercions and auxiliary constants left out.
def hasSorry (stx : Syntax) : Bool := …
- def
StubLinter.checkDeclChecks a declaration command for stubs, placeholder definitions, and axioms line 48 sourceSource documentation
Checks a declaration command for stubs, placeholder definitions, and axioms.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Lean.Syntax,Lean.Elab.Command.CommandElabM,UnitProof uses:
ite,Eq,Bool,BEq.beq,Lean.SyntaxNodeKind,Lean.Syntax.getKind,Lean.Name.mkStr4,Bool.true,GetElem.getElem,Nat,True,OfNat.ofNat,True.intro,Lean.Linter.logLintIf,linter.style.stubs,Function.comp,String,Std.Format,Lean.MessageData,Lean.MessageData.ofFormatand 11 more14 instances, coercions and auxiliary constants left out.
def checkDecl (stx : Syntax) : CommandElabM Unit := do …
- def
StubLinter.stubLinterThe stub linter checks that noopaque,axiom, or `def line 67 sourceSource documentation
The stub linter checks that no
opaque,axiom, ordef ... := sorrydefinitions are present.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Lean.Elab.Command.LinterProof uses:
Lean.Elab.Command.Linter.mk,Lean.withSetOptionIn,Lean.Syntax,ite,Lean.Elab.Command.CommandElabM,Unit,Eq,Bool,BEq.beq,Lean.SyntaxNodeKind,Lean.Syntax.getKind,Lean.Name.mkStr4,Bool.true,Bind.bind,PUnit,ForIn.forIn,Array,inferInstance,Membership,Lean.Syntax.getArgsand 18 more13 instances, coercions and auxiliary constants left out.
def stubLinter : Linter where …