X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Flibrary%2Fnat%2Fplus.ma;h=1c145dd6141cea519fd99f7c681a179159a72346;hb=33a02e0b639217093eb63f30169aaa6ac8c78907;hp=1a43e216f7f1a86f2c80713f39db3f13f7ab637f;hpb=244d65f63ca6a736b871f9f91328fe8c5524ff05;p=helm.git diff --git a/helm/matita/library/nat/plus.ma b/helm/matita/library/nat/plus.ma index 1a43e216f..1c145dd61 100644 --- a/helm/matita/library/nat/plus.ma +++ b/helm/matita/library/nat/plus.ma @@ -12,9 +12,8 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/nat/plus.ma". +set "baseuri" "cic:/matita/nat/plus". -include "logic/equality.ma". include "nat/nat.ma". let rec plus n m \def @@ -22,13 +21,16 @@ let rec plus n m \def [ O \Rightarrow m | (S p) \Rightarrow S (plus p m) ]. -theorem plus_n_O: \forall n:nat. eq nat n (plus n O). +(*CSC: the URI must disappear: there is a bug now *) +interpretation "natural plus" 'plus x y = (cic:/matita/nat/plus/plus.con x y). + +theorem plus_n_O: \forall n:nat. n = n+O. intros.elim n. simplify.reflexivity. simplify.apply eq_f.assumption. qed. -theorem plus_n_Sm : \forall n,m:nat. eq nat (S (plus n m)) (plus n (S m)). +theorem plus_n_Sm : \forall n,m:nat. S (n+m) = n+(S m). intros.elim n. simplify.reflexivity. simplify.apply eq_f.assumption. @@ -39,7 +41,7 @@ and functions/symmetric; functions symmetric is not in functions.moo why? theorem symmetric_plus: symmetric nat plus. *) -theorem sym_plus: \forall n,m:nat. eq nat (plus n m) (plus m n). +theorem sym_plus: \forall n,m:nat. n+m = m+n. intros.elim n. simplify.apply plus_n_O. simplify.rewrite > H.apply plus_n_Sm. @@ -51,19 +53,19 @@ simplify.reflexivity. simplify.apply eq_f.assumption. qed. -theorem assoc_plus : \forall n,m,p:nat. eq nat (plus (plus n m) p) (plus n (plus m p)) +theorem assoc_plus : \forall n,m,p:nat. (n+m)+p = n+(m+p) \def associative_plus. -theorem injective_plus_r: \forall n:nat.injective nat nat (\lambda m.plus n m). +theorem injective_plus_r: \forall n:nat.injective nat nat (\lambda m.n+m). intro.simplify.intros 2.elim n. exact H. apply H.apply inj_S.apply H1. qed. -theorem inj_plus_r: \forall p,n,m:nat.eq nat (plus p n) (plus p m) \to (eq nat n m) +theorem inj_plus_r: \forall p,n,m:nat. p+n = p+m \to n=m \def injective_plus_r. -theorem injective_plus_l: \forall m:nat.injective nat nat (\lambda n.plus n m). +theorem injective_plus_l: \forall m:nat.injective nat nat (\lambda n.n+m). intro.simplify.intros. (* qui vorrei applicare injective_plus_r *) apply inj_plus_r m. @@ -72,5 +74,5 @@ rewrite < sym_plus y. assumption. qed. -theorem inj_plus_l: \forall p,n,m:nat.eq nat (plus n p) (plus m p) \to (eq nat n m) -\def injective_plus_l. \ No newline at end of file +theorem inj_plus_l: \forall p,n,m:nat. n+p = m+p \to n=m +\def injective_plus_l.