lean2/tests/lean/run/prec_max.lean
Leonardo de Moura 002050fa97 feat(frontends/lean): increase binding power of ! and @
Remark: I did not add the constant "app".
Reason: It would break the standard library in many places.
Moreover, the current "max" is not just the binding power of
application, but also the binding power of identifiers, (, [, ...
It would be weird to call it "app"

closes #388
2015-01-19 18:40:33 -08:00

18 lines
354 B
Text

open nat
reserve postfix ⁻¹:(max + 1)
postfix ⁻¹ := eq.symm
constant foo (a b : nat) : a + b = 0
theorem tst1 (a b : nat) : 0 = a + b :=
!foo⁻¹
constant f {a b : nat} (h1 : 0 = a + b) (h2 : a = b) : a = 0 ∧ b = 0
example (a b : nat) : a = 0 ∧ b = 0 :=
f !foo⁻¹ sorry
example (a b : nat) : a = 0 ∧ b = 0 :=
f !foo⁻¹ sorry⁻¹