lean2/tests/lean/run/alias2.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

22 lines
349 B
Text

import logic
namespace N1
constant num : Type.{1}
constant foo : num → num → num
end N1
namespace N2
constant val : Type.{1}
constant foo : val → val → val
end N2
open N1
open N2
constants a b : num
constant f : num → val
attribute f [coercion]
definition aux2 := foo a b
check aux2
theorem T3 : aux2 = N1.foo a b
:= eq.refl _