FormalConjecturesUtil/Linters/LatexDocstringLinter.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

5 declarations, 0 contain sorry, 0 declared as axioms

The Docstring Markup Linter

The LatexDocstringLinter checks markup that affects generated documentation. It ensures that docstrings use $ $ or $$ $$ for mathematics and use inline Markdown links for URLs.

Imports (3)
Imported by 2 files
  1. def LatexDocstringLinter.containsLatex line 39 source

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

    Statement uses: String, Bool

    Proof uses: Bool.or, Decidable.decide, GT.gt, Nat, List.length, String.splitOn, OfNat.ofNat

    3 instances, coercions and auxiliary constants left out.

  2. def LatexDocstringLinter.containsLegacyUrlLink line 43 source

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

    Statement uses: String, Bool

    Proof uses: Bool.or, Decidable.decide, GT.gt, Nat, List.length, String.splitOn, OfNat.ofNat

    3 instances, coercions and auxiliary constants left out.

  3. def LatexDocstringLinter.getDocstringText line 46 source

    standard axioms: propext what this means

    Statement uses: Lean.TSyntax, List.cons, Lean.SyntaxNodeKind, Lean.Name.mkStr4, List.nil, String

    Proof uses: Lean.Syntax, GetElem?.getElem!, Nat, True, Lean.TSyntax.raw, OfNat.ofNat, Lean.Syntax.getAtomVal

    5 instances, coercions and auxiliary constants left out.

  4. def LatexDocstringLinter.lintDocstring line 50 source

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

    Statement uses: Lean.Syntax, String, Lean.Elab.Command.CommandElabM, Unit

    Proof uses: ite, Eq, Bool, LatexDocstringLinter.containsLegacyUrlLink, Bool.true, Lean.Linter.logLintIf, linter.style.latex_docstring, Function.comp, Std.Format, Lean.MessageData, Lean.MessageData.ofFormat, Std.ToFormat.format, Pure.pure, Lean.Elab.Command.Context, StateRefT', IO.RealWorld, Lean.Elab.Command.State, EIO, Lean.Exception, Unit.unit and 2 more

    12 instances, coercions and auxiliary constants left out.

  5. def LatexDocstringLinter.latexDocstringLinter The linter checking markup in docstrings line 59 source

    Source documentation

    The linter checking markup in docstrings.

    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, String, Lean.Syntax.getAtomVal, GetElem?.getElem!, Nat, True, OfNat.ofNat, Bind.bind and 22 more

    15 instances, coercions and auxiliary constants left out.

    def latexDocstringLinter : Linter where
    …