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 :)
Asked
Active
Viewed 3,337 times
7
-
Are you looking for ∧ (U+2227: LOGICAL AND) and ∀ (U+2200: FOR ALL)? – Andreas Rejbrand Jun 03 '10 at 20:38
5 Answers
2
Assume ForAll x: P(x) /\ Q(x)
var x;
P(x) //because you assumed it earlier
ForAll x: P(x)
(ForAll x: P(x) /\ Q(x)) => (ForAll x: P(x))
Intuitivly, if for all x, P(x) AND Q(x) hold, then for all x, P(x) holds.

Henri
- 5,065
- 23
- 24
2
Actually, I figured this one out when I found this:
Mathematics for Computer Scientists 2
In lesson 5 he solves the exact same problem and uses "cut (P x /\ Q x)" which re-writes the goal from "P x" to "P x /\ Q x -> P x". From there you can do some manipulations and when the goal is just "P x /\ Q x" you can apply "forall x : P x /\ Q x" and the rest is straightforward.

Farley Knight
- 1,795
- 1
- 13
- 17
-1
here is the answer:
Lemma fa_dist_and (A : Set) (P : A -> Prop) (Q: A -> Prop):
(forall x, P x) /\ (forall x, Q x) <-> (forall x : A, P x /\ Q x).
Proof.
split.
intro H.
(destruct H).
intro H1.
split.
(apply H).
(apply H0).
intro H.
split.
intro H1.
(apply H).
intro H1.
(apply H).
Qed.
you can find other solved exercises in this file: https://cse.buffalo.edu/~knepley/classes/cse191/ClassNotes.pdf

Andry
- 2,273
- 29
- 28
-
Hi, welcome to SO! All your contributions to this site are welcome, but please avoid answering an old post that has already a correct answer, especially as you do not answer the original question. – eponier Oct 30 '19 at 12:41