I'm trying to prove a substitution theorem about Prop, and I'm failing miserably. Can the following theorem be proven in coq, and if not, why not.
Theorem prop_subst:
forall (f : Prop -> Prop) (P Q : Prop),
(P <-> Q) -> ((f P) <-> (f Q)).
The point is that the proof, in logic, would be by induction. Prop isn't defined inductively, as far as I can see. How would such a theorem be proven in Coq?
Here's the answer: The property I was looking for is called propositional extensionality, and means that
forall p q : Prop, (p <-> q) -> (p = q)
. The converse, is trivial. This is something that is defined inLibrary Coq.Logic.ClassicalFacts
, together with other facts from classical, i.e., non-intuitionistic logic. The above definition is calledprop_extensionality
, and can be used as follows:Axiom EquivThenEqual: prop_extensionality
. Now you can apply theEquivThenEqual
, use it for rewriting, etc. Thanks to Kristopher Micinski for pointing towards extensionality.This is propositional extentionality.
What you are looking for is called "extensionality:"
http://coq.inria.fr/V8.1/faq.html#htoc41
http://coq.inria.fr/stdlib/Coq.Logic.FunctionalExtensionality.html
http://en.wikipedia.org/wiki/Extensionality
EDIT:
You can admit predicate extensionality, as noted in the Coq FAQ.