lean2/tests/lean/tst11.lean
Leonardo de Moura c56df132b8 refactor(kernel): remove semantic attachments from the kernel
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-02 14:48:27 -08:00

13 lines
No EOL
353 B
Text

import tactic
definition xor (x y : Bool) : Bool := (not x) = y
infixr 50 ⊕ : xor
print xor true false
variable a : Bool
print a ⊕ a ⊕ a
check @subst
theorem EM2 (a : Bool) : a \/ (not a) :=
case (fun x : Bool, x \/ (not x)) (by simp) (by simp) a
check EM2
check EM2 a
theorem xor_neq (a b : Bool) : (a ⊕ b) ↔ ((¬ a) = b)
:= refl (a ⊕ b)