lean4-htt/tests/lean/run/scopedParsers2.lean
Kim Morrison dcff54edb5
chore: notation ^^ for Bool.xor (#5332)
Not sure why this had been missing. Precedence is slightly higher than
`||`, matching the precedence order we have for bitwise operators.
2024-09-18 08:59:11 +00:00

30 lines
366 B
Text

namespace Foo
def x := 10
end Foo
#check Foo.x
open Foo
#check x
theorem ex1 : x = Foo.x := rfl
namespace Foo
def f x y := x + y + 1
scoped infix:70 "~~" => f
#check 1 ~~ 2
theorem ex1 : x ~~ y = f x y := rfl
end Foo
#check 1 ~~ 2 -- works because we have an `open Foo` above
theorem ex2 : x ~~ y = f x y := rfl
theorem ex3 : x ~~ y = Foo.f x y := rfl