the user can now write `termination_by?` to see the termination argument inferred by GuessLex, and turn it into `termination_by …` using the “Try this” widget or a code action. To be done later, maybe: Avoid writing `sizeOf` if it's not necessary.
7 lines
188 B
Text
7 lines
188 B
Text
|
|
def ackermann (n m : Nat) := match n, m with
|
|
| 0, m => m + 1
|
|
| .succ n, 0 => ackermann n 1
|
|
| .succ n, .succ m => ackermann n (ackermann (n + 1) m)
|
|
termination_by?
|
|
--^ codeAction
|