X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Flib%2Fextraction.ma;h=66386cb3bd2ebe77ac74d4d3f101920269c45a0f;hb=7c9d99dfb049d726491b71f07ba6a9b088b30166;hp=aa781cfa7469ce8b40226a74e480d01bf8c52b23;hpb=7b90367afd82791ef1017330c1386e034a9ca0e3;p=helm.git diff --git a/matita/matita/lib/extraction.ma b/matita/matita/lib/extraction.ma index aa781cfa7..66386cb3b 100644 --- a/matita/matita/lib/extraction.ma +++ b/matita/matita/lib/extraction.ma @@ -14,8 +14,6 @@ include "basics/pts.ma". -(*FEATURE: kind signatures in type declarations*) - inductive nat : Type[0] ≝ O: nat | S: nat → nat. axiom test1: Type[1]. @@ -73,7 +71,6 @@ definition dtest13 ≝ dtest3 nat → dtest3 True → dtest3 Prop → nat. definition dtest14 ≝ λX:Type[2]. X → X. -(*FEATURE: type the forall bound variables*) definition dtest15 ≝ ∀T:Type[1] → Type[1]. T nat → T nat. definition dtest16 ≝ ∀T:Type[1]. T → nat. @@ -121,12 +118,12 @@ definition ttest11 ≝ λf:ttest11_aux True. f I. definition ttest12 ≝ λf:True → nat. f I. -(*GENERAL BUG: name clashes when binders shadow each other in CIC*) +(*BUG: assertion failure here! difficult case for head application +axiom ttest13_a: ∀T:Type[1]. T → nat. +definition ttest13_b ≝ ttest13_a nat O. +definition ttest13_c ≝ ttest13_a Prop True.*) -(*BUG: mutual type definitions not handled correctly: the ref is computed in a - wrong way *) - -(*BUG: multiple let-reced things are given the same (wrong) name*) +(*GENERAL BUG: name clashes when binders shadow each other in CIC*) (*BUG: for OCaml: cofixpoint not distinguished from fixpoints*) @@ -147,9 +144,6 @@ and g (n:nat) : nat ≝ (*BUG: pattern matching patterns when arguments have been deleted from the constructor are wrong *) -(*BUG: constructor names in pattern should be capitalised correctly; - name clashes must be avoided*) - coinductive stream: Type[0] ≝ scons : nat → stream → stream. let corec div (n:nat) : stream ≝ scons n (div (S n)). @@ -176,14 +170,40 @@ inductive T1 : (Type[0] → Type[0]) → ∀B:Type[0]. nat → Type[0] → Type[ inductive T2 : (Type[0] → Type[0]) → ∀B:Type[0]. B → Type[0] → Type[0] ≝ . (* no content *) -(*BUG: eliminators extracted anyway???*) inductive T3 : (Type[0] → Type[0]) → CProp[2] ≝ . definition erase ≝ λX:Type[0].Type[0]. axiom lt: nat → nat → Prop. -(*BUG: elimination principles not extracted *) inductive myvect (A: Type[0]) (b:nat) : nat → Type[0] ≝ myemptyv : myvect A b O - | mycons: ∀n. lt n b → A → myvect A b n → myvect A b (S n). \ No newline at end of file + | mycons: ∀n. lt n b → A → myvect A b n → myvect A b (S n). + +inductive False: Prop ≝ . + +inductive Empty: Type[0] ≝ . + +inductive bool: Type[0] ≝ true: bool | false:bool. + +inductive eq (A:Type[1]) (a:A) : A → Prop ≝ refl: eq A a a. + +(* requires coercion *) +definition cast_bug1 ≝ + λH:eq Type[0] bool nat. S (match H return λA:Type[0].λ_.A with [ refl ⇒ true ]). + +(* +(*BUG: Here we use eq_rect_Type0 in its poly-kinded form, but we only extracted + the one-kinded form. Require coercions *) +definition cast_bug1' ≝ + λH:eq Type[0] bool nat. S (eq_rect_Type0 Type[0] bool (λA:Type[0].λ_.A) true nat H). +*) + +(* requires coercion in all branches *) +definition cast_bug2 ≝ + match true return λb.match b with [ true ⇒ nat → nat | false ⇒ bool ] with + [ true ⇒ S | false ⇒ false ] + O. + +(*BUG: try singleton elimination with constructor arguments to show bug in + DeBrujin indexes *) \ No newline at end of file