X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2FZ%2Fz.ma;h=ac530c38fe02b7df1766fd69ff93a637162131b0;hb=7a116453d799657958e32693be28d18a5aab84fc;hp=9532ea95deb4d3ffb2a7c66b1665f58aa7a6c462;hpb=68a2f8d0a8c34cb7ea0438c7db9222a853a38826;p=helm.git diff --git a/helm/software/matita/library/Z/z.ma b/helm/software/matita/library/Z/z.ma index 9532ea95d..ac530c38f 100644 --- a/helm/software/matita/library/Z/z.ma +++ b/helm/software/matita/library/Z/z.ma @@ -34,6 +34,11 @@ definition neg_Z_of_nat \def [ O \Rightarrow OZ | (S n)\Rightarrow neg n]. +lemma pos_n_eq_S_n : \forall n : nat. + (pos n) = (S n). +intro.reflexivity. +qed. + definition abs \def \lambda z. match z with @@ -55,9 +60,9 @@ match OZ_test z with intros.elim z. simplify.reflexivity. simplify. unfold Not. intros (H). -discriminate H. +destruct H. simplify. unfold Not. intros (H). -discriminate H. +destruct H. qed. (* discrimination *) @@ -85,17 +90,17 @@ variant inj_neg : \forall n,m:nat. neg n = neg m \to n = m theorem not_eq_OZ_pos: \forall n:nat. OZ \neq pos n. unfold Not.intros (n H). -discriminate H. +destruct H. qed. theorem not_eq_OZ_neg :\forall n:nat. OZ \neq neg n. unfold Not.intros (n H). -discriminate H. +destruct H. qed. theorem not_eq_pos_neg :\forall n,m:nat. pos n \neq neg m. unfold Not.intros (n m H). -discriminate H. +destruct H. qed. theorem decidable_eq_Z : \forall x,y:Z. decidable (x=y). @@ -117,7 +122,7 @@ elim x. (* goal: x=pos y=pos *) elim (decidable_eq_nat n n1:((n=n1) \lor ((n=n1) \to False))). left.apply eq_f.assumption. - right.unfold Not.intros (H_inj).apply H. injection H_inj. assumption. + right.unfold Not.intros (H_inj).apply H. destruct H_inj. reflexivity. (* goal: x=pos y=neg *) right.unfold Not.intro.apply (not_eq_pos_neg n n1). assumption. (* goal: x=neg *)