]> matita.cs.unibo.it Git - helm.git/commitdiff
added another example in which our coercions are powerful
authorEnrico Tassi <enrico.tassi@inria.fr>
Wed, 25 Jul 2007 10:13:55 +0000 (10:13 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Wed, 25 Jul 2007 10:13:55 +0000 (10:13 +0000)
helm/software/matita/tests/coercions_open.ma [new file with mode: 0644]

diff --git a/helm/software/matita/tests/coercions_open.ma b/helm/software/matita/tests/coercions_open.ma
new file mode 100644 (file)
index 0000000..d0d8cae
--- /dev/null
@@ -0,0 +1,38 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "logic/equality.ma".
+include "nat/nat.ma".
+
+axiom A : nat -> Type.
+axiom B : nat -> Type.
+axiom AB : \forall x. A  x = B x.
+
+axiom eatA : ∀n. A n -> A O.
+axiom eatB : ∀n. B n -> A O.
+
+axiom jmcBA : ∀n,m.∀p:A n = B m.B m -> A n. 
+axiom jmcAB : ∀n,m.∀p:A n = B m.A n -> B m.
+
+coercion cic:/matita/test/jmcAB.con.
+coercion cic:/matita/test/jmcBA.con.
+
+axiom daemon : ∀x,y:A O.x = y.
+
+alias num (instance 0) = "natural number".
+lemma xx : ∀b:B 2.∀a:A 1.eatA ? b = eatB ? a.
+intros; [3,5,7,9: apply AB|1: apply daemon];skip.
+qed.
\ No newline at end of file