2014-10-27 20:16:50 +00:00
|
|
|
import logic data.nat.basic
|
|
|
|
open nat
|
|
|
|
|
|
|
|
inductive vector (A : Type) : nat → Type :=
|
2015-02-26 01:00:10 +00:00
|
|
|
| vnil : vector A zero
|
|
|
|
| vcons : Π {n : nat}, A → vector A n → vector A (succ n)
|
2014-10-27 20:16:50 +00:00
|
|
|
|
|
|
|
namespace vector
|
|
|
|
theorem vcons.inj₁ {A : Type} {n : nat} (a₁ a₂ : A) (v₁ v₂ : vector A n) : vcons a₁ v₁ = vcons a₂ v₂ → a₁ = a₂ :=
|
2015-02-11 20:49:27 +00:00
|
|
|
assume h, vector.no_confusion h (λ n h t, h)
|
2014-10-27 20:16:50 +00:00
|
|
|
|
|
|
|
end vector
|