File: bug_19411.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (33 lines) | stat: -rw-r--r-- 860 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
Set Universe Polymorphism.

Inductive unit' := tt'.

Inductive eq {A : Type} (x : A) : A -> Prop :=
  eq_refl : eq x x.

Register eq as core.eq.type.
Register eq_refl as core.eq.refl.

Lemma posttest : True.
Proof.
  destruct tt eqn:V.
  Check V : eq tt tt. (* check that we did use the non stdlib eq *)

  destruct tt' eqn:V'.
  exact I.
Qed.
(*
In environment
u := tt : unit
The term "eq_refl u" has type "eq u u" while it is expected to have type "eq tt u".

if we remove the first destruct:
Error: Illegal application:
The term "@eq_refl@{foo.18}" of type "forall (A : Type@{foo.18}) (x : A), @eq@{foo.18} A x x"
cannot be applied to the terms
 "unit'@{foo.16}" : "Type@{foo.16}"
 "u" : "unit'@{foo.16}"
The 1st term has type "Type@{foo.16}" which should be a subtype of "Type@{foo.18}".

(the difference is because unit : Set but unit'@{u} : Type@{u})
*)