我在Coq中有以下定理:Theorem T : exists x:A, P x.
我希望能够在后续证明中使用此值。 I.E.我想说的是:“让o
代表一个P o
的值。我知道o
存在于定理T
......”
我该怎么做? 提前谢谢!
答案 0 :(得分:4)
从数学上讲,您需要为∃构造函数应用消除规则。通用淘汰策略elim
有效。
elim T; intro o.
愚蠢的例子:
Parameter A : Prop.
Parameter P : A -> Prop.
Axiom T : exists x:A, P x.
Parameter G : Prop.
Axiom U : forall x:A, P x -> G.
Goal G.
Proof.
elim T; intro o.
apply U.
Qed.