I am learning the Coq language and trying to prove the following statement:
Lemma ex4: forall (X : Set) (P : X -> Prop), ~(forall x, ~ (P x)) -> (exists x, (P x)).
In the beginning of my proof:
Proof.
intros X P A.
I arrive at the point where I have the assumptions
X : Set
P : X -> Prop
A : ~ (forall x : X, ~ P x)
I now want to apply de morgan law on A
to get an assumption
B : exists x : X, ~ (~ P x) (*** Or something similar ***)
but I can't find a way to correctly use the library function. The following line
apply (not_all_ex_not P).
throws an error:
In environment
X : Set
P : X -> Prop
A : ~ (forall x : X, ~ P x)
The term "P" has type "X -> Prop" while it is expected to have type "Type".
I import the not_all_ex_not
from using the command Require Import Coq.Logic.Classical.
What am I doing wrong?