match nat_compare m n with
[ LT \Rightarrow (neg (pred (n-m)))
| EQ \Rightarrow OZ
- | GT \Rightarrow (pos (pred (m-n)))]]
+ | GT \Rightarrow (pos (pred (m-n)))] ]
| (neg m) \Rightarrow
match y with
[ OZ \Rightarrow x
[ LT \Rightarrow (pos (pred (n-m)))
| EQ \Rightarrow OZ
| GT \Rightarrow (neg (pred (m-n)))]
- | (neg n) \Rightarrow (neg (pred ((S m)+(S 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).
qed.
theorem Zplus_Zsucc_neg_neg :
-\forall n,m. (Zsucc (neg n))+(neg m) = Zsucc ((neg n)+(neg m)).
+\forall n,m. Zsucc (neg n) + neg m = Zsucc (neg n + neg m).
intros.
apply nat_elim2
-(\lambda n,m. ((Zsucc (neg n))+(neg m)) = Zsucc ((neg n)+(neg m))).intro.
+(\lambda n,m. Zsucc (neg n) + neg m = Zsucc (neg n + neg m)).intro.
intros.elim n1.
simplify. reflexivity.
elim n2.simplify. reflexivity.
\forall n,m. Zsucc (neg n)+(pos m) = Zsucc ((neg n)+(pos m)).
intros.
apply nat_elim2
-(\lambda n,m. (Zsucc (neg n))+(pos m) = Zsucc ((neg n)+(pos m))).
+(\lambda n,m. Zsucc (neg n) + (pos m) = Zsucc (neg n + pos m)).
intros.elim n1.
simplify. reflexivity.
elim n2.simplify. reflexivity.