FormalConjecturesUtil/Linters/StubLinter.lean

GitHub source file

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
  1. def StubLinter.hasSorry Checks whether a syntax node contains sorry, admit, or sorryAx sorry line 38 source

    Source documentation

    Checks whether a syntax node contains sorry, admit, or sorryAx.

    no axioms what this means

    Statement uses: Lean.Syntax, Bool

    Proof 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.none

    3 instances, coercions and auxiliary constants left out.

    def hasSorry (stx : Syntax) : Bool :=
    …
  2. def StubLinter.checkDecl Checks a declaration command for stubs, placeholder definitions, and axioms line 48 source

    Source 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, Unit

    Proof 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.ofFormat and 11 more

    14 instances, coercions and auxiliary constants left out.

    def checkDecl (stx : Syntax) : CommandElabM Unit := do
    …
  3. def StubLinter.stubLinter The stub linter checks that no opaque, axiom, or `def line 67 source

    Source documentation

    The stub linter checks that no opaque, axiom, or def ... := sorry definitions are present.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Lean.Elab.Command.Linter

    Proof 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.getArgs and 18 more

    13 instances, coercions and auxiliary constants left out.

    def stubLinter : Linter where
    …