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/library_autobatch/nat/plus".
17 include "auto/nat/nat.ma".
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/library_autobatch/nat/plus/plus.con x y).
27 theorem plus_n_O: \forall n:nat. n = n+O.
39 theorem plus_n_Sm : \forall n,m:nat. S (n+m) = n+(S m).
51 theorem sym_plus: \forall n,m:nat. n+m = m+n.
62 theorem associative_plus : associative nat plus.
63 unfold associative.intros.elim x
74 theorem assoc_plus : \forall n,m,p:nat. (n+m)+p = n+(m+p)
75 \def associative_plus.
77 theorem injective_plus_r: \forall n:nat.injective nat nat (\lambda m.n+m).
78 intro.simplify.intros 2.elim n
81 (*apply H.apply inj_S.apply H1.*)
85 theorem inj_plus_r: \forall p,n,m:nat. p+n = p+m \to n=m
86 \def injective_plus_r.
88 theorem injective_plus_l: \forall m:nat.injective nat nat (\lambda n.n+m).
89 intro.simplify.intros.autobatch.
90 (*apply (injective_plus_r m).
92 rewrite < (sym_plus y).
96 theorem inj_plus_l: \forall p,n,m:nat. n+p = m+p \to n=m
97 \def injective_plus_l.