Documentation

Mathlib.Tactic.TacticAnalysis.Declarations

Tactic linters #

This file defines passes to run from the tactic analysis framework.

def Mathlib.TacticAnalysis.terminalReplacement (oldTacticName newTacticName : String) (oldTacticKind : Lean.SyntaxNodeKind) (newTactic : Lean.SyntaxLean.MVarIdLean.MetaM (Lean.TSyntax `tactic)) (reportFailure : Bool := true) (reportSuccess reportSlowdown : Bool := false) (maxSlowdown : Float := 1) :

Define a pass that tries replacing one terminal tactic with another.

newTacticName is a human-readable name for the tactic, for example "linarith". This can be used to group messages together, so that ring, ring_nf, ring1, ... all produce the same message.

oldTacticKind is the SyntaxNodeKind for the tactic's main parser, for example Mathlib.Tactic.linarith.

newTactic stx goal selects the new tactic to try, which may depend on the old tactic invocation in stx and the current goal.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Mathlib.TacticAnalysis.grindReplacementWith (tacticName : String) (tacticKind : Lean.SyntaxNodeKind) (reportFailure : Bool := true) (reportSuccess reportSlowdown : Bool := false) (maxSlowdown : Float := 1) :

    Define a pass that tries replacing a specific tactic with grind.

    tacticName is a human-readable name for the tactic, for example "linarith". This can be used to group messages together, so that ring, ring_nf, ring1, ... all produce the same message.

    tacticKind is the SyntaxNodeKind for the tactic's main parser, for example Mathlib.Tactic.linarith.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Debug grind by identifying places where it does not yet supersede linarith.

      Debug grind by identifying places where it does not yet supersede linarith.

      Equations
      Instances For

        Debug grind by identifying places where it does not yet supersede ring.

        Debug grind by identifying places where it does not yet supersede ring.

        Equations
        Instances For

          Debug cutsat by identifying places where it does not yet supersede omega.

          Debug cutsat by identifying places where it does not yet supersede omega.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Report places where omega can be replaced by cutsat.

            Report places where omega can be replaced by cutsat.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Suggest merging two adjacent rw tactics if that also solves the goal.

              Suggest merging two adjacent rw tactics if that also solves the goal.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Suggest merging tac; grind into just grind if that also solves the goal.

                Suggest merging tac; grind into just grind if that also solves the goal.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Suggest replacing a sequence of tactics with grind if that also solves the goal.

                  Suggest replacing a sequence of tactics with grind if that also solves the goal.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Suggest merging two adjacent intro tactics which don't pattern match.

                    Suggest merging two adjacent intro tactics which don't pattern match.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For