lean4-htt/tests/lean/run/instanceIssues.lean
Leonardo de Moura e455df9c95 fix: use a def-eq aware mapping at toLinearExpr
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.
2022-02-28 13:46:36 -08:00

9 lines
286 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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