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 fact ymin_pre_dx_aux: ∀x,y. y ≤ x → x - (x - y) ≤ y.
21 [ #x #y #Hxy >yminus_inj
22 /3 width=4 by yle_inj, monotonic_le_minus_l/
27 lemma ymin_pre_sn: ∀x,y. x ≤ y → x - (x - y) = x.
29 #x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy //
32 lemma ymin_pre_i_dx: ∀x,y. x - (x - y) ≤ y.
33 #x #y elim (yle_split x y) /2 width=1 by ymin_pre_dx_aux/
34 #Hxy >(ymin_pre_sn … Hxy) //
37 lemma ymin_pre_i_sn: ∀x,y. x - (x - y) ≤ x.
40 lemma ymin_pre_dx: ∀x,y. y ≤ yinj x → yinj x - (yinj x - y) = y.
41 #x #y #H elim (yle_inv_inj2 … H) -H
42 #z #Hzx #H destruct >yminus_inj
43 /3 width=4 by minus_le_minus_minus_comm, eq_f/
46 lemma ymin_pre_e: ∀z,x. z ≤ yinj x → ∀y. z ≤ y →
47 z ≤ yinj x - (yinj x - y).
48 #z #x #Hzx #y #Hzy elim (yle_split x y)
49 [ #H >(ymin_pre_sn … H) -y //
50 | #H >(ymin_pre_dx … H) -x //