juvix
juvix copied to clipboard
Juvix should understand Suc (suc n) is structurally larger than suc n.
Describe the bug Juvix should understand Suc (suc n) is structurally larger than suc n. To Reproduce As it does not, the folllowing fibonacci implementation fails the termination checker
module betterfib;
open import Stdlib.Prelude;
fib : ℕ -> ℕ;
fib zero := zero;
fib (suc (zero)) := 1;
fib (suc (suc n)) := fib (suc n) + fib n;
main : IO;
main := putStrLn( natToStr (fib 25));
end;
Expected behavior Compiliation succeeds