lean4-htt/tests/lean/wf1.lean.expected.out
Joachim Breitner 17825bf81d
feat: GuessLex: if no measure is found, explain why (#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`).
2023-12-05 08:32:15 +00:00

19 lines
602 B
Text

wf1.lean:3:12-3:19: error: fail to show termination for
g
with errors
argument #1 was not used for structural recursion
failed to eliminate recursive application
g (x - 1)
argument #2 was not used for structural recursion
insufficient number of parameters at recursive application
g (x - 1)
structural recursion cannot be used
Could not find a decreasing measure.
The arguments relate at each recursive call as follows:
(<, ≤, =: relation proved, ? all proofs failed, _: no proof attempted)
x y
1) 3:12-19 ? ?
Please use `termination_by` to specify a decreasing measure.