]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground_2/etc/ynat/ynat_min.etc
updated probe and matitadep
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / etc / ynat / ynat_min.etc
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "ground_2/ynat/ynat_plus.ma".
16
17 (* NATURAL NUMBERS WITH INFINITY ********************************************)
18
19 fact ymin_pre_dx_aux: ∀x,y. y ≤ x → x - (x - y) ≤ y.
20 #x #y * -x -y
21 [ #x #y #Hxy >yminus_inj
22  /3 width=4 by yle_inj, monotonic_le_minus_l/
23 | * //
24 ]
25 qed-.
26
27 lemma ymin_pre_sn: ∀x,y. x ≤ y → x - (x - y) = x.
28 #x #y * -x -y //
29 #x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy //
30 qed-.
31
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) //
35 qed.
36
37 lemma ymin_pre_i_sn: ∀x,y. x - (x - y) ≤ x.
38 // qed.
39
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/
44 qed-.
45
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 //
51 ]
52 qed.