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: GuessLex: if no measure is found, explain why (leanprover#2960)
by showing the matrix of calls and measures, and what we know about that call (=, <, ≤, ?), e.g. guessLexFailures.lean:27:0-33:31: error: Could not find a decreasing measure. The arguments relate at each recursive call as follows: (<, ≤, =: relation proved, ? all proofs failed, _: no proof attempted) x1 x2 x3 1) 29:6-25 = = = 2) 30:6-23 = ? < 3) 31:6-23 < _ _ Please use `termination_by` to specify a decreasing measure It’s a bit more verbose for mutual functions. It will use the user-specified argument names for functions written ``` foo (n : Nat) := … ``` but not with pattern matching like ``` foo : Nat → … | n => … ``` This can be refined later and separately (and maybe right away in `expandMatchAltsWhereDecls`).
- Loading branch information
Showing
5 changed files
with
404 additions
and
62 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
Oops, something went wrong.