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/arith/nat_le_minus.ma".
16 include "ground/arith/ynat_lminus.ma".
17 include "ground/arith/ynat_le.ma".
19 (* ORDER FOR NON-NEGATIVE INTEGERS WITH INFINITY ****************************)
21 (* Constructions with ylminus ***********************************************)
24 lemma yle_lminus_sn_refl_sn (x) (n): x - n ≤ x.
25 #x @(ynat_split_nat_inf … x) -x //
26 #m #n /2 width=1 by yle_inj/
29 (*** monotonic_yle_minus_dx *)
30 lemma yle_lminus_bi_dx (o) (x) (y):
31 x ≤ y → x - o ≤ y - o.
33 /3 width=1 by nle_minus_bi_dx, yle_inj, yle_inf/
37 lemma yle_eq_zero_lminus (x) (n): 𝟎 = x - n → x ≤ yinj_nat n.
38 #x @(ynat_split_nat_inf … x) -x
39 [ #m #n <ylminus_inj_sn >yinj_nat_zero #H
40 /4 width=1 by nle_eq_zero_minus, yle_inj, eq_inv_yinj_nat_bi/
41 | #n <ylminus_inf_sn #H destruct
45 (* Inversions with ylminus **************************************************)
48 lemma yle_inv_eq_zero_lminus (x) (n):
49 x ≤ yinj_nat n → 𝟎 = x - n.
50 #x @(ynat_split_nat_inf … x) -x
51 [ #m #n #H <ylminus_inj_sn
52 <nle_inv_eq_zero_minus /2 width=1 by yle_inv_inj_bi/
54 lapply (yle_inv_inf_sn … H) -H #H
55 elim (eq_inv_inf_yinj_nat … H)