| 1 |
Set Universe Polymorphism. |
| 2 |
|
| 3 |
Inductive sum@{sl sr s;ul ur|} (A : Type@{sl;ul}) (B : Type@{sr;ur}) : Type@{s;max(ul,ur)} := |
| 4 |
| inl : A -> sum A B |
| 5 |
| inr : B -> sum A B. |
| 6 |
Arguments inl {_} {_} _. |
| 7 |
Arguments inr {_} {_} _. |
| 8 |
|
| 9 |
Inductive sig@{s s' s'';u v|} (A : Type@{s;u}) (P : A -> Type@{s';v}) : Type@{s'';max(u,v)} := |
| 10 |
| existsS : forall x, P x -> sig A P. |
| 11 |
Arguments existsS {_} {_} _ _. |
| 12 |
|
| 13 |
Set Printing Universes. |
| 14 |
|
| 15 |
Lemma testElim@{s s';u v|s -> s'} : |
| 16 |
forall (A B : Prop) (P : sum@{Prop Prop s;0 0} A B -> Type@{s';0}) |
| 17 |
(Q : sum@{Prop Prop s';0 0} A B -> Type@{s';0}) (x : sum@{Prop Prop s;0 0} A B), |
| 18 |
P x -> sig (sum@{Prop Prop s';0 0} A B) Q. |
| 19 |
Proof. |
| 20 |
intros ????? HP. |
| 21 |
refine (existsS (match x return sum@{Prop Prop s';0 0} A B with |
| 22 |
| inl x => inl x |
| 23 |
| inr y => inr y |
| 24 |
end) _). |
| 25 |
|
| 26 |
destruct x. Abort. |