the support for mutual structural recursion (new since #4575) is extended so that Lean tries to infer it even without annotations. * The error message when termination checking fails looks quite different now. Maybe a bit better, maybe with more room for improvements. * If there are too many combinations (with an arbitrary cut-off) for a given argument type, it will just give up and ask the user to use `termination_by structural`. * It is now legal to specify `termination_by structural` on not necessarily all functions of a clique; this simply restricts the combinations of arguments that Lean considers. --------- Co-authored-by: Tobias Grosser <tobias@grosser.es>
18 lines
563 B
Text
18 lines
563 B
Text
wf1.lean:1:4-1:5: error: fail to show termination for
|
|
g
|
|
with errors
|
|
failed to infer structural recursion:
|
|
Cannot use parameter x:
|
|
failed to eliminate recursive application
|
|
g (x - 1)
|
|
Cannot use parameter y:
|
|
insufficient number of parameters at recursive application
|
|
g (x - 1)
|
|
|
|
|
|
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 y - x
|
|
1) 3:12-19 ≤ ? ?
|
|
Please use `termination_by` to specify a decreasing measure.
|