1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "arithmetics/nat.ma".
17 (*FEATURE: kind signatures in type declarations*)
25 axiom test2: Type[1] → Type[1].
27 axiom test3: Prop → Type[1] → CProp[1] → Type[1] → Type[2].
29 (* not in F_omega ? *)
30 axiom test4: ∀A:Type[1]. A → ∀B:Type[1]. B → ∀C:Prop. C → Type[1].
32 axiom test4': ∀C:Prop. C → C.
34 axiom test4'': ∀C:Prop. C → Nat.
36 axiom test4''': ∀C:Type[1]. C.
38 axiom test4_5: (∀A:Type[0].A) → Nat.
40 axiom test5: (Type[1] → Type[1]) → Type[1].
43 axiom test6: Type[1] → Prop.
45 definition dtest1: Type[1] ≝ Nat → Nat.
47 definition dtest2: Type[2] ≝ ∀A:Type[1]. A → A.
49 definition dtest3: Type[1] → Type[1] ≝ λA:Type[1]. A → A.
51 definition dtest4: Type[1] → Type[1] ≝ λA:Type[1].dtest3 A.
53 definition dtest5: Type[1] → Type[1] ≝ dtest3.
55 definition dtest6: Type[1] ≝ dtest3 Nat.
58 definition dtest7: Prop ≝ True → True.
61 definition dtest8: Type[1] ≝ dtest3 True.
64 definition dtest9: Type[1] ≝ dtest3 Prop.
66 definition dtest10: Type[1] → Type[1] → Type[1] ≝ λX,Y.X.
68 definition dtest11: Type[1] → Nat → Type[1] → Type[1] ≝ λ_:Type[1].λ_:Nat.λX:Type[1]. X → Nat → test1.
71 definition dtest12 ≝ λ_:Type[1].λ_:Nat.λX:Type[1]. X → Nat → test1.
73 definition dtest13 ≝ dtest3 Nat → dtest3 True → dtest3 Prop → Nat.
75 definition dtest14 ≝ λX:Type[2]. X → X.
77 (*FEATURE: type the forall bound variables*)
78 definition dtest15 ≝ ∀T:Type[1] → Type[1]. T Nat → T Nat.
80 definition dtest16 ≝ ∀T:Type[1]. T → Nat.
82 definition dtest17 ≝ ∀T:dtest14 Type[1]. T Nat → dtest14 Nat → dtest14 Nat.
84 definition dtest18 ≝ λA,B:Type[0].λn:Nat.λC:Type[0].A.
86 definition dtest19 ≝ dtest18 Nat True O Nat → dtest18 Nat Nat O Nat.
88 definition dtest20 ≝ test5 test2.
90 (*BUG: lambda-lift the inner declaration;
91 to be traced, raises NotInFOmega; why? *)
92 definition dtest21 ≝ test5 (λX:Type[1].X).
94 definition ttest1 ≝ λx:Nat.x.
96 (*BUG: clash of name due to capitalisation*)
97 (*definition Ttest1 ≝ λx:Nat.x.*)
99 (*FEATURE: print binders in the l.h.s. without using lambda abstraction*)
100 definition ttest2 ≝ λT:Type[1].λx:T.x.
102 definition ttest3 ≝ λT:Type[1].λx:T.let y ≝ x in y.
104 definition ttest4 ≝ λT:Type[1].let y ≝ T in λx:y.x.
106 (*BUG IN HASKELL PRETTY PRINTING: all lets are let rec*)
107 (*definition ttest5 ≝ λT:Type[1].λy:T.let y ≝ y in y.*)
109 definition ttest6 ≝ ttest4 Nat.
111 definition ttest7 ≝ λf:∀X:Type[1].X. f (Nat → Nat) O.
113 definition ttest8 ≝ λf:∀X:Type[1].X. f (True → True) I.
115 definition ttest9 ≝ λf:∀X:Type[1].X. f (True → Nat) I.
117 definition ttest10 ≝ λf:∀X:Type[1].X. f (True → Nat → Nat) I O.
119 definition ttest11_aux ≝ λS:Type[1]. S → Nat.
121 definition ttest11 ≝ λf:ttest11_aux True. f I.
123 definition ttest12 ≝ λf:True → Nat. f I.
125 (*GENERAL BUG: name clashes when binders shadow each other in CIC*)
127 (*BUG: mutual type definitions not handled correctly: the ref is computed in a
130 (*BUG: multiple let-reced things are given the same (wrong) name*)
132 (*BUG: for OCaml: cofixpoint not distinguished from fixpoints*)
134 let rec rtest1 (n:nat) : nat ≝
139 let rec f (n:nat) : nat ≝
143 and g (n:nat) : nat ≝
148 (*BUG: pattern matching patterns when arguments have been deleted from
149 the constructor are wrong *)
151 (*BUG: constructor names in pattern should be capitalised correctly;
152 name clashes must be avoided*)
154 coinductive stream: Type[0] ≝ scons : nat → stream → stream.
156 let corec div (n:nat) : stream ≝ scons n (div (S n)).
159 let rec mkterm (n:nat) : nat ≝
163 and mktyp (n:nat) : Type[0] ≝