X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fmatita%2Ftests%2Fcoercions.ma;h=337ef50edc1fc2a63bb1600e0ca6f0f32dc005f8;hb=8aaf525856e25bcd8f355e505fd00f45c62bc18f;hp=3d1279133e7c956d82f4051e67fa63a23aab8e70;hpb=c8aa73f573026ca9e1736f058bf77561f028c10a;p=helm.git diff --git a/helm/matita/tests/coercions.ma b/helm/matita/tests/coercions.ma index 3d1279133..337ef50ed 100644 --- a/helm/matita/tests/coercions.ma +++ b/helm/matita/tests/coercions.ma @@ -12,33 +12,20 @@ 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 \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. +alias symbol "eq" (instance 0) = "leibnitz's equality". +theorem a: fst O one = fst (positive O) (next one). +reflexivity. +qed.