Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prove (forall x, P x /\ Q x) -> (forall x, P x)

Tags:

proof

coq

How does one prove (forall x, P x /\ Q x) -> (forall x, P x) in Coq? Been trying for hours and can't figure out how to break down the antecedent to something that Coq can digest. (I'm a newb, obviously :)

like image 441
Farley Knight Avatar asked May 07 '09 14:05

Farley Knight


1 Answers

You can do it more quickly by just applying H, but this script should be more clear.

Lemma foo : forall (A:Type) (P Q: A-> Prop), (forall x, P x /\ Q x) -> (forall x, P x).
intros.
destruct (H x). 
exact H0.
Qed.
like image 134
Vinz Avatar answered Oct 18 '22 22:10

Vinz