2014-12-02 03:08:56 +00:00
|
|
|
import data.vector
|
|
|
|
open nat
|
|
|
|
|
|
|
|
namespace vector
|
|
|
|
variables {A : Type} {n : nat}
|
|
|
|
|
|
|
|
protected definition destruct2 (v : vector A (succ (succ n))) {P : Π {n : nat}, vector A (succ n) → Type}
|
|
|
|
(H : Π {n : nat} (h : A) (t : vector A n), P (h :: t)) : P v :=
|
|
|
|
begin
|
2015-01-08 20:11:52 +00:00
|
|
|
cases v with (n', h', t'),
|
2014-12-02 03:08:56 +00:00
|
|
|
apply (H h' t')
|
|
|
|
end
|
|
|
|
end vector
|