Coq:如何证明存在元素的列表的存在?

时间:2015-05-28 13:20:41

标签: coq

说我有公理说明元素的可用性:

Axiom FLP_Lemma3_p1: forall cfg, bivalent cfg -> exists msg, bivalent (run cfg [msg]).

如何证明相同的属性适用于无限大的列表?

Theorem FLP_Lemma3: forall cfg, bivalent cfg -> forall m, exists s, length s > m -> bivalent (run cfg s).

msgnatslist的nat。

1 个答案:

答案 0 :(得分:2)

这是一个证据:

Theorem FLP_Lemma3: forall cfg, bivalent cfg -> forall m, exists s, length s > m -> bivalent (run cfg s).
Proof.
  intros. destruct (FLP_Lemma3_p1 cfg H) as [msg B].
  exists [msg]. intros. apply B.
Qed.

这个想法是用你的引理来获得见证,但由于引理提供了{msg | bivalent (run cfg [msg])},你需要把它分成两部分。您可以使用destruct立即执行此操作,或先使用pose proof (FLP_Lemma3_p1 cfg H) as L.介绍见证人,然后销毁L

现在另一个注意事项,你试图证明的这个引理似乎有点无用。

您打算证明:

Theorem FLP_Lemma3: forall cfg, bivalent cfg -> forall m, exists s, length s > m /\ bivalent (run cfg s).

因为这会更有趣,但鉴于你的公理,它是不可证明的,因为你对msg的长度一无所知。