X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2FZ%2Ftimes.ma;h=eefe4af7ead7d2f818216c44c6c9174fe298ccad;hb=647b419e96770d90a82d7a9e5e8843566a9f93ee;hp=e5e1cdb452fa38ce33a8ba73f95b6ca4a5d5f27d;hpb=55b82bd235d82ff7f0a40d980effe1efde1f5073;p=helm.git diff --git a/helm/software/matita/library/Z/times.ma b/helm/software/matita/library/Z/times.ma index e5e1cdb45..eefe4af7e 100644 --- a/helm/software/matita/library/Z/times.ma +++ b/helm/software/matita/library/Z/times.ma @@ -12,8 +12,6 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/Z/times". - include "nat/lt_arith.ma". include "Z/plus.ma". @@ -32,8 +30,7 @@ definition Ztimes :Z \to Z \to Z \def | (pos n) \Rightarrow (neg (pred ((S m) * (S n)))) | (neg n) \Rightarrow (pos (pred ((S m) * (S n))))]]. -(*CSC: the URI must disappear: there is a bug now *) -interpretation "integer times" 'times x y = (cic:/matita/Z/times/Ztimes.con x y). +interpretation "integer times" 'times x y = (Ztimes x y). theorem Ztimes_z_OZ: \forall z:Z. z*OZ = OZ. intro.elim z. @@ -42,6 +39,8 @@ simplify.reflexivity. simplify.reflexivity. qed. +definition Zone \def pos O. + theorem Ztimes_neg_Zopp: \forall n:nat.\forall x:Z. neg n * x = - (pos n * x). intros.elim x. @@ -49,6 +48,7 @@ simplify.reflexivity. simplify.reflexivity. simplify.reflexivity. qed. + theorem symmetric_Ztimes : symmetric Z Ztimes. change with (\forall x,y:Z. x*y = y*x). intros.elim x.rewrite > Ztimes_z_OZ.reflexivity. @@ -67,8 +67,23 @@ qed. variant sym_Ztimes : \forall x,y:Z. x*y = y*x \def symmetric_Ztimes. +theorem Ztimes_Zone_l: \forall z:Z. Ztimes Zone z = z. +intro.unfold Zone.simplify. +elim z;simplify + [reflexivity + |rewrite < plus_n_O.reflexivity + |rewrite < plus_n_O.reflexivity + ] +qed. + +theorem Ztimes_Zone_r: \forall z:Z. Ztimes z Zone = z. +intro. +rewrite < sym_Ztimes. +apply Ztimes_Zone_l. +qed. + theorem associative_Ztimes: associative Z Ztimes. -change with (\forall x,y,z:Z. (x*y)*z = x*(y*z)). +unfold associative. intros.elim x. simplify.reflexivity. elim y.