Open mars0i opened 2 months ago
Thanks!
My report is incorrect. It's an embarrassing rookie mistake. I interpreted the code in FPIL,
def Nat.plusR : Nat -> Nat -> Nat
| n, 0 => n
| n, k + 1 => plusR n k + 1
as
def Nat.plusR : Nat -> Nat -> Nat
| n, 0 => n
| n, k + 1 => plusR n (k + 1)
which doesn't terminate, rather than
def Nat.plusR : Nat -> Nat -> Nat
| n, 0 => n
| n, k + 1 => (plusR n k) + 1
which does. I added the parentheses around k + 1
in my code, and then didn't copy the parentheses into this report. The original FPIL definition, without added parentheses, doesn't generate a termination error in Lean 4.13.0-rc3.
The recursion doesn't reduce the size of either
Nat
and generates a "Failed to show termination" error. I believe the last line should beFull error text: