lean2/tests/lean/run/enum.lean
2015-02-11 14:09:25 -08:00

16 lines
402 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import logic
inductive Three :=
zero : Three,
one : Three,
two : Three
namespace Three
theorem disj (a : Three) : a = zero a = one a = two :=
Three.rec (or.inl rfl) (or.inr (or.inl rfl)) (or.inr (or.inr rfl)) a
example (a : Three) : a ≠ zero → a ≠ one → a = two :=
Three.rec (λ h₁ h₂, absurd rfl h₁) (λ h₁ h₂, absurd rfl h₂) (λ h₁ h₂, rfl) a
end Three