FormalConjecturesUtil/Linters/AnswerLinter.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, 0 contain sorry, 0 declared as axioms

The AnswerLinter

The AnswerLinter is a linter to aid with using answer(sorry) correctly.

Imports (3)
Imported by 2 files
  1. def AnswerLinter.contains_early_args Helper to check for arguments (h : True) line 40 source

    Source comment

    Helper to check for arguments (h : True)

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

    Statement uses: Lean.Syntax, Lean.Elab.Command.CommandElabM, Bool

    Proof uses: GetElem.getElem, Nat, True, OfNat.ofNat, True.intro, ite, Eq, bne, Lean.SyntaxNodeKind, Lean.Syntax.getKind, Lean.Name.mkStr4, Bool.true, Pure.pure, Lean.Elab.Command.Context, StateRefT', IO.RealWorld, Lean.Elab.Command.State, EIO, Lean.Exception, Bool.false and 4 more

    10 instances, coercions and auxiliary constants left out.

    def contains_early_args (stx : Syntax) : CommandElabM Bool := do
    …
  2. def AnswerLinter.stars_with_answer_sorry_iff Helper to check for answer(sorry) ↔ line 48 source

    Source comment

    Helper to check for answer(sorry) ↔ ...

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

    Statement uses: Lean.Syntax, Lean.Elab.Command.CommandElabM, Bool

    Proof uses: GetElem.getElem, Nat, True, OfNat.ofNat, True.intro, ite, Eq, bne, Lean.SyntaxNodeKind, Lean.Syntax.getKind, Lean.Name.mkStr4, Bool.true, Pure.pure, Lean.Elab.Command.Context, StateRefT', IO.RealWorld, Lean.Elab.Command.State, EIO, Lean.Exception, Bool.false and 5 more

    10 instances, coercions and auxiliary constants left out.

    def stars_with_answer_sorry_iff (stx : Syntax) : CommandElabM Bool := do
    …
  3. def AnswerLinter.answerLinter The actual linter object line 63 source

    Source documentation

    The actual linter object

    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, Unit, Lean.Elab.Command.CommandElabM, Pure.pure, Lean.Elab.Command.Context, StateRefT', IO.RealWorld, Lean.Elab.Command.State, EIO, Lean.Exception, Unit.unit, ite, Eq, Bool, BEq.beq, Lean.SyntaxNodeKind, Lean.Syntax.getKind, Lean.Name.mkStr4 and 14 more

    13 instances, coercions and auxiliary constants left out.

    def answerLinter : Linter where
    …