X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=helm%2Fsoftware%2Fmatita%2Flibrary%2FZ%2Fplus.ma;h=00da44a00335ba1725c676d36bdfd52cf4617459;hb=47070cf066ae366ac7f3e73594f1bc02b0efb7f4;hp=2b439b92e273c83d0e9175bd402d32d0fb363b64;hpb=68a2f8d0a8c34cb7ea0438c7db9222a853a38826;p=helm.git diff --git a/helm/software/matita/library/Z/plus.ma b/helm/software/matita/library/Z/plus.ma index 2b439b92e..00da44a00 100644 --- a/helm/software/matita/library/Z/plus.ma +++ b/helm/software/matita/library/Z/plus.ma @@ -12,8 +12,6 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/Z/plus". - include "Z/z.ma". include "nat/minus.ma". @@ -40,8 +38,7 @@ definition Zplus :Z \to Z \to Z \def | GT \Rightarrow (neg (pred (m-n)))] | (neg n) \Rightarrow (neg (pred ((S m)+(S n))))] ]. -(*CSC: the URI must disappear: there is a bug now *) -interpretation "integer plus" 'plus x y = (cic:/matita/Z/plus/Zplus.con x y). +interpretation "integer plus" 'plus x y = (Zplus x y). theorem Zplus_z_OZ: \forall z:Z. z+OZ = z. intro.elim z. @@ -258,8 +255,11 @@ definition Zopp : Z \to Z \def | (pos n) \Rightarrow (neg n) | (neg n) \Rightarrow (pos n) ]. -(*CSC: the URI must disappear: there is a bug now *) -interpretation "integer unary minus" 'uminus x = (cic:/matita/Z/plus/Zopp.con x). +interpretation "integer unary minus" 'uminus x = (Zopp x). + +theorem eq_OZ_Zopp_OZ : OZ = (- OZ). +reflexivity. +qed. theorem Zopp_Zplus: \forall x,y:Z. -(x+y) = -x + -y. intros. @@ -299,7 +299,26 @@ rewrite > nat_compare_n_n. simplify.apply refl_eq. qed. +theorem injective_Zplus_l: \forall x:Z.injective Z Z (\lambda y.y+x). +intro.simplify.intros (z y). +rewrite < Zplus_z_OZ. +rewrite < (Zplus_z_OZ y). +rewrite < (Zplus_Zopp x). +rewrite < assoc_Zplus. +rewrite < assoc_Zplus. +apply eq_f2 + [assumption|reflexivity] +qed. + +theorem injective_Zplus_r: \forall x:Z.injective Z Z (\lambda y.x+y). +intro.simplify.intros (z y). +apply (injective_Zplus_l x). +rewrite < sym_Zplus. +rewrite > H. +apply sym_Zplus. +qed. + (* minus *) definition Zminus : Z \to Z \to Z \def \lambda x,y:Z. x + (-y). -interpretation "integer minus" 'minus x y = (cic:/matita/Z/plus/Zminus.con x y). +interpretation "integer minus" 'minus x y = (Zminus x y).