75621df52b
closes #504
13 lines
364 B
Text
13 lines
364 B
Text
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
|
|
cases v with [n', h', t'],
|
|
apply (H h' t')
|
|
end
|
|
end vector
|