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/nat/orders_op".
17 include "higher_order_defs/functions.ma".
18 include "nat/times.ma".
19 include "nat/orders.ma".
22 theorem monotonic_le_plus_r:
23 \forall n:nat.monotonic nat le (\lambda m.n+m).
24 simplify.intros.elim n.
26 simplify.apply le_S_S.assumption.
29 theorem le_plus_r: \forall p,n,m:nat. n \leq m \to p+n \leq p+m
30 \def monotonic_le_plus_r.
32 theorem monotonic_le_plus_l:
33 \forall m:nat.monotonic nat le (\lambda n.n+m).
35 rewrite < sym_plus.rewrite < sym_plus m.
36 apply le_plus_r.assumption.
39 theorem le_plus_l: \forall p,n,m:nat. n \leq m \to n+p \leq m+p
40 \def monotonic_le_plus_l.
42 theorem le_plus: \forall n1,n2,m1,m2:nat. n1 \leq n2 \to m1 \leq m2
45 apply trans_le ? (n2+m1).
46 apply le_plus_l.assumption.
47 apply le_plus_r.assumption.
50 theorem le_plus_n :\forall n,m:nat. m \leq n+m.
51 intros.change with O+m \leq n+m.
52 apply le_plus_l.apply le_O_n.
55 theorem eq_plus_to_le: \forall n,m,p:nat.n=m+p \to m \leq n.
62 theorem monotonic_le_times_r:
63 \forall n:nat.monotonic nat le (\lambda m.n*m).
64 simplify.intros.elim n.
65 simplify.apply le_O_n.
66 simplify.apply le_plus.
71 theorem le_times_r: \forall p,n,m:nat. n \leq m \to p*n \leq p*m
72 \def monotonic_le_times_r.
74 theorem monotonic_le_times_l:
75 \forall m:nat.monotonic nat le (\lambda n.n*m).
77 rewrite < sym_times.rewrite < sym_times m.
78 apply le_times_r.assumption.
81 theorem le_times_l: \forall p,n,m:nat. n \leq m \to n*p \leq m*p
82 \def monotonic_le_times_l.
84 theorem le_times: \forall n1,n2,m1,m2:nat. n1 \leq n2 \to m1 \leq m2
87 apply trans_le ? (n2*m1).
88 apply le_times_l.assumption.
89 apply le_times_r.assumption.
92 theorem le_times_n: \forall n,m:nat.S O \leq n \to m \leq n*m.
93 intros.elim H.simplify.
94 elim (plus_n_O ?).apply le_n.
95 simplify.rewrite < sym_plus.apply le_plus_n.