coq: elimination of forall quantifier

浪尽此生 提交于 2019-12-10 15:54:02

问题


I want to prove the following theorem:

Theorem Frobenius (A: Set) (q: Prop) (p: A -> Prop) :
  (q \/ forall x : A, p x) -> (forall x : A, q \/ p x).

I already got the following piece of the proof:

Proof.
intro.
intro.
destruct H.
left.
assumption.

But now I am in a situation I don't know what to do. The following things are at my disposal:

A : Set
q : Prop
p : A -> Prop
H : forall x : A, p x
x : A

And I would like to prove the following subgoal:

q \/ p x

How can I eliminate the forall quantifier in the given premise

forall x : A, p x

that is: How can I plug in my concrete x : A so that I can deduce: p x ?


回答1:


You can instantiate the universally quantified x in H with specialize (specialize (H x)).




回答2:


Probably the simplest?

Theorem Frobenius (A: Set) (q: Prop) (p: A -> Prop) :
  (q \/ forall x : A, p x) -> (forall x : A, q \/ p x).
intro H.

elim H.
intros Hl x.
left.
exact Hl.

intros Hr x.
right.
apply Hr.


来源:https://stackoverflow.com/questions/35994491/coq-elimination-of-forall-quantifier

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!