FormalConjecturesForMathlib/Tactic/Linter/Term.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

2 declarations, 0 contain sorry, 0 declared as axioms

Imports (5)
Imported by 2 files
  1. def Lean.Elab.ContextInfo.runMetaMInCommandElabM A copy of ContextInfo.runMetaM that keeps the messages and passes in the same filename line 30 source

    Source documentation

    A copy of ContextInfo.runMetaM that keeps the messages and passes in the same filename.

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

    Statement uses: Lean.Elab.ContextInfo, Lean.LocalContext, Lean.Meta.MetaM, Lean.Elab.Command.CommandElabM

    Proof uses: Lean.Core.CoreM, Prod, Lean.Meta.State, Lean.Meta.MetaM.run, Lean.Meta.withLocalInstances, Lean.Meta.Context, StateRefT', IO.RealWorld, List.reduceOption, Lean.LocalDecl, Lean.PersistentArray.toList, Option, Lean.LocalContext.decls, Lean.Meta.Context.mk, Inhabited.default, Lean.Meta.ConfigWithKey, Bool.false, EmptyCollection.emptyCollection, Lean.FVarIdSet, List.toArray and 97 more

    44 instances, coercions and auxiliary constants left out.

    def Lean.Elab.ContextInfo.runMetaMInCommandElabM {α} (info : ContextInfo) (lctx : LocalContext)
        (x : MetaM α) : Command.CommandElabM α := do
    …
  2. def Lean.Elab.Command.Linter.runTermLinter A linter that applies to terms line 72 source

    Source documentation

    A linter that applies to terms.

    The lint argument receives both the original syntax and elaborated expression, provided the option is enabled. Note that the linter lives in StateT σ, so that it can build up state inherited from parent trees.

    This doesn't return a Linter, as then the caller would have to remember to pass the name.

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

    Statement uses: Inhabited, Lean.Option, Bool, Lean.Syntax.Term, Lean.Expr, StateT, Lean.Meta.MetaM, Unit, Lean.Elab.Command.CommandElab

    Proof uses: Lean.withSetOptionIn, Lean.Syntax, Bind.bind, Lean.Elab.Command.CommandElabM, Lean.Elab.Command.State, MonadState.get, StateRefT', IO.RealWorld, EIO, Lean.Exception, Lean.Elab.Command.Context, ST, BaseIO, Array, Lean.Elab.InfoTree, Lean.PersistentArray.toArray, Lean.Elab.InfoState.trees, Lean.Elab.Command.State.infoState, ite, Eq and 70 more

    50 instances, coercions and auxiliary constants left out.

    def runTermLinter {σ} [Inhabited σ] (opt : Lean.Option Bool)
        (lint : Term → Expr → StateT σ MetaM Unit) : Command.CommandElab :=
    …