summaryrefslogtreecommitdiff
path: root/test-suite/coqchk/cumulativity.v
blob: 034684054dc9d770d4bc058b6aa5fb95f36e9ecf (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Set Universe Polymorphism.
Set Polymorphic Inductive Cumulativity.
Set Printing Universes.

Inductive List (A: Type) := nil | cons : A -> List A -> List A.

Section ListLift.
  Universe i j.

  Constraint i < j.

  Definition LiftL {A} : List@{i} A -> List@{j} A := fun x => x.

End ListLift.

Lemma LiftL_Lem A (l : List A) : l = LiftL l.
Proof. reflexivity. Qed.

Section ListLower.
  Universe i j.

  Constraint i < j.

  Definition LowerL {A : Type@{i}} : List@{j} A -> List@{i} A := fun x => x.

End ListLower.

Lemma LowerL_Lem@{i j|j<i+} (A : Type@{j}) (l : List@{i} A) : l = LowerL@{j i} l.
Proof. reflexivity. Qed.
(*
I disable these tests because cqochk can't process them when compiled with
   ocaml-4.02.3+32bit and camlp5-4.16 which is the case for Travis!

   I have added this file (including the commented parts below) in
   test-suite/success/cumulativity.v which doesn't run coqchk on them.
*)
(* Inductive Tp := tp : Type -> Tp. *)

(* Section TpLift. *)
(*   Universe i j. *)

(*   Constraint i < j. *)

(*   Definition LiftTp : Tp@{i} -> Tp@{j} := fun x => x. *)

(* End TpLift. *)

(* Lemma LiftC_Lem (t : Tp) : LiftTp t = t. *)
(* Proof. reflexivity. Qed. *)

(* Section TpLower. *)
(*   Universe i j. *)

(*   Constraint i < j. *)

(*   Fail Definition LowerTp : Tp@{j} -> Tp@{i} := fun x => x. *)

(* End TpLower. *)


(* Section subtyping_test. *)
(*   Universe i j. *)
(*   Constraint i < j. *)

(*   Inductive TP2 := tp2 : Type@{i} -> Type@{j} -> TP2. *)

(* End subtyping_test. *)