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 (**************************************************************************)
15 include "ground_2/ynat/ynat_plus.ma".
17 (* NATURAL NUMBERS WITH INFINITY ********************************************)
19 lemma ymax_pre_dx: ∀x,y. x ≤ y → x - y + y = y.
21 #x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy //
24 lemma ymax_pre_sn: ∀x,y. y ≤ x → x - y + y = x.
26 [ #x #y #Hxy >yminus_inj /3 width=3 by plus_minus, eq_f/
31 lemma ymax_pre_i_dx: ∀y,x. y ≤ x - y + y.
34 lemma ymax_pre_i_sn: ∀y,x. x ≤ x - y + y.
35 * // #y * /2 width=1 by yle_inj/
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 //
45 lemma ymax_pre_dx_comm: ∀x,y. x ≤ y → y + (x - y) = y.
46 /2 width=1 by ymax_pre_dx/ qed-.
48 lemma ymax_pre_sn_comm: ∀x,y. y ≤ x → y + (x - y) = x.
49 /2 width=1 by ymax_pre_sn/ qed-.
51 lemma ymax_pre_i_dx_comm: ∀y,x. y ≤ y + (x - y).
54 lemma ymax_pre_i_sn_comm: ∀y,x. x ≤ y + (x - y).
55 /2 width=1 by ymax_pre_i_sn/ qed.
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.