-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve case-split heuristic used in
grind
(#6658)
This PR ensures that `grind` avoids case-splitting on terms congruent to those that have already been case-split.
- Loading branch information
1 parent
0050e93
commit 6259b47
Showing
3 changed files
with
64 additions
and
2 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
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,50 @@ | ||
variable (d : Nat) in | ||
inductive X : Nat → Prop | ||
| f {s : Nat} : X s | ||
| g {s : Nat} : X d → X s | ||
|
||
/-- | ||
error: `grind` failed | ||
case grind.1 | ||
c : Nat | ||
q : X c 0 | ||
s : Nat | ||
h✝ : 0 = s | ||
h : HEq ⋯ ⋯ | ||
⊢ False | ||
[grind] Diagnostics | ||
[facts] Asserted facts | ||
[prop] X c 0 | ||
[prop] 0 = s | ||
[prop] HEq ⋯ ⋯ | ||
[eqc] True propositions | ||
[prop] X c 0 | ||
[prop] X c s | ||
[eqc] Equivalence classes | ||
[eqc] {s, 0} | ||
case grind.2 | ||
c : Nat | ||
q : X c 0 | ||
s : Nat | ||
a✝¹ a✝ : X c c | ||
h✝ : 0 = s | ||
h : HEq ⋯ ⋯ | ||
⊢ False | ||
[grind] Diagnostics | ||
[facts] Asserted facts | ||
[prop] X c 0 | ||
[prop] X c c | ||
[prop] 0 = s | ||
[prop] HEq ⋯ ⋯ | ||
[eqc] True propositions | ||
[prop] X c 0 | ||
[prop] X c c | ||
[prop] X c s | ||
[eqc] Equivalence classes | ||
[eqc] {s, 0} | ||
[issues] Issues | ||
[issue] this goal was not fully processed due to previous failures, threshold: `(failures := 1)` | ||
-/ | ||
#guard_msgs (error) in | ||
example {c : Nat} (q : X c 0) : False := by | ||
grind |