| 1 |
(* Bug #5481 *) |
| 2 |
|
| 3 |
Set Universe Polymorphism. |
| 4 |
|
| 5 |
Parameter P : Type -> Type -> Prop. |
| 6 |
Parameter A : Type. |
| 7 |
Lemma foo (B : Type) (H : P A B) : P A B. |
| 8 |
Proof. |
| 9 |
congruence. |
| 10 |
Qed. |
| 11 |
|
| 12 |
(* An example with types hidden behind "match" *) |
| 13 |
|
| 14 |
Parameter b : unit. |
| 15 |
Lemma foo2 (B : Type) (H : (let () := b in P) A B) : (let () := b in P) A B. |
| 16 |
Proof. |
| 17 |
congruence. |
| 18 |
Qed. |
| 19 |
|
| 20 |
(* Bug #9979, with f_equal *) |
| 21 |
|
| 22 |
Record Map(K V: Type) := { |
| 23 |
rep: Type; |
| 24 |
put: rep -> K -> V -> rep; |
| 25 |
}. |
| 26 |
|
| 27 |
Section Test. |
| 28 |
Universes u1 u2 u3 u4 u5 u6. |
| 29 |
|
| 30 |
Goal forall K V (M: Map K V) (k: K) (v: V) (m: rep K V M), |
| 31 |
put@{u1 u2 u3} K V M m k v = put@{u4 u5 u6} K V M m k v. |
| 32 |
Proof. |
| 33 |
intros. |
| 34 |
f_equal. |
| 35 |
Qed. |
| 36 |
|
| 37 |
End Test. |
| 38 |
|
| 39 |
(* An example with unification of monomorphic universe levels *) |
| 40 |
|
| 41 |
Unset Universe Polymorphism. |
| 42 |
|
| 43 |
Lemma foo3 (B : Type) : Type. |
| 44 |
Proof. |
| 45 |
congruence. |
| 46 |
Qed. |