X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2FZ%2Fplus.ma;fp=helm%2Fsoftware%2Fmatita%2Flibrary%2FZ%2Fplus.ma;h=cd565124589d1e20dbac077a384e1aac6fa06125;hb=f262223fb7b49a191b25d27ecc58818b9d7a357d;hp=2b439b92e273c83d0e9175bd402d32d0fb363b64;hpb=0ca6c1688d9000997977e6b1bad9a8c997c81d08;p=helm.git diff --git a/helm/software/matita/library/Z/plus.ma b/helm/software/matita/library/Z/plus.ma index 2b439b92e..cd5651245 100644 --- a/helm/software/matita/library/Z/plus.ma +++ b/helm/software/matita/library/Z/plus.ma @@ -261,6 +261,10 @@ definition Zopp : Z \to Z \def (*CSC: the URI must disappear: there is a bug now *) interpretation "integer unary minus" 'uminus x = (cic:/matita/Z/plus/Zopp.con x). +theorem eq_OZ_Zopp_OZ : OZ = (- OZ). +reflexivity. +qed. + theorem Zopp_Zplus: \forall x,y:Z. -(x+y) = -x + -y. intros. elim x.elim y. @@ -299,6 +303,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 < (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).