File: bug_5481.v

package info (click to toggle)
coq-doc 8.20.0-2
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 46,708 kB
  • sloc: ml: 234,429; sh: 4,686; python: 3,359; ansic: 2,644; makefile: 842; lisp: 172; javascript: 87; xml: 24; sed: 2
file content (46 lines) | stat: -rw-r--r-- 824 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
(* Bug #5481 *)

Set Universe Polymorphism.

Parameter P : Type -> Type -> Prop.
Parameter A : Type.
Lemma foo (B : Type) (H : P A B) : P A B.
Proof.
  congruence.
Qed.

(* An example with types hidden behind "match" *)

Parameter b : unit.
Lemma foo2 (B : Type) (H : (let () := b in P) A B) : (let () := b in P) A B.
Proof.
  congruence.
Qed.

(* Bug #9979, with f_equal *)

Record Map(K V: Type) := {
  rep: Type;
  put: rep -> K -> V -> rep;
}.

Section Test.
  Universes u1 u2 u3 u4 u5 u6.

  Goal forall K V (M: Map K V) (k: K) (v: V) (m: rep K V M),
      put@{u1 u2 u3} K V M m k v = put@{u4 u5 u6} K V M m k v.
  Proof.
    intros.
    f_equal.
  Qed.

End Test.

(* An example with unification of monomorphic universe levels *)

Unset Universe Polymorphism.

Lemma foo3 (B : Type) : Type.
Proof.
  congruence.
Qed.