lean2/tests/lean/bad_coercions.lean
Leonardo de Moura 4f2e0c6d7f refactor(frontends/lean): add 'attribute' command
The new command provides a uniform way to set declaration attributes.
It replaces the commands: class, instance, coercion, multiple_instances,
reducible, irreducible
2015-01-24 20:23:21 -08:00

19 lines
370 B
Text

open nat
constant list.{l} : Type.{l} → Type.{l}
constant vector.{l} : Type.{l} → nat → Type.{l}
constant nil (A : Type) : list A
set_option pp.coercions true
context
parameter A : Type
parameter n : nat
definition foo2 [coercion] (v : vector A n) : list A :=
nil A
definition foo (v : vector A n) : list A :=
nil A
attribute foo [coercion]
end