| 1 |
Set Universe Polymorphism. |
| 2 |
|
| 3 |
Definition le@{i j} : Type@{j} := |
| 4 |
(fun A : Type@{j} => A) |
| 5 |
(unit : Type@{i}). |
| 6 |
Definition eq@{i j} : Type@{j} := let x := le@{i j} in le@{j i}. |
| 7 |
|
| 8 |
Record Inj@{i j} (A : Type@{i}) (B : Type@{j}) : Type@{j} := |
| 9 |
{ inj : A }. |
| 10 |
|
| 11 |
Monomorphic Universe u1. |
| 12 |
Definition ty1 : Type@{u1} := Set. |
| 13 |
Check Inj@{Set u1}. |
| 14 |
(* Would fail with univ inconsistency if the universe was minimized *) |
| 15 |
|
| 16 |
Record Inj'@{i j} (A : Type@{i}) (B : Type@{j}) : Type@{j} := |
| 17 |
{ inj' : A; foo : Type@{j} := eq@{i j} }. |
| 18 |
Fail Check Inj'@{Set u1}. (* Do not drop constraint i = j *) |
| 19 |
Check Inj'@{Set Set}. |