| 1 |
(* An example showing that prop-extensionality is incompatible with |
| 2 |
powerful extensions of the guard condition. |
| 3 |
This is a variation on the example in subterm2, exploiting |
| 4 |
missing typing constraints in the commutative cut subterm rule |
| 5 |
(subterm2 is using the same flaw but for the match rule). |
| 6 |
|
| 7 |
Example due to Cristóbal Camarero on Coq-Club. |
| 8 |
*) |
| 9 |
|
| 10 |
Axiom prop_ext: forall P Q, (P <-> Q) -> P=Q. |
| 11 |
|
| 12 |
Inductive True2 : Prop := I3 : (False -> True2) -> True2. |
| 13 |
|
| 14 |
Theorem T3T: True2 = True. |
| 15 |
Proof. |
| 16 |
apply prop_ext; split; auto. |
| 17 |
intros; constructor; apply False_rect. |
| 18 |
Qed. |
| 19 |
|
| 20 |
Theorem T3F_FT3F : (True2 -> False) = ((False -> True2) -> False). |
| 21 |
Proof. |
| 22 |
rewrite T3T. |
| 23 |
apply prop_ext; split; auto. |
| 24 |
Qed. |
| 25 |
|
| 26 |
Fail Fixpoint loop (x : True2) : False := |
| 27 |
match x with |
| 28 |
I3 f => (match T3F_FT3F in _=T return T with eq_refl=> loop end) f |
| 29 |
end. |