1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
17 include "NPlus/inv.ma".
19 (* Functional properties ****************************************************)
21 theorem nplus_total: \forall p,q. \exists r. p + q == r.
22 intros 2. elim q; clear q;
23 [ autobatch | decompose. autobatch ].
26 theorem nplus_mono: \forall p,q,r1. (p + q == r1) \to
27 \forall r2. (p + q == r2) \to r1 = r2.
28 intros 4. elim H; clear H q r1;
29 [ lapply linear nplus_inv_zero_2 to H1
30 | lapply linear nplus_inv_succ_2 to H3. decompose
31 ]; destruct; autobatch.
34 theorem nplus_inj_1: \forall p1, q, r. (p1 + q == r) \to
35 \forall p2. (p2 + q == r) \to p2 = p1.
36 intros 4. elim H; clear H q r;
37 [ lapply linear nplus_inv_zero_2 to H1
38 | lapply linear nplus_inv_succ_2_3 to H3