X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcontribs%2FRELATIONAL%2FNPlus%2Fmonoid.ma;h=368396a778e5afa5cf55634560b56ffdc80a7266;hb=77405663b295e36da4e322c6f8184a1d256f8b78;hp=a7d56eeb3e2f1e4ddf9bdd1672747bc6641eb0de;hpb=b0b69bb764af48d7f022477398f0beff5fb3f3f3;p=helm.git diff --git a/matita/contribs/RELATIONAL/NPlus/monoid.ma b/matita/contribs/RELATIONAL/NPlus/monoid.ma index a7d56eeb3..368396a77 100644 --- a/matita/contribs/RELATIONAL/NPlus/monoid.ma +++ b/matita/contribs/RELATIONAL/NPlus/monoid.ma @@ -22,7 +22,7 @@ theorem nplus_zero_1: \forall q. zero + q == q. intros. elim q; clear q; auto. qed. -theorem nplus_succ_1: \forall p,q,r. NPlus p q r \to +theorem nplus_succ_1: \forall p,q,r. (p + q == r) \to (succ p) + q == (succ r). intros. elim H; clear H q r; auto. qed. @@ -39,6 +39,19 @@ theorem nplus_comm_rew: \forall p,q,r. (p + q == r) \to q + p == r. intros. elim H; clear H q r; auto. qed. +theorem nplus_ass: \forall p1, p2, r1. (p1 + p2 == r1) \to + \forall p3, s1. (r1 + p3 == s1) \to + \forall r3. (p2 + p3 == r3) \to + \forall s3. (p1 + r3 == s3) \to s1 = s3. + intros 4. elim H; clear H p2 r1; + [ lapply linear nplus_inv_zero_1 to H2. subst. + lapply nplus_mono to H1, H3. subst. auto + | lapply linear nplus_inv_succ_1 to H3. decompose. subst. + lapply linear nplus_inv_succ_1 to H4. decompose. subst. + lapply linear nplus_inv_succ_2 to H5. decompose. subst. auto + ]. +qed. + (* Corollaries of functional properties **************************************) theorem nplus_inj_2: \forall p, q1, r. (p + q1 == r) \to