]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground_2/etc/ynat/ynat_max.etc
updated probe and matitadep
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / etc / ynat / ynat_max.etc
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "ground_2/ynat/ynat_plus.ma".
16
17 (* NATURAL NUMBERS WITH INFINITY ********************************************)
18
19 lemma ymax_pre_dx: ∀x,y. x ≤ y → x - y + y = y.
20 #x #y * -x -y //
21 #x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy //
22 qed-.
23
24 lemma ymax_pre_sn: ∀x,y. y ≤ x → x - y + y = x.
25 #x #y * -x -y
26 [ #x #y #Hxy >yminus_inj /3 width=3 by plus_minus, eq_f/
27 | * //
28 ]
29 qed-.
30
31 lemma ymax_pre_i_dx: ∀y,x. y ≤ x - y + y.
32 // qed.
33
34 lemma ymax_pre_i_sn: ∀y,x. x ≤ x - y + y.
35 * // #y * /2 width=1 by yle_inj/
36 qed.
37
38 lemma ymax_pre_e: ∀x,z. x ≤ z → ∀y. y ≤ z → x - y + y ≤ z.
39 #x #z #Hxz #y #Hyz elim (yle_split x y)
40 [ #Hxy >(ymax_pre_dx … Hxy) -x //
41 | #Hyx >(ymax_pre_sn … Hyx) -y //
42 ]
43 qed.
44
45 lemma ymax_pre_dx_comm: ∀x,y. x ≤ y → y + (x - y) = y.
46 /2 width=1 by ymax_pre_dx/ qed-.
47
48 lemma ymax_pre_sn_comm: ∀x,y. y ≤ x → y + (x - y) = x.
49 /2 width=1 by ymax_pre_sn/ qed-.
50
51 lemma ymax_pre_i_dx_comm: ∀y,x. y ≤ y + (x - y).
52 // qed.
53
54 lemma ymax_pre_i_sn_comm: ∀y,x. x ≤ y + (x - y).
55 /2 width=1 by ymax_pre_i_sn/ qed.
56
57 lemma ymax_pre_e_comm: ∀x,z. x ≤ z → ∀y. y ≤ z → y + (x - y) ≤ z.
58 /2 width=1 by ymax_pre_e/ qed.