Debian Codegraph @

test-suite/success/private_univs.v

raw
1 Set Universe Polymorphism. Set Printing Universes.
2
3 Definition internal_defined@{i j | i < j +} (A : Type@{i}) : Type@{j}.
4 pose(foo:=Type). (* 1 universe for the let body + 1 for the type *)
5 exact A.
6 Fail Defined.
7 Abort.
8
9 Definition internal_defined@{i j +} (A : Type@{i}) : Type@{j}.
10 pose(foo:=Type).
11 exact A.
12 Defined.
13 Check internal_defined@{_ _ _ _}.
14
15 Module M.
16 Lemma internal_qed@{i j|i<=j} (A:Type@{i}) : Type@{j}.
17 Proof.
18 pose (foo := Type).
19 exact A.
20 Qed.
21 Check internal_qed@{_ _}.
22 End M.
23 Include M.
24 (* be careful to remove const_private_univs in Include! will be coqchk'd *)
25
26 Unset Strict Universe Declaration.
27 Lemma private_transitivity@{i j} (A:Type@{i}) : Type@{j}.
28 Proof.
29 pose (bar := Type : Type@{j}).
30 pose (foo := Type@{i} : bar).
31 exact bar.
32 Qed.
33
34 Definition private_transitivity'@{i j|i < j} := private_transitivity@{i j}.
35 Fail Definition dummy@{i j|j <= i +} := private_transitivity@{i j}.
36
37 Unset Private Polymorphic Universes.
38 Lemma internal_noprivate_qed@{i j|i<=j} (A:Type@{i}) : Type@{j}.
39 Proof.
40 pose (foo := Type).
41 exact A.
42 Fail Qed.
43 Abort.
44
45 Lemma internal_noprivate_qed@{i j +} (A:Type@{i}) : Type@{j}.
46 Proof.
47 pose (foo := Type).
48 exact A.
49 Qed.
50 Check internal_noprivate_qed@{_ _ _ _}.