FormalConjecturesUtil/Linters/AMSLinter.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 AMS Linter

The AMSLinter is a linter to aid with formatting contributions to the Formal Conjectures repository by ensuring that results in a file have the appropriate subject tags.

Imports (3)
Imported by 2 files
  1. def AMSLinter.toAMS Checks if a command has the AMS attribute line 42 source

    Source documentation

    Checks if a command has the AMS attribute.

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

    Statement uses: Lean.TSyntax, List.cons, Lean.SyntaxNodeKind, Lean.Name.mkStr4, List.nil, Lean.Elab.Command.CommandElabM, Array, Lean.TSyntaxArray, Lean.Name.mkStr1

    Proof uses: ite, Eq, Bool, Lean.Syntax.isOfKind, Lean.TSyntax.raw, Bool.true, Lean.Syntax, Lean.Syntax.getArg, OfNat.ofNat, Nat, Lean.Syntax.matchesNull, Option, Array.mapM, Lean.TSyntax.mk, Option.some, Array.getSepElems, Lean.Syntax.getArgs, Array.filterMapM, Lean.Name.mkStr2, Lean.TSyntaxArray.mk and 12 more

    9 instances, coercions and auxiliary constants left out.

    def toAMS (stx : TSyntax ``Command.declModifiers) :
        CommandElabM (Array <| TSyntaxArray `num) := do
    …
  2. def AMSLinter.mkAMSSyntax line 52 source

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

    Statement uses: Lean.TSyntaxArray, List.cons, Lean.SyntaxNodeKind, Lean.Name.mkStr1, List.nil, Lean.Elab.Command.CommandElabM, Lean.TSyntax, Lean.Name.mkStr4

    Proof uses: Bind.bind, Lean.SourceInfo, Lean.MonadRef.mkInfoFromRefPos, Lean.MacroScope, Lean.MonadQuotation.getCurrMacroScope, Lean.Name, Lean.MonadQuotation.getContext, Pure.pure, Lean.Elab.Command.Context, StateRefT', IO.RealWorld, Lean.Elab.Command.State, EIO, Lean.Exception, Lean.TSyntax.mk, Lean.Syntax.node2, Lean.Syntax.node1, Lean.Syntax.node, Array.mkArray0, Lean.Syntax and 4 more

    8 instances, coercions and auxiliary constants left out.

  3. def AMSLinter.AMSLinter The problem category linter checks that every theorem/lemma/example has been given an AMS attribute line 57 source

    Source documentation

    The problem category linter checks that every theorem/lemma/example has been given an AMS attribute.

    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, Lean.Syntax.isOfKind, Lean.Name.mkStr4, Bool.true, Lean.Syntax.getArg, OfNat.ofNat, Nat, cond, Bool.or, Bool.false, Lean.Syntax.matchesNull, Lean.TSyntax, List.cons and 58 more

    31 instances, coercions and auxiliary constants left out.

    def AMSLinter : Linter where
    …