lean-ja / lean-by-example

コード例で学ぶ Lean 言語
https://lean-ja.github.io/lean-by-example/
MIT License
15 stars 5 forks source link

notation の priority のことを紹介する #334

Open Seasawher opened 2 weeks ago

Seasawher commented 2 weeks ago

ただし,Lean by Example でいま紹介している例は priority を指定してもなぜかエラーになる

-- 排他的論理和の記号を定義
infix:60 (priority := high) " ⊕ " => xor

#check_failure true ⊕ true = false
Seasawher commented 2 weeks ago

良い感じのコード例を Zulip で見つけた

see: https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Is.20there.20a.20way.20to.20remove.20an.20instance.3F/near/436930026