| 1 |
Set Universe Polymorphism. |
| 2 |
Set Primitive Projections. |
| 3 |
|
| 4 |
Structure S := { carrier :> Type; val : carrier }. |
| 5 |
|
| 6 |
Canonical Structure default@{i j} : S@{j} := {| carrier := Type@{i}; val := nat |}. |
| 7 |
|
| 8 |
Definition test (s : S) : carrier s := val s. |
| 9 |
|
| 10 |
(** We want to force a CS resolution for default, so a problem carrier ?S = Type *) |
| 11 |
|
| 12 |
Axiom fn : forall x : Type, True. |
| 13 |
|
| 14 |
Lemma foo@{i} : True. |
| 15 |
apply fn. apply (test@{i} _). |
| 16 |
Qed. |
| 17 |
|
| 18 |
Lemma foo'@{i} : True. |
| 19 |
apply fn. refine (test@{i} _). |
| 20 |
Qed. |