| 1 |
Require RelationClasses. |
| 2 |
Require TestSuite.relationclasses. |
| 3 |
|
| 4 |
Class PreOrder (A : Type) (r : A -> A -> Type) : Type := |
| 5 |
{ refl : forall x, r x x }. |
| 6 |
|
| 7 |
(* FAILURE 1 *) |
| 8 |
|
| 9 |
#[universes(polymorphic)] |
| 10 |
Section foo. |
| 11 |
Polymorphic Universes A. |
| 12 |
Polymorphic Context {A : Type@{A}} {rA : A -> A -> Prop} {PO : PreOrder A rA}. |
| 13 |
|
| 14 |
Fail Monomorphic Definition foo := PO. |
| 15 |
End foo. |
| 16 |
|
| 17 |
|
| 18 |
Module ILogic. |
| 19 |
|
| 20 |
Set Universe Polymorphism. |
| 21 |
|
| 22 |
(* Logical connectives *) |
| 23 |
Class ILogic@{L} (A : Type@{L}) : Type := mkILogic |
| 24 |
{ |
| 25 |
lentails: A -> A -> Prop; |
| 26 |
lentailsPre:: RelationClasses.PreOrder lentails |
| 27 |
}. |
| 28 |
|
| 29 |
|
| 30 |
End ILogic. |
| 31 |
|
| 32 |
Set Printing Universes. |
| 33 |
|
| 34 |
(* There is still a problem if the class is universe polymorphic *) |
| 35 |
#[universes(polymorphic)] |
| 36 |
Section Embed_ILogic_Pre. |
| 37 |
Polymorphic Universes A T. |
| 38 |
Fail Monomorphic Context {A : Type@{A}} {ILA: ILogic.ILogic@{A} A}. |
| 39 |
|
| 40 |
End Embed_ILogic_Pre. |