X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Fcontribs%2FRELATIONAL%2FNPlus%2Ffun.ma;fp=matita%2Fcontribs%2FRELATIONAL%2FNPlus%2Ffun.ma;h=271a7c6e475949614872175a546473b7fefbcebd;hb=f61af501fb4608cc4fb062a0864c774e677f0d76;hp=0000000000000000000000000000000000000000;hpb=58ae1809c352e71e7b5530dc41e2bfc834e1aef1;p=helm.git diff --git a/matita/contribs/RELATIONAL/NPlus/fun.ma b/matita/contribs/RELATIONAL/NPlus/fun.ma new file mode 100644 index 000000000..271a7c6e4 --- /dev/null +++ b/matita/contribs/RELATIONAL/NPlus/fun.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + + + +include "NPlus/inv.ma". + +(* Functional properties ****************************************************) + +theorem nplus_total: \forall p,q. \exists r. p + q == r. + intros 2. elim q; clear q; + [ autobatch | decompose. autobatch ]. +qed. + +theorem nplus_mono: \forall p,q,r1. (p + q == r1) \to + \forall r2. (p + q == r2) \to r1 = r2. + intros 4. elim H; clear H q r1; + [ lapply linear nplus_inv_zero_2 to H1 + | lapply linear nplus_inv_succ_2 to H3. decompose + ]; destruct; autobatch. +qed. + +theorem nplus_inj_1: \forall p1, q, r. (p1 + q == r) \to + \forall p2. (p2 + q == r) \to p2 = p1. + intros 4. elim H; clear H q r; + [ lapply linear nplus_inv_zero_2 to H1 + | lapply linear nplus_inv_succ_2_3 to H3 + ]; autobatch. +qed.