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_lt.ma".
17 (* NATURAL NUMBERS WITH INFINITY ********************************************)
20 definition yminus: ynat → ynat → ynat ≝ λx,y. match y with
25 interpretation "ynat minus" 'minus x y = (yminus x y).
27 (* Basic properties *********************************************************)
29 lemma yminus_inj: ∀n,m. yinj m - yinj n = yinj (m - n).
30 #n elim n -n /2 width=3 by trans_eq/
33 lemma yminus_Y_inj: ∀n. ∞ - yinj n = ∞.
34 #n elim n -n // normalize
38 (* Properties on predecessor ************************************************)
40 lemma yminus_SO2: ∀m. m - 1 = ⫰m.
44 (* Properties on successor **************************************************)
46 lemma yminus_succ: ∀n,m. ⫯m - ⫯n = m - n.
47 * // #n * [2: >yminus_Y_inj // ]
51 (* Properties on order ******************************************************)
53 lemma yle_minus_sn: ∀n,m. m - n ≤ m.
54 * // #n * /2 width=1 by yle_inj/
57 lemma yle_to_minus: ∀m:ynat. ∀n:ynat. m ≤ n → m - n = 0.
58 #m #n * -m -n /3 width=3 by eq_minus_O, eq_f/
61 lemma yminus_to_le: ∀n:ynat. ∀m:ynat. m - n = 0 → m ≤ n.
63 [ #m >yminus_inj #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
64 /2 width=1 by yle_inj/
65 | >yminus_Y_inj #H destruct