The new test exposes the problem fixed by this commit. In the termination proof we have two `sizeOf xs` terms that are not syntactically identical (only definitional equal) because the instances are different.
9 lines
286 B
Text
9 lines
286 B
Text
inductive Vector (α : Type u) : Nat → Type u
|
||
| nil : Vector α 0
|
||
| cons : α → Vector α n → Vector α (n + 1)
|
||
|
||
def test [Monad m] (xs : Vector α a) : m Unit :=
|
||
match xs with
|
||
| Vector.nil => return ()
|
||
| Vector.cons x xs => test xs
|
||
termination_by test xs => sizeOf xs
|