2
我如何证明以下琐碎引理:平等感性类型
Require Import Vector.
Lemma t0_nil: forall A (x:t A 0), x = nil A.
Proof.
Qed.
FAQ建议decide equality
和discriminate
战术,但我无法找到一个方法来运用他们的任何。作为参考,这里是感应的定义:
Inductive t A : nat -> Type :=
|nil : t A 0
|cons : forall (h:A) (n:nat), t A n -> t A (S n).
皮埃尔Boutillier,从这[勒柯克俱乐部后]采取(一种优雅的解决方案http://coq-club.inria.narkive.com/wrDwvaNY/how-to -prove-all-vectors-of-0-length-are-to-vector-nil#post2): 定义t0_nil A(x:t A 0):x = nil A:= match x with无_ => eq_refl结束.' – 2017-02-18 16:20:08