I am trying to prove contraposition. And my proof is like the following. It doesn't work.
Theorem contrapositive : forall (P Q : Prop),
(P -> Q) -> (~Q -> ~P).
Proof.
intros.
destruct H0.
apply H.
Fail exact P. Abort.
My question is, after apply H, I get the following goal
1 goal
P, Q : Prop
H : P -> Q
______________________________________(1/1)
P
So, IMO, we have to prove P, and we have a P in our hypothesis. So why can't we just use exact P?
To have
P : Propin your assumptions is not the same as having ap : Pin your assumptions.If the goal is to prove
P,exact xmust be used withxas a term of typeP, i.e, a proof ofP.Pis not a proof ofP.P : Propmeans "letPbe an arbitrary proposition". It could be true, it could be false.p : Pmeans "letpbe a proof ofP". That's what means thatPis true.