]> matita.cs.unibo.it Git - helm.git/commitdiff
more stuff about coercions
authorEnrico Tassi <enrico.tassi@inria.fr>
Thu, 26 Jul 2007 10:41:15 +0000 (10:41 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Thu, 26 Jul 2007 10:41:15 +0000 (10:41 +0000)
matita/tests/coercions_dupelim.ma [new file with mode: 0644]
matita/tests/coercions_nonuniform.ma [new file with mode: 0644]

diff --git a/matita/tests/coercions_dupelim.ma b/matita/tests/coercions_dupelim.ma
new file mode 100644 (file)
index 0000000..bfe2b34
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+set "baseuri" "cic:/matita/test/".
+
+include "nat/nat.ma".
+
+axiom A : Type.
+
+inductive vec : nat -> Type := 
+ | vnil : vec O
+ | vcons : ∀x:A.∀n:nat. vec n -> vec (S n).
+
+definition f := λx,n.λv:vec n.vcons x n v.
+definition g := λn,x.λv:vec n.vcons x n v.
+
+include "logic/equality.ma".
+
+(* definition xx :=  f = g. *)
+theorem xx1 : ∀n.∀x1:vec n.f ? ? x1 = g ? ? x1.
diff --git a/matita/tests/coercions_nonuniform.ma b/matita/tests/coercions_nonuniform.ma
new file mode 100644 (file)
index 0000000..bed1d73
--- /dev/null
@@ -0,0 +1,49 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+set "baseuri" "cic:/matita/test/".
+
+axiom A : Type.
+axiom B : A -> Type.
+axiom f : A -> A.
+axiom f1 : A -> A.
+
+axiom c : ∀a:A.B (f a).
+
+coercion cic:/matita/test/c.con.
+
+axiom C : Type.
+
+(* axiom c1 : ∀a:A. B (f a) -> C. *) (* COQ NO: non uniform *)
+(* axiom c1 : ∀a:A. B (f1 a) -> C. *) (* non si compongono, ma almeno ho le 2 non composte le ho e le posso usare *)
+(* axiom c1 : ∀f.∀a:A.B (f a) -> C. *) (* COQ NO: non uniform *)
+
+(* COQ NO: non uniform *)
+axiom c2 : ∀a.B (f a) -> B (f1 a).
+axiom c1 : ∀a:A. B (f1 a) -> C.
+
+coercion cic:/matita/test/c1.con.
+coercion cic:/matita/test/c2.con.
+
+axiom g : C -> C.
+
+definition test := λa:A.g a.
+
+(*
+Coq < Coercion c1 : B >-> C.                
+User error: c1 does not respect the inheritance uniform condition
+*)
+
+
+