X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Ftests%2Fcoercions.ma;h=ae69759bf4c083fe6ccaf5c4acb2325631d5e69d;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=21bf994ce1d73e8bfab6db82571251081d99ae68;hpb=7c4e75d43137f6bc529d1c42a298a72a3548a912;p=helm.git diff --git a/helm/matita/tests/coercions.ma b/helm/matita/tests/coercions.ma index 21bf994ce..ae69759bf 100644 --- a/helm/matita/tests/coercions.ma +++ b/helm/matita/tests/coercions.ma @@ -1,3 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "coq.ma". + inductive pos: Set \def | one : pos | next : pos \to pos. @@ -12,33 +29,19 @@ inductive int: Set \def inductive empty : Set \def . -let rec pos2nat (x:pos) : nat \def +let rec pos2nat x \def match x with [ one \Rightarrow (S O) | (next z) \Rightarrow S (pos2nat z)]. -let rec nat2int (x:nat) :int \def - match x with - [ O \Rightarrow positive O - | (S z) \Rightarrow positive (S z)]. +definition nat2int \def \lambda x. positive x. coercion pos2nat. coercion nat2int. -let rec plus (x,y:int) on x : int \def - match x with - [ (positive n) \Rightarrow x - | (negative z) \Rightarrow y]. - -theorem a: plus O one. - - - - - - - - - +definition fst \def \lambda x,y:int.x. +theorem a: fst O one = fst (positive O) (next one). +reflexivity. +qed.