forked from leanprover/lean4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve
grind
failure message (leanprover#6633)
This PR improves the failure message produced by the `grind` tactic. We now include information about asserted facts, propositions that are known to be true and false, and equivalence classes.
- Loading branch information
1 parent
0cdd751
commit b0f4e1d
Showing
12 changed files
with
283 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/- | ||
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 Init.NotationExtra | ||
|
||
namespace Lean.Grind | ||
/-! | ||
This is a hackish module for hovering node information in the `grind` tactic state. | ||
-/ | ||
|
||
inductive NodeDef where | ||
| unit | ||
|
||
set_option linter.unusedVariables false in | ||
def node_def (_ : Nat) {α : Sort u} {a : α} : NodeDef := .unit | ||
|
||
@[app_unexpander node_def] | ||
def nodeDefUnexpander : PrettyPrinter.Unexpander := fun stx => do | ||
match stx with | ||
| `($_ $id:num) => return mkIdent <| Name.mkSimple $ "#" ++ toString id.getNat | ||
| _ => throw () | ||
|
||
@[app_unexpander NodeDef] | ||
def NodeDefUnexpander : PrettyPrinter.Unexpander := fun _ => do | ||
return mkIdent <| Name.mkSimple "NodeDef" | ||
|
||
end Lean.Grind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.