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/ynat_succ.ma".
16 include "ground/arith/ynat_le_pred.ma".
18 (* ORDER FOR NON-NEGATIVE INTEGERS WITH INFINITY ****************************)
20 (* Constructions with ypred and ysucc ***************************************)
22 (*** yle_refl_SP_dx *)
23 lemma yle_succ_pred_dx_refl (x): x ≤ ↑↓x.
24 #x @(ynat_split_nat_inf … x) -x
25 /2 width=1 by yle_inj/
29 lemma yle_pred_sn (x) (y): x ≤ ↑y → ↓x ≤ y.
30 #x #y0 @(insert_eq_1 … (↑y0))
33 elim (eq_inv_ysucc_inj … H) -H #n #H1 #H2 destruct
34 /3 width=1 by yle_inj, nle_pred_sn/
35 | #x0 #H <(eq_inv_ysucc_inf … H) -y0 //
39 (* Inversions with ypred and ysucc ******************************************)
42 lemma yle_inv_pred_sn (x) (y): ↓x ≤ y → x ≤ ↑y.
43 #x0 #y @(insert_eq_1 … (↓x0))
44 #x * -x -y // #m0 #n #Hmn #H
45 elim (eq_inv_ypred_inj … H) -H #m #H1 #H2 destruct
46 /3 width=1 by yle_inj, nle_inv_pred_sn/
50 lemma yle_inv_succ_sn (x) (y):
51 ↑x ≤ y → ∧∧ x ≤ ↓y & y = ↑↓y.
52 #x0 #y @(insert_eq_1 … (↑x0))
55 elim (eq_inv_ysucc_inj … H) -H #m #H1 #H2 destruct
56 elim (nle_inv_succ_sn … Hmn) -Hmn #Hmn #Hn
57 /3 width=1 by yle_inj, conj/
58 | /2 width=1 by yle_inf, conj/