| 1 |
Module A. |
| 2 |
Set Printing All. |
| 3 |
Set Printing Universes. |
| 4 |
|
| 5 |
Module M. |
| 6 |
Section foo. |
| 7 |
Universe i. |
| 8 |
End foo. |
| 9 |
End M. |
| 10 |
|
| 11 |
Check Type@{M.i}. |
| 12 |
(* Succeeds *) |
| 13 |
|
| 14 |
Fail Check Type@{j}. |
| 15 |
(* Error: Undeclared universe: j *) |
| 16 |
|
| 17 |
Definition foo@{j} : Type@{M.i} := Type@{j}. |
| 18 |
(* ok *) |
| 19 |
End A. |
| 20 |
Import A. Import M. |
| 21 |
Set Universe Polymorphism. |
| 22 |
Fail Universes j. |
| 23 |
Monomorphic Universe j. |
| 24 |
Section foo. |
| 25 |
Universes i. |
| 26 |
Constraint i < j. |
| 27 |
Definition foo : Type@{j} := Type@{i}. |
| 28 |
Definition foo' : Type@{j} := Type@{i}. |
| 29 |
End foo. |
| 30 |
|
| 31 |
Check eq_refl : foo@{i} = foo'@{i}. |
| 32 |
|
| 33 |
Definition bar := foo. |
| 34 |
Monomorphic Definition bar'@{k} := foo@{k}. |
| 35 |
|
| 36 |
Fail Constraint j = j. |
| 37 |
Monomorphic Constraint i = i. |