2015-08-12 22:05:14 +00:00
|
|
|
import data.examples.vector
|
2015-06-18 01:37:53 +00:00
|
|
|
open nat prod.ops
|
|
|
|
|
|
|
|
example (n : nat) (v₁ : vector nat n) (v₂ : vector nat 0) (h₁ : (v₂, n).2 = 0) (h₂ : n = 0) (h₃ : eq.rec_on h₁ v₁ = v₂) : v₂ = eq.rec_on h₂ v₁ :=
|
|
|
|
begin
|
|
|
|
esimp at h₁,
|
|
|
|
esimp at h₃,
|
|
|
|
subst h₃
|
|
|
|
end
|
|
|
|
|
|
|
|
example (n : nat) (v₁ : vector nat n) (v₂ : vector nat 0) (h₁ : (v₂, n).2 = 0) (h₂ : n = 0) (h₃ : eq.rec_on h₁ v₁ = v₂) : v₂ = eq.rec_on h₂ v₁ :=
|
|
|
|
begin
|
|
|
|
esimp at *,
|
|
|
|
subst h₃
|
|
|
|
end
|