2014-10-31 20:15:21 +00:00
|
|
|
|
import logic
|
|
|
|
|
|
|
|
|
|
inductive Three :=
|
|
|
|
|
zero : Three,
|
|
|
|
|
one : Three,
|
|
|
|
|
two : Three
|
|
|
|
|
|
|
|
|
|
namespace Three
|
|
|
|
|
|
|
|
|
|
theorem disj (a : Three) : a = zero ∨ a = one ∨ a = two :=
|
2015-02-11 20:49:27 +00:00
|
|
|
|
Three.rec (or.inl rfl) (or.inr (or.inl rfl)) (or.inr (or.inr rfl)) a
|
2014-10-31 20:15:21 +00:00
|
|
|
|
|
2014-11-01 23:12:23 +00:00
|
|
|
|
example (a : Three) : a ≠ zero → a ≠ one → a = two :=
|
2015-02-11 20:49:27 +00:00
|
|
|
|
Three.rec (λ h₁ h₂, absurd rfl h₁) (λ h₁ h₂, absurd rfl h₂) (λ h₁ h₂, rfl) a
|
2014-10-31 20:15:21 +00:00
|
|
|
|
|
|
|
|
|
end Three
|