lean2/tests/lean/notation_priority.lean
Leonardo de Moura cf574d0127 feat(library): assign priorities to notation declarations in the standard library
Now, even if the user opens the namespaces in the "wrong" order, the
notation + coercions will behave as expected.
2015-06-30 17:38:13 -07:00

26 lines
342 B
Text

import data.real
open real int nat
variables a b : nat
variables i j : int
set_option pp.all true
check a + b
check i + j
example : a + b = nat.add a b :=
rfl
example : i + j = int.add i j :=
rfl
open nat real int
example : a + b = nat.add a b :=
rfl
example : i + j = int.add i j :=
rfl
set_option pp.all true
check a + b
check i + j