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 (**************************************************************************)
15 set "baseuri" "cic:/matita/nat/plus".
22 | (S p) \Rightarrow S (plus p m) ].
24 (*CSC: the URI must disappear: there is a bug now *)
25 interpretation "natural plus" 'plus x y = (cic:/matita/nat/plus/plus.con x y).
27 theorem plus_n_O: \forall n:nat. n = n+O.
30 simplify.apply eq_f.assumption.
33 theorem plus_n_Sm : \forall n,m:nat. S (n+m) = n+(S m).
36 simplify.apply eq_f.assumption.
39 theorem sym_plus: \forall n,m:nat. n+m = m+n.
41 simplify.apply plus_n_O.
42 simplify.rewrite > H.apply plus_n_Sm.
45 theorem associative_plus : associative nat plus.
46 unfold associative.intros.elim x.
48 simplify.apply eq_f.assumption.
51 theorem assoc_plus : \forall n,m,p:nat. (n+m)+p = n+(m+p)
52 \def associative_plus.
54 theorem injective_plus_r: \forall n:nat.injective nat nat (\lambda m.n+m).
55 intro.simplify.intros 2.elim n.
57 apply H.apply inj_S.apply H1.
60 theorem inj_plus_r: \forall p,n,m:nat. p+n = p+m \to n=m
61 \def injective_plus_r.
63 theorem injective_plus_l: \forall m:nat.injective nat nat (\lambda n.n+m).
64 intro.simplify.intros.
65 apply (injective_plus_r m).
67 rewrite < (sym_plus y).
71 theorem inj_plus_l: \forall p,n,m:nat. n+p = m+p \to n=m
72 \def injective_plus_l.