2014-12-22 09:40:15 -08:00
|
|
|
open nat
|
|
|
|
open eq.ops
|
|
|
|
|
|
|
|
inductive even : nat → Type :=
|
2015-02-25 17:00:10 -08:00
|
|
|
| even_zero : even zero
|
|
|
|
| even_succ_of_odd : ∀ {a}, odd a → even (succ a)
|
2014-12-22 09:40:15 -08:00
|
|
|
with odd : nat → Type :=
|
2015-02-25 17:00:10 -08:00
|
|
|
| odd_succ_of_even : ∀ {a}, even a → odd (succ a)
|
2014-12-22 09:40:15 -08:00
|
|
|
|
|
|
|
example : even 1 → empty :=
|
|
|
|
begin
|
|
|
|
intro He1,
|
2015-03-27 17:26:06 -07:00
|
|
|
cases He1 with [a, Ho0],
|
2014-12-22 09:40:15 -08:00
|
|
|
cases Ho0
|
|
|
|
end
|
|
|
|
|
|
|
|
example : even 3 → empty :=
|
|
|
|
begin
|
|
|
|
intro He3,
|
2015-03-27 17:26:06 -07:00
|
|
|
cases He3 with [a, Ho2],
|
|
|
|
cases Ho2 with [a, He1],
|
|
|
|
cases He1 with [a, Ho0],
|
2014-12-22 09:40:15 -08:00
|
|
|
cases Ho0
|
|
|
|
end
|