| 1 |
Require Import Setoid. |
| 2 |
Require Import Corelib.Classes.CRelationClasses. |
| 3 |
Require Import Corelib.Classes.CMorphisms. |
| 4 |
|
| 5 |
Parameter B C : Type. |
| 6 |
Parameter P : Type -> Type -> Type. |
| 7 |
|
| 8 |
(* This is used for rewrites for lem_P and lem_P_iffT. *) |
| 9 |
#[export] Instance P_Proper : Proper (iffT ==> iffT ==> iffT) (P). |
| 10 |
Admitted. |
| 11 |
|
| 12 |
Lemma lem_P : forall A, iffT A B -> P A C -> P B C. |
| 13 |
Proof. |
| 14 |
intros A H1 H2. |
| 15 |
rewrite H1 in H2. (* Comment out iffT_P_Proper to see this fail. *) |
| 16 |
Abort. |
| 17 |
|
| 18 |
Lemma lem_P_iffT : forall A, iffT A B -> P A C -> iffT B C. |
| 19 |
Proof. |
| 20 |
intros A H1 H2. |
| 21 |
setoid_rewrite H1 in H2. (* Comment out iffT_P_Proper to see this fail. *) |
| 22 |
Abort. |
| 23 |
|
| 24 |
(* Trying to do the same with iffT instead of P. *) |
| 25 |
#[export] Instance iffT_Proper : Proper (iffT ==> iffT ==> iffT) iffT. |
| 26 |
Admitted. |
| 27 |
|
| 28 |
(* Just in case? *) |
| 29 |
#[export] Instance arrow_Proper : Proper (iffT ==> iffT ==> iffT ) (arrow). |
| 30 |
Admitted. |
| 31 |
|
| 32 |
Lemma lem_iffT_P : forall A, iffT A B -> iffT A C -> P B C. |
| 33 |
Proof. |
| 34 |
intros A H1 H2. |
| 35 |
rewrite H1 in H2. |
| 36 |
Abort. |
| 37 |
|
| 38 |
Lemma lem_iffT : forall A, iffT A B -> iffT A C -> iffT B C. |
| 39 |
Proof. |
| 40 |
intros A H1 H2. |
| 41 |
setoid_rewrite H1 in H2. |
| 42 |
Abort. |