| 1 |
Require Import TestSuite.relationclasses. |
| 2 |
|
| 3 |
Definition eqT (T : Type) := @eq T. |
| 4 |
|
| 5 |
Set Universe Polymorphism. |
| 6 |
|
| 7 |
Definition RowType := list Type. |
| 8 |
|
| 9 |
|
| 10 |
Inductive Row : RowType -> Type := |
| 11 |
| RNil : Row nil |
| 12 |
| RCons : forall T Ts, T -> Row Ts -> Row (cons T Ts). |
| 13 |
|
| 14 |
Inductive RowTypeDecidable (P : forall T, relation T) `(H : forall T, Equivalence (P T)) |
| 15 |
: RowType -> Type := |
| 16 |
| RTDecNil : RowTypeDecidable P H nil |
| 17 |
| RTDecCons : forall T Ts, (forall t0 t1 : T, |
| 18 |
{P T t0 t1} + {~P T t0 t1}) |
| 19 |
-> RowTypeDecidable P H Ts |
| 20 |
-> RowTypeDecidable P H (cons T Ts). |
| 21 |
|
| 22 |
|
| 23 |
Set Printing Universes. |
| 24 |
|
| 25 |
Fixpoint Row_eq (Ts : RowType) |
| 26 |
: RowTypeDecidable (@eqT) _ Ts -> forall r1 r2 : Row Ts, {@eq (Row Ts) r1 r2} + {r1 <> r2}. |
| 27 |
(* Toplevel input, characters 81-87: |
| 28 |
Error: |
| 29 |
In environment |
| 30 |
Ts : RowType (* Top.53 Stdlib.Init.Logic.8 *) |
| 31 |
r1 : Row (* Top.54 Top.55 *) Ts |
| 32 |
r2 : Row (* Top.56 Top.57 *) Ts |
| 33 |
The term "Row (* Stdlib.Init.Logic.8 Top.59 *) Ts" has type |
| 34 |
"Type (* max(Top.58+1, Top.59) *)" while it is expected to have type |
| 35 |
"Type (* Stdlib.Init.Logic.8 *)" (Universe inconsistency). *) |
| 36 |
Abort. |