[ 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
(* 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. destruct 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 *)