X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Ftests%2Fcoercions.ma;h=20b15cd2650d8a7f7840d68696da39423af2248c;hb=b1527286e32c8651d65619af61e3f638b3b89f8d;hp=507147cef8b1802a925746acdec4b097a5bf07ca;hpb=d9394782ed9580f3565eb9b4682d8348aae6349e;p=helm.git diff --git a/helm/matita/tests/coercions.ma b/helm/matita/tests/coercions.ma index 507147cef..20b15cd26 100644 --- a/helm/matita/tests/coercions.ma +++ b/helm/matita/tests/coercions.ma @@ -1,4 +1,19 @@ -set "baseuri" "cic:/matita/tests/". +(**************************************************************************) +(* ___ *) +(* ||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/tests/coercions/". +include "legacy/coq.ma". inductive pos: Set \def | one : pos @@ -21,13 +36,29 @@ let rec pos2nat x \def definition nat2int \def \lambda x. positive x. -coercion pos2nat. +coercion cic:/matita/tests/coercions/pos2nat.con. -coercion nat2int. +coercion cic:/matita/tests/coercions/nat2int.con. definition fst \def \lambda x,y:int.x. -alias symbol "eq" (instance 0) = "leibnitz's equality". theorem a: fst O one = fst (positive O) (next one). reflexivity. qed. + +definition double: + \forall f:int \to int. pos \to int +\def + \lambda f:int \to int. \lambda x : pos .f (nat2int x). + +definition double1: + \forall f:int \to int. pos \to int +\def + \lambda f:int \to int. \lambda x : pos .f (pos2nat x). + +definition double2: + \forall f:int \to int. pos \to int +\def + \lambda f:int \to int. \lambda x : pos .f (nat2int (pos2nat x)). + +