lean4-htt/tests/lean/reserve_bugs.lean
2017-03-09 18:41:19 -08:00

29 lines
487 B
Text

--
constant f : num → num
constant g : num → num → num
constant h : num → num → num
reserve infixl `+`:65
reserve infixr `&`:70
reserve infixl `-`:65
reserve prefix `-`:100
local infixl `+` := g
local infixl `-` := h
local prefix `-` := f
local infixr `&` := h
set_option pp.notation false
#check -(1:num) + 2
#check 1 & 2 & 3 & 4
#check (1:num) - 2 - 3 - 4
infixr `~~`:60 := h
infixl `!!`:60 := h
#check 1 ~~ 2 ~~ 3 ~~ 4
#check 1 !! 2 !! 3 !! 4
#check 1 ~~ 2 + 3 ~~ 4