1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| A.Asperti, C.Sacerdoti Coen, *)
8 (* ||A|| E.Tassi, S.Zacchiroli *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
20 | (S p) \Rightarrow S (plus p m) ].
22 (*CSC: the URI must disappear: there is a bug now *)
23 interpretation "natural plus" 'plus x y = (cic:/matita/nat/plus/plus.con x y).
25 theorem plus_n_O: \forall n:nat. n = n+O.
28 simplify.apply eq_f.assumption.
31 theorem plus_n_Sm : \forall n,m:nat. S (n+m) = n+(S m).
34 simplify.apply eq_f.assumption.
37 theorem plus_n_SO : \forall n:nat. S n = n+(S O).
38 intro.rewrite > plus_n_O.
42 theorem sym_plus: \forall n,m:nat. n+m = m+n.
44 simplify.apply plus_n_O.
45 simplify.rewrite > H.apply plus_n_Sm.
48 theorem associative_plus : associative nat plus.
49 unfold associative.intros.elim x.
51 simplify.apply eq_f.assumption.
54 theorem assoc_plus : \forall n,m,p:nat. (n+m)+p = n+(m+p)
55 \def associative_plus.
57 theorem injective_plus_r: \forall n:nat.injective nat nat (\lambda m.n+m).
58 intro.simplify.intros 2.elim n.
60 apply H.apply inj_S.apply H1.
63 theorem inj_plus_r: \forall p,n,m:nat. p+n = p+m \to n=m
64 \def injective_plus_r.
66 theorem injective_plus_l: \forall m:nat.injective nat nat (\lambda n.n+m).
67 intro.simplify.intros.
68 apply (injective_plus_r m).
70 rewrite < (sym_plus y).
74 theorem inj_plus_l: \forall p,n,m:nat. n+p = m+p \to n=m
75 \def injective_plus_l.