Skip to content

Commit

Permalink
feat: add grind_pattern command (#6470)
Browse files Browse the repository at this point in the history
This PR introduces a command for specifying patterns used in the
heuristic instantiation of global theorems in the `grind` tactic. Note
that this PR only adds the parser.
  • Loading branch information
leodemoura authored Dec 29, 2024
1 parent a781f98 commit 9c0ef2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Lean/Meta/Tactic/Grind.lean
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Lean.Meta.Tactic.Grind.Propagate
import Lean.Meta.Tactic.Grind.PP
import Lean.Meta.Tactic.Grind.Simp
import Lean.Meta.Tactic.Grind.Ctor
import Lean.Meta.Tactic.Grind.Parser

namespace Lean

Expand Down
15 changes: 15 additions & 0 deletions src/Lean/Meta/Tactic/Grind/Parser.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/-
Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
prelude
import Lean.Parser.Command

namespace Lean.Parser.Command
/-!
Builtin parsers for `grind` related commands
-/
@[builtin_command_parser] def grindPattern := leading_parser
"grind_pattern " >> ident >> darrow >> sepBy1 termParser ","
end Lean.Parser.Command

0 comments on commit 9c0ef2a

Please sign in to comment.